diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2013-01-23 17:44:56 +0100 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2013-01-23 17:44:56 +0100 |
commit | ac8987591f5503768e7587c25693928f26fcb3d1 (patch) | |
tree | 2531b37d6673aea7f4d1c61549978664a2c807ac /libavcodec/x86 | |
parent | a793a587df05bfc789e040c13329825cf9a261a3 (diff) | |
parent | 88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f (diff) | |
download | ffmpeg-streaming-ac8987591f5503768e7587c25693928f26fcb3d1.zip ffmpeg-streaming-ac8987591f5503768e7587c25693928f26fcb3d1.tar.gz |
Merge commit '88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f'
* commit '88bd7fdc821aaa0cbcf44cf075c62aaa42121e3f':
Drop DCTELEM typedef
Conflicts:
libavcodec/alpha/dsputil_alpha.h
libavcodec/alpha/motion_est_alpha.c
libavcodec/arm/dsputil_init_armv6.c
libavcodec/bfin/dsputil_bfin.h
libavcodec/bfin/pixels_bfin.S
libavcodec/cavs.c
libavcodec/cavsdec.c
libavcodec/dct-test.c
libavcodec/dnxhdenc.c
libavcodec/dsputil.c
libavcodec/dsputil.h
libavcodec/dsputil_template.c
libavcodec/eamad.c
libavcodec/h264_cavlc.c
libavcodec/h264idct_template.c
libavcodec/mpeg12.c
libavcodec/mpegvideo.c
libavcodec/mpegvideo.h
libavcodec/mpegvideo_enc.c
libavcodec/ppc/dsputil_altivec.c
libavcodec/proresdsp.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/x86')
-rw-r--r-- | libavcodec/x86/dnxhdenc.c | 2 | ||||
-rw-r--r-- | libavcodec/x86/dsputil_mmx.c | 24 | ||||
-rw-r--r-- | libavcodec/x86/dsputil_mmx.h | 10 | ||||
-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, 94 insertions, 93 deletions
diff --git a/libavcodec/x86/dnxhdenc.c b/libavcodec/x86/dnxhdenc.c index b2ba894..98b8b17 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 858eb90..2bbe7ff 100644 --- a/libavcodec/x86/dsputil_mmx.c +++ b/libavcodec/x86/dsputil_mmx.c @@ -226,10 +226,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 */ @@ -301,7 +301,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; @@ -318,10 +318,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; @@ -423,7 +423,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" \ @@ -443,7 +443,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" @@ -460,7 +460,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" @@ -1882,28 +1882,28 @@ void ff_avg_dirac_pixels32_sse2(uint8_t *dst, const uint8_t *src[5], int stride, * converted. */ #if CONFIG_GPL static void ff_libmpeg2mmx_idct_put(uint8_t *dest, int line_size, - DCTELEM *block) + int16_t *block) { ff_mmx_idct(block); ff_put_pixels_clamped_mmx(block, dest, line_size); } static void ff_libmpeg2mmx_idct_add(uint8_t *dest, int line_size, - DCTELEM *block) + int16_t *block) { ff_mmx_idct(block); ff_add_pixels_clamped_mmx(block, dest, line_size); } static void ff_libmpeg2mmx2_idct_put(uint8_t *dest, int line_size, - DCTELEM *block) + int16_t *block) { ff_mmxext_idct(block); ff_put_pixels_clamped_mmx(block, dest, line_size); } static void ff_libmpeg2mmx2_idct_add(uint8_t *dest, int line_size, - DCTELEM *block) + int16_t *block) { ff_mmxext_idct(block); ff_add_pixels_clamped_mmx(block, dest, line_size); diff --git a/libavcodec/x86/dsputil_mmx.h b/libavcodec/x86/dsputil_mmx.h index a0a44c1..033a175 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); @@ -100,8 +100,8 @@ void ff_put_rv40_qpel16_mc33_mmx(uint8_t *block, uint8_t *pixels, int line_size) void ff_avg_rv40_qpel8_mc33_mmx(uint8_t *block, uint8_t *pixels, int line_size); void ff_avg_rv40_qpel16_mc33_mmx(uint8_t *block, uint8_t *pixels, int line_size); -void ff_mmx_idct(DCTELEM *block); -void ff_mmxext_idct(DCTELEM *block); +void ff_mmx_idct(int16_t *block); +void ff_mmxext_idct(int16_t *block); void ff_deinterlace_line_mmx(uint8_t *dst, diff --git a/libavcodec/x86/dsputilenc.asm b/libavcodec/x86/dsputilenc.asm index 55eacf5..1839bee 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 8a50a26..5ac3c1c 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); @@ -798,7 +798,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 d0ac0fe..8fef7b8 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 deededa..015cc6f 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 65d300f..a0c22eb 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 b62865e..5e9f405 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 a584fba..7a2847b 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 9870ed7..f4bf05f 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; @@ -187,7 +187,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; @@ -256,7 +256,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; @@ -322,7 +322,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; @@ -388,7 +388,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; @@ -464,7 +464,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]; @@ -518,7 +518,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 47c3b43..1e0505e 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 094f872..aedacc2 100644 --- a/libavcodec/x86/proresdsp.asm +++ b/libavcodec/x86/proresdsp.asm @@ -232,7 +232,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 21ce098..91ff257 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, AVCodecContext *avctx) { 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 c514d75..f9fd7dc 100644 --- a/libavcodec/x86/simple_idct.c +++ b/libavcodec/x86/simple_idct.c @@ -1154,12 +1154,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 6ce65e4..a769535 100644 --- a/libavcodec/x86/vc1dsp_mmx.c +++ b/libavcodec/x86/vc1dsp_mmx.c @@ -493,7 +493,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; @@ -532,7 +532,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; @@ -594,7 +594,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; @@ -633,7 +633,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 e425f50..1df570e 100644 --- a/libavcodec/x86/vp3dsp_init.c +++ b/libavcodec/x86/vp3dsp_init.c @@ -25,17 +25,18 @@ #include "libavutil/x86/cpu.h" #include "libavutil/x86/asm.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 84805fd..c5fb455 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 735619c..09e2d91 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)\ |