From b9ee5f2cab3ffe1c962e542346b1ed61394864ec Mon Sep 17 00:00:00 2001 From: Mans Rullgard Date: Sun, 9 Dec 2012 19:18:47 +0000 Subject: indeo3: replace use of copy_block4 with put_pixels The destination is sufficiently aligned for put_pixels here. Signed-off-by: Mans Rullgard --- libavcodec/indeo3.c | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'libavcodec/indeo3.c') diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c index 261c651b52..22f5e7916b 100644 --- a/libavcodec/indeo3.c +++ b/libavcodec/indeo3.c @@ -254,7 +254,7 @@ static void copy_cell(Indeo3DecodeContext *ctx, Plane *plane, Cell *cell) } if (w >= 1) { - copy_block4(dst, src, plane->pitch, plane->pitch, h); + ctx->dsp.put_no_rnd_pixels_tab[2][0](dst, src, plane->pitch, h); w--; src += 4; dst += 4; @@ -324,7 +324,7 @@ if (*data_ptr >= last_ptr) \ #define RLE_BLOCK_COPY \ if (cell->mv_ptr || !skip_flag) \ - copy_block4(dst, ref, row_offset, row_offset, 4 << v_zoom) + ctx->dsp.put_pixels_tab[2][0](dst, ref, row_offset, 4 << v_zoom) #define RLE_BLOCK_COPY_8 \ pix64 = AV_RN64A(ref);\ @@ -336,7 +336,7 @@ if (*data_ptr >= last_ptr) \ fill_64(dst, pix64, 8, row_offset) #define RLE_LINES_COPY \ - copy_block4(dst, ref, row_offset, row_offset, num_lines << v_zoom) + ctx->dsp.put_pixels_tab[2][0](dst, ref, row_offset, num_lines << v_zoom) #define RLE_LINES_COPY_M10 \ pix64 = AV_RN64A(ref);\ @@ -404,7 +404,8 @@ if (*data_ptr >= last_ptr) \ } -static int decode_cell_data(Cell *cell, uint8_t *block, uint8_t *ref_block, +static int decode_cell_data(Indeo3DecodeContext *ctx, Cell *cell, + uint8_t *block, uint8_t *ref_block, int pitch, int h_zoom, int v_zoom, int mode, const vqEntry *delta[2], int swap_quads[2], const uint8_t **data_ptr, const uint8_t *last_ptr) @@ -637,14 +638,16 @@ static int decode_cell(Indeo3DecodeContext *ctx, AVCodecContext *avctx, } zoom_fac = mode >= 3; - error = decode_cell_data(cell, block, ref_block, plane->pitch, 0, zoom_fac, - mode, delta, swap_quads, &data_ptr, last_ptr); + error = decode_cell_data(ctx, cell, block, ref_block, plane->pitch, + 0, zoom_fac, mode, delta, swap_quads, + &data_ptr, last_ptr); break; case 10: /*-------------------- MODE 10 (8x8 block processing) ---------------------*/ case 11: /*----------------- MODE 11 (4x8 INTER block processing) ------------------*/ if (mode == 10 && !cell->mv_ptr) { /* MODE 10 INTRA processing */ - error = decode_cell_data(cell, block, ref_block, plane->pitch, 1, 1, - mode, delta, swap_quads, &data_ptr, last_ptr); + error = decode_cell_data(ctx, cell, block, ref_block, plane->pitch, + 1, 1, mode, delta, swap_quads, + &data_ptr, last_ptr); } else { /* mode 10 and 11 INTER processing */ if (mode == 11 && !cell->mv_ptr) { av_log(avctx, AV_LOG_ERROR, "Attempt to use Mode 11 for an INTRA cell!\n"); @@ -652,7 +655,7 @@ static int decode_cell(Indeo3DecodeContext *ctx, AVCodecContext *avctx, } zoom_fac = mode == 10; - error = decode_cell_data(cell, block, ref_block, plane->pitch, + error = decode_cell_data(ctx, cell, block, ref_block, plane->pitch, zoom_fac, 1, mode, delta, swap_quads, &data_ptr, last_ptr); } -- cgit v1.2.3