diff options
author | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-12-12 00:12:59 +0000 |
---|---|---|
committer | Baptiste Coudurier <baptiste.coudurier@gmail.com> | 2008-12-12 00:12:59 +0000 |
commit | e1b24cfddb46be1702317e665fbe776fe9fc8633 (patch) | |
tree | c6fb09b97a92b4e26fcfa264861c1a40db51a461 /libavcodec/dnxhdenc.c | |
parent | 8c9c0ea42798c7dd69cfd7c4c3e49712de768e70 (diff) | |
download | ffmpeg-streaming-e1b24cfddb46be1702317e665fbe776fe9fc8633.zip ffmpeg-streaming-e1b24cfddb46be1702317e665fbe776fe9fc8633.tar.gz |
Move get_pixels_8x4 before init func to avoid useless forward declaration.
Originally committed as revision 16071 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dnxhdenc.c')
-rw-r--r-- | libavcodec/dnxhdenc.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c index 48df839..6c141d5 100644 --- a/libavcodec/dnxhdenc.c +++ b/libavcodec/dnxhdenc.c @@ -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); |