diff options
author | Diego Biurrun <diego@biurrun.de> | 2013-01-20 01:02:29 +0100 |
---|---|---|
committer | Ronald S. Bultje <rsbultje@gmail.com> | 2013-01-22 18:32:56 -0800 |
commit | 88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f (patch) | |
tree | 86f541af3a6bc6b60ec737d8011435e105a77cd9 /libavcodec/x86 | |
parent | 2e4bb99f4df7052b3e147ee898fcb4013a34d904 (diff) | |
download | ffmpeg-streaming-88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f.zip ffmpeg-streaming-88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f.tar.gz |
Drop DCTELEM typedef
It does not help as an abstraction and adds dsputil dependencies.
Signed-off-by: Ronald S. Bultje <rsbultje@gmail.com>
Diffstat (limited to 'libavcodec/x86')
-rw-r--r-- | libavcodec/x86/dnxhdenc.c | 2 | ||||
-rw-r--r-- | libavcodec/x86/dsputil_mmx.c | 16 | ||||
-rw-r--r-- | libavcodec/x86/dsputil_mmx.h | 6 | ||||
-rw-r--r-- | libavcodec/x86/dsputilenc.asm | 4 | ||||
-rw-r--r-- | libavcodec/x86/dsputilenc_mmx.c | 8 | ||||
-rw-r--r-- | libavcodec/x86/h264_idct.asm | 26 | ||||
-rw-r--r-- | libavcodec/x86/h264_intrapred_init.c | 1 | ||||
-rw-r--r-- | libavcodec/x86/h264dsp_init.c | 8 | ||||
-rw-r--r-- | libavcodec/x86/idct_mmx_xvid.c | 8 | ||||
-rw-r--r-- | libavcodec/x86/idct_xvid.h | 10 | ||||
-rw-r--r-- | libavcodec/x86/mpegvideo.c | 16 | ||||
-rw-r--r-- | libavcodec/x86/mpegvideoenc_template.c | 2 | ||||
-rw-r--r-- | libavcodec/x86/proresdsp.asm | 2 | ||||
-rw-r--r-- | libavcodec/x86/proresdsp_init.c | 7 | ||||
-rw-r--r-- | libavcodec/x86/rv34dsp.asm | 2 | ||||
-rw-r--r-- | libavcodec/x86/rv34dsp_init.c | 6 | ||||
-rw-r--r-- | libavcodec/x86/simple_idct.c | 4 | ||||
-rw-r--r-- | libavcodec/x86/vc1dsp_mmx.c | 8 | ||||
-rw-r--r-- | libavcodec/x86/vp3dsp_init.c | 11 | ||||
-rw-r--r-- | libavcodec/x86/vp8dsp.asm | 10 | ||||
-rw-r--r-- | libavcodec/x86/vp8dsp_init.c | 18 |
21 files changed, 88 insertions, 87 deletions
diff --git a/libavcodec/x86/dnxhdenc.c b/libavcodec/x86/dnxhdenc.c index 43ee246..f5470c9 100644 --- a/libavcodec/x86/dnxhdenc.c +++ b/libavcodec/x86/dnxhdenc.c @@ -26,7 +26,7 @@ #if HAVE_SSE2_INLINE -static void get_pixels_8x4_sym_sse2(DCTELEM *block, const uint8_t *pixels, int line_size) +static void get_pixels_8x4_sym_sse2(int16_t *block, const uint8_t *pixels, int line_size) { __asm__ volatile( "pxor %%xmm5, %%xmm5 \n\t" diff --git a/libavcodec/x86/dsputil_mmx.c b/libavcodec/x86/dsputil_mmx.c index 9a282e8..8866813 100644 --- a/libavcodec/x86/dsputil_mmx.c +++ b/libavcodec/x86/dsputil_mmx.c @@ -225,10 +225,10 @@ DECLARE_ALIGNED(16, const double, ff_pd_2)[2] = { 2.0, 2.0 }; /***********************************/ /* standard MMX */ -void ff_put_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, +void ff_put_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels, int line_size) { - const DCTELEM *p; + const int16_t *p; uint8_t *pix; /* read the pixels */ @@ -300,7 +300,7 @@ void ff_put_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, "movq %%mm3, (%0, %3, 2) \n\t" \ "movq %%mm4, (%0, %1) \n\t" -void ff_put_signed_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, +void ff_put_signed_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels, int line_size) { x86_reg line_skip = line_size; @@ -317,10 +317,10 @@ void ff_put_signed_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, : "memory"); } -void ff_add_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, +void ff_add_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels, int line_size) { - const DCTELEM *p; + const int16_t *p; uint8_t *pix; int i; @@ -422,7 +422,7 @@ static void put_pixels16_mmx(uint8_t *block, const uint8_t *pixels, } #define CLEAR_BLOCKS(name, n) \ -static void name(DCTELEM *blocks) \ +static void name(int16_t *blocks) \ { \ __asm__ volatile ( \ "pxor %%mm7, %%mm7 \n\t" \ @@ -442,7 +442,7 @@ static void name(DCTELEM *blocks) \ CLEAR_BLOCKS(clear_blocks_mmx, 6) CLEAR_BLOCKS(clear_block_mmx, 1) -static void clear_block_sse(DCTELEM *block) +static void clear_block_sse(int16_t *block) { __asm__ volatile ( "xorps %%xmm0, %%xmm0 \n" @@ -459,7 +459,7 @@ static void clear_block_sse(DCTELEM *block) ); } -static void clear_blocks_sse(DCTELEM *blocks) +static void clear_blocks_sse(int16_t *blocks) { __asm__ volatile ( "xorps %%xmm0, %%xmm0 \n" diff --git a/libavcodec/x86/dsputil_mmx.h b/libavcodec/x86/dsputil_mmx.h index 49688dc..86de479 100644 --- a/libavcodec/x86/dsputil_mmx.h +++ b/libavcodec/x86/dsputil_mmx.h @@ -83,9 +83,9 @@ extern const double ff_pd_2[2]; void ff_dsputilenc_init_mmx(DSPContext* c, AVCodecContext *avctx); void ff_dsputil_init_pix_mmx(DSPContext* c, AVCodecContext *avctx); -void ff_add_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size); -void ff_put_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size); -void ff_put_signed_pixels_clamped_mmx(const DCTELEM *block, uint8_t *pixels, int line_size); +void ff_add_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels, int line_size); +void ff_put_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels, int line_size); +void ff_put_signed_pixels_clamped_mmx(const int16_t *block, uint8_t *pixels, int line_size); void ff_put_cavs_qpel8_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride); void ff_avg_cavs_qpel8_mc00_mmxext(uint8_t *dst, uint8_t *src, int stride); diff --git a/libavcodec/x86/dsputilenc.asm b/libavcodec/x86/dsputilenc.asm index 7b8763c..7e4fd81 100644 --- a/libavcodec/x86/dsputilenc.asm +++ b/libavcodec/x86/dsputilenc.asm @@ -335,7 +335,7 @@ cglobal sse16, 5, 5, 8 RET INIT_MMX mmx -; get_pixels_mmx(DCTELEM *block, const uint8_t *pixels, int line_size) +; get_pixels_mmx(int16_t *block, const uint8_t *pixels, int line_size) cglobal get_pixels, 3,4 movsxdifnidn r2, r2d add r0, 128 @@ -392,7 +392,7 @@ cglobal get_pixels, 3, 4 RET INIT_MMX mmx -; diff_pixels_mmx(DCTELEM *block, const uint8_t *s1, const unint8_t *s2, stride) +; diff_pixels_mmx(int16_t *block, const uint8_t *s1, const unint8_t *s2, stride) cglobal diff_pixels, 4,5 movsxdifnidn r3, r3d pxor m7, m7 diff --git a/libavcodec/x86/dsputilenc_mmx.c b/libavcodec/x86/dsputilenc_mmx.c index fa126d6..532b609 100644 --- a/libavcodec/x86/dsputilenc_mmx.c +++ b/libavcodec/x86/dsputilenc_mmx.c @@ -30,9 +30,9 @@ #include "libavcodec/mathops.h" #include "dsputil_mmx.h" -void ff_get_pixels_mmx(DCTELEM *block, const uint8_t *pixels, int line_size); -void ff_get_pixels_sse2(DCTELEM *block, const uint8_t *pixels, int line_size); -void ff_diff_pixels_mmx(DCTELEM *block, const uint8_t *s1, const uint8_t *s2, int stride); +void ff_get_pixels_mmx(int16_t *block, const uint8_t *pixels, int line_size); +void ff_get_pixels_sse2(int16_t *block, const uint8_t *pixels, int line_size); +void ff_diff_pixels_mmx(int16_t *block, const uint8_t *s1, const uint8_t *s2, int stride); int ff_pix_sum16_mmx(uint8_t * pix, int line_size); int ff_pix_norm1_mmx(uint8_t *pix, int line_size); @@ -797,7 +797,7 @@ static void sub_hfyu_median_prediction_mmxext(uint8_t *dst, const uint8_t *src1, HSUM(%%xmm0, %%xmm1, %0) #define DCT_SAD_FUNC(cpu) \ -static int sum_abs_dctelem_##cpu(DCTELEM *block){\ +static int sum_abs_dctelem_##cpu(int16_t *block){\ int sum;\ __asm__ volatile(\ DCT_SAD\ diff --git a/libavcodec/x86/h264_idct.asm b/libavcodec/x86/h264_idct.asm index 30cecd9..de0de24 100644 --- a/libavcodec/x86/h264_idct.asm +++ b/libavcodec/x86/h264_idct.asm @@ -302,7 +302,7 @@ cglobal h264_idct8_dc_add_8, 3, 3, 0 INIT_MMX mmx ; ff_h264_idct_add16_mmx(uint8_t *dst, const int *block_offset, -; DCTELEM *block, int stride, const uint8_t nnzc[6*8]) +; int16_t *block, int stride, const uint8_t nnzc[6*8]) cglobal h264_idct_add16_8, 5, 7 + npicregs, 0, dst, block_offset, block, stride, nnzc, cntr, coeff, picreg xor r5, r5 %ifdef PIC @@ -324,7 +324,7 @@ cglobal h264_idct_add16_8, 5, 7 + npicregs, 0, dst, block_offset, block, stride, REP_RET ; ff_h264_idct8_add4_mmx(uint8_t *dst, const int *block_offset, -; DCTELEM *block, int stride, const uint8_t nnzc[6*8]) +; int16_t *block, int stride, const uint8_t nnzc[6*8]) cglobal h264_idct8_add4_8, 5, 7 + npicregs, 0, dst, block_offset, block, stride, nnzc, cntr, coeff, picreg %assign pad 128+4-(stack_offset&7) SUB rsp, pad @@ -357,7 +357,7 @@ cglobal h264_idct8_add4_8, 5, 7 + npicregs, 0, dst, block_offset, block, stride, INIT_MMX mmxext ; ff_h264_idct_add16_mmxext(uint8_t *dst, const int *block_offset, -; DCTELEM *block, int stride, const uint8_t nnzc[6*8]) +; int16_t *block, int stride, const uint8_t nnzc[6*8]) cglobal h264_idct_add16_8, 5, 8 + npicregs, 0, dst1, block_offset, block, stride, nnzc, cntr, coeff, dst2, picreg xor r5, r5 %ifdef PIC @@ -402,7 +402,7 @@ cglobal h264_idct_add16_8, 5, 8 + npicregs, 0, dst1, block_offset, block, stride INIT_MMX mmx ; ff_h264_idct_add16intra_mmx(uint8_t *dst, const int *block_offset, -; DCTELEM *block, int stride, const uint8_t nnzc[6*8]) +; int16_t *block, int stride, const uint8_t nnzc[6*8]) cglobal h264_idct_add16intra_8, 5, 7 + npicregs, 0, dst, block_offset, block, stride, nnzc, cntr, coeff, picreg xor r5, r5 %ifdef PIC @@ -426,7 +426,7 @@ cglobal h264_idct_add16intra_8, 5, 7 + npicregs, 0, dst, block_offset, block, st INIT_MMX mmxext ; ff_h264_idct_add16intra_mmxext(uint8_t *dst, const int *block_offset, -; DCTELEM *block, int stride, +; int16_t *block, int stride, ; const uint8_t nnzc[6*8]) cglobal h264_idct_add16intra_8, 5, 8 + npicregs, 0, dst1, block_offset, block, stride, nnzc, cntr, coeff, dst2, picreg xor r5, r5 @@ -469,7 +469,7 @@ cglobal h264_idct_add16intra_8, 5, 8 + npicregs, 0, dst1, block_offset, block, s REP_RET ; ff_h264_idct8_add4_mmxext(uint8_t *dst, const int *block_offset, -; DCTELEM *block, int stride, +; int16_t *block, int stride, ; const uint8_t nnzc[6*8]) cglobal h264_idct8_add4_8, 5, 8 + npicregs, 0, dst1, block_offset, block, stride, nnzc, cntr, coeff, dst2, picreg %assign pad 128+4-(stack_offset&7) @@ -530,7 +530,7 @@ cglobal h264_idct8_add4_8, 5, 8 + npicregs, 0, dst1, block_offset, block, stride INIT_XMM sse2 ; ff_h264_idct8_add4_sse2(uint8_t *dst, const int *block_offset, -; DCTELEM *block, int stride, const uint8_t nnzc[6*8]) +; int16_t *block, int stride, const uint8_t nnzc[6*8]) cglobal h264_idct8_add4_8, 5, 8 + npicregs, 10, dst1, block_offset, block, stride, nnzc, cntr, coeff, dst2, picreg xor r5, r5 %ifdef PIC @@ -605,7 +605,7 @@ h264_idct_add8_mmx_plane: rep ret ; ff_h264_idct_add8_mmx(uint8_t **dest, const int *block_offset, -; DCTELEM *block, int stride, const uint8_t nnzc[6*8]) +; int16_t *block, int stride, const uint8_t nnzc[6*8]) cglobal h264_idct_add8_8, 5, 8 + npicregs, 0, dst1, block_offset, block, stride, nnzc, cntr, coeff, dst2, picreg mov r5, 16 add r2, 512 @@ -669,7 +669,7 @@ h264_idct_add8_mmxext_plane: INIT_MMX mmxext ; ff_h264_idct_add8_mmxext(uint8_t **dest, const int *block_offset, -; DCTELEM *block, int stride, const uint8_t nnzc[6*8]) +; int16_t *block, int stride, const uint8_t nnzc[6*8]) cglobal h264_idct_add8_8, 5, 8 + npicregs, 0, dst1, block_offset, block, stride, nnzc, cntr, coeff, dst2, picreg mov r5, 16 add r2, 512 @@ -746,7 +746,7 @@ h264_add8x4_idct_sse2: %endmacro ; ff_h264_idct_add16_sse2(uint8_t *dst, const int *block_offset, -; DCTELEM *block, int stride, const uint8_t nnzc[6*8]) +; int16_t *block, int stride, const uint8_t nnzc[6*8]) cglobal h264_idct_add16_8, 5, 5 + ARCH_X86_64, 8 %if ARCH_X86_64 mov r5, r0 @@ -793,7 +793,7 @@ cglobal h264_idct_add16_8, 5, 5 + ARCH_X86_64, 8 %endmacro ; ff_h264_idct_add16intra_sse2(uint8_t *dst, const int *block_offset, -; DCTELEM *block, int stride, const uint8_t nnzc[6*8]) +; int16_t *block, int stride, const uint8_t nnzc[6*8]) cglobal h264_idct_add16intra_8, 5, 7 + ARCH_X86_64, 8 %if ARCH_X86_64 mov r7, r0 @@ -844,7 +844,7 @@ cglobal h264_idct_add16intra_8, 5, 7 + ARCH_X86_64, 8 %endmacro ; ff_h264_idct_add8_sse2(uint8_t **dest, const int *block_offset, -; DCTELEM *block, int stride, const uint8_t nnzc[6*8]) +; int16_t *block, int stride, const uint8_t nnzc[6*8]) cglobal h264_idct_add8_8, 5, 7 + ARCH_X86_64, 8 add r2, 512 %if ARCH_X86_64 @@ -861,7 +861,7 @@ cglobal h264_idct_add8_8, 5, 7 + ARCH_X86_64, 8 add8_sse2_cycle 3, 0x64 RET -;void ff_h264_luma_dc_dequant_idct_mmx(DCTELEM *output, DCTELEM *input, int qmul) +;void ff_h264_luma_dc_dequant_idct_mmx(int16_t *output, int16_t *input, int qmul) %macro WALSH4_1D 5 SUMSUB_BADC w, %4, %3, %2, %1, %5 diff --git a/libavcodec/x86/h264_intrapred_init.c b/libavcodec/x86/h264_intrapred_init.c index 454dd3f..d207fd0 100644 --- a/libavcodec/x86/h264_intrapred_init.c +++ b/libavcodec/x86/h264_intrapred_init.c @@ -20,6 +20,7 @@ #include "libavutil/cpu.h" #include "libavutil/x86/cpu.h" +#include "libavcodec/avcodec.h" #include "libavcodec/h264pred.h" #define PRED4x4(TYPE, DEPTH, OPT) \ diff --git a/libavcodec/x86/h264dsp_init.c b/libavcodec/x86/h264dsp_init.c index 73d4990..0acd61d 100644 --- a/libavcodec/x86/h264dsp_init.c +++ b/libavcodec/x86/h264dsp_init.c @@ -48,7 +48,7 @@ IDCT_ADD_FUNC(8, 10, avx) #define IDCT_ADD_REP_FUNC(NUM, REP, DEPTH, OPT) \ void ff_h264_idct ## NUM ## _add ## REP ## _ ## DEPTH ## _ ## OPT \ (uint8_t *dst, const int *block_offset, \ - DCTELEM *block, int stride, const uint8_t nnzc[6 * 8]); + int16_t *block, int stride, const uint8_t nnzc[6 * 8]); IDCT_ADD_REP_FUNC(8, 4, 8, mmx) IDCT_ADD_REP_FUNC(8, 4, 8, mmxext) @@ -70,7 +70,7 @@ IDCT_ADD_REP_FUNC(, 16intra, 10, avx) #define IDCT_ADD_REP_FUNC2(NUM, REP, DEPTH, OPT) \ void ff_h264_idct ## NUM ## _add ## REP ## _ ## DEPTH ## _ ## OPT \ (uint8_t **dst, const int *block_offset, \ - DCTELEM *block, int stride, const uint8_t nnzc[6 * 8]); + int16_t *block, int stride, const uint8_t nnzc[6 * 8]); IDCT_ADD_REP_FUNC2(, 8, 8, mmx) IDCT_ADD_REP_FUNC2(, 8, 8, mmxext) @@ -78,8 +78,8 @@ IDCT_ADD_REP_FUNC2(, 8, 8, sse2) IDCT_ADD_REP_FUNC2(, 8, 10, sse2) IDCT_ADD_REP_FUNC2(, 8, 10, avx) -void ff_h264_luma_dc_dequant_idct_mmx(DCTELEM *output, DCTELEM *input, int qmul); -void ff_h264_luma_dc_dequant_idct_sse2(DCTELEM *output, DCTELEM *input, int qmul); +void ff_h264_luma_dc_dequant_idct_mmx(int16_t *output, int16_t *input, int qmul); +void ff_h264_luma_dc_dequant_idct_sse2(int16_t *output, int16_t *input, int qmul); /***********************************/ /* deblocking */ diff --git a/libavcodec/x86/idct_mmx_xvid.c b/libavcodec/x86/idct_mmx_xvid.c index 2cf8b47..3870ffd 100644 --- a/libavcodec/x86/idct_mmx_xvid.c +++ b/libavcodec/x86/idct_mmx_xvid.c @@ -531,25 +531,25 @@ __asm__ volatile( :: "r"(block), "r"(rounder_0), "r"(tab_i_04_xmm), "r"(tg_1_16)); } -void ff_idct_xvid_mmx_put(uint8_t *dest, int line_size, DCTELEM *block) +void ff_idct_xvid_mmx_put(uint8_t *dest, int line_size, int16_t *block) { ff_idct_xvid_mmx(block); ff_put_pixels_clamped_mmx(block, dest, line_size); } -void ff_idct_xvid_mmx_add(uint8_t *dest, int line_size, DCTELEM *block) +void ff_idct_xvid_mmx_add(uint8_t *dest, int line_size, int16_t *block) { ff_idct_xvid_mmx(block); ff_add_pixels_clamped_mmx(block, dest, line_size); } -void ff_idct_xvid_mmxext_put(uint8_t *dest, int line_size, DCTELEM *block) +void ff_idct_xvid_mmxext_put(uint8_t *dest, int line_size, int16_t *block) { ff_idct_xvid_mmxext(block); ff_put_pixels_clamped_mmx(block, dest, line_size); } -void ff_idct_xvid_mmxext_add(uint8_t *dest, int line_size, DCTELEM *block) +void ff_idct_xvid_mmxext_add(uint8_t *dest, int line_size, int16_t *block) { ff_idct_xvid_mmxext(block); ff_add_pixels_clamped_mmx(block, dest, line_size); diff --git a/libavcodec/x86/idct_xvid.h b/libavcodec/x86/idct_xvid.h index 79d5bf9..aea28ba 100644 --- a/libavcodec/x86/idct_xvid.h +++ b/libavcodec/x86/idct_xvid.h @@ -28,15 +28,13 @@ #include <stdint.h> -#include "libavcodec/dsputil.h" - void ff_idct_xvid_mmx(short *block); -void ff_idct_xvid_mmx_put(uint8_t *dest, int line_size, DCTELEM *block); -void ff_idct_xvid_mmx_add(uint8_t *dest, int line_size, DCTELEM *block); +void ff_idct_xvid_mmx_put(uint8_t *dest, int line_size, int16_t *block); +void ff_idct_xvid_mmx_add(uint8_t *dest, int line_size, int16_t *block); void ff_idct_xvid_mmxext(short *block); -void ff_idct_xvid_mmxext_put(uint8_t *dest, int line_size, DCTELEM *block); -void ff_idct_xvid_mmxext_add(uint8_t *dest, int line_size, DCTELEM *block); +void ff_idct_xvid_mmxext_put(uint8_t *dest, int line_size, int16_t *block); +void ff_idct_xvid_mmxext_add(uint8_t *dest, int line_size, int16_t *block); void ff_idct_xvid_sse2(short *block); void ff_idct_xvid_sse2_put(uint8_t *dest, int line_size, short *block); diff --git a/libavcodec/x86/mpegvideo.c b/libavcodec/x86/mpegvideo.c index 3bc93f3..599db94 100644 --- a/libavcodec/x86/mpegvideo.c +++ b/libavcodec/x86/mpegvideo.c @@ -29,7 +29,7 @@ #if HAVE_INLINE_ASM static void dct_unquantize_h263_intra_mmx(MpegEncContext *s, - DCTELEM *block, int n, int qscale) + int16_t *block, int n, int qscale) { x86_reg level, qmul, qadd, nCoeffs; @@ -104,7 +104,7 @@ __asm__ volatile( static void dct_unquantize_h263_inter_mmx(MpegEncContext *s, - DCTELEM *block, int n, int qscale) + int16_t *block, int n, int qscale) { x86_reg qmul, qadd, nCoeffs; @@ -195,7 +195,7 @@ __asm__ volatile( high3 += tlow1 */ static void dct_unquantize_mpeg1_intra_mmx(MpegEncContext *s, - DCTELEM *block, int n, int qscale) + int16_t *block, int n, int qscale) { x86_reg nCoeffs; const uint16_t *quant_matrix; @@ -264,7 +264,7 @@ __asm__ volatile( } static void dct_unquantize_mpeg1_inter_mmx(MpegEncContext *s, - DCTELEM *block, int n, int qscale) + int16_t *block, int n, int qscale) { x86_reg nCoeffs; const uint16_t *quant_matrix; @@ -330,7 +330,7 @@ __asm__ volatile( } static void dct_unquantize_mpeg2_intra_mmx(MpegEncContext *s, - DCTELEM *block, int n, int qscale) + int16_t *block, int n, int qscale) { x86_reg nCoeffs; const uint16_t *quant_matrix; @@ -396,7 +396,7 @@ __asm__ volatile( } static void dct_unquantize_mpeg2_inter_mmx(MpegEncContext *s, - DCTELEM *block, int n, int qscale) + int16_t *block, int n, int qscale) { x86_reg nCoeffs; const uint16_t *quant_matrix; @@ -472,7 +472,7 @@ __asm__ volatile( ); } -static void denoise_dct_mmx(MpegEncContext *s, DCTELEM *block){ +static void denoise_dct_mmx(MpegEncContext *s, int16_t *block){ const int intra= s->mb_intra; int *sum= s->dct_error_sum[intra]; uint16_t *offset= s->dct_offset[intra]; @@ -526,7 +526,7 @@ static void denoise_dct_mmx(MpegEncContext *s, DCTELEM *block){ ); } -static void denoise_dct_sse2(MpegEncContext *s, DCTELEM *block){ +static void denoise_dct_sse2(MpegEncContext *s, int16_t *block){ const int intra= s->mb_intra; int *sum= s->dct_error_sum[intra]; uint16_t *offset= s->dct_offset[intra]; diff --git a/libavcodec/x86/mpegvideoenc_template.c b/libavcodec/x86/mpegvideoenc_template.c index a6e7ba4..4d3fb74 100644 --- a/libavcodec/x86/mpegvideoenc_template.c +++ b/libavcodec/x86/mpegvideoenc_template.c @@ -92,7 +92,7 @@ #endif static int RENAME(dct_quantize)(MpegEncContext *s, - DCTELEM *block, int n, + int16_t *block, int n, int qscale, int *overflow) { x86_reg last_non_zero_p1; diff --git a/libavcodec/x86/proresdsp.asm b/libavcodec/x86/proresdsp.asm index 91e0800..855f209 100644 --- a/libavcodec/x86/proresdsp.asm +++ b/libavcodec/x86/proresdsp.asm @@ -327,7 +327,7 @@ section .text align=16 %endmacro ; void prores_idct_put_10_<opt>(uint8_t *pixels, int stride, -; DCTELEM *block, const int16_t *qmat); +; int16_t *block, const int16_t *qmat); %macro idct_put_fn 1 cglobal prores_idct_put_10, 4, 4, %1 movsxd r1, r1d diff --git a/libavcodec/x86/proresdsp_init.c b/libavcodec/x86/proresdsp_init.c index 46c26bd..9df69b6 100644 --- a/libavcodec/x86/proresdsp_init.c +++ b/libavcodec/x86/proresdsp_init.c @@ -21,14 +21,15 @@ */ #include "libavutil/x86/cpu.h" +#include "libavcodec/dsputil.h" #include "libavcodec/proresdsp.h" void ff_prores_idct_put_10_sse2(uint16_t *dst, int linesize, - DCTELEM *block, const int16_t *qmat); + int16_t *block, const int16_t *qmat); void ff_prores_idct_put_10_sse4(uint16_t *dst, int linesize, - DCTELEM *block, const int16_t *qmat); + int16_t *block, const int16_t *qmat); void ff_prores_idct_put_10_avx (uint16_t *dst, int linesize, - DCTELEM *block, const int16_t *qmat); + int16_t *block, const int16_t *qmat); void ff_proresdsp_x86_init(ProresDSPContext *dsp) { diff --git a/libavcodec/x86/rv34dsp.asm b/libavcodec/x86/rv34dsp.asm index c099ac5..4d9c35b 100644 --- a/libavcodec/x86/rv34dsp.asm +++ b/libavcodec/x86/rv34dsp.asm @@ -133,7 +133,7 @@ cglobal rv34_idct_dc_add, 3, 3 mova mm5, [pd_512] ; 0x200 %endmacro -; ff_rv34_idct_add_mmxext(uint8_t *dst, ptrdiff_t stride, DCTELEM *block); +; ff_rv34_idct_add_mmxext(uint8_t *dst, ptrdiff_t stride, int16_t *block); %macro COL_TRANSFORM 4 pshufw mm3, %2, 0xDD ; col. 1,3,1,3 pshufw %2, %2, 0x88 ; col. 0,2,0,2 diff --git a/libavcodec/x86/rv34dsp_init.c b/libavcodec/x86/rv34dsp_init.c index 6b6cf91..a930967 100644 --- a/libavcodec/x86/rv34dsp_init.c +++ b/libavcodec/x86/rv34dsp_init.c @@ -25,11 +25,11 @@ #include "libavcodec/dsputil.h" #include "libavcodec/rv34dsp.h" -void ff_rv34_idct_dc_mmxext(DCTELEM *block); -void ff_rv34_idct_dc_noround_mmxext(DCTELEM *block); +void ff_rv34_idct_dc_mmxext(int16_t *block); +void ff_rv34_idct_dc_noround_mmxext(int16_t *block); void ff_rv34_idct_dc_add_mmx(uint8_t *dst, ptrdiff_t stride, int dc); void ff_rv34_idct_dc_add_sse4(uint8_t *dst, ptrdiff_t stride, int dc); -void ff_rv34_idct_add_mmxext(uint8_t *dst, ptrdiff_t stride, DCTELEM *block); +void ff_rv34_idct_add_mmxext(uint8_t *dst, ptrdiff_t stride, int16_t *block); av_cold void ff_rv34dsp_init_x86(RV34DSPContext* c, DSPContext *dsp) { diff --git a/libavcodec/x86/simple_idct.c b/libavcodec/x86/simple_idct.c index 0e80933..966beaa 100644 --- a/libavcodec/x86/simple_idct.c +++ b/libavcodec/x86/simple_idct.c @@ -1155,12 +1155,12 @@ void ff_simple_idct_mmx(int16_t *block) //FIXME merge add/put into the idct -void ff_simple_idct_put_mmx(uint8_t *dest, int line_size, DCTELEM *block) +void ff_simple_idct_put_mmx(uint8_t *dest, int line_size, int16_t *block) { idct(block); ff_put_pixels_clamped_mmx(block, dest, line_size); } -void ff_simple_idct_add_mmx(uint8_t *dest, int line_size, DCTELEM *block) +void ff_simple_idct_add_mmx(uint8_t *dest, int line_size, int16_t *block) { idct(block); ff_add_pixels_clamped_mmx(block, dest, line_size); diff --git a/libavcodec/x86/vc1dsp_mmx.c b/libavcodec/x86/vc1dsp_mmx.c index b02582f..a64ec41 100644 --- a/libavcodec/x86/vc1dsp_mmx.c +++ b/libavcodec/x86/vc1dsp_mmx.c @@ -494,7 +494,7 @@ DECLARE_FUNCTION(3, 2) DECLARE_FUNCTION(3, 3) static void vc1_inv_trans_4x4_dc_mmxext(uint8_t *dest, int linesize, - DCTELEM *block) + int16_t *block) { int dc = block[0]; dc = (17 * dc + 4) >> 3; @@ -533,7 +533,7 @@ static void vc1_inv_trans_4x4_dc_mmxext(uint8_t *dest, int linesize, } static void vc1_inv_trans_4x8_dc_mmxext(uint8_t *dest, int linesize, - DCTELEM *block) + int16_t *block) { int dc = block[0]; dc = (17 * dc + 4) >> 3; @@ -595,7 +595,7 @@ static void vc1_inv_trans_4x8_dc_mmxext(uint8_t *dest, int linesize, } static void vc1_inv_trans_8x4_dc_mmxext(uint8_t *dest, int linesize, - DCTELEM *block) + int16_t *block) { int dc = block[0]; dc = ( 3 * dc + 1) >> 1; @@ -634,7 +634,7 @@ static void vc1_inv_trans_8x4_dc_mmxext(uint8_t *dest, int linesize, } static void vc1_inv_trans_8x8_dc_mmxext(uint8_t *dest, int linesize, - DCTELEM *block) + int16_t *block) { int dc = block[0]; dc = (3 * dc + 1) >> 1; diff --git a/libavcodec/x86/vp3dsp_init.c b/libavcodec/x86/vp3dsp_init.c index 95beeab..2668bcf 100644 --- a/libavcodec/x86/vp3dsp_init.c +++ b/libavcodec/x86/vp3dsp_init.c @@ -22,17 +22,18 @@ #include "libavutil/cpu.h" #include "libavutil/x86/cpu.h" #include "libavcodec/avcodec.h" +#include "libavcodec/dsputil.h" #include "libavcodec/vp3dsp.h" #include "config.h" -void ff_vp3_idct_put_mmx(uint8_t *dest, int line_size, DCTELEM *block); -void ff_vp3_idct_add_mmx(uint8_t *dest, int line_size, DCTELEM *block); +void ff_vp3_idct_put_mmx(uint8_t *dest, int line_size, int16_t *block); +void ff_vp3_idct_add_mmx(uint8_t *dest, int line_size, int16_t *block); -void ff_vp3_idct_put_sse2(uint8_t *dest, int line_size, DCTELEM *block); -void ff_vp3_idct_add_sse2(uint8_t *dest, int line_size, DCTELEM *block); +void ff_vp3_idct_put_sse2(uint8_t *dest, int line_size, int16_t *block); +void ff_vp3_idct_add_sse2(uint8_t *dest, int line_size, int16_t *block); void ff_vp3_idct_dc_add_mmxext(uint8_t *dest, int line_size, - DCTELEM *block); + int16_t *block); void ff_vp3_v_loop_filter_mmxext(uint8_t *src, int stride, int *bounding_values); diff --git a/libavcodec/x86/vp8dsp.asm b/libavcodec/x86/vp8dsp.asm index af8403e..caf2cd6 100644 --- a/libavcodec/x86/vp8dsp.asm +++ b/libavcodec/x86/vp8dsp.asm @@ -899,7 +899,7 @@ cglobal put_vp8_pixels16, 5, 5, 2, dst, dststride, src, srcstride, height REP_RET ;----------------------------------------------------------------------------- -; void vp8_idct_dc_add_<opt>(uint8_t *dst, DCTELEM block[16], int stride); +; void vp8_idct_dc_add_<opt>(uint8_t *dst, int16_t block[16], int stride); ;----------------------------------------------------------------------------- %macro ADD_DC 4 @@ -977,7 +977,7 @@ cglobal vp8_idct_dc_add, 3, 3, 6, dst, block, stride RET ;----------------------------------------------------------------------------- -; void vp8_idct_dc_add4y_<opt>(uint8_t *dst, DCTELEM block[4][16], int stride); +; void vp8_idct_dc_add4y_<opt>(uint8_t *dst, int16_t block[4][16], int stride); ;----------------------------------------------------------------------------- %if ARCH_X86_32 @@ -1050,7 +1050,7 @@ cglobal vp8_idct_dc_add4y, 3, 3, 6, dst, block, stride RET ;----------------------------------------------------------------------------- -; void vp8_idct_dc_add4uv_<opt>(uint8_t *dst, DCTELEM block[4][16], int stride); +; void vp8_idct_dc_add4uv_<opt>(uint8_t *dst, int16_t block[4][16], int stride); ;----------------------------------------------------------------------------- INIT_MMX mmx @@ -1092,7 +1092,7 @@ cglobal vp8_idct_dc_add4uv, 3, 3, 0, dst, block, stride RET ;----------------------------------------------------------------------------- -; void vp8_idct_add_<opt>(uint8_t *dst, DCTELEM block[16], int stride); +; void vp8_idct_add_<opt>(uint8_t *dst, int16_t block[16], int stride); ;----------------------------------------------------------------------------- ; calculate %1=mul_35468(%1)-mul_20091(%2); %2=mul_20091(%1)+mul_35468(%2) @@ -1172,7 +1172,7 @@ INIT_MMX sse VP8_IDCT_ADD ;----------------------------------------------------------------------------- -; void vp8_luma_dc_wht_mmxext(DCTELEM block[4][4][16], DCTELEM dc[16]) +; void vp8_luma_dc_wht_mmxext(int16_t block[4][4][16], int16_t dc[16]) ;----------------------------------------------------------------------------- %macro SCATTER_WHT 3 diff --git a/libavcodec/x86/vp8dsp_init.c b/libavcodec/x86/vp8dsp_init.c index a9d3541..38770c3 100644 --- a/libavcodec/x86/vp8dsp_init.c +++ b/libavcodec/x86/vp8dsp_init.c @@ -230,21 +230,21 @@ HVBILIN(ssse3, 8, 4, 8) HVBILIN(ssse3, 8, 8, 16) HVBILIN(ssse3, 8, 16, 16) -extern void ff_vp8_idct_dc_add_mmx(uint8_t *dst, DCTELEM block[16], +extern void ff_vp8_idct_dc_add_mmx(uint8_t *dst, int16_t block[16], ptrdiff_t stride); -extern void ff_vp8_idct_dc_add_sse4(uint8_t *dst, DCTELEM block[16], +extern void ff_vp8_idct_dc_add_sse4(uint8_t *dst, int16_t block[16], ptrdiff_t stride); -extern void ff_vp8_idct_dc_add4y_mmx(uint8_t *dst, DCTELEM block[4][16], +extern void ff_vp8_idct_dc_add4y_mmx(uint8_t *dst, int16_t block[4][16], ptrdiff_t stride); -extern void ff_vp8_idct_dc_add4y_sse2(uint8_t *dst, DCTELEM block[4][16], +extern void ff_vp8_idct_dc_add4y_sse2(uint8_t *dst, int16_t block[4][16], ptrdiff_t stride); -extern void ff_vp8_idct_dc_add4uv_mmx(uint8_t *dst, DCTELEM block[2][16], +extern void ff_vp8_idct_dc_add4uv_mmx(uint8_t *dst, int16_t block[2][16], ptrdiff_t stride); -extern void ff_vp8_luma_dc_wht_mmx(DCTELEM block[4][4][16], DCTELEM dc[16]); -extern void ff_vp8_luma_dc_wht_sse(DCTELEM block[4][4][16], DCTELEM dc[16]); -extern void ff_vp8_idct_add_mmx(uint8_t *dst, DCTELEM block[16], +extern void ff_vp8_luma_dc_wht_mmx(int16_t block[4][4][16], int16_t dc[16]); +extern void ff_vp8_luma_dc_wht_sse(int16_t block[4][4][16], int16_t dc[16]); +extern void ff_vp8_idct_add_mmx(uint8_t *dst, int16_t block[16], ptrdiff_t stride); -extern void ff_vp8_idct_add_sse(uint8_t *dst, DCTELEM block[16], +extern void ff_vp8_idct_add_sse(uint8_t *dst, int16_t block[16], ptrdiff_t stride); #define DECLARE_LOOP_FILTER(NAME)\ |