aboutsummaryrefslogtreecommitdiffstats
path: root/libavcodec/dsputil.c
diff options
context:
space:
mode:
authorMans Rullgard <mans@mansr.com>2011-07-20 20:01:56 +0100
committerMans Rullgard <mans@mansr.com>2011-07-21 18:10:58 +0100
commit0a72533e9854aa615bb6d1569dd5f0c4cd031429 (patch)
tree78c7bae61e8857170f174d4fdd114808f3bae514 /libavcodec/dsputil.c
parent73c0dd939d503aaf83d3266181a156615eeb77d5 (diff)
downloadffmpeg-0a72533e9854aa615bb6d1569dd5f0c4cd031429.tar.gz
jfdctint: add 10-bit version
Signed-off-by: Mans Rullgard <mans@mansr.com>
Diffstat (limited to 'libavcodec/dsputil.c')
-rw-r--r--libavcodec/dsputil.c27
1 files changed, 16 insertions, 11 deletions
diff --git a/libavcodec/dsputil.c b/libavcodec/dsputil.c
index 4008389a9d..a99be55eac 100644
--- a/libavcodec/dsputil.c
+++ b/libavcodec/dsputil.c
@@ -2848,17 +2848,22 @@ av_cold void dsputil_init(DSPContext* c, AVCodecContext *avctx)
ff_check_alignment();
#if CONFIG_ENCODERS
- if(avctx->dct_algo==FF_DCT_FASTINT) {
- c->fdct = fdct_ifast;
- c->fdct248 = fdct_ifast248;
- }
- else if(avctx->dct_algo==FF_DCT_FAAN) {
- c->fdct = ff_faandct;
- c->fdct248 = ff_faandct248;
- }
- else {
- c->fdct = ff_jpeg_fdct_islow; //slow/accurate/default
- c->fdct248 = ff_fdct248_islow;
+ if (avctx->bits_per_raw_sample == 10) {
+ c->fdct = ff_jpeg_fdct_islow_10;
+ c->fdct248 = ff_fdct248_islow_10;
+ } else {
+ if(avctx->dct_algo==FF_DCT_FASTINT) {
+ c->fdct = fdct_ifast;
+ c->fdct248 = fdct_ifast248;
+ }
+ else if(avctx->dct_algo==FF_DCT_FAAN) {
+ c->fdct = ff_faandct;
+ c->fdct248 = ff_faandct248;
+ }
+ else {
+ c->fdct = ff_jpeg_fdct_islow_8; //slow/accurate/default
+ c->fdct248 = ff_fdct248_islow_8;
+ }
}
#endif //CONFIG_ENCODERS