Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Wu Jianhua <toqsxw@outlook.com>
To: "ffmpeg-devel@ffmpeg.org" <ffmpeg-devel@ffmpeg.org>
Cc: Tong Wu <tong1.wu@intel.com>
Subject: [FFmpeg-devel] 回复:  [PATCH 1/5] avcodec/d3d12va_vp9: fix vp9 max_num_refs value
Date: Mon, 25 Dec 2023 14:47:30 +0000
Message-ID: <OSZP286MB2173411378EB85D125F572D6CA99A@OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <20231225141859.664-1-tong1.wu@intel.com>

Tong Wu <tong1.wu-at-intel.com@ffmpeg.org>:
> subject: [FFmpeg-devel] [PATCH 1/5] avcodec/d3d12va_vp9: fix vp9 max_num_refs value
>
> Previous max_num_refs was based on pp.frame_refs plus 1 and it could possibly
> reaches the size limit. Actually it should be the size of pp.ref_frame_map
> plus 1.
>
> Signed-off-by: Tong Wu <tong1.wu@intel.com>
> ---
> libavcodec/d3d12va_vp9.c | 2 +-
>1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/libavcodec/d3d12va_vp9.c b/libavcodec/d3d12va_vp9.c
> index bb94e18781..d6dfc905d9 100644
> --- a/libavcodec/d3d12va_vp9.c
> +++ b/libavcodec/d3d12va_vp9.c
> @@ -148,7 +148,7 @@ static int d3d12va_vp9_decode_init(AVCodecContext *avctx)
>        break;
>    };
>
> -    ctx->max_num_ref = FF_ARRAY_ELEMS(pp.frame_refs) + 1;
> +    ctx->max_num_ref = FF_ARRAY_ELEMS(pp.ref_frame_map) + 1;
> 
>     return ff_d3d12va_decode_init(avctx);
> }
> --
> 2.41.0.windows.1

LGTM. I tested this fix both in command line and C API and it fixed the VP9 decoding issue
that the decoded reference frames of some samples have corrupted.

Thanks,
Jianhua
_______________________________________________
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".

      parent reply	other threads:[~2023-12-25 14:47 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-12-25 14:18 [FFmpeg-devel] " Tong Wu
2023-12-25 14:18 ` [FFmpeg-devel] [PATCH 2/5] avcodec/d3d12va_decode: delete an empty line and fix a fuction alignment Tong Wu
2023-12-25 14:18 ` [FFmpeg-devel] [PATCH 3/5] avcodec/d3d12va_h264: replace assert with av_assert0 Tong Wu
2023-12-25 14:18 ` [FFmpeg-devel] [PATCH 4/5] avcodec/d3d12va_decode: remove assertion from get_surface_index Tong Wu
2023-12-27  5:42   ` Xiang, Haihao
2023-12-25 14:18 ` [FFmpeg-devel] [PATCH 5/5] avcodec/dxva2(h264|mpeg2|vc1): use av_assert0 instead of assert Tong Wu
2023-12-27  5:45   ` Xiang, Haihao
2023-12-25 14:47 ` Wu Jianhua [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=OSZP286MB2173411378EB85D125F572D6CA99A@OSZP286MB2173.JPNP286.PROD.OUTLOOK.COM \
    --to=toqsxw@outlook.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    --cc=tong1.wu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

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