Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
To: ffmpeg-devel@ffmpeg.org
Cc: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
Subject: [FFmpeg-devel] [PATCH 07/19] avcodec/vc1: Move setting res_fasttx-IDCT functions to vc1dec.c
Date: Mon, 31 Oct 2022 00:56:19 +0100
Message-ID: <GV1P250MB0737F8F713A87322D7D927588F349@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM> (raw)
In-Reply-To: <GV1P250MB0737EF25F056808CC9F6896C8F349@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM>

It allows to avoid compiling simple_idct.o for the VC-1 parser.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/Makefile |  2 +-
 libavcodec/vc1.c    | 11 -----------
 libavcodec/vc1dec.c |  9 +++++++++
 3 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/libavcodec/Makefile b/libavcodec/Makefile
index 72d2f92901..739bf757f9 100644
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
@@ -1169,7 +1169,7 @@ OBJS-$(CONFIG_SBC_PARSER)              += sbc_parser.o
 OBJS-$(CONFIG_SIPR_PARSER)             += sipr_parser.o
 OBJS-$(CONFIG_TAK_PARSER)              += tak_parser.o tak.o
 OBJS-$(CONFIG_VC1_PARSER)              += vc1_parser.o vc1.o vc1data.o  \
-                                          simple_idct.o wmv2data.o
+                                          wmv2data.o
 OBJS-$(CONFIG_VP3_PARSER)              += vp3_parser.o
 OBJS-$(CONFIG_VP8_PARSER)              += vp8_parser.o
 OBJS-$(CONFIG_VP9_PARSER)              += vp9_parser.o
diff --git a/libavcodec/vc1.c b/libavcodec/vc1.c
index f6468b54c7..6eb0d70a68 100644
--- a/libavcodec/vc1.c
+++ b/libavcodec/vc1.c
@@ -35,7 +35,6 @@
 #include "vc1data.h"
 #include "wmv2data.h"
 #include "unary.h"
