[FFmpeg-devel] [PATCH 1/2] hevcdec: Miss the location of chroma samples when exporting stream parameters
wm4
nfxjfg at googlemail.com
Wed May 16 21:11:07 EEST 2018
On Wed, 16 May 2018 15:19:44 +0800
Haihao Xiang <haihao.xiang at intel.com> wrote:
> Signed-off-by: Haihao Xiang <haihao.xiang at intel.com>
> ---
> libavcodec/hevcdec.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/libavcodec/hevcdec.c b/libavcodec/hevcdec.c
> index c8877626d2..13d868bb4f 100644
> --- a/libavcodec/hevcdec.c
> +++ b/libavcodec/hevcdec.c
> @@ -344,6 +344,11 @@ static void export_stream_params(AVCodecContext *avctx, const HEVCParamSets *ps,
> avctx->colorspace = AVCOL_SPC_UNSPECIFIED;
> }
>
> + if (sps->vui.chroma_loc_info_present_flag)
> + avctx->chroma_sample_location = sps->vui.chroma_sample_loc_type_top_field + 1;
> + else
> + avctx->chroma_sample_location = AVCHROMA_LOC_UNSPECIFIED;
> +
> if (vps->vps_timing_info_present_flag) {
> num = vps->vps_num_units_in_tick;
> den = vps->vps_time_scale;
Wouldn't this prevent an API user from setting the field to a container
value as a fallback? Although maybe that's not necessary because
there's an "unspecified" special value anyway.
More information about the ffmpeg-devel
mailing list