diff mbox series

[FFmpeg-devel] libavcodec/qsvenc.c: add max_frame_size support for hevc_qsv

Message ID 20201130054945.820762-1-wenbin.chen@intel.com
State New
Headers show
Series [FFmpeg-devel] libavcodec/qsvenc.c: add max_frame_size support for hevc_qsv
Related show

Checks

Context Check Description
andriy/x86_make success Make finished
andriy/x86_make_fate success Make fate finished

Commit Message

Wenbin Chen Nov. 30, 2020, 5:49 a.m. UTC
From: Wenbinc-Bin <wenbin.chen@intel.com>

    The max_frame_size parameter is set only when codec is h264. Now I add hevc in that conditional statement.

    Signed-off-by: Wenbin CHEN <wenbin.chen@intel.com>
---
 libavcodec/qsvenc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Xiang, Haihao Dec. 2, 2020, 1:15 a.m. UTC | #1
On Mon, 2020-11-30 at 13:49 +0800, wenbin.chen@intel.com wrote:
> From: Wenbinc-Bin <wenbin.chen@intel.com>
> 
>     The max_frame_size parameter is set only when codec is h264. Now I add
> hevc in that conditional statement.
> 
>     Signed-off-by: Wenbin CHEN <wenbin.chen@intel.com>

Please remove the spaces at the beginning of each line in the commit log.

> ---
>  libavcodec/qsvenc.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
> index 2bd2a56227..aba98dd689 100644
> --- a/libavcodec/qsvenc.c
> +++ b/libavcodec/qsvenc.c
> @@ -691,7 +691,7 @@ FF_ENABLE_DEPRECATION_WARNINGS
>          q->extparam_internal[q->nb_extparam_internal++] = (mfxExtBuffer *)&q-
> >extco;
>  
>  #if QSV_HAVE_CO2
> -        if (avctx->codec_id == AV_CODEC_ID_H264) {
> +        if (avctx->codec_id == AV_CODEC_ID_H264 || avctx->codec_id ==
> AV_CODEC_ID_HEVC) {
>              if (q->int_ref_type >= 0)
>                  q->extco2.IntRefType = q->int_ref_type;
>              if (q->int_ref_cycle_size >= 0)
diff mbox series

Patch

diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 2bd2a56227..aba98dd689 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -691,7 +691,7 @@  FF_ENABLE_DEPRECATION_WARNINGS
         q->extparam_internal[q->nb_extparam_internal++] = (mfxExtBuffer *)&q->extco;
 
 #if QSV_HAVE_CO2
-        if (avctx->codec_id == AV_CODEC_ID_H264) {
+        if (avctx->codec_id == AV_CODEC_ID_H264 || avctx->codec_id == AV_CODEC_ID_HEVC) {
             if (q->int_ref_type >= 0)
                 q->extco2.IntRefType = q->int_ref_type;
             if (q->int_ref_cycle_size >= 0)