diff mbox series

[FFmpeg-devel,1/2] avcodec/d3d12va_mpeg2: remove unused variables

Message ID 20231231202445.2023-1-jamrial@gmail.com
State Accepted
Commit e9722735fad451db9efa47adfcc98af9d171c00b
Headers show
Series [FFmpeg-devel,1/2] avcodec/d3d12va_mpeg2: remove unused variables | 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

James Almer Dec. 31, 2023, 8:24 p.m. UTC
Signed-off-by: James Almer <jamrial@gmail.com>
---
is_field worries me. Was it a copy-paste left over, or is it meant to
be checked?

 libavcodec/d3d12va_mpeg2.c | 8 --------
 1 file changed, 8 deletions(-)

Comments

Wu Jianhua Jan. 1, 2024, 9:48 a.m. UTC | #1
James Almer:
> [FFmpeg-devel] [PATCH 1/2] avcodec/d3d12va_mpeg2: remove unused variables
>
> Signed-off-by: James Almer <jamrial@gmail.com>
> ---
> is_field worries me. Was it a copy-paste left over, or is it meant to
> be checked?
>
> libavcodec/d3d12va_mpeg2.c | 8 --------
> 1 file changed, 8 deletions(-)

> diff --git a/libavcodec/d3d12va_mpeg2.c b/libavcodec/d3d12va_mpeg2.c
> index 91bf3f8b75..a2ae8bf948 100644
> --- a/libavcodec/d3d12va_mpeg2.c
> +++ b/libavcodec/d3d12va_mpeg2.c
> @@ -49,7 +49,6 @@ static int d3d12va_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint
>     const MpegEncContext      *s       = avctx->priv_data;
>     D3D12VADecodeContext      *ctx     = D3D12VA_DECODE_CONTEXT(avctx);
>     D3D12DecodePictureContext *ctx_pic = s->current_picture_ptr->hwaccel_picture_private;
>-    DXVA_QmatrixData          *qm      = &ctx_pic->qm;
>
>     if (!ctx)
>         return -1;
>@@ -76,8 +75,6 @@ static int d3d12va_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buff
>     const MpegEncContext      *s       = avctx->priv_data;
>     D3D12DecodePictureContext *ctx_pic = s->current_picture_ptr->hwaccel_picture_private;
>
> -    int is_field = s->picture_structure != PICT_FRAME;
> -
> 

This patch set LGTM. It's something added for debugging but forgot to remove. Thanks for your fix.
diff mbox series

Patch

diff --git a/libavcodec/d3d12va_mpeg2.c b/libavcodec/d3d12va_mpeg2.c
index 91bf3f8b75..a2ae8bf948 100644
--- a/libavcodec/d3d12va_mpeg2.c
+++ b/libavcodec/d3d12va_mpeg2.c
@@ -49,7 +49,6 @@  static int d3d12va_mpeg2_start_frame(AVCodecContext *avctx, av_unused const uint
     const MpegEncContext      *s       = avctx->priv_data;
     D3D12VADecodeContext      *ctx     = D3D12VA_DECODE_CONTEXT(avctx);
     D3D12DecodePictureContext *ctx_pic = s->current_picture_ptr->hwaccel_picture_private;
-    DXVA_QmatrixData          *qm      = &ctx_pic->qm;
 
     if (!ctx)
         return -1;
@@ -76,8 +75,6 @@  static int d3d12va_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buff
     const MpegEncContext      *s       = avctx->priv_data;
     D3D12DecodePictureContext *ctx_pic = s->current_picture_ptr->hwaccel_picture_private;
 
-    int is_field = s->picture_structure != PICT_FRAME;
-
     if (ctx_pic->slice_count >= MAX_SLICES) {
         return AVERROR(ERANGE);
     }
@@ -94,9 +91,6 @@  static int d3d12va_mpeg2_decode_slice(AVCodecContext *avctx, const uint8_t *buff
 
 static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPUT_STREAM_ARGUMENTS *input_args, ID3D12Resource *buffer)
 {
-    D3D12VADecodeContext      *ctx          = D3D12VA_DECODE_CONTEXT(avctx);
-    AVHWFramesContext         *frames_ctx   = D3D12VA_FRAMES_CONTEXT(avctx);
-    AVD3D12VAFramesContext    *frames_hwctx = frames_ctx->hwctx;
     const MpegEncContext      *s            = avctx->priv_data;
     D3D12DecodePictureContext *ctx_pic      = s->current_picture_ptr->hwaccel_picture_private;
 
@@ -147,7 +141,6 @@  static int d3d12va_mpeg2_end_frame(AVCodecContext *avctx)
 {
     int ret;
     MpegEncContext            *s       = avctx->priv_data;
-    D3D12VADecodeContext      *ctx     = D3D12VA_DECODE_CONTEXT(avctx);
     D3D12DecodePictureContext *ctx_pic = s->current_picture_ptr->hwaccel_picture_private;
 
     if (ctx_pic->slice_count <= 0 || ctx_pic->bitstream_size <= 0)
@@ -163,7 +156,6 @@  static int d3d12va_mpeg2_end_frame(AVCodecContext *avctx)
 
 static int d3d12va_mpeg2_decode_init(AVCodecContext *avctx)
 {
-    const MpegEncContext       *s      = avctx->priv_data;
     D3D12VADecodeContext      *ctx     = D3D12VA_DECODE_CONTEXT(avctx);
 
     ctx->cfg.DecodeProfile = D3D12_VIDEO_DECODE_PROFILE_MPEG2;