Message ID | 20200128162344.32120-2-ovchinnikov.dmitrii@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | [FFmpeg-devel,1/2] libavcodec/amfenc_hevc.c: Fix constant QP settings for I, P | expand |
Context | Check | Description |
---|---|---|
andriy/ffmpeg-patchwork | success | Make fate finished |
On 28/01/2020 16:23, OvchinnikovDmitrii wrote: > Patch was made by Sitan Liu <nst799610810@gmail.com> If you are not the author then please ensure that the git author field is filled correctly. > The same code already exists in amfenc_h264.c > --- > libavcodec/amfenc_hevc.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/libavcodec/amfenc_hevc.c b/libavcodec/amfenc_hevc.c > index 8b4d289fac..77e57d2461 100644 > --- a/libavcodec/amfenc_hevc.c > +++ b/libavcodec/amfenc_hevc.c > @@ -136,7 +136,7 @@ static av_cold int amf_encode_init_hevc(AVCodecContext *avctx) > AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_TIER, ctx->tier); > > profile_level = avctx->level; > - if (profile_level == 0) { > + if (profile_level == FF_LEVEL_UNKNOWN) { This looks right. > profile_level = ctx->level; > } > if (profile_level != 0) { > @@ -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) { This looks unrelated? > AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_MAX_NUM_REFRAMES, avctx->refs); > } > // Aspect Ratio > Thanks, - Mark
> > > This looks right. > Thanks for accepting the patch! > If you are not the author then please ensure that the git author field is filled correctly. > This looks unrelated? I divided this patch into 2 parts and fixed the value of the author field. I hope everything is correct now. (https://patchwork.ffmpeg.org/project/ffmpeg/list/?series=282)
diff --git a/libavcodec/amfenc_hevc.c b/libavcodec/amfenc_hevc.c index 8b4d289fac..77e57d2461 100644 --- a/libavcodec/amfenc_hevc.c +++ b/libavcodec/amfenc_hevc.c @@ -136,7 +136,7 @@ static av_cold int amf_encode_init_hevc(AVCodecContext *avctx) AMF_ASSIGN_PROPERTY_INT64(res, ctx->encoder, AMF_VIDEO_ENCODER_HEVC_TIER, ctx->tier); profile_level = avctx->level; - if (profile_level == 0) { + if (profile_level == FF_LEVEL_UNKNOWN) { profile_level = ctx->level; } if (profile_level != 0) { @@ -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