Commit d10d1b86 authored by Michael Niedermayer's avatar Michael Niedermayer Committed by Derek Buitenhuis

libx265: enable psnr reporting when requested by the user

This is similar to what is done in libx264.c
Signed-off-by: 's avatarMichael Niedermayer <michaelni@gmx.at>
Signed-off-by: 's avatarDerek Buitenhuis <derek.buitenhuis@gmail.com>
parent 19133e96
......@@ -111,6 +111,7 @@ static av_cold int libx265_encode_init(AVCodecContext *avctx)
ctx->params->fpsDenom = avctx->time_base.num * avctx->ticks_per_frame;
ctx->params->sourceWidth = avctx->width;
ctx->params->sourceHeight = avctx->height;
ctx->params->bEnablePsnr = !!(avctx->flags & CODEC_FLAG_PSNR);
if (avctx->sample_aspect_ratio.num > 0 && avctx->sample_aspect_ratio.den > 0) {
av_reduce(&sar_num, &sar_den,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment