diff mbox series

[FFmpeg-devel] libavcodec/qsvenc: fixy typo for min/max qp reset

Message ID 1663967960-15148-1-git-send-email-dmitry.v.rogozhkin@intel.com
State Accepted
Commit dd2ea014ef273157fe9a0e928e77841fbbee9b2f
Headers show
Series [FFmpeg-devel] libavcodec/qsvenc: fixy typo for min/max qp reset | expand

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Dmitry Rogozhkin Sept. 23, 2022, 9:19 p.m. UTC
Fixes: 005c7a4 ("libavcodec/qsvenc: Add max/min qp reset support in qsvenc")
CC: Wenbin Chen <wenbin.chen@intel.com>
Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
---
 libavcodec/qsvenc.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Chen, Wenbin Sept. 26, 2022, 1:51 a.m. UTC | #1
> Fixes: 005c7a4 ("libavcodec/qsvenc: Add max/min qp reset support in
> qsvenc")
> CC: Wenbin Chen <wenbin.chen@intel.com>
> Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
> ---
>  libavcodec/qsvenc.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
> index 84c6e29..8bd9272 100644
> --- a/libavcodec/qsvenc.c
> +++ b/libavcodec/qsvenc.c
> @@ -1760,8 +1760,8 @@ static int update_min_max_qp(AVCodecContext
> *avctx, QSVEncContext *q)
>      if (avctx->codec_id != AV_CODEC_ID_H264)
>          return 0;
> 
> -    UPDATE_PARAM(q->old_qmax, avctx->qmin);
> -    UPDATE_PARAM(q->old_qmax, avctx->qmin);
> +    UPDATE_PARAM(q->old_qmin, avctx->qmin);
> +    UPDATE_PARAM(q->old_qmax, avctx->qmax);
>      UPDATE_PARAM(q->old_min_qp_i, q->min_qp_i);
>      UPDATE_PARAM(q->old_max_qp_i, q->max_qp_i);
>      UPDATE_PARAM(q->old_min_qp_p, q->min_qp_p);
> --
> 1.8.3.1

Thanks for your correction.
LGTM
Xiang, Haihao Sept. 26, 2022, 8:35 a.m. UTC | #2
On Mon, 2022-09-26 at 01:51 +0000, Chen, Wenbin wrote:
> > Fixes: 005c7a4 ("libavcodec/qsvenc: Add max/min qp reset support in
> > qsvenc")
> > CC: Wenbin Chen <wenbin.chen@intel.com>
> > Signed-off-by: Dmitry Rogozhkin <dmitry.v.rogozhkin@intel.com>
> > ---
> >  libavcodec/qsvenc.c | 4 ++--
> >  1 file changed, 2 insertions(+), 2 deletions(-)
> > 
> > diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
> > index 84c6e29..8bd9272 100644
> > --- a/libavcodec/qsvenc.c
> > +++ b/libavcodec/qsvenc.c
> > @@ -1760,8 +1760,8 @@ static int update_min_max_qp(AVCodecContext
> > *avctx, QSVEncContext *q)
> >      if (avctx->codec_id != AV_CODEC_ID_H264)
> >          return 0;
> > 
> > -    UPDATE_PARAM(q->old_qmax, avctx->qmin);
> > -    UPDATE_PARAM(q->old_qmax, avctx->qmin);
> > +    UPDATE_PARAM(q->old_qmin, avctx->qmin);
> > +    UPDATE_PARAM(q->old_qmax, avctx->qmax);
> >      UPDATE_PARAM(q->old_min_qp_i, q->min_qp_i);
> >      UPDATE_PARAM(q->old_max_qp_i, q->max_qp_i);
> >      UPDATE_PARAM(q->old_min_qp_p, q->min_qp_p);
> > --
> > 1.8.3.1
> 
> Thanks for your correction.
> LGTM

Applied, thx

-Haihao
diff mbox series

Patch

diff --git a/libavcodec/qsvenc.c b/libavcodec/qsvenc.c
index 84c6e29..8bd9272 100644
--- a/libavcodec/qsvenc.c
+++ b/libavcodec/qsvenc.c
@@ -1760,8 +1760,8 @@  static int update_min_max_qp(AVCodecContext *avctx, QSVEncContext *q)
     if (avctx->codec_id != AV_CODEC_ID_H264)
         return 0;
 
-    UPDATE_PARAM(q->old_qmax, avctx->qmin);
-    UPDATE_PARAM(q->old_qmax, avctx->qmin);
+    UPDATE_PARAM(q->old_qmin, avctx->qmin);
+    UPDATE_PARAM(q->old_qmax, avctx->qmax);
     UPDATE_PARAM(q->old_min_qp_i, q->min_qp_i);
     UPDATE_PARAM(q->old_max_qp_i, q->max_qp_i);
     UPDATE_PARAM(q->old_min_qp_p, q->min_qp_p);