comparison dsputil.h @ 11485:0f0cd6b5791f libavcodec

Separate DWT from snow and dsputil This moves the DWT functions from snow.c and dsputil.c to a file of their own. A new struct, DWTContext, holds the function pointers previously part of DSPContext.
author mru
date Sun, 14 Mar 2010 17:50:12 +0000
parents 4b0cc1b97def
children 2a4dc3c0b012
comparison
equal deleted inserted replaced
11484:5330f17dc769 11485:0f0cd6b5791f
35 35
36 36
37 //#define DEBUG 37 //#define DEBUG
38 /* dct code */ 38 /* dct code */
39 typedef short DCTELEM; 39 typedef short DCTELEM;
40 typedef int DWTELEM;
41 typedef short IDWTELEM;
42 40
43 void fdct_ifast (DCTELEM *data); 41 void fdct_ifast (DCTELEM *data);
44 void fdct_ifast248 (DCTELEM *data); 42 void fdct_ifast248 (DCTELEM *data);
45 void ff_jpeg_fdct_islow (DCTELEM *data); 43 void ff_jpeg_fdct_islow (DCTELEM *data);
46 void ff_fdct248_islow (DCTELEM *data); 44 void ff_fdct248_islow (DCTELEM *data);
182 180
183 /* motion estimation */ 181 /* motion estimation */
184 // h is limited to {width/2, width, 2*width} but never larger than 16 and never smaller then 2 182 // h is limited to {width/2, width, 2*width} but never larger than 16 and never smaller then 2
185 // although currently h<4 is not used as functions with width <8 are neither used nor implemented 183 // although currently h<4 is not used as functions with width <8 are neither used nor implemented
186 typedef int (*me_cmp_func)(void /*MpegEncContext*/ *s, uint8_t *blk1/*align width (8 or 16)*/, uint8_t *blk2/*align 1*/, int line_size, int h)/* __attribute__ ((const))*/; 184 typedef int (*me_cmp_func)(void /*MpegEncContext*/ *s, uint8_t *blk1/*align width (8 or 16)*/, uint8_t *blk2/*align 1*/, int line_size, int h)/* __attribute__ ((const))*/;
187
188
189 // for snow slices
190 typedef struct slice_buffer_s slice_buffer;
191 185
192 /** 186 /**
193 * Scantable. 187 * Scantable.
194 */ 188 */
195 typedef struct ScanTable{ 189 typedef struct ScanTable{
535 void (*h264_dct)(DCTELEM block[4][4]); 529 void (*h264_dct)(DCTELEM block[4][4]);
536 void (*h264_idct_add16)(uint8_t *dst/*align 16*/, const int *blockoffset, DCTELEM *block/*align 16*/, int stride, const uint8_t nnzc[6*8]); 530 void (*h264_idct_add16)(uint8_t *dst/*align 16*/, const int *blockoffset, DCTELEM *block/*align 16*/, int stride, const uint8_t nnzc[6*8]);
537 void (*h264_idct8_add4)(uint8_t *dst/*align 16*/, const int *blockoffset, DCTELEM *block/*align 16*/, int stride, const uint8_t nnzc[6*8]); 531 void (*h264_idct8_add4)(uint8_t *dst/*align 16*/, const int *blockoffset, DCTELEM *block/*align 16*/, int stride, const uint8_t nnzc[6*8]);
538 void (*h264_idct_add8)(uint8_t **dst/*align 16*/, const int *blockoffset, DCTELEM *block/*align 16*/, int stride, const uint8_t nnzc[6*8]); 532 void (*h264_idct_add8)(uint8_t **dst/*align 16*/, const int *blockoffset, DCTELEM *block/*align 16*/, int stride, const uint8_t nnzc[6*8]);
539 void (*h264_idct_add16intra)(uint8_t *dst/*align 16*/, const int *blockoffset, DCTELEM *block/*align 16*/, int stride, const uint8_t nnzc[6*8]); 533 void (*h264_idct_add16intra)(uint8_t *dst/*align 16*/, const int *blockoffset, DCTELEM *block/*align 16*/, int stride, const uint8_t nnzc[6*8]);
540
541 /* snow wavelet */
542 void (*vertical_compose97i)(IDWTELEM *b0, IDWTELEM *b1, IDWTELEM *b2, IDWTELEM *b3, IDWTELEM *b4, IDWTELEM *b5, int width);
543 void (*horizontal_compose97i)(IDWTELEM *b, int width);
544 void (*inner_add_yblock)(const uint8_t *obmc, const int obmc_stride, uint8_t * * block, int b_w, int b_h, int src_x, int src_y, int src_stride, slice_buffer * sb, int add, uint8_t * dst8);
545 534
546 void (*prefetch)(void *mem, int stride, int h); 535 void (*prefetch)(void *mem, int stride, int h);
547 536
548 void (*shrink[4])(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height); 537 void (*shrink[4])(uint8_t *dst, int dst_wrap, const uint8_t *src, int src_wrap, int width, int height);
549 538
679 void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx); 668 void dsputil_init_mmx(DSPContext* c, AVCodecContext *avctx);
680 void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx); 669 void dsputil_init_ppc(DSPContext* c, AVCodecContext *avctx);
681 void dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx); 670 void dsputil_init_sh4(DSPContext* c, AVCodecContext *avctx);
682 void dsputil_init_vis(DSPContext* c, AVCodecContext *avctx); 671 void dsputil_init_vis(DSPContext* c, AVCodecContext *avctx);
683 672
673 void ff_dsputil_init_dwt(DSPContext *c);
684 void ff_cavsdsp_init(DSPContext* c, AVCodecContext *avctx); 674 void ff_cavsdsp_init(DSPContext* c, AVCodecContext *avctx);
685 void ff_rv30dsp_init(DSPContext* c, AVCodecContext *avctx); 675 void ff_rv30dsp_init(DSPContext* c, AVCodecContext *avctx);
686 void ff_rv40dsp_init(DSPContext* c, AVCodecContext *avctx); 676 void ff_rv40dsp_init(DSPContext* c, AVCodecContext *avctx);
687 void ff_vc1dsp_init(DSPContext* c, AVCodecContext *avctx); 677 void ff_vc1dsp_init(DSPContext* c, AVCodecContext *avctx);
688 void ff_intrax8dsp_init(DSPContext* c, AVCodecContext *avctx); 678 void ff_intrax8dsp_init(DSPContext* c, AVCodecContext *avctx);