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 4/7] avcodec/mathops: Move bitswap_32() to its only user
Date: Thu, 17 Mar 2022 13:43:16 +0100
Message-ID: <AS1PR01MB95649A182564D2F4B03BBF7D8F129@AS1PR01MB9564.eurprd01.prod.exchangelabs.com> (raw)
In-Reply-To: <AS1PR01MB9564621E92A6F42E563B74A38F119@AS1PR01MB9564.eurprd01.prod.exchangelabs.com>

Effectively reverts eaff1aa09e90e2711207c9463db8bf8e8dec8178
given that bitswap_32 is no longer used outside of bitstream.c
since 03008c2811ec26cf338780a89b6b2b849b399e3c.

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
---
 libavcodec/bitstream.c | 11 +++++++++--
 libavcodec/dstdec.c    |  1 +
 libavcodec/mathops.h   |  9 ---------
 libavcodec/mpeg12dec.c |  1 +
 libavcodec/pcm.c       |  1 +
 libavcodec/s302m.c     |  1 +
 libavcodec/s302menc.c  |  1 +
 libavcodec/tiff.c      |  1 +
 libavcodec/xbmdec.c    |  1 +
 libavcodec/xbmenc.c    |  1 +
 10 files changed, 17 insertions(+), 11 deletions(-)

diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c
index c948c889b6..04817f9a84 100644
--- a/libavcodec/bitstream.c
+++ b/libavcodec/bitstream.c
@@ -35,7 +35,6 @@
 
 #include "config.h"
 #include "libavutil/avassert.h"
-#include "libavutil/bswap.h"
 #include "libavutil/error.h"
 #include "libavutil/internal.h"
 #include "libavutil/intreadwrite.h"
@@ -43,7 +42,7 @@
 #include "libavutil/macros.h"
 #include "libavutil/mem.h"
 #include "libavutil/qsort.h"
-#include "mathops.h"
+#include "libavutil/reverse.h"
 #include "put_bits.h"
 #include "vlc.h"
 
@@ -134,6 +133,14 @@ static int alloc_table(VLC *vlc, int size, int use_static)
 
 #define LOCALBUF_ELEMS 1500 // the maximum currently needed is 1296 by rv34
 
+static av_always_inline uint32_t bitswap_32(uint32_t x)
+{
+    return (uint32_t)ff_reverse[ x        & 0xFF] << 24 |
+           (uint32_t)ff_reverse[(x >> 8)  & 0xFF] << 16 |
+           (uint32_t)ff_reverse[(x >> 16) & 0xFF] << 8  |
+           (uint32_t)ff_reverse[ x >> 24];
+}
+
 typedef struct VLCcode {
     uint8_t bits;
     VLC_TYPE symbol;
diff --git a/libavcodec/dstdec.c b/libavcodec/dstdec.c
index 0458856580..3ea3f38eee 100644
--- a/libavcodec/dstdec.c
+++ b/libavcodec/dstdec.c
@@ -27,6 +27,7 @@
 
 #include "libavutil/intreadwrite.h"
 #include "libavutil/mem_internal.h"
+#include "libavutil/reverse.h"
 #include "codec_internal.h"
 #include "internal.h"
 #include "get_bits.h"
diff --git a/libavcodec/mathops.h b/libavcodec/mathops.h
index 1c35664318..239e0e492f 100644
--- a/libavcodec/mathops.h
+++ b/libavcodec/mathops.h
@@ -25,7 +25,6 @@
 #include <stdint.h>
 
 #include "libavutil/common.h"
-#include "libavutil/reverse.h"
 #include "config.h"
 
 #define MAX_NEG_CROP 1024
@@ -240,12 +239,4 @@ static inline int8_t ff_u8_to_s8(uint8_t a)
     return b.s8;
 }
 
-static av_always_inline uint32_t bitswap_32(uint32_t x)
-{
-    return (uint32_t)ff_reverse[ x        & 0xFF] << 24 |
-           (uint32_t)ff_reverse[(x >> 8)  & 0xFF] << 16 |
-           (uint32_t)ff_reverse[(x >> 16) & 0xFF] << 8  |
-           (uint32_t)ff_reverse[ x >> 24];
-}
-
 #endif /* AVCODEC_MATHOPS_H */
diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c
index 6110e63af8..6b6cadeb05 100644
--- a/libavcodec/mpeg12dec.c
+++ b/libavcodec/mpeg12dec.c
@@ -34,6 +34,7 @@
 #include "libavutil/imgutils.h"
 #include "libavutil/internal.h"
 #include "libavutil/mem_internal.h"
+#include "libavutil/reverse.h"
 #include "libavutil/stereo3d.h"
 #include "libavutil/timecode.h"
 
