Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
* [FFmpeg-devel] [PATCH 1/2] avcodec/d3d12va_mpeg2: remove unused variables
@ 2023-12-31 20:24 James Almer
  2023-12-31 20:24 ` [FFmpeg-devel] [PATCH 2/2] avcodec/d3d12va_mpeg2: change the type for the ID3D12Resource_Map input data argument James Almer
  2024-01-01  9:48 ` [FFmpeg-devel] 回复: [PATCH 1/2] avcodec/d3d12va_mpeg2: remove unused variables Wu Jianhua
  0 siblings, 2 replies; 3+ messages in thread
From: James Almer @ 2023-12-31 20:24 UTC (permalink / raw)
  To: ffmpeg-devel

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;
-
     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;
-- 
2.43.0

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [FFmpeg-devel] [PATCH 2/2] avcodec/d3d12va_mpeg2: change the type for the ID3D12Resource_Map input data argument
  2023-12-31 20:24 [FFmpeg-devel] [PATCH 1/2] avcodec/d3d12va_mpeg2: remove unused variables James Almer
@ 2023-12-31 20:24 ` James Almer
  2024-01-01  9:48 ` [FFmpeg-devel] 回复: [PATCH 1/2] avcodec/d3d12va_mpeg2: remove unused variables Wu Jianhua
  1 sibling, 0 replies; 3+ messages in thread
From: James Almer @ 2023-12-31 20:24 UTC (permalink / raw)
  To: ffmpeg-devel

Fixes -Wincompatible-pointer-types warnings.

Signed-off-by: James Almer <jamrial@gmail.com>
---
 libavcodec/d3d12va_mpeg2.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/libavcodec/d3d12va_mpeg2.c b/libavcodec/d3d12va_mpeg2.c
index a2ae8bf948..b964f8d2ff 100644
--- a/libavcodec/d3d12va_mpeg2.c
+++ b/libavcodec/d3d12va_mpeg2.c
@@ -98,7 +98,7 @@ static int update_input_arguments(AVCodecContext *avctx, D3D12_VIDEO_DECODE_INPU
     const unsigned mb_count = s->mb_width * (s->mb_height >> is_field);
 
     int i;
-    uint8_t *mapped_data = NULL;
+    void *mapped_data = NULL;
     D3D12_VIDEO_DECODE_FRAME_ARGUMENT *args = &input_args->FrameArguments[input_args->NumFrameArguments++];
 
     D3D12_RANGE range = {
-- 
2.43.0

_______________________________________________
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".

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [FFmpeg-devel] 回复:  [PATCH 1/2] avcodec/d3d12va_mpeg2: remove unused variables
  2023-12-31 20:24 [FFmpeg-devel] [PATCH 1/2] avcodec/d3d12va_mpeg2: remove unused variables James Almer
  2023-12-31 20:24 ` [FFmpeg-devel] [PATCH 2/2] avcodec/d3d12va_mpeg2: change the type for the ID3D12Resource_Map input data argument James Almer
@ 2024-01-01  9:48 ` Wu Jianhua
  1 sibling, 0 replies; 3+ messages in thread
From: Wu Jianhua @ 2024-01-01  9:48 UTC (permalink / raw)
  To: ffmpeg-devel

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.
_______________________________________________
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".

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-01-01  9:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-12-31 20:24 [FFmpeg-devel] [PATCH 1/2] avcodec/d3d12va_mpeg2: remove unused variables James Almer
2023-12-31 20:24 ` [FFmpeg-devel] [PATCH 2/2] avcodec/d3d12va_mpeg2: change the type for the ID3D12Resource_Map input data argument James Almer
2024-01-01  9:48 ` [FFmpeg-devel] 回复: [PATCH 1/2] avcodec/d3d12va_mpeg2: remove unused variables Wu Jianhua

Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

This inbox may be cloned and mirrored by anyone:

	git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \
		ffmpegdev@gitmailbox.com
	public-inbox-index ffmpegdev

Example config snippet for mirrors.


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git