diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2014-04-09 03:20:52 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2014-04-09 03:36:38 +0200 |
commit | ed962414bd66027ce67ded912c17e08970163f52 (patch) | |
tree | 27a07264d5e7d5194c9a2df07882b8cdb75790a3 /libswscale/output.c | |
parent | 0a1cc04e6c09295cf06a1ca96d9a5a6e8bd85acb (diff) | |
parent | 92b099daf4b8ef93513e38b43899cb8458a2fde3 (diff) | |
download | ffmpeg-ed962414bd66027ce67ded912c17e08970163f52.tar.gz |
Merge commit '92b099daf4b8ef93513e38b43899cb8458a2fde3'
* commit '92b099daf4b8ef93513e38b43899cb8458a2fde3':
swscale: support converting YVYU422 pixel format
Conflicts:
libswscale/input.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libswscale/output.c')
-rw-r--r-- | libswscale/output.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/libswscale/output.c b/libswscale/output.c index 4083c73116..eee6b4874b 100644 --- a/libswscale/output.c +++ b/libswscale/output.c @@ -526,7 +526,12 @@ YUV2PACKEDWRAPPER(yuv2mono,, black, AV_PIX_FMT_MONOBLACK) dest[pos + 1] = U; \ dest[pos + 2] = Y2; \ dest[pos + 3] = V; \ - } else { \ + } else if (target == AV_PIX_FMT_YVYU422) { \ + dest[pos + 0] = Y1; \ + dest[pos + 1] = V; \ + dest[pos + 2] = Y2; \ + dest[pos + 3] = U; \ + } else { /* AV_PIX_FMT_UYVY422 */ \ dest[pos + 0] = U; \ dest[pos + 1] = Y1; \ dest[pos + 2] = V; \ @@ -661,6 +666,7 @@ yuv2422_1_c_template(SwsContext *c, const int16_t *buf0, #undef output_pixels YUV2PACKEDWRAPPER(yuv2, 422, yuyv422, AV_PIX_FMT_YUYV422) +YUV2PACKEDWRAPPER(yuv2, 422, yvyu422, AV_PIX_FMT_YVYU422) YUV2PACKEDWRAPPER(yuv2, 422, uyvy422, AV_PIX_FMT_UYVY422) #define R_B ((target == AV_PIX_FMT_RGB48LE || target == AV_PIX_FMT_RGB48BE || target == AV_PIX_FMT_RGBA64LE || target == AV_PIX_FMT_RGBA64BE) ? R : B) @@ -2205,6 +2211,11 @@ av_cold void ff_sws_init_output_funcs(SwsContext *c, *yuv2packed2 = yuv2yuyv422_2_c; *yuv2packedX = yuv2yuyv422_X_c; break; + case AV_PIX_FMT_YVYU422: + *yuv2packed1 = yuv2yvyu422_1_c; + *yuv2packed2 = yuv2yvyu422_2_c; + *yuv2packedX = yuv2yvyu422_X_c; + break; case AV_PIX_FMT_UYVY422: *yuv2packed1 = yuv2uyvy422_1_c; *yuv2packed2 = yuv2uyvy422_2_c; |