diff options
Diffstat (limited to 'libavcodec/dnxhdenc.c')
-rw-r--r-- | libavcodec/dnxhdenc.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c index 690e64f869..5fbf46b281 100644 --- a/libavcodec/dnxhdenc.c +++ b/libavcodec/dnxhdenc.c @@ -51,7 +51,7 @@ static const AVClass class = { #define LAMBDA_FRAC_BITS 10 -static void dnxhd_8bit_get_pixels_8x4_sym(DCTELEM *av_restrict block, const uint8_t *pixels, int line_size) +static void dnxhd_8bit_get_pixels_8x4_sym(int16_t *av_restrict block, const uint8_t *pixels, int line_size) { int i; for (i = 0; i < 4; i++) { @@ -68,7 +68,7 @@ static void dnxhd_8bit_get_pixels_8x4_sym(DCTELEM *av_restrict block, const uint memcpy(block + 24, block - 32, sizeof(*block) * 8); } -static av_always_inline void dnxhd_10bit_get_pixels_8x4_sym(DCTELEM *av_restrict block, const uint8_t *pixels, int line_size) +static av_always_inline void dnxhd_10bit_get_pixels_8x4_sym(int16_t *av_restrict block, const uint8_t *pixels, int line_size) { int i; const uint16_t* pixels16 = (const uint16_t*)pixels; @@ -88,7 +88,7 @@ static av_always_inline void dnxhd_10bit_get_pixels_8x4_sym(DCTELEM *av_restrict memcpy(block + 24, block - 32, sizeof(*block) * 8); } -static int dnxhd_10bit_dct_quantize(MpegEncContext *ctx, DCTELEM *block, +static int dnxhd_10bit_dct_quantize(MpegEncContext *ctx, int16_t *block, int n, int qscale, int *overflow) { const uint8_t *scantable= ctx->intra_scantable.scantable; @@ -392,7 +392,7 @@ static av_always_inline void dnxhd_encode_dc(DNXHDEncContext *ctx, int diff) (ctx->cid_table->dc_codes[nbits]<<nbits) + (diff & ((1 << nbits) - 1))); } -static av_always_inline void dnxhd_encode_block(DNXHDEncContext *ctx, DCTELEM *block, int last_index, int n) +static av_always_inline void dnxhd_encode_block(DNXHDEncContext *ctx, int16_t *block, int last_index, int n) { int last_non_zero = 0; int slevel, i, j; @@ -415,7 +415,7 @@ static av_always_inline void dnxhd_encode_block(DNXHDEncContext *ctx, DCTELEM *b put_bits(&ctx->m.pb, ctx->vlc_bits[0], ctx->vlc_codes[0]); // EOB } -static av_always_inline void dnxhd_unquantize_c(DNXHDEncContext *ctx, DCTELEM *block, int n, int qscale, int last_index) +static av_always_inline void dnxhd_unquantize_c(DNXHDEncContext *ctx, int16_t *block, int n, int qscale, int last_index) { const uint8_t *weight_matrix; int level; @@ -456,7 +456,7 @@ static av_always_inline void dnxhd_unquantize_c(DNXHDEncContext *ctx, DCTELEM *b } } -static av_always_inline int dnxhd_ssd_block(DCTELEM *qblock, DCTELEM *block) +static av_always_inline int dnxhd_ssd_block(int16_t *qblock, int16_t *block) { int score = 0; int i; @@ -465,7 +465,7 @@ static av_always_inline int dnxhd_ssd_block(DCTELEM *qblock, DCTELEM *block) return score; } -static av_always_inline int dnxhd_calc_ac_bits(DNXHDEncContext *ctx, DCTELEM *block, int last_index) +static av_always_inline int dnxhd_calc_ac_bits(DNXHDEncContext *ctx, int16_t *block, int last_index) { int last_non_zero = 0; int bits = 0; @@ -527,7 +527,7 @@ static int dnxhd_calc_bits_thread(AVCodecContext *avctx, void *arg, int jobnr, i DNXHDEncContext *ctx = avctx->priv_data; int mb_y = jobnr, mb_x; int qscale = ctx->qscale; - LOCAL_ALIGNED_16(DCTELEM, block, [64]); + LOCAL_ALIGNED_16(int16_t, block, [64]); ctx = ctx->thread[threadnr]; ctx->m.last_dc[0] = @@ -544,7 +544,7 @@ static int dnxhd_calc_bits_thread(AVCodecContext *avctx, void *arg, int jobnr, i dnxhd_get_blocks(ctx, mb_x, mb_y); for (i = 0; i < 8; i++) { - DCTELEM *src_block = ctx->blocks[i]; + int16_t *src_block = ctx->blocks[i]; int overflow, nbits, diff, last_index; int n = dnxhd_switch_matrix(ctx, i); @@ -593,7 +593,7 @@ static int dnxhd_encode_thread(AVCodecContext *avctx, void *arg, int jobnr, int dnxhd_get_blocks(ctx, mb_x, mb_y); for (i = 0; i < 8; i++) { - DCTELEM *block = ctx->blocks[i]; + int16_t *block = ctx->blocks[i]; int overflow, n = dnxhd_switch_matrix(ctx, i); int last_index = ctx->m.dct_quantize(&ctx->m, block, 4&(2*i), qscale, &overflow); //START_TIMER; |