diff --git a/libavcodec/pcm.c b/libavcodec/pcm.c
index 1e83b356ac..aaccd86199 100644
--- a/libavcodec/pcm.c
+++ b/libavcodec/pcm.c
@@ -28,6 +28,7 @@
 #include "config_components.h"
 #include "libavutil/attributes.h"
 #include "libavutil/float_dsp.h"
+#include "libavutil/reverse.h"
 #include "libavutil/thread.h"
 #include "avcodec.h"
 #include "bytestream.h"
diff --git a/libavcodec/s302m.c b/libavcodec/s302m.c
index 2c0cfc699a..d90549e487 100644
--- a/libavcodec/s302m.c
+++ b/libavcodec/s302m.c
@@ -24,6 +24,7 @@
 #include "libavutil/intreadwrite.h"
 #include "libavutil/opt.h"
 #include "libavutil/log.h"
+#include "libavutil/reverse.h"
 #include "avcodec.h"
 #include "codec_internal.h"
 #include "internal.h"
diff --git a/libavcodec/s302menc.c b/libavcodec/s302menc.c
index ad5186d69c..737fc94697 100644
--- a/libavcodec/s302menc.c
+++ b/libavcodec/s302menc.c
@@ -21,6 +21,7 @@
  */
 
 #include "libavutil/channel_layout.h"
+#include "libavutil/reverse.h"
 #include "avcodec.h"
 #include "codec_internal.h"
 #include "encode.h"
diff --git a/libavcodec/tiff.c b/libavcodec/tiff.c
index 88ac838587..fdd3ae5c68 100644
--- a/libavcodec/tiff.c
+++ b/libavcodec/tiff.c
@@ -39,6 +39,7 @@
 #include "libavutil/intreadwrite.h"
 #include "libavutil/imgutils.h"
 #include "libavutil/opt.h"
+#include "libavutil/reverse.h"
 #include "avcodec.h"
 #include "bytestream.h"
 #include "codec_internal.h"
diff --git a/libavcodec/xbmdec.c b/libavcodec/xbmdec.c
index 0ea5883024..9dbd0ac571 100644
--- a/libavcodec/xbmdec.c
+++ b/libavcodec/xbmdec.c
@@ -21,6 +21,7 @@
  */
 
 #include "libavutil/avstring.h"
+#include "libavutil/reverse.h"
 
 #include "avcodec.h"
 #include "codec_internal.h"
diff --git a/libavcodec/xbmenc.c b/libavcodec/xbmenc.c
index d578eec930..95db87dba6 100644
--- a/libavcodec/xbmenc.c
+++ b/libavcodec/xbmenc.c
@@ -20,6 +20,7 @@
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
+#include "libavutil/reverse.h"
 #include "avcodec.h"
 #include "codec_internal.h"
 #include "encode.h"
-- 
2.32.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".

  parent reply	other threads:[~2022-03-17 12:43 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-16 21:45 [FFmpeg-devel] [PATCH 1/3] avcodec/internal: Move FF_CODEC_CAP_* to a new header codec_internal.h Andreas Rheinhardt
2022-03-16 21:47 ` [FFmpeg-devel] [PATCH 2/3] avcodec/codec_internal: Add FFCodec, hide internal part of AVCodec Andreas Rheinhardt
2022-03-16 21:47 ` [FFmpeg-devel] [PATCH 3/3] avcodec/codec_internal: Rename AVCodecDefault->FFCodecDefault Andreas Rheinhardt
2022-03-17 12:43 ` Andreas Rheinhardt [this message]
2022-03-17 12:43 ` [FFmpeg-devel] [PATCH 5/7] avcodec/bitstream: Move code for initializing VLCs to file of its own Andreas Rheinhardt
2022-03-17 12:43 ` [FFmpeg-devel] [PATCH 6/7] avcodec/internal: Move FF_SIGNBIT and ff_log2_run to mathops.h Andreas Rheinhardt
2022-03-17 12:43 ` [FFmpeg-devel] [PATCH 7/7] avcodec/internal: Move FF_DEFAULT_QUANT_BIAS to mpegvideoenc.h Andreas Rheinhardt
2022-03-18 10:52 ` [FFmpeg-devel] [PATCH 8/8] avcodec/codec_internal: Include codec_tags only when they are needed Andreas Rheinhardt
2022-03-18 13:13   ` Michael Niedermayer
2022-03-18 13:31     ` Michael Niedermayer
2022-03-18 13:39       ` Andreas Rheinhardt
2022-03-18 13:37     ` Andreas Rheinhardt
2022-03-31  8:26   ` 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=AS1PR01MB95649A182564D2F4B03BBF7D8F129@AS1PR01MB9564.eurprd01.prod.exchangelabs.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