diff mbox

[FFmpeg-devel,v4,1/2] Move bitswap_32() into a header file.

Message ID E1cQhMM-0003cH-D2@pannekake.samfundet.no
State New
Headers show

Commit Message

Steinar H. Gunderson Jan. 8, 2017, 1:14 p.m. UTC
Allows more codecs than mpeg12video to make use of it.
---
 libavcodec/bitstream.c | 8 --------
 libavcodec/mathops.h   | 8 ++++++++
 2 files changed, 8 insertions(+), 8 deletions(-)

Comments

Steinar H. Gunderson Jan. 11, 2017, 11:19 a.m. UTC | #1
On Sun, Jan 08, 2017 at 02:14:54PM +0100, Steinar H. Gunderson wrote:
> Allows more codecs than mpeg12video to make use of it.
> ---

48h ping. (I realize I should maybe have reset the commit date so that it
doesn't sort odd.) Is there anything else that I should do about this
patch set?

/* Steinar */
Paul B Mahol Jan. 11, 2017, 1:06 p.m. UTC | #2
On 1/11/17, Steinar H. Gunderson <steinar+ffmpeg@gunderson.no> wrote:
> On Sun, Jan 08, 2017 at 02:14:54PM +0100, Steinar H. Gunderson wrote:
>> Allows more codecs than mpeg12video to make use of it.
>> ---
>
> 48h ping. (I realize I should maybe have reset the commit date so that it
> doesn't sort odd.) Is there anything else that I should do about this
> patch set?

No, I will apply if nobody wants/can.
diff mbox

Patch

diff --git a/libavcodec/bitstream.c b/libavcodec/bitstream.c
index 6c8dca1d85..c26650099f 100644
--- a/libavcodec/bitstream.c
+++ b/libavcodec/bitstream.c
@@ -128,14 +128,6 @@  static int alloc_table(VLC *vlc, int size, int use_static)
     return index;
 }
 
-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;
     uint16_t symbol;
diff --git a/libavcodec/mathops.h b/libavcodec/mathops.h
index 5168dc2ce0..958132d897 100644
--- a/libavcodec/mathops.h
+++ b/libavcodec/mathops.h
@@ -249,4 +249,12 @@  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 */