forked from FFmpeg/FFmpeg
avcodec/internal: Move FF_SIGNBIT and ff_log2_run to mathops.h
It is a more fitting place for them. Also move the definition of ff_log2_run to mathtables.c. Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
parent
495de744fa
commit
86c909558c
12 changed files with 15 additions and 24 deletions
|
@ -21,7 +21,7 @@
|
|||
*/
|
||||
|
||||
#include "aptx.h"
|
||||
#include "internal.h"
|
||||
#include "mathops.h"
|
||||
|
||||
|
||||
static const int32_t quantize_intervals_LF[65] = {
|
||||
|
|
|
@ -36,15 +36,6 @@
|
|||
#include "libavutil/intreadwrite.h"
|
||||
#include "put_bits.h"
|
||||
|
||||
const uint8_t ff_log2_run[41]={
|
||||
0, 0, 0, 0, 1, 1, 1, 1,
|
||||
2, 2, 2, 2, 3, 3, 3, 3,
|
||||
4, 4, 5, 5, 6, 6, 7, 7,
|
||||
8, 9,10,11,12,13,14,15,
|
||||
16,17,18,19,20,21,22,23,
|
||||
24,
|
||||
};
|
||||
|
||||
void ff_put_string(PutBitContext *pb, const char *string, int terminate_string)
|
||||
{
|
||||
while (*string) {
|
||||
|
|
|
@ -25,14 +25,10 @@
|
|||
* @author Stefan Gehrer <stefan.gehrer@gmx.de>
|
||||
*/
|
||||
|
||||
#include "libavutil/mem_internal.h"
|
||||
|
||||
#include "avcodec.h"
|
||||
#include "get_bits.h"
|
||||
#include "golomb.h"
|
||||
#include "h264chroma.h"
|
||||
#include "idctdsp.h"
|
||||
#include "internal.h"
|
||||
#include "mathops.h"
|
||||
#include "qpeldsp.h"
|
||||
#include "cavs.h"
|
||||
|
|
|
@ -32,6 +32,7 @@
|
|||
#include "cavs.h"
|
||||
#include "codec_internal.h"
|
||||
#include "internal.h"
|
||||
#include "mathops.h"
|
||||
#include "mpeg12data.h"
|
||||
#include "startcode.h"
|
||||
|
||||
|
|
|
@ -33,7 +33,7 @@
|
|||
#include "codec_internal.h"
|
||||
#include "encode.h"
|
||||
#include "fdctdsp.h"
|
||||
#include "internal.h"
|
||||
#include "mathops.h"
|
||||
#include "mpegvideo.h"
|
||||
#include "mpegvideoenc.h"
|
||||
#include "pixblockdsp.h"
|
||||
|
|
|
@ -32,7 +32,6 @@
|
|||
#include "libavutil/pixdesc.h"
|
||||
#include "avcodec.h"
|
||||
#include "codec_internal.h"
|
||||
#include "internal.h"
|
||||
#include "get_bits.h"
|
||||
#include "rangecoder.h"
|
||||
#include "golomb.h"
|
||||
|
|
|
@ -35,7 +35,6 @@
|
|||
#include "avcodec.h"
|
||||
#include "encode.h"
|
||||
#include "codec_internal.h"
|
||||
#include "internal.h"
|
||||
#include "put_bits.h"
|
||||
#include "put_golomb.h"
|
||||
#include "rangecoder.h"
|
||||
|
|
|
@ -44,8 +44,6 @@
|
|||
|
||||
#define FF_SANE_NB_CHANNELS 512U
|
||||
|
||||
#define FF_SIGNBIT(x) ((x) >> CHAR_BIT * sizeof(x) - 1)
|
||||
|
||||
#if HAVE_SIMD_ALIGN_64
|
||||
# define STRIDE_ALIGN 64 /* AVX-512 */
|
||||
#elif HAVE_SIMD_ALIGN_32
|
||||
|
@ -159,8 +157,6 @@ typedef struct AVCodecInternal {
|
|||
AVChannelLayout initial_ch_layout;
|
||||
} AVCodecInternal;
|
||||
|
||||
extern const uint8_t ff_log2_run[41];
|
||||
|
||||
/**
|
||||
* Return the index into tab at which {a,b} match elements {[0],[1]} of tab.
|
||||
* If there is no such matching pair then size is returned.
|
||||
|
|
|
@ -29,9 +29,7 @@
|
|||
#include "codec_internal.h"
|
||||
#include "get_bits.h"
|
||||
#include "golomb.h"
|
||||
#include "internal.h"
|
||||
#include "mathops.h"
|
||||
#include "mjpeg.h"
|
||||
#include "mjpegdec.h"
|
||||
#include "jpegls.h"
|
||||
#include "jpeglsdec.h"
|
||||
|
|
|
@ -34,7 +34,6 @@
|
|||
#include "get_bits.h"
|
||||
#include "put_bits.h"
|
||||
#include "put_golomb.h"
|
||||
#include "internal.h"
|
||||
#include "mathops.h"
|
||||
#include "mjpeg.h"
|
||||
#include "jpegls.h"
|
||||
|
|
|
@ -30,6 +30,7 @@
|
|||
#define MAX_NEG_CROP 1024
|
||||
|
||||
extern const uint32_t ff_inverse[257];
|
||||
extern const uint8_t ff_log2_run[41];
|
||||
extern const uint8_t ff_sqrt_tab[256];
|
||||
extern const uint8_t ff_crop_tab[256 + 2 * MAX_NEG_CROP];
|
||||
extern const uint8_t ff_zigzag_direct[64];
|
||||
|
@ -125,6 +126,8 @@ static inline av_const int median4(int a, int b, int c, int d)
|
|||
}
|
||||
#endif
|
||||
|
||||
#define FF_SIGNBIT(x) ((x) >> CHAR_BIT * sizeof(x) - 1)
|
||||
|
||||
#ifndef sign_extend
|
||||
static inline av_const int sign_extend(int val, unsigned bits)
|
||||
{
|
||||
|
|
|
@ -112,3 +112,12 @@ const uint8_t ff_zigzag_scan[16+1] = {
|
|||
1 + 2 * 4, 0 + 3 * 4, 1 + 3 * 4, 2 + 2 * 4,
|
||||
3 + 1 * 4, 3 + 2 * 4, 2 + 3 * 4, 3 + 3 * 4,
|
||||
};
|
||||
|
||||
const uint8_t ff_log2_run[41] = {
|
||||
0, 0, 0, 0, 1, 1, 1, 1,
|
||||
2, 2, 2, 2, 3, 3, 3, 3,
|
||||
4, 4, 5, 5, 6, 6, 7, 7,
|
||||
8, 9, 10, 11, 12, 13, 14, 15,
|
||||
16, 17, 18, 19, 20, 21, 22, 23,
|
||||
24,
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue