1
0
mirror of https://github.com/FFmpeg/FFmpeg.git synced 2024-12-23 12:43:46 +02:00

indeo3: replace use of copy_block4 with put_pixels

The destination is sufficiently aligned for put_pixels here.

Signed-off-by: Mans Rullgard <mans@mansr.com>
This commit is contained in:
Mans Rullgard 2012-12-09 19:18:47 +00:00 committed by Diego Biurrun
parent ed62e6e3c3
commit b9ee5f2cab

View File

@ -254,7 +254,7 @@ static void copy_cell(Indeo3DecodeContext *ctx, Plane *plane, Cell *cell)
} }
if (w >= 1) { 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--; w--;
src += 4; src += 4;
dst += 4; dst += 4;
@ -324,7 +324,7 @@ if (*data_ptr >= last_ptr) \
#define RLE_BLOCK_COPY \ #define RLE_BLOCK_COPY \
if (cell->mv_ptr || !skip_flag) \ 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 \ #define RLE_BLOCK_COPY_8 \
pix64 = AV_RN64A(ref);\ pix64 = AV_RN64A(ref);\
@ -336,7 +336,7 @@ if (*data_ptr >= last_ptr) \
fill_64(dst, pix64, 8, row_offset) fill_64(dst, pix64, 8, row_offset)
#define RLE_LINES_COPY \ #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 \ #define RLE_LINES_COPY_M10 \
pix64 = AV_RN64A(ref);\ 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, int pitch, int h_zoom, int v_zoom, int mode,
const vqEntry *delta[2], int swap_quads[2], const vqEntry *delta[2], int swap_quads[2],
const uint8_t **data_ptr, const uint8_t *last_ptr) 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; zoom_fac = mode >= 3;
error = decode_cell_data(cell, block, ref_block, plane->pitch, 0, zoom_fac, error = decode_cell_data(ctx, cell, block, ref_block, plane->pitch,
mode, delta, swap_quads, &data_ptr, last_ptr); 0, zoom_fac, mode, delta, swap_quads,
&data_ptr, last_ptr);
break; break;
case 10: /*-------------------- MODE 10 (8x8 block processing) ---------------------*/ case 10: /*-------------------- MODE 10 (8x8 block processing) ---------------------*/
case 11: /*----------------- MODE 11 (4x8 INTER block processing) ------------------*/ case 11: /*----------------- MODE 11 (4x8 INTER block processing) ------------------*/
if (mode == 10 && !cell->mv_ptr) { /* MODE 10 INTRA processing */ if (mode == 10 && !cell->mv_ptr) { /* MODE 10 INTRA processing */
error = decode_cell_data(cell, block, ref_block, plane->pitch, 1, 1, error = decode_cell_data(ctx, cell, block, ref_block, plane->pitch,
mode, delta, swap_quads, &data_ptr, last_ptr); 1, 1, mode, delta, swap_quads,
&data_ptr, last_ptr);
} else { /* mode 10 and 11 INTER processing */ } else { /* mode 10 and 11 INTER processing */
if (mode == 11 && !cell->mv_ptr) { if (mode == 11 && !cell->mv_ptr) {
av_log(avctx, AV_LOG_ERROR, "Attempt to use Mode 11 for an INTRA cell!\n"); 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; 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, zoom_fac, 1, mode, delta, swap_quads,
&data_ptr, last_ptr); &data_ptr, last_ptr);
} }