diff mbox series

[FFmpeg-devel] avcodec/vaapi_encode_h265: fix missing slice_block_cols assignment

Message ID D4AGJ1XX2J0I.2YWZV5R550TJ6@gmail.com
State Accepted
Headers show
Series [FFmpeg-devel] avcodec/vaapi_encode_h265: fix missing slice_block_cols assignment | expand

Checks

Context Check Description
yinshiyou/make_loongarch64 success Make finished
yinshiyou/make_fate_loongarch64 success Make fate finished
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished

Commit Message

Marvin Scholz Sept. 19, 2024, 6:01 p.m. UTC
Instead of assigning to unit_opts.slice_block_cols, the slice_block_cols
value from the context was incorrectly assigned to slice_block_rows.

Regression from 12f158ca8f2ecc172f27569af88426d0e39ce995

Fixes CID1619479 Unused value
---
 libavcodec/vaapi_encode_h265.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)


base-commit: dc11c12b6466795f5f9eb057b1aebd76bf129785

Comments

Wang, Fei W Sept. 20, 2024, 1:12 a.m. UTC | #1
On Thu, 2024-09-19 at 20:01 +0200, Marvin Scholz wrote:
> Instead of assigning to unit_opts.slice_block_cols, the
> slice_block_cols
> value from the context was incorrectly assigned to slice_block_rows.
> 
> Regression from 12f158ca8f2ecc172f27569af88426d0e39ce995
> 
> Fixes CID1619479 Unused value
> ---
>  libavcodec/vaapi_encode_h265.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/libavcodec/vaapi_encode_h265.c
> b/libavcodec/vaapi_encode_h265.c
> index f4a9003c823..2283bcc0b4d 100644
> --- a/libavcodec/vaapi_encode_h265.c
> +++ b/libavcodec/vaapi_encode_h265.c
> @@ -273,11 +273,11 @@ static int
> vaapi_encode_h265_init_sequence_params(AVCodecContext *avctx)
>      priv->unit_opts.cu_qp_delta_enabled_flag = (ctx->va_rc_mode !=
> VA_RC_CQP);
>      priv->unit_opts.tile_rows = ctx->tile_rows;
>      priv->unit_opts.tile_cols = ctx->tile_cols;
>      priv->unit_opts.nb_slices = ctx->nb_slices;
>      priv->unit_opts.slice_block_rows = ctx->slice_block_rows;
> -    priv->unit_opts.slice_block_rows = ctx->slice_block_cols;
> +    priv->unit_opts.slice_block_cols = ctx->slice_block_cols;

LGTM.

Thanks
Fei

>      memcpy(priv->unit_opts.col_width, ctx->col_width,
>             ctx->tile_rows*sizeof(*priv->unit_opts.col_width));
>      memcpy(priv->unit_opts.row_height, ctx->row_height,
>             ctx->tile_cols*sizeof(*priv->unit_opts.row_height));
>  
> 
> base-commit: dc11c12b6466795f5f9eb057b1aebd76bf129785
Xiang, Haihao Sept. 20, 2024, 1:32 a.m. UTC | #2
On Vr, 2024-09-20 at 01:12 +0000, Wang, Fei W wrote:
> On Thu, 2024-09-19 at 20:01 +0200, Marvin Scholz wrote:
> > Instead of assigning to unit_opts.slice_block_cols, the
> > slice_block_cols
> > value from the context was incorrectly assigned to slice_block_rows.
> > 
> > Regression from 12f158ca8f2ecc172f27569af88426d0e39ce995
> > 
> > Fixes CID1619479 Unused value
> > ---
> >  libavcodec/vaapi_encode_h265.c | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> > 
> > diff --git a/libavcodec/vaapi_encode_h265.c
> > b/libavcodec/vaapi_encode_h265.c
> > index f4a9003c823..2283bcc0b4d 100644
> > --- a/libavcodec/vaapi_encode_h265.c
> > +++ b/libavcodec/vaapi_encode_h265.c
> > @@ -273,11 +273,11 @@ static int
> > vaapi_encode_h265_init_sequence_params(AVCodecContext *avctx)
> >      priv->unit_opts.cu_qp_delta_enabled_flag = (ctx->va_rc_mode !=
> > VA_RC_CQP);
> >      priv->unit_opts.tile_rows = ctx->tile_rows;
> >      priv->unit_opts.tile_cols = ctx->tile_cols;
> >      priv->unit_opts.nb_slices = ctx->nb_slices;
> >      priv->unit_opts.slice_block_rows = ctx->slice_block_rows;
> > -    priv->unit_opts.slice_block_rows = ctx->slice_block_cols;
> > +    priv->unit_opts.slice_block_cols = ctx->slice_block_cols;
> 
> LGTM.
> 
> Thanks
> Fei
> 
> >      memcpy(priv->unit_opts.col_width, ctx->col_width,
> >             ctx->tile_rows*sizeof(*priv->unit_opts.col_width));
> >      memcpy(priv->unit_opts.row_height, ctx->row_height,
> >             ctx->tile_cols*sizeof(*priv->unit_opts.row_height));
> >  
> > 
> > base-commit: dc11c12b6466795f5f9eb057b1aebd76bf129785


Applied, thx

- Haihao

> 
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
> 
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox series

Patch

diff --git a/libavcodec/vaapi_encode_h265.c b/libavcodec/vaapi_encode_h265.c
index f4a9003c823..2283bcc0b4d 100644
--- a/libavcodec/vaapi_encode_h265.c
+++ b/libavcodec/vaapi_encode_h265.c
@@ -273,11 +273,11 @@  static int vaapi_encode_h265_init_sequence_params(AVCodecContext *avctx)
     priv->unit_opts.cu_qp_delta_enabled_flag = (ctx->va_rc_mode != VA_RC_CQP);
     priv->unit_opts.tile_rows = ctx->tile_rows;
     priv->unit_opts.tile_cols = ctx->tile_cols;
     priv->unit_opts.nb_slices = ctx->nb_slices;
     priv->unit_opts.slice_block_rows = ctx->slice_block_rows;
-    priv->unit_opts.slice_block_rows = ctx->slice_block_cols;
+    priv->unit_opts.slice_block_cols = ctx->slice_block_cols;
     memcpy(priv->unit_opts.col_width, ctx->col_width,
            ctx->tile_rows*sizeof(*priv->unit_opts.col_width));
     memcpy(priv->unit_opts.row_height, ctx->row_height,
            ctx->tile_cols*sizeof(*priv->unit_opts.row_height));