On 13/04/15 14:52, Vittorio Giovara wrote: > On Mon, Apr 13, 2015 at 11:12 AM, Luca Barbato <[email protected]> wrote: >> --- >> libavcodec/libx264.c | 7 +++++++ >> 1 file changed, 7 insertions(+) >> >> diff --git a/libavcodec/libx264.c b/libavcodec/libx264.c >> index 8e19be4..bf64489 100644 >> --- a/libavcodec/libx264.c >> +++ b/libavcodec/libx264.c >> @@ -493,6 +493,13 @@ static av_cold int X264_init(AVCodecContext *avctx) >> avctx->pix_fmt == AV_PIX_FMT_YUVJ444P || >> avctx->color_range == AVCOL_RANGE_JPEG; >> >> + if (avctx->color_primaries <= AVCOL_PRI_BT2020) >> + x4->params.vui.i_colorprim = avctx->color_primaries; >> + if (avctx->color_trc <= AVCOL_TRC_BT2020_12) >> + x4->params.vui.i_transfer = avctx->color_trc; >> + if (avctx->colorspace <= AVCOL_SPC_BT2020_CL) >> + x4->params.vui.i_colmatrix = avctx->colorspace; >> + > > These checks are performed inside x264 already, I believe it's safe to > assign the value directlry. >
Ok, I can make it simpler then. _______________________________________________ libav-devel mailing list [email protected] https://lists.libav.org/mailman/listinfo/libav-devel
