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] avcodec/vc1dec: Don't initialize write-only intra_scantable, deduplicate cleanup code (PR #20786)
@ 2025-10-29 15:06 mkver via ffmpeg-devel
  0 siblings, 0 replies; only message in thread
From: mkver via ffmpeg-devel @ 2025-10-29 15:06 UTC (permalink / raw)
  To: ffmpeg-devel; +Cc: mkver

PR #20786 opened by mkver
URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20786
Patch URL: https://code.ffmpeg.org/FFmpeg/FFmpeg/pulls/20786.patch


>From 7dddd98a62cbb30586d704d9365cbf87b04cd64b Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Date: Wed, 29 Oct 2025 15:47:47 +0100
Subject: [PATCH 1/2] avcodec/vc1dec: Don't initialize write-only
 intra_scantable

VC-1 does not use it.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/vc1dec.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 55225baec9..35d8c68f45 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -468,9 +468,6 @@ av_cold int ff_vc1_decode_init(AVCodecContext *avctx)
     if (ret < 0)
         return ret;
 
-    ff_permute_scantable(s->intra_scantable.permutated, ff_wmv1_scantable[1],
-                         s->idsp.idct_permutation);
-
     ret = vc1_decode_init_alloc_tables(v);
     if (ret < 0) {
         vc1_decode_reset(avctx);
-- 
2.49.1


>From 3e8af4515c36caf744328f25c60376f9aebbae53 Mon Sep 17 00:00:00 2001
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Date: Wed, 29 Oct 2025 15:59:17 +0100
Subject: [PATCH 2/2] avcodec/vc1dec: Deduplicate cleanup code

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/vc1dec.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index 35d8c68f45..1925384ba5 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -1366,12 +1366,7 @@ image:
     }
 
 end:
-    av_free(buf2);
-    for (i = 0; i < n_slices; i++)
-        av_free(slices[i].buf);
-    av_free(slices);
-    return buf_size;
-
+    ret = buf_size;
 err:
     av_free(buf2);
     for (i = 0; i < n_slices; i++)
-- 
2.49.1

_______________________________________________
ffmpeg-devel mailing list -- ffmpeg-devel@ffmpeg.org
To unsubscribe send an email to ffmpeg-devel-leave@ffmpeg.org

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-10-29 15:07 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-29 15:06 [FFmpeg-devel] [PATCH] avcodec/vc1dec: Don't initialize write-only intra_scantable, deduplicate cleanup code (PR #20786) mkver via ffmpeg-devel

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