diff options
author | Oskar Arvidsson <oskar@irock.se> | 2011-03-29 17:49:00 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2011-04-10 22:33:42 +0200 |
commit | 5e85298cb50e6fcfbfc6715cbc200ec79334d5c3 (patch) | |
tree | 2a0e35e0458d3d83c3cc29d728e20fbd4cdea471 | |
parent | 8dbe5856410ee10ac4a9368105149efdacfac994 (diff) | |
download | ffmpeg-5e85298cb50e6fcfbfc6715cbc200ec79334d5c3.tar.gz |
Enable decoding of high bit depth h264.
This patch completes the high bit depth h264 decoding support.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/h264.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c index 020a505a69..c9f2ad9f17 100644 --- a/libavcodec/h264.c +++ b/libavcodec/h264.c @@ -2317,12 +2317,23 @@ static int decode_slice_header(H264Context *h, H264Context *h0){ av_reduce(&s->avctx->time_base.num, &s->avctx->time_base.den, h->sps.num_units_in_tick, den, 1<<30); } + + switch (h->sps.bit_depth_luma) { + case 9 : + s->avctx->pix_fmt = PIX_FMT_YUV420P9; + break; + case 10 : + s->avctx->pix_fmt = PIX_FMT_YUV420P10; + break; + default: s->avctx->pix_fmt = s->avctx->get_format(s->avctx, s->avctx->codec->pix_fmts ? s->avctx->codec->pix_fmts : s->avctx->color_range == AVCOL_RANGE_JPEG ? hwaccel_pixfmt_list_h264_jpeg_420 : ff_hwaccel_pixfmt_list_420); + } + s->avctx->hwaccel = ff_find_hwaccel(s->avctx->codec->id, s->avctx->pix_fmt); if (MPV_common_init(s) < 0){ |