@@ -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;
@@ -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"
@@ -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 */
@@ -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"
@@ -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"
@@ -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"
@@ -21,6 +21,7 @@
*/
#include "libavutil/channel_layout.h"
+#include "libavutil/reverse.h"
#include "avcodec.h"
#include "codec_internal.h"
#include "encode.h"
@@ -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"
@@ -21,6 +21,7 @@
*/
#include "libavutil/avstring.h"
+#include "libavutil/reverse.h"
#include "avcodec.h"
#include "codec_internal.h"
@@ -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"
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(-)