Commit 619e0da1 authored by Ronald S. Bultje's avatar Ronald S. Bultje Committed by Martin Storsjö

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: 's avatarMartin Storsjö <martin@martin.st>
parent c443117f
...@@ -2728,21 +2728,22 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx) ...@@ -2728,21 +2728,22 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx)
#define FUNC(f, depth) f ## _ ## depth #define FUNC(f, depth) f ## _ ## depth
#define FUNCC(f, depth) f ## _ ## depth ## _c #define FUNCC(f, depth) f ## _ ## depth ## _c
#define BIT_DEPTH_FUNCS(depth, dct)\ c->clear_block = FUNCC(clear_block, 8);
c->get_pixels = FUNCC(get_pixels ## dct , depth);\ c->clear_blocks = FUNCC(clear_blocks, 8);
c->draw_edges = FUNCC(draw_edges , depth);\
c->clear_block = FUNCC(clear_block ## dct , depth);\ #define BIT_DEPTH_FUNCS(depth) \
c->clear_blocks = FUNCC(clear_blocks ## dct , depth);\ c->get_pixels = FUNCC(get_pixels, depth);\
c->draw_edges = FUNCC(draw_edges, depth);
switch (avctx->bits_per_raw_sample) { switch (avctx->bits_per_raw_sample) {
case 9: case 9:
BIT_DEPTH_FUNCS(9, _16); BIT_DEPTH_FUNCS(9);
break; break;
case 10: case 10:
BIT_DEPTH_FUNCS(10, _16); BIT_DEPTH_FUNCS(10);
break; break;
default: default:
BIT_DEPTH_FUNCS(8, _16); BIT_DEPTH_FUNCS(8);
break; break;
} }
......
...@@ -65,46 +65,38 @@ static void FUNCC(draw_edges)(uint8_t *_buf, int _wrap, int width, int height, i ...@@ -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 memcpy(last_line + (i + 1) * wrap, last_line, (width + w + w) * sizeof(pixel)); // bottom
} }
#define DCTELEM_FUNCS(dctcoef, suffix) \ static void FUNCC(get_pixels)(int16_t *restrict block,
static void FUNCC(get_pixels ## suffix)(int16_t *restrict _block, \ const uint8_t *_pixels,
const uint8_t *_pixels, \ int line_size)
int line_size) \ {
{ \ const pixel *pixels = (const pixel *) _pixels;
const pixel *pixels = (const pixel *) _pixels; \ int i;
dctcoef *restrict block = (dctcoef *) _block; \
int i; \ /* read the pixels */
\ for(i=0;i<8;i++) {
/* read the pixels */ \ block[0] = pixels[0];
for(i=0;i<8;i++) { \ block[1] = pixels[1];
block[0] = pixels[0]; \ block[2] = pixels[2];
block[1] = pixels[1]; \ block[3] = pixels[3];
block[2] = pixels[2]; \ block[4] = pixels[4];
block[3] = pixels[3]; \ block[5] = pixels[5];
block[4] = pixels[4]; \ block[6] = pixels[6];
block[5] = pixels[5]; \ block[7] = pixels[7];
block[6] = pixels[6]; \ pixels += line_size / sizeof(pixel);
block[7] = pixels[7]; \ block += 8;
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); \
} }
DCTELEM_FUNCS(int16_t, _16) #if BIT_DEPTH == 8
#if BIT_DEPTH > 8 static void FUNCC(clear_block)(int16_t *block)
DCTELEM_FUNCS(dctcoef, _32) {
memset(block, 0, sizeof(int16_t)*64);
}
static void FUNCC(clear_blocks)(int16_t *blocks)
{
memset(blocks, 0, sizeof(int16_t)*6*64);
}
#endif #endif
#if BIT_DEPTH == 8 #if BIT_DEPTH == 8
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment