[FFmpeg-cvslog] Enable decoding of high bit depth h264.
Oskar Arvidsson
git at videolan.org
Wed May 11 06:06:42 CEST 2011
ffmpeg | branch: master | Oskar Arvidsson <oskar at irock.se> | Tue Mar 29 17:49:00 2011 +0200| [d545cf804c4a246285d75aae48741da5d2344993] | committer: Ronald S. Bultje
Enable decoding of high bit depth h264.
This patch completes the high bit depth h264 decoding support.
Signed-off-by: Ronald S. Bultje <rsbultje at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=d545cf804c4a246285d75aae48741da5d2344993
---
libavcodec/h264.c | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 1388dd5..616d0a4 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1930,12 +1930,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)
More information about the ffmpeg-cvslog
mailing list