aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/h264.c
diff options
context:
space:
mode:
authorDavid Conrad <lessen42@gmail.com>2009-05-11 04:34:23 +0000
committerDavid Conrad <lessen42@gmail.com>2009-05-11 04:34:23 +0000
commit580a7465fb416782a1d5ad95011351b9c257f0de (patch)
treef26ec625283620ebc2c6df689bd6cbffba0d6cc8 /libavcodec/h264.c
parent014b7ecb6643332af35251c751aebd04bac4bb1e (diff)
downloadffmpeg-580a7465fb416782a1d5ad95011351b9c257f0de.tar.gz
Add a chroma_sample_location field to define positioning of chroma samples
Originally committed as revision 18795 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/h264.c')
-rw-r--r--libavcodec/h264.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index b45a249f59..550c4990db 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -2198,6 +2198,7 @@ static av_cold int decode_init(AVCodecContext *avctx){
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 @@ static inline int decode_vui_parameters(H264Context *h, SPS *sps){
}
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 */
}