ffmpeg | branch: master | James Almer <jamr...@gmail.com> | Mon Nov 4 21:35:15 2024 -0300| [c8438546ff165acadf65bf66e5a43589898c4503] | committer: James Almer
avfilter/vsrc_testsrc: add support for RGB48/RGBA64 Signed-off-by: James Almer <jamr...@gmail.com> > http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=c8438546ff165acadf65bf66e5a43589898c4503 --- libavfilter/vsrc_testsrc.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/libavfilter/vsrc_testsrc.c b/libavfilter/vsrc_testsrc.c index 1342f63d25..e9a3a29c0d 100644 --- a/libavfilter/vsrc_testsrc.c +++ b/libavfilter/vsrc_testsrc.c @@ -1000,6 +1000,7 @@ static void rgbtest_put_pixel(uint8_t *dstp[4], int dst_linesizep[4], uint8_t *dst = dstp[0]; ptrdiff_t dst_linesize = dst_linesizep[0]; uint32_t v; + uint64_t v16; uint8_t *p; uint16_t *p16; @@ -1016,6 +1017,23 @@ static void rgbtest_put_pixel(uint8_t *dstp[4], int dst_linesizep[4], p = dst + 3*x + y*dst_linesize; AV_WL24(p, v); break; + case AV_PIX_FMT_RGB48: + case AV_PIX_FMT_BGR48: + v16 = ((uint64_t)r << (rgba_map[R]*16)) + ((uint64_t)g << (rgba_map[G]*16)) + ((uint64_t)b << (rgba_map[B]*16)); + p16 = (uint16_t *)(dst + 6*x + y*dst_linesize); + *p16++ = v16 >> 32; + *p16++ = v16 >> 16; + *p16++ = v16; + break; + case AV_PIX_FMT_RGBA64: + case AV_PIX_FMT_BGRA64: + v16 = ((uint64_t)r << (rgba_map[R]*16)) + ((uint64_t)g << (rgba_map[G]*16)) + ((uint64_t)b << (rgba_map[B]*16)); + p16 = (uint16_t *)(dst + 8*x + y*dst_linesize); + *p16++ = v16 >> 32; + *p16++ = v16 >> 16; + *p16++ = v16; + *p16++ = 0xffff; + break; case AV_PIX_FMT_RGBA: case AV_PIX_FMT_BGRA: case AV_PIX_FMT_ARGB: @@ -1114,6 +1132,8 @@ static const enum AVPixelFormat rgbtest_pix_fmts[] = { AV_PIX_FMT_RGB444, AV_PIX_FMT_BGR444, AV_PIX_FMT_RGB565, AV_PIX_FMT_BGR565, AV_PIX_FMT_RGB555, AV_PIX_FMT_BGR555, + AV_PIX_FMT_RGB48, AV_PIX_FMT_BGR48, + AV_PIX_FMT_RGBA64, AV_PIX_FMT_BGRA64, AV_PIX_FMT_GBRP, AV_PIX_FMT_GBRP9, AV_PIX_FMT_GBRP10, AV_PIX_FMT_GBRP12, AV_PIX_FMT_GBRP14, AV_PIX_FMT_GBRP16, AV_PIX_FMT_X2RGB10LE, AV_PIX_FMT_X2BGR10LE, _______________________________________________ ffmpeg-cvslog mailing list ffmpeg-cvslog@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-cvslog To unsubscribe, visit link above, or email ffmpeg-cvslog-requ...@ffmpeg.org with subject "unsubscribe".