Mercurial > libavcodec.hg
diff h264.c @ 9626:bd3e11b60ccd libavcodec
Add a chroma_sample_location field to define positioning of chroma samples
author | conrad |
---|---|
date | Mon, 11 May 2009 04:34:23 +0000 |
parents | 0bc68f915e8e |
children | 9c9342d1ce14 |
line wrap: on
line diff
--- a/h264.c Mon May 11 02:41:50 2009 +0000 +++ b/h264.c Mon May 11 04:34:23 2009 +0000 @@ -2198,6 +2198,7 @@ else avctx->pix_fmt= avctx->get_format(avctx, avctx->codec->pix_fmts); avctx->hwaccel = ff_find_hwaccel(avctx->codec->id, avctx->pix_fmt); + avctx->chroma_sample_location = AVCHROMA_LOC_LEFT; decode_init_vlc(); @@ -7064,7 +7065,7 @@ } if(get_bits1(&s->gb)){ /* chroma_location_info_present_flag */ - get_ue_golomb(&s->gb); /* chroma_sample_location_type_top_field */ + s->avctx->chroma_sample_location = get_ue_golomb(&s->gb)+1; /* chroma_sample_location_type_top_field */ get_ue_golomb(&s->gb); /* chroma_sample_location_type_bottom_field */ }