diff options
author | Mans Rullgard <mans@mansr.com> | 2011-07-20 16:05:05 +0100 |
---|---|---|
committer | Mans Rullgard <mans@mansr.com> | 2011-07-20 17:49:48 +0100 |
commit | e7a972e113ddf3271c4c0e01a2d57e23ac5195f1 (patch) | |
tree | 4650c81bbd3485f6ef938e834d8384eab4741363 /libavcodec/dsputil.c | |
parent | 7b4ee3a21d7c7419b485bf7af3b2795b9c3e89ea (diff) | |
download | ffmpeg-e7a972e113ddf3271c4c0e01a2d57e23ac5195f1.tar.gz |
simple_idct: add 10-bit version
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/dsputil.c')
-rw-r--r-- | libavcodec/dsputil.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c index e2cf708940..4b26f68387 100644 --- a/libavcodec/dsputil.c +++ b/libavcodec/dsputil.c @@ -2237,7 +2237,7 @@ static int quant_psnr8x8_c(/*MpegEncContext*/ void *c, uint8_t *src1, uint8_t *s 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); - ff_simple_idct(temp); //FIXME + ff_simple_idct_8(temp); //FIXME for(i=0; i<64; i++) sum+= (temp[i]-bak[i])*(temp[i]-bak[i]); @@ -2878,6 +2878,12 @@ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx) c->idct = 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->idct_algo==FF_IDCT_INT){ c->idct_put= ff_jref_idct_put; c->idct_add= ff_jref_idct_add; @@ -2908,11 +2914,12 @@ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx) c->idct_put = ff_bink_idct_put_c; c->idct_permutation_type = FF_NO_IDCT_PERM; }else{ //accurate/default - c->idct_put= ff_simple_idct_put; - c->idct_add= ff_simple_idct_add; - c->idct = ff_simple_idct; + c->idct_put = ff_simple_idct_put_8; + c->idct_add = ff_simple_idct_add_8; + c->idct = ff_simple_idct_8; c->idct_permutation_type= FF_NO_IDCT_PERM; } + } } c->get_pixels = get_pixels_c; |