diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-02-09 12:19:21 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-02-09 12:37:03 +0100 |
commit | e5212354eadd4acbdc1bfeeafa5e50eb1ec5c337 (patch) | |
tree | 6d894a25a0c708b840e4c6868ca62e17a6df5d93 | |
parent | bcb15e66f7c46e036be198ecc9ea5f66dc0a537c (diff) | |
parent | b9ee5f2cab3ffe1c962e542346b1ed61394864ec (diff) | |
download | ffmpeg-e5212354eadd4acbdc1bfeeafa5e50eb1ec5c337.tar.gz |
Merge commit 'b9ee5f2cab3ffe1c962e542346b1ed61394864ec'
* commit 'b9ee5f2cab3ffe1c962e542346b1ed61394864ec':
indeo3: replace use of copy_block4 with put_pixels
mjpegdec: use put_pixels instead of copy_block8
Conflicts:
libavcodec/mjpegdec.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r-- | libavcodec/indeo3.c | 15 | ||||
-rw-r--r-- | libavcodec/mjpegdec.c | 8 |
2 files changed, 14 insertions, 9 deletions
diff --git a/libavcodec/indeo3.c b/libavcodec/indeo3.c index a8206dbb00..1d36d22e73 100644 --- a/libavcodec/indeo3.c +++ b/libavcodec/indeo3.c @@ -410,7 +410,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) @@ -656,14 +657,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"); @@ -671,7 +674,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); } diff --git a/libavcodec/mjpegdec.c b/libavcodec/mjpegdec.c index 299c0817ec..3b654cebbd 100644 --- a/libavcodec/mjpegdec.c +++ b/libavcodec/mjpegdec.c @@ -987,11 +987,12 @@ static int ljpeg_decode_yuv_scan(MJpegDecodeContext *s, int predictor, return 0; } -static av_always_inline void mjpeg_copy_block(uint8_t *dst, const uint8_t *src, +static av_always_inline void mjpeg_copy_block(MJpegDecodeContext *s, + uint8_t *dst, const uint8_t *src, int linesize, int lowres) { switch (lowres) { - case 0: copy_block8(dst, src, linesize, linesize, 8); + case 0: s->dsp.put_pixels_tab[1][0](dst, src, linesize, 8); break; case 1: copy_block4(dst, src, linesize, linesize, 4); break; @@ -1067,8 +1068,9 @@ static int mjpeg_decode_scan(MJpegDecodeContext *s, int nb_components, int Ah, ptr = data[c] + block_offset; if (!s->progressive) { if (copy_mb) - mjpeg_copy_block(ptr, reference_data[c] + block_offset, + mjpeg_copy_block(s, ptr, reference_data[c] + block_offset, linesize[c], s->avctx->lowres); + else { s->dsp.clear_block(s->block); if (decode_block(s, s->block, i, |