Mercurial > libavcodec.hg
comparison dsputil.c @ 1567:e08df4d22d27 libavcodec
* introducing dct248 into the DSP context.
* simple/accurate implementation of dct248
* DV encoding now supports 2-4-8 DCT
* DV encoding gets a bit faster (but still miles away
from what I think it could do)
* misc. DV codec cleanups
author | romansh |
---|---|
date | Fri, 24 Oct 2003 18:28:01 +0000 |
parents | 5d53c03186a1 |
children | aa4dc16c0f18 |
comparison
equal
deleted
inserted
replaced
1566:396e8526e82c | 1567:e08df4d22d27 |
---|---|
40 27, 20, 13, 6, 7, 14, 21, 28, | 40 27, 20, 13, 6, 7, 14, 21, 28, |
41 35, 42, 49, 56, 57, 50, 43, 36, | 41 35, 42, 49, 56, 57, 50, 43, 36, |
42 29, 22, 15, 23, 30, 37, 44, 51, | 42 29, 22, 15, 23, 30, 37, 44, 51, |
43 58, 59, 52, 45, 38, 31, 39, 46, | 43 58, 59, 52, 45, 38, 31, 39, 46, |
44 53, 60, 61, 54, 47, 55, 62, 63 | 44 53, 60, 61, 54, 47, 55, 62, 63 |
45 }; | |
46 | |
47 /* Specific zigzag scan for 248 idct. NOTE that unlike the | |
48 specification, we interleave the fields */ | |
49 const uint8_t ff_zigzag248_direct[64] = { | |
50 0, 8, 1, 9, 16, 24, 2, 10, | |
51 17, 25, 32, 40, 48, 56, 33, 41, | |
52 18, 26, 3, 11, 4, 12, 19, 27, | |
53 34, 42, 49, 57, 50, 58, 35, 43, | |
54 20, 28, 5, 13, 6, 14, 21, 29, | |
55 36, 44, 51, 59, 52, 60, 37, 45, | |
56 22, 30, 7, 15, 23, 31, 38, 46, | |
57 53, 61, 54, 62, 39, 47, 55, 63, | |
45 }; | 58 }; |
46 | 59 |
47 /* not permutated inverse zigzag_direct + 1 for MMX quantizer */ | 60 /* not permutated inverse zigzag_direct + 1 for MMX quantizer */ |
48 uint16_t __align8 inv_zigzag_direct16[64]; | 61 uint16_t __align8 inv_zigzag_direct16[64]; |
49 | 62 |
2867 void dsputil_init(DSPContext* c, AVCodecContext *avctx) | 2880 void dsputil_init(DSPContext* c, AVCodecContext *avctx) |
2868 { | 2881 { |
2869 int i; | 2882 int i; |
2870 | 2883 |
2871 #ifdef CONFIG_ENCODERS | 2884 #ifdef CONFIG_ENCODERS |
2872 if(avctx->dct_algo==FF_DCT_FASTINT) | 2885 if(avctx->dct_algo==FF_DCT_FASTINT) { |
2873 c->fdct = fdct_ifast; | 2886 c->fdct = fdct_ifast; |
2874 else if(avctx->dct_algo==FF_DCT_FAAN) | 2887 c->fdct248 = ff_fdct248_islow; // FIXME: need an optimized version |
2888 } | |
2889 else if(avctx->dct_algo==FF_DCT_FAAN) { | |
2875 c->fdct = ff_faandct; | 2890 c->fdct = ff_faandct; |
2876 else | 2891 c->fdct248 = ff_fdct248_islow; // FIXME: need an optimized version |
2892 } | |
2893 else { | |
2877 c->fdct = ff_jpeg_fdct_islow; //slow/accurate/default | 2894 c->fdct = ff_jpeg_fdct_islow; //slow/accurate/default |
2895 c->fdct248 = ff_fdct248_islow; | |
2896 } | |
2878 #endif //CONFIG_ENCODERS | 2897 #endif //CONFIG_ENCODERS |
2879 | 2898 |
2880 if(avctx->idct_algo==FF_IDCT_INT){ | 2899 if(avctx->idct_algo==FF_IDCT_INT){ |
2881 c->idct_put= ff_jref_idct_put; | 2900 c->idct_put= ff_jref_idct_put; |
2882 c->idct_add= ff_jref_idct_add; | 2901 c->idct_add= ff_jref_idct_add; |