-#include "simple_idct.h"
 
 /***********************************************************************/
 /**
@@ -314,16 +313,6 @@ int ff_vc1_decode_sequence_header(AVCodecContext *avctx, VC1Context *v, GetBitCo
     v->res_x8          = get_bits1(gb); //reserved
     v->multires        = get_bits1(gb);
     v->res_fasttx      = get_bits1(gb);
-    if (!v->res_fasttx) {
-        v->vc1dsp.vc1_inv_trans_8x8    = ff_simple_idct_int16_8bit;
-        v->vc1dsp.vc1_inv_trans_8x4    = ff_simple_idct84_add;
-        v->vc1dsp.vc1_inv_trans_4x8    = ff_simple_idct48_add;
-        v->vc1dsp.vc1_inv_trans_4x4    = ff_simple_idct44_add;
-        v->vc1dsp.vc1_inv_trans_8x8_dc = ff_simple_idct_add_int16_8bit;
-        v->vc1dsp.vc1_inv_trans_8x4_dc = ff_simple_idct84_add;
-        v->vc1dsp.vc1_inv_trans_4x8_dc = ff_simple_idct48_add;
-        v->vc1dsp.vc1_inv_trans_4x4_dc = ff_simple_idct44_add;
-    }
 
     v->fastuvmc        = get_bits1(gb); //common
     if (!v->profile && !v->fastuvmc) {
diff --git a/libavcodec/vc1dec.c b/libavcodec/vc1dec.c
index fa6b5cfd3c..2cb39430f5 100644
--- a/libavcodec/vc1dec.c
+++ b/libavcodec/vc1dec.c
@@ -40,6 +40,7 @@
 #include "msmpeg4data.h"
 #include "msmpeg4dec.h"
 #include "profiles.h"
+#include "simple_idct.h"
 #include "vc1.h"
 #include "vc1data.h"
 #include "libavutil/avassert.h"
@@ -562,6 +563,14 @@ static av_cold int vc1_decode_init(AVCodecContext *avctx)
         memcpy(v->zz_8x8, ff_wmv1_scantable, 4*64);
         v->left_blk_sh = 3;
         v->top_blk_sh  = 0;
+        v->vc1dsp.vc1_inv_trans_8x8    = ff_simple_idct_int16_8bit;
+        v->vc1dsp.vc1_inv_trans_8x4    = ff_simple_idct84_add;
+        v->vc1dsp.vc1_inv_trans_4x8    = ff_simple_idct48_add;
+        v->vc1dsp.vc1_inv_trans_4x4    = ff_simple_idct44_add;
+        v->vc1dsp.vc1_inv_trans_8x8_dc = ff_simple_idct_add_int16_8bit;
+        v->vc1dsp.vc1_inv_trans_8x4_dc = ff_simple_idct84_add;
+        v->vc1dsp.vc1_inv_trans_4x8_dc = ff_simple_idct48_add;
+        v->vc1dsp.vc1_inv_trans_4x4_dc = ff_simple_idct44_add;
     }
 
     if (avctx->codec_id == AV_CODEC_ID_WMV3IMAGE || avctx->codec_id == AV_CODEC_ID_VC1IMAGE) {
-- 
2.34.1

_______________________________________________
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:[~2022-10-30 23:57 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-10-30 23:41 [FFmpeg-devel] [PATCH 01/19] avcodec/vc1: Don't check for AVCodecContext.codec Andreas Rheinhardt
2022-10-30 23:56 ` [FFmpeg-devel] [PATCH 02/19] avcodec/vc1: Remove always-false check Andreas Rheinhardt
2022-10-30 23:56 ` [FFmpeg-devel] [PATCH 03/19] avcodec/vc1: Don't check for errors for complete VLC Andreas Rheinhardt
2022-10-30 23:56 ` [FFmpeg-devel] [PATCH 04/19] avcodec/vc1: Don't use VLC to read bfraction Andreas Rheinhardt
2022-10-30 23:56 ` [FFmpeg-devel] [PATCH 05/19] avcodec/vc1_parser: Set parse_only only once Andreas Rheinhardt
2022-10-30 23:56 ` [FFmpeg-devel] [PATCH 06/19] avcodec/vc1_parser: Don't call ff_vc1_init_common() Andreas Rheinhardt
2022-10-30 23:56 ` Andreas Rheinhardt [this message]
2022-10-30 23:56 ` [FFmpeg-devel] [PATCH 08/19] avcodec/vc1data: Remove duplicate defines Andreas Rheinhardt
2022-10-30 23:56 ` [FFmpeg-devel] [PATCH 09/19] avcodec/vc1data: Remove declarations of inexistent arrays Andreas Rheinhardt
2022-10-30 23:56 ` [FFmpeg-devel] [PATCH 10/19] avcodec/vc1data: Move VLC codes/lengths tables to a header Andreas Rheinhardt
2022-10-30 23:56 ` [FFmpeg-devel] [PATCH 11/19] avcodec/vc1: Move ff_vc1_init_common() to vc1dec.c Andreas Rheinhardt
2022-10-30 23:56 ` [FFmpeg-devel] [PATCH 12/19] avcodec/vc1_block: Don't duplicate #defines Andreas Rheinhardt
2022-10-30 23:56 ` [FFmpeg-devel] [PATCH 13/19] avcodec/msmpeg4dec: Factor initializing VLCs shared with VC-1 out Andreas Rheinhardt
2022-10-30 23:56 ` [FFmpeg-devel] [PATCH 14/19] avcodec/vc1dec: Don't open and close decoder during init Andreas Rheinhardt
2022-10-30 23:56 ` [FFmpeg-devel] [PATCH 15/19] avcodec/vc1dec: Factor (re)initializing code out Andreas Rheinhardt
2022-10-30 23:56 ` [FFmpeg-devel] [PATCH 16/19] avcodec/vc1dec: Return early upon error Andreas Rheinhardt
2022-10-30 23:56 ` [FFmpeg-devel] [PATCH 17/19] avcodec/msmpeg4data: Move data shared between msmpeg4 and VC-1 out Andreas Rheinhardt
2022-10-30 23:56 ` [FFmpeg-devel] [PATCH 18/19] avcodec/vc1dec: Split VC-1 decoders from msmpeg4 Andreas Rheinhardt
2022-10-30 23:56 ` [FFmpeg-devel] [PATCH 19/19] avcodec/vc1_block: Remove redundant write Andreas Rheinhardt
2022-11-03  2:57 ` [FFmpeg-devel] [PATCH 20/24] avcodec/mpegvideo_dec: Don't use MotionEstContext as scratch space Andreas Rheinhardt
2022-11-03  2:57 ` [FFmpeg-devel] [PATCH 21/24] avcodec/vc1dec: Remove VC-1 decoders->H.263 decoder dependency Andreas Rheinhardt
2022-11-03  2:57 ` [FFmpeg-devel] [PATCH 22/24] avcodec/h263dec: Move initializing qpel DSP context to mpeg4videodec.c Andreas Rheinhardt
2022-11-03  2:57 ` [FFmpeg-devel] [PATCH 23/24] avcodec/mpegvideo_enc: Move initializing QpelDSPCtx to mpeg4videoenc.c Andreas Rheinhardt
2022-11-03  2:57 ` [FFmpeg-devel] [PATCH 24/24] avcodec/motion_est: Remove unused field Andreas Rheinhardt
2022-11-05 17:18 ` [FFmpeg-devel] [PATCH 01/19] avcodec/vc1: Don't check for AVCodecContext.codec Andreas Rheinhardt

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=GV1P250MB0737F8F713A87322D7D927588F349@GV1P250MB0737.EURP250.PROD.OUTLOOK.COM \
    --to=andreas.rheinhardt@outlook.com \
    --cc=ffmpeg-devel@ffmpeg.org \
    /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