On Mon, Nov 4, 2013 at 1:26 PM, Yusuke Nakamura <muken.the.vfrman...@gmail.com> wrote: > --- > libavcodec/hevc.c | 7 +++++++ > 1 file changed, 7 insertions(+) > > diff --git a/libavcodec/hevc.c b/libavcodec/hevc.c > index ed980e3..e3d306b 100644 > --- a/libavcodec/hevc.c > +++ b/libavcodec/hevc.c > @@ -401,6 +401,13 @@ static int set_sps(HEVCContext *s, const HEVCSPS *sps) > s->avctx->sample_aspect_ratio = sps->vui.sar; > s->avctx->has_b_frames = sps->temporal_layer[sps->max_sub_layers > - 1].num_reorder_pics; > > + if (sps->vui.chroma_loc_info_present_flag) > + s->avctx->chroma_sample_location = > sps->vui.chroma_sample_loc_type_top_field + 1; > + else if (sps->chroma_format_idc == 1) > + s->avctx->chroma_sample_location = AVCHROMA_LOC_LEFT; > + else > + s->avctx->chroma_sample_location = AVCHROMA_LOC_UNSPECIFIED; > +
I think the specs say that when chroma_format_idc is not 1 the chroma_sample_location should be 0 (eg AVCHROMA_LOC_LEF in avcodec). Vittorio _______________________________________________ libav-devel mailing list libav-devel@libav.org https://lists.libav.org/mailman/listinfo/libav-devel