mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-13 21:28:01 +02:00
dsputil: Remove unused 32-bit functions
Previously, if dct_bits was set to 32, we used separate 32-bit versions of these functions. Since dct_bits now is removed, remove the unused 32-bit versions of the functions. Signed-off-by: Martin Storsjö <martin@martin.st>
This commit is contained in:
parent
c443117f25
commit
619e0da191
@ -2728,21 +2728,22 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx)
|
||||
#define FUNC(f, depth) f ## _ ## depth
|
||||
#define FUNCC(f, depth) f ## _ ## depth ## _c
|
||||
|
||||
#define BIT_DEPTH_FUNCS(depth, dct)\
|
||||
c->get_pixels = FUNCC(get_pixels ## dct , depth);\
|
||||
c->draw_edges = FUNCC(draw_edges , depth);\
|
||||
c->clear_block = FUNCC(clear_block ## dct , depth);\
|
||||
c->clear_blocks = FUNCC(clear_blocks ## dct , depth);\
|
||||
c->clear_block = FUNCC(clear_block, 8);
|
||||
c->clear_blocks = FUNCC(clear_blocks, 8);
|
||||
|
||||
#define BIT_DEPTH_FUNCS(depth) \
|
||||
c->get_pixels = FUNCC(get_pixels, depth);\
|
||||
c->draw_edges = FUNCC(draw_edges, depth);
|
||||
|
||||
switch (avctx->bits_per_raw_sample) {
|
||||
case 9:
|
||||
BIT_DEPTH_FUNCS(9, _16);
|
||||
BIT_DEPTH_FUNCS(9);
|
||||
break;
|
||||
case 10:
|
||||
BIT_DEPTH_FUNCS(10, _16);
|
||||
BIT_DEPTH_FUNCS(10);
|
||||
break;
|
||||
default:
|
||||
BIT_DEPTH_FUNCS(8, _16);
|
||||
BIT_DEPTH_FUNCS(8);
|
||||
break;
|
||||
}
|
||||
|
||||
|
@ -65,46 +65,38 @@ static void FUNCC(draw_edges)(uint8_t *_buf, int _wrap, int width, int height, i
|
||||
memcpy(last_line + (i + 1) * wrap, last_line, (width + w + w) * sizeof(pixel)); // bottom
|
||||
}
|
||||
|
||||
#define DCTELEM_FUNCS(dctcoef, suffix) \
|
||||
static void FUNCC(get_pixels ## suffix)(int16_t *restrict _block, \
|
||||
const uint8_t *_pixels, \
|
||||
int line_size) \
|
||||
{ \
|
||||
const pixel *pixels = (const pixel *) _pixels; \
|
||||
dctcoef *restrict block = (dctcoef *) _block; \
|
||||
int i; \
|
||||
\
|
||||
/* read the pixels */ \
|
||||
for(i=0;i<8;i++) { \
|
||||
block[0] = pixels[0]; \
|
||||
block[1] = pixels[1]; \
|
||||
block[2] = pixels[2]; \
|
||||
block[3] = pixels[3]; \
|
||||
block[4] = pixels[4]; \
|
||||
block[5] = pixels[5]; \
|
||||
block[6] = pixels[6]; \
|
||||
block[7] = pixels[7]; \
|
||||
pixels += line_size / sizeof(pixel); \
|
||||
block += 8; \
|
||||
} \
|
||||
} \
|
||||
\
|
||||
static void FUNCC(clear_block ## suffix)(int16_t *block) \
|
||||
{ \
|
||||
memset(block, 0, sizeof(dctcoef)*64); \
|
||||
} \
|
||||
\
|
||||
/** \
|
||||
* memset(blocks, 0, sizeof(int16_t)*6*64) \
|
||||
*/ \
|
||||
static void FUNCC(clear_blocks ## suffix)(int16_t *blocks) \
|
||||
{ \
|
||||
memset(blocks, 0, sizeof(dctcoef)*6*64); \
|
||||
static void FUNCC(get_pixels)(int16_t *restrict block,
|
||||
const uint8_t *_pixels,
|
||||
int line_size)
|
||||
{
|
||||
const pixel *pixels = (const pixel *) _pixels;
|
||||
int i;
|
||||
|
||||
/* read the pixels */
|
||||
for(i=0;i<8;i++) {
|
||||
block[0] = pixels[0];
|
||||
block[1] = pixels[1];
|
||||
block[2] = pixels[2];
|
||||
block[3] = pixels[3];
|
||||
block[4] = pixels[4];
|
||||
block[5] = pixels[5];
|
||||
block[6] = pixels[6];
|
||||
block[7] = pixels[7];
|
||||
pixels += line_size / sizeof(pixel);
|
||||
block += 8;
|
||||
}
|
||||
}
|
||||
|
||||
DCTELEM_FUNCS(int16_t, _16)
|
||||
#if BIT_DEPTH > 8
|
||||
DCTELEM_FUNCS(dctcoef, _32)
|
||||
#if BIT_DEPTH == 8
|
||||
static void FUNCC(clear_block)(int16_t *block)
|
||||
{
|
||||
memset(block, 0, sizeof(int16_t)*64);
|
||||
}
|
||||
|
||||
static void FUNCC(clear_blocks)(int16_t *blocks)
|
||||
{
|
||||
memset(blocks, 0, sizeof(int16_t)*6*64);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if BIT_DEPTH == 8
|
||||
|
Loading…
Reference in New Issue
Block a user