summaryrefslogtreecommitdiff
path: root/libavcodec/dsputil.h
diff options
context:
space:
mode:
authorMike Melanson <mike@multimedia.cx>2004-03-08 02:13:45 +0000
committerMike Melanson <mike@multimedia.cx>2004-03-08 02:13:45 +0000
commit44cb64ee89eeb1b28622cf697ff80f65d3bb5959 (patch)
tree723028c753ef5279d7a83ba4e919fc698032e388 /libavcodec/dsputil.h
parente82d912dba14d6d5ee53f84544ef50b79c288925 (diff)
seperated out the C-based VP3 DSP functions into a different file; also
ported the MMX-optimized versions of those functions Originally committed as revision 2855 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavcodec/dsputil.h')
-rw-r--r--libavcodec/dsputil.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/libavcodec/dsputil.h b/libavcodec/dsputil.h
index 99cac9fa6b..84ea34464f 100644
--- a/libavcodec/dsputil.h
+++ b/libavcodec/dsputil.h
@@ -60,6 +60,19 @@ extern const uint8_t ff_zigzag248_direct[64];
extern uint32_t squareTbl[512];
extern uint8_t cropTbl[256 + 2 * MAX_NEG_CROP];
+/* VP3 DSP functions */
+void vp3_dsp_init_c(void);
+void vp3_idct_put_c(int16_t *input_data, int16_t *dequant_matrix,
+ int coeff_count, uint8_t *dest, int stride);
+void vp3_idct_add_c(int16_t *input_data, int16_t *dequant_matrix,
+ int coeff_count, uint8_t *dest, int stride);
+
+void vp3_dsp_init_mmx(void);
+void vp3_idct_put_mmx(int16_t *input_data, int16_t *dequant_matrix,
+ int coeff_count, uint8_t *dest, int stride);
+void vp3_idct_add_mmx(int16_t *input_data, int16_t *dequant_matrix,
+ int coeff_count, uint8_t *dest, int stride);
+
/* minimum alignment rules ;)
if u notice errors in the align stuff, need more alignment for some asm code for some cpu
@@ -292,6 +305,40 @@ typedef struct DSPContext {
#define BASIS_SHIFT 16
#define RECON_SHIFT 6
+ /**
+ * This function handles any initialization for the VP3 DSP functions.
+ */
+ void (*vp3_dsp_init)(void);
+
+ /**
+ * This function is responsible for taking a block of zigzag'd,
+ * quantized DCT coefficients, reconstructing the original block of
+ * samples, and placing it into the output.
+ * @param input_data 64 zigzag'd, quantized DCT coefficients
+ * @param dequant_matrix 64 zigzag'd quantizer coefficients
+ * @param coeff_count index of the last coefficient
+ * @param dest the final output location where the transformed samples
+ * are to be placed
+ * @param stride the width in 8-bit samples of a line on this plane
+ */
+ void (*vp3_idct_put)(int16_t *input_data, int16_t *dequant_matrix,
+ int coeff_count, uint8_t *dest, int stride);
+
+ /**
+ * This function is responsible for taking a block of zigzag'd,
+ * quantized DCT coefficients, reconstructing the original block of
+ * samples, and adding the transformed samples to an existing block of
+ * samples in the output.
+ * @param input_data 64 zigzag'd, quantized DCT coefficients
+ * @param dequant_matrix 64 zigzag'd quantizer coefficients
+ * @param coeff_count index of the last coefficient
+ * @param dest the final output location where the transformed samples
+ * are to be placed
+ * @param stride the width in 8-bit samples of a line on this plane
+ */
+ void (*vp3_idct_add)(int16_t *input_data, int16_t *dequant_matrix,
+ int coeff_count, uint8_t *dest, int stride);
+
} DSPContext;
void dsputil_static_init(void);