Commit e1b24cfd authored by Baptiste Coudurier's avatar Baptiste Coudurier

Move get_pixels_8x4 before init func to avoid useless forward declaration.

Originally committed as revision 16071 to svn://svn.ffmpeg.org/ffmpeg/trunk
parent 8c9c0ea4
......@@ -33,6 +33,23 @@ int dct_quantize_c(MpegEncContext *s, DCTELEM *block, int n, int qscale, int *ov
#define LAMBDA_FRAC_BITS 10
static av_always_inline void dnxhd_get_pixels_8x4(DCTELEM *restrict block, const uint8_t *pixels, int line_size)
{
int i;
for (i = 0; i < 4; 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;
block += 8;
}
memcpy(block , block- 8, sizeof(*block)*8);
memcpy(block+ 8, block-16, sizeof(*block)*8);
memcpy(block+16, block-24, sizeof(*block)*8);
memcpy(block+24, block-32, sizeof(*block)*8);
}
static int dnxhd_init_vlc(DNXHDEncContext *ctx)
{
int i, j, level, run;
......@@ -330,23 +347,6 @@ static av_always_inline int dnxhd_calc_ac_bits(DNXHDEncContext *ctx, DCTELEM *bl
return bits;
}
static av_always_inline void dnxhd_get_pixels_8x4(DCTELEM *restrict block, const uint8_t *pixels, int line_size)
{
int i;
for (i = 0; i < 4; 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;
block += 8;
}
memcpy(block , block- 8, sizeof(*block)*8);
memcpy(block+ 8, block-16, sizeof(*block)*8);
memcpy(block+16, block-24, sizeof(*block)*8);
memcpy(block+24, block-32, sizeof(*block)*8);
}
static av_always_inline void dnxhd_get_blocks(DNXHDEncContext *ctx, int mb_x, int mb_y)
{
const uint8_t *ptr_y = ctx->thread[0]->src[0] + ((mb_y << 4) * ctx->m.linesize) + (mb_x << 4);
......
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