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/dsputil.c | |
parent | 2e4bb99f4df7052b3e147ee898fcb4013a34d904 (diff) | |
download | ffmpeg-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/dsputil.c')
-rw-r--r-- | libavcodec/dsputil.c | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index caf1b071d7..82da8dd6c1 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -336,7 +336,7 @@ static int sse16_c(void *v, uint8_t *pix1, uint8_t *pix2, int line_size, int h) return s; } -static void diff_pixels_c(DCTELEM *restrict block, const uint8_t *s1, +static void diff_pixels_c(int16_t *restrict block, const uint8_t *s1, const uint8_t *s2, int stride){ int i; @@ -357,7 +357,7 @@ static void diff_pixels_c(DCTELEM *restrict block, const uint8_t *s1, } -static void put_pixels_clamped_c(const DCTELEM *block, uint8_t *restrict pixels, +static void put_pixels_clamped_c(const int16_t *block, uint8_t *restrict pixels, int line_size) { int i; @@ -378,7 +378,7 @@ static void put_pixels_clamped_c(const DCTELEM *block, uint8_t *restrict pixels, } } -static void put_signed_pixels_clamped_c(const DCTELEM *block, +static void put_signed_pixels_clamped_c(const int16_t *block, uint8_t *restrict pixels, int line_size) { @@ -399,7 +399,7 @@ static void put_signed_pixels_clamped_c(const DCTELEM *block, } } -static void add_pixels_clamped_c(const DCTELEM *block, uint8_t *restrict pixels, +static void add_pixels_clamped_c(const int16_t *block, uint8_t *restrict pixels, int line_size) { int i; @@ -419,7 +419,7 @@ static void add_pixels_clamped_c(const DCTELEM *block, uint8_t *restrict pixels, } } -static int sum_abs_dctelem_c(DCTELEM *block) +static int sum_abs_dctelem_c(int16_t *block) { int sum=0, i; for(i=0; i<64; i++) @@ -1712,10 +1712,10 @@ static void add_8x8basis_c(int16_t rem[64], int16_t basis[64], int scale){ * @param scantable the used scantable, this is only used to speed the permutation up, the block is not * (inverse) permutated to scantable order! */ -void ff_block_permute(DCTELEM *block, uint8_t *permutation, const uint8_t *scantable, int last) +void ff_block_permute(int16_t *block, uint8_t *permutation, const uint8_t *scantable, int last) { int i; - DCTELEM temp[64]; + int16_t temp[64]; if(last<=0) return; //if(permutation[1]==1) return; //FIXME it is ok but not clean and might fail for some permutations @@ -2030,7 +2030,7 @@ static int hadamard8_intra8x8_c(/*MpegEncContext*/ void *s, uint8_t *src, uint8_ static int dct_sad8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){ MpegEncContext * const s= (MpegEncContext *)c; - LOCAL_ALIGNED_16(DCTELEM, temp, [64]); + LOCAL_ALIGNED_16(int16_t, temp, [64]); assert(h==8); @@ -2069,7 +2069,7 @@ static int dct_sad8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2 static int dct264_sad8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){ MpegEncContext * const s= (MpegEncContext *)c; - DCTELEM dct[8][8]; + int16_t dct[8][8]; int i; int sum=0; @@ -2094,7 +2094,7 @@ static int dct264_sad8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *s static int dct_max8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){ MpegEncContext * const s= (MpegEncContext *)c; - LOCAL_ALIGNED_16(DCTELEM, temp, [64]); + LOCAL_ALIGNED_16(int16_t, temp, [64]); int sum=0, i; assert(h==8); @@ -2110,8 +2110,8 @@ static int dct_max8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2 static int quant_psnr8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){ MpegEncContext * const s= (MpegEncContext *)c; - LOCAL_ALIGNED_16(DCTELEM, temp, [64*2]); - DCTELEM * const bak = temp+64; + LOCAL_ALIGNED_16(int16_t, temp, [64*2]); + int16_t * const bak = temp+64; int sum=0, i; assert(h==8); @@ -2119,7 +2119,7 @@ static int quant_psnr8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *s s->dsp.diff_pixels(temp, src1, src2, stride); - memcpy(bak, temp, 64*sizeof(DCTELEM)); + memcpy(bak, temp, 64*sizeof(int16_t)); s->block_last_index[0/*FIXME*/]= s->fast_dct_quantize(s, temp, 0/*FIXME*/, s->qscale, &i); s->dct_unquantize_inter(s, temp, 0, s->qscale); @@ -2134,7 +2134,7 @@ static int quant_psnr8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *s static int rd8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){ MpegEncContext * const s= (MpegEncContext *)c; const uint8_t *scantable= s->intra_scantable.permutated; - LOCAL_ALIGNED_16(DCTELEM, temp, [64]); + LOCAL_ALIGNED_16(int16_t, temp, [64]); LOCAL_ALIGNED_16(uint8_t, lsrc1, [64]); LOCAL_ALIGNED_16(uint8_t, lsrc2, [64]); int i, last, run, bits, level, distortion, start_i; @@ -2210,7 +2210,7 @@ static int rd8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int static int bit8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *src2, int stride, int h){ MpegEncContext * const s= (MpegEncContext *)c; const uint8_t *scantable= s->intra_scantable.permutated; - LOCAL_ALIGNED_16(DCTELEM, temp, [64]); + LOCAL_ALIGNED_16(int16_t, temp, [64]); int i, last, run, bits, level, start_i; const int esc_length= s->ac_esc_length; uint8_t * length; @@ -2447,12 +2447,12 @@ static void vector_clip_int32_c(int32_t *dst, const int32_t *src, int32_t min, } while (len > 0); } -static void ff_jref_idct_put(uint8_t *dest, int line_size, DCTELEM *block) +static void ff_jref_idct_put(uint8_t *dest, int line_size, int16_t *block) { ff_j_rev_dct (block); put_pixels_clamped_c(block, dest, line_size); } -static void ff_jref_idct_add(uint8_t *dest, int line_size, DCTELEM *block) +static void ff_jref_idct_add(uint8_t *dest, int line_size, int16_t *block) { ff_j_rev_dct (block); add_pixels_clamped_c(block, dest, line_size); |