diff mbox series

[FFmpeg-devel,2/2] libavcodec/amfenc_hevc.c: Fix Maximum Reference Frames option on AMF HEVC.

Message ID 20200203215415.25324-2-ovchinnikov.dmitrii@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel,1/2] libavcodec/amfenc_hevc.c: Fix Profile level option on AMF HEVC. | expand

Checks

Context Check Description
andriy/ffmpeg-patchwork success Make fate finished

Commit Message

Dmitrii Ovchinnikov Feb. 3, 2020, 9:54 p.m. UTC
From: Sitan Liu <nst799610810@gmail.com>

---
 libavcodec/amfenc_hevc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Mark Thompson Feb. 9, 2020, 3:52 p.m. UTC | #1
On 03/02/2020 21:54, OvchinnikovDmitrii wrote:
> From: Sitan Liu <nst799610810@gmail.com>
> 
> ---
>  libavcodec/amfenc_hevc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/amfenc_hevc.c b/libavcodec/amfenc_hevc.c
> index 411d444a62..77e57d2461 100644
> --- a/libavcodec/amfenc_hevc.c
> +++ b/libavcodec/amfenc_hevc.c
> @@ -144,7 +144,7 @@ static av_cold int amf_encode_init_hevc(AVCodecContext *avctx)
>      }
>      AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET, ctx->quality);
>      // Maximum Reference Frames
> -    if (avctx->refs != 0) {
> +    if (avctx->refs != -1) {
>          AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_MAX_NUM_REFRAMES, avctx->refs);
>      }
>      // Aspect Ratio
> 

Yep; both applied.

Thanks,

- Mark
diff mbox series

Patch

diff --git a/libavcodec/amfenc_hevc.c b/libavcodec/amfenc_hevc.c
index 411d444a62..77e57d2461 100644
--- a/libavcodec/amfenc_hevc.c
+++ b/libavcodec/amfenc_hevc.c
@@ -144,7 +144,7 @@  static av_cold int amf_encode_init_hevc(AVCodecContext *avctx)
     }
     AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_QUALITY_PRESET, ctx->quality);
     // Maximum Reference Frames
-    if (avctx->refs != 0) {
+    if (avctx->refs != -1) {
         AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_MAX_NUM_REFRAMES, avctx->refs);
     }
     // Aspect Ratio