Re: [libav-devel] [PATCH 04/14] indeo3: replace use of copy_block4 with put_pixels

2013-02-08 Thread Kostya Shishkov
On Fri, Feb 08, 2013 at 12:42:47AM +0100, Diego Biurrun wrote:
 From: Mans Rullgard m...@mansr.com
 
 The destination is sufficiently aligned for put_pixels here.
 
 Signed-off-by: Mans Rullgard m...@mansr.com
 ---
  libavcodec/indeo3.c |   21 -
  1 file changed, 12 insertions(+), 9 deletions(-)

LGTM
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH 04/14] indeo3: replace use of copy_block4 with put_pixels

2013-02-07 Thread Diego Biurrun
From: Mans Rullgard m...@mansr.com

The destination is sufficiently aligned for put_pixels here.

Signed-off-by: Mans Rullgard m...@mansr.com
---
 libavcodec/indeo3.c |   21 -
 1 file changed, 12 insertions(+), 9 deletions(-)

diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c
index 261c651..22f5e79 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);
 }
-- 
1.7.9.5

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel