avcodec/mathops: Move bitswap_32() to its only user

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

Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
release/5.1
Andreas Rheinhardt 3 years ago
parent 7aebdb8bf1
commit b303f1e083
  1. 11
      libavcodec/bitstream.c
  2. 1
      libavcodec/dstdec.c
  3. 9
      libavcodec/mathops.h
  4. 1
      libavcodec/mpeg12dec.c
  5. 1
      libavcodec/pcm.c
  6. 1
      libavcodec/s302m.c
  7. 1
      libavcodec/s302menc.c
  8. 1
      libavcodec/tiff.c
  9. 1
      libavcodec/xbmdec.c
  10. 1
      libavcodec/xbmenc.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;

@ -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"

Loading…
Cancel
Save