Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
 help / color / mirror / Atom feed
From: flow gg <hlefthleft@gmail.com>
To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Subject: [FFmpeg-devel] [PATCH 1/3] lvac/svqenc: add ff_svq1enc_init
Date: Fri, 29 Dec 2023 19:56:39 +0800
Message-ID: <CAEa-L+u3y3S8hbX9bBtrbT2p779SRZ+U=8Jct+9ULEpvksgMCw@mail.gmail.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 1 bytes --]



[-- Attachment #2: 0001-lvac-svqenc-add-ff_svq1enc_init.patch --]
[-- Type: text/x-patch, Size: 2142 bytes --]

From 55fe9e001545ed3ae1f2c64666d07aebaeb83a2a Mon Sep 17 00:00:00 2001
From: sunyuechi <sunyuechi@iscas.ac.cn>
Date: Fri, 29 Dec 2023 13:08:25 +0800
Subject: [PATCH 1/3] lvac/svqenc: add ff_svq1enc_init

This is for clarity and use in testing, consistent with other parts of the code
---
 libavcodec/svq1enc.c    | 18 ++++++++++++------
 libavcodec/svq1encdsp.h |  1 +
 2 files changed, 13 insertions(+), 6 deletions(-)

diff --git a/libavcodec/svq1enc.c b/libavcodec/svq1enc.c
index 764d047799..0dea405dec 100644
--- a/libavcodec/svq1enc.c
+++ b/libavcodec/svq1enc.c
@@ -634,18 +634,13 @@ static av_cold int svq1_encode_init(AVCodecContext *avctx)
                                         s->y_block_height * sizeof(int32_t));
     s->m.me.map            = av_mallocz(2 * ME_MAP_SIZE * sizeof(*s->m.me.map));
     s->m.new_picture       = av_frame_alloc();
-    s->svq1encdsp.ssd_int8_vs_int16 = ssd_int8_vs_int16_c;
 
     if (!s->m.me.scratchpad || !s->m.me.map ||
         !s->mb_type || !s->dummy || !s->m.new_picture)
         return AVERROR(ENOMEM);
     s->m.me.score_map = s->m.me.map + ME_MAP_SIZE;
 
-#if ARCH_PPC
-    ff_svq1enc_init_ppc(&s->svq1encdsp);
-#elif ARCH_X86
-    ff_svq1enc_init_x86(&s->svq1encdsp);
-#endif
+    ff_svq1enc_init(&s->svq1encdsp);
 
     ff_h263_encode_init(&s->m); // mv_penalty
 
@@ -764,3 +759,14 @@ const FFCodec ff_svq1_encoder = {
                                                      AV_PIX_FMT_NONE },
     .caps_internal  = FF_CODEC_CAP_INIT_CLEANUP,
 };
+
+void ff_svq1enc_init(SVQ1EncDSPContext *c)
+{
+    c->ssd_int8_vs_int16 = ssd_int8_vs_int16_c;
+
+#if ARCH_PPC
+    ff_svq1enc_init_ppc(c);
+#elif ARCH_X86
+    ff_svq1enc_init_x86(c);
+#endif
+}
diff --git a/libavcodec/svq1encdsp.h b/libavcodec/svq1encdsp.h
index 91b36735d7..618bf8463b 100644
--- a/libavcodec/svq1encdsp.h
+++ b/libavcodec/svq1encdsp.h
@@ -28,6 +28,7 @@ typedef struct SVQ1EncDSPContext {
                              intptr_t size);
 } SVQ1EncDSPContext;
 
+void ff_svq1enc_init(SVQ1EncDSPContext *c);
 void ff_svq1enc_init_ppc(SVQ1EncDSPContext *c);
 void ff_svq1enc_init_x86(SVQ1EncDSPContext *c);
 
-- 
2.43.0


[-- Attachment #3: Type: text/plain, Size: 251 bytes --]

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

                 reply	other threads:[~2023-12-29 11:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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='CAEa-L+u3y3S8hbX9bBtrbT2p779SRZ+U=8Jct+9ULEpvksgMCw@mail.gmail.com' \
    --to=hlefthleft@gmail.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