diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2011-11-25 01:38:21 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-11-25 04:34:44 +0100 |
commit | 92afb431621c79155fcb7171d26f137eb1bee028 (patch) | |
tree | 2beb660ea9fafc1d2d304c0f7df610ebf54117e0 /libavcodec/h264.c | |
parent | 3880b4541ace2697f380ae1f43cb2299efeb2cc7 (diff) | |
parent | 7f1b427018ecff59e0e14031eecc79aac0d91ec8 (diff) | |
download | ffmpeg-92afb431621c79155fcb7171d26f137eb1bee028.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
snow: split snow in snowdec and snowenc
tiffenc: deprecate using compression_level
swscale: fix failing fate tests.
swscale: add support for planar RGB input.
h264: add support for decoding planar RGB images.
Clean up swscale pixfmt macros using av_pix_fmt_descriptors[].
pixfmt: add planar RGB formats.
Conflicts:
libavcodec/h264.c
libavcodec/snow.c
libavcodec/utils.c
libavutil/avutil.h
libavutil/pixdesc.c
libavutil/pixfmt.h
libswscale/swscale.c
libswscale/swscale_internal.h
libswscale/swscale_unscaled.c
libswscale/utils.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r-- | libavcodec/h264.c | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 893b3d385d..a08573e221 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2781,17 +2781,23 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ switch (h->sps.bit_depth_luma) { case 9 : - if (CHROMA444) - s->avctx->pix_fmt = PIX_FMT_YUV444P9; - else if (CHROMA422) + if (CHROMA444) { + if (s->avctx->colorspace == AVCOL_SPC_RGB) { + s->avctx->pix_fmt = PIX_FMT_GBRP9; + } else + s->avctx->pix_fmt = PIX_FMT_YUV444P9; + } else if (CHROMA422) s->avctx->pix_fmt = PIX_FMT_YUV422P9; else s->avctx->pix_fmt = PIX_FMT_YUV420P9; break; case 10 : - if (CHROMA444) - s->avctx->pix_fmt = PIX_FMT_YUV444P10; - else if (CHROMA422) + if (CHROMA444) { + if (s->avctx->colorspace == AVCOL_SPC_RGB) { + s->avctx->pix_fmt = PIX_FMT_GBRP10; + } else + s->avctx->pix_fmt = PIX_FMT_YUV444P10; + } else if (CHROMA422) s->avctx->pix_fmt = PIX_FMT_YUV422P10; else s->avctx->pix_fmt = PIX_FMT_YUV420P10; |