Mercurial > libavcodec.hg
comparison dsputil.h @ 1977:89422281f6f6 libavcodec
reorganize and simplify the VP3 IDCT stuff
author | melanson |
---|---|
date | Mon, 26 Apr 2004 00:20:29 +0000 |
parents | 8c5489b2cf3e |
children | ef919e9ef73e |
comparison
equal
deleted
inserted
replaced
1976:5dfde318d44a | 1977:89422281f6f6 |
---|---|
60 extern uint32_t squareTbl[512]; | 60 extern uint32_t squareTbl[512]; |
61 extern uint8_t cropTbl[256 + 2 * MAX_NEG_CROP]; | 61 extern uint8_t cropTbl[256 + 2 * MAX_NEG_CROP]; |
62 | 62 |
63 /* VP3 DSP functions */ | 63 /* VP3 DSP functions */ |
64 void vp3_dsp_init_c(void); | 64 void vp3_dsp_init_c(void); |
65 void vp3_idct_put_c(int16_t *input_data, int16_t *dequant_matrix, | 65 void vp3_idct_c(int16_t *input_data, int16_t *dequant_matrix, |
66 int coeff_count, uint8_t *dest, int stride); | 66 int coeff_count, DCTELEM *output_data); |
67 void vp3_idct_add_c(int16_t *input_data, int16_t *dequant_matrix, | |
68 int coeff_count, uint8_t *dest, int stride); | |
69 | 67 |
70 void vp3_dsp_init_mmx(void); | 68 void vp3_dsp_init_mmx(void); |
71 void vp3_idct_put_mmx(int16_t *input_data, int16_t *dequant_matrix, | 69 void vp3_idct_mmx(int16_t *input_data, int16_t *dequant_matrix, |
72 int coeff_count, uint8_t *dest, int stride); | 70 int coeff_count, DCTELEM *output_data); |
73 void vp3_idct_add_mmx(int16_t *input_data, int16_t *dequant_matrix, | |
74 int coeff_count, uint8_t *dest, int stride); | |
75 | 71 |
76 void vp3_dsp_init_sse2(void); | 72 void vp3_dsp_init_sse2(void); |
77 void vp3_idct_put_sse2(int16_t *input_data, int16_t *dequant_matrix, | 73 void vp3_idct_sse2(int16_t *input_data, int16_t *dequant_matrix, |
78 int coeff_count, uint8_t *dest, int stride); | 74 int coeff_count, DCTELEM *output_data); |
79 void vp3_idct_add_sse2(int16_t *input_data, int16_t *dequant_matrix, | |
80 int coeff_count, uint8_t *dest, int stride); | |
81 | |
82 | 75 |
83 /* minimum alignment rules ;) | 76 /* minimum alignment rules ;) |
84 if u notice errors in the align stuff, need more alignment for some asm code for some cpu | 77 if u notice errors in the align stuff, need more alignment for some asm code for some cpu |
85 or need to use a function with less aligned data then send a mail to the ffmpeg-dev list, ... | 78 or need to use a function with less aligned data then send a mail to the ffmpeg-dev list, ... |
86 | 79 |
316 */ | 309 */ |
317 void (*vp3_dsp_init)(void); | 310 void (*vp3_dsp_init)(void); |
318 | 311 |
319 /** | 312 /** |
320 * This function is responsible for taking a block of zigzag'd, | 313 * This function is responsible for taking a block of zigzag'd, |
321 * quantized DCT coefficients, reconstructing the original block of | 314 * quantized DCT coefficients and reconstructing the original block of |
322 * samples, and placing it into the output. | 315 * samples. |
323 * @param input_data 64 zigzag'd, quantized DCT coefficients | 316 * @param input_data 64 zigzag'd, quantized DCT coefficients |
324 * @param dequant_matrix 64 zigzag'd quantizer coefficients | 317 * @param dequant_matrix 64 zigzag'd quantizer coefficients |
325 * @param coeff_count index of the last coefficient | 318 * @param coeff_count index of the last coefficient |
326 * @param dest the final output location where the transformed samples | 319 * @param output_samples space for 64 DCTELEMs where the transformed |
327 * are to be placed | 320 * samples will be stored |
328 * @param stride the width in 8-bit samples of a line on this plane | 321 */ |
329 */ | 322 void (*vp3_idct)(int16_t *input_data, int16_t *dequant_matrix, |
330 void (*vp3_idct_put)(int16_t *input_data, int16_t *dequant_matrix, | 323 int coeff_count, DCTELEM *output_samples); |
331 int coeff_count, uint8_t *dest, int stride); | |
332 | |
333 /** | |
334 * This function is responsible for taking a block of zigzag'd, | |
335 * quantized DCT coefficients, reconstructing the original block of | |
336 * samples, and adding the transformed samples to an existing block of | |
337 * samples in the output. | |
338 * @param input_data 64 zigzag'd, quantized DCT coefficients | |
339 * @param dequant_matrix 64 zigzag'd quantizer coefficients | |
340 * @param coeff_count index of the last coefficient | |
341 * @param dest the final output location where the transformed samples | |
342 * are to be placed | |
343 * @param stride the width in 8-bit samples of a line on this plane | |
344 */ | |
345 void (*vp3_idct_add)(int16_t *input_data, int16_t *dequant_matrix, | |
346 int coeff_count, uint8_t *dest, int stride); | |
347 | 324 |
348 } DSPContext; | 325 } DSPContext; |
349 | 326 |
350 void dsputil_static_init(void); | 327 void dsputil_static_init(void); |
351 void dsputil_init(DSPContext* p, AVCodecContext *avctx); | 328 void dsputil_init(DSPContext* p, AVCodecContext *avctx); |