diff options
author | Michael Niedermayer <michaelni@gmx.at> | 2012-04-22 22:26:42 +0200 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2012-04-22 22:26:42 +0200 |
commit | 92ef4be4ab9fbb7d901b22e0036a4ca90b00a476 (patch) | |
tree | c04ededf84f089de4f9ef417ca6ecc715b84fa4b /libavcodec/dsputil.c | |
parent | 2e07f42957666df6d7c63a62263b8447e97b1442 (diff) | |
parent | d526c5338d50d12a54fd95130030c60070707d3e (diff) | |
download | ffmpeg-92ef4be4ab9fbb7d901b22e0036a4ca90b00a476.tar.gz |
Merge remote-tracking branch 'qatar/master'
* qatar/master:
ARM: allow runtime masking of CPU features
dsputil: remove unused functions
mov: Treat keyframe indexes as 1-origin if starting at non-zero.
mov: Take stps entries into consideration also about key_off.
Remove lowres video decoding
Conflicts:
ffmpeg.c
ffplay.c
libavcodec/arm/vp8dsp_init_arm.c
libavcodec/libopenjpegdec.c
libavcodec/mjpegdec.c
libavcodec/mpegvideo.c
libavcodec/utils.c
libavformat/mov.c
Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/dsputil.c')
-rw-r--r-- | libavcodec/dsputil.c | 122 |
1 files changed, 6 insertions, 116 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index a13737d77e..553fb8c1cd 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -381,38 +381,6 @@ void ff_put_pixels_clamped_c(const DCTELEM *block, uint8_t *restrict pixels, } } -static void put_pixels_clamped4_c(const DCTELEM *block, uint8_t *restrict pixels, - int line_size) -{ - int i; - - /* read the pixels */ - for(i=0;i<4;i++) { - pixels[0] = av_clip_uint8(block[0]); - pixels[1] = av_clip_uint8(block[1]); - pixels[2] = av_clip_uint8(block[2]); - pixels[3] = av_clip_uint8(block[3]); - - pixels += line_size; - block += 8; - } -} - -static void put_pixels_clamped2_c(const DCTELEM *block, uint8_t *restrict pixels, - int line_size) -{ - int i; - - /* read the pixels */ - for(i=0;i<2;i++) { - pixels[0] = av_clip_uint8(block[0]); - pixels[1] = av_clip_uint8(block[1]); - - pixels += line_size; - block += 8; - } -} - void ff_put_signed_pixels_clamped_c(const DCTELEM *block, uint8_t *restrict pixels, int line_size) @@ -454,36 +422,6 @@ void ff_add_pixels_clamped_c(const DCTELEM *block, uint8_t *restrict pixels, } } -static void add_pixels_clamped4_c(const DCTELEM *block, uint8_t *restrict pixels, - int line_size) -{ - int i; - - /* read the pixels */ - for(i=0;i<4;i++) { - pixels[0] = av_clip_uint8(pixels[0] + block[0]); - pixels[1] = av_clip_uint8(pixels[1] + block[1]); - pixels[2] = av_clip_uint8(pixels[2] + block[2]); - pixels[3] = av_clip_uint8(pixels[3] + block[3]); - pixels += line_size; - block += 8; - } -} - -static void add_pixels_clamped2_c(const DCTELEM *block, uint8_t *restrict pixels, - int line_size) -{ - int i; - - /* read the pixels */ - for(i=0;i<2;i++) { - pixels[0] = av_clip_uint8(pixels[0] + block[0]); - pixels[1] = av_clip_uint8(pixels[1] + block[1]); - pixels += line_size; - block += 8; - } -} - static int sum_abs_dctelem_c(DCTELEM *block) { int sum=0, i; @@ -2746,37 +2684,6 @@ static void ff_jref_idct_add(uint8_t *dest, int line_size, DCTELEM *block) ff_add_pixels_clamped_c(block, dest, line_size); } -static void ff_jref_idct4_put(uint8_t *dest, int line_size, DCTELEM *block) -{ - ff_j_rev_dct4 (block); - put_pixels_clamped4_c(block, dest, line_size); -} -static void ff_jref_idct4_add(uint8_t *dest, int line_size, DCTELEM *block) -{ - ff_j_rev_dct4 (block); - add_pixels_clamped4_c(block, dest, line_size); -} - -static void ff_jref_idct2_put(uint8_t *dest, int line_size, DCTELEM *block) -{ - ff_j_rev_dct2 (block); - put_pixels_clamped2_c(block, dest, line_size); -} -static void ff_jref_idct2_add(uint8_t *dest, int line_size, DCTELEM *block) -{ - ff_j_rev_dct2 (block); - add_pixels_clamped2_c(block, dest, line_size); -} - -static void ff_jref_idct1_put(uint8_t *dest, int line_size, DCTELEM *block) -{ - dest[0] = av_clip_uint8((block[0] + 4)>>3); -} -static void ff_jref_idct1_add(uint8_t *dest, int line_size, DCTELEM *block) -{ - dest[0] = av_clip_uint8(dest[0] + ((block[0] + 4)>>3)); -} - static void just_return(void *mem av_unused, int stride av_unused, int h av_unused) { return; } /* init static data */ @@ -2843,28 +2750,12 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx) } #endif //CONFIG_ENCODERS - if(avctx->lowres==1){ - c->idct_put= ff_jref_idct4_put; - c->idct_add= ff_jref_idct4_add; - c->idct = ff_j_rev_dct4; - c->idct_permutation_type= FF_NO_IDCT_PERM; - }else if(avctx->lowres==2){ - c->idct_put= ff_jref_idct2_put; - c->idct_add= ff_jref_idct2_add; - c->idct = ff_j_rev_dct2; - c->idct_permutation_type= FF_NO_IDCT_PERM; - }else if(avctx->lowres==3){ - c->idct_put= ff_jref_idct1_put; - c->idct_add= ff_jref_idct1_add; - c->idct = ff_j_rev_dct1; - c->idct_permutation_type= FF_NO_IDCT_PERM; - }else{ - if (avctx->bits_per_raw_sample == 10) { - c->idct_put = ff_simple_idct_put_10; - c->idct_add = ff_simple_idct_add_10; - c->idct = ff_simple_idct_10; - c->idct_permutation_type = FF_NO_IDCT_PERM; - } else { + if (avctx->bits_per_raw_sample == 10) { + c->idct_put = ff_simple_idct_put_10; + c->idct_add = ff_simple_idct_add_10; + c->idct = ff_simple_idct_10; + c->idct_permutation_type = FF_NO_IDCT_PERM; + } else { if(avctx->idct_algo==FF_IDCT_INT){ c->idct_put= ff_jref_idct_put; c->idct_add= ff_jref_idct_add; @@ -2895,7 +2786,6 @@ av_cold void ff_dsputil_init(DSPContext* c, AVCodecContext *avctx) c->idct = ff_simple_idct_8; c->idct_permutation_type= FF_NO_IDCT_PERM; } - } } c->diff_pixels = diff_pixels_c; |