summaryrefslogtreecommitdiff
path: root/libavcodec/libx265.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2014-09-10 01:38:58 +0200
committerDerek Buitenhuis <derek.buitenhuis@gmail.com>2014-10-01 14:31:48 +0100
commitd10d1b86550d254bd1e746ed613bf6885978879c (patch)
treeb2a9391b22fffba0341f0c9828cd64fa07db24e6 /libavcodec/libx265.c
parent19133e96d30e3f80dbae236ef081aedef419a6bf (diff)
libx265: enable psnr reporting when requested by the user
This is similar to what is done in libx264.c Signed-off-by: Michael Niedermayer <michaelni@gmx.at> Signed-off-by: Derek Buitenhuis <derek.buitenhuis@gmail.com>
Diffstat (limited to 'libavcodec/libx265.c')
-rw-r--r--libavcodec/libx265.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/libavcodec/libx265.c b/libavcodec/libx265.c
index bee403d005..a3bf2dc0b4 100644
--- a/libavcodec/libx265.c
+++ b/libavcodec/libx265.c
@@ -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,