Skip to content

Commit

Permalink
RV40 MC functions
Browse files Browse the repository at this point in the history
Originally committed as revision 15967 to svn://svn.ffmpeg.org/ffmpeg/trunk
  • Loading branch information
Kostya Shishkov committed Dec 1, 2008
1 parent 7960e18 commit 2d8a081
Show file tree
Hide file tree
Showing 3 changed files with 383 additions and 0 deletions.
24 changes: 24 additions & 0 deletions libavcodec/dsputil.c
Expand Up @@ -2743,6 +2743,23 @@ void ff_intrax8dsp_init(DSPContext* c, AVCodecContext *avctx);
/* H264 specific */
void ff_h264dspenc_init(DSPContext* c, AVCodecContext *avctx);

#if defined(CONFIG_RV40_DECODER)
static void put_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride){
put_pixels16_xy2_c(dst, src, stride, 16);
}
static void avg_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride){
avg_pixels16_xy2_c(dst, src, stride, 16);
}
static void put_rv40_qpel8_mc33_c(uint8_t *dst, uint8_t *src, int stride){
put_pixels8_xy2_c(dst, src, stride, 8);
}
static void avg_rv40_qpel8_mc33_c(uint8_t *dst, uint8_t *src, int stride){
avg_pixels8_xy2_c(dst, src, stride, 8);
}

void ff_rv40dsp_init(DSPContext* c, AVCodecContext *avctx);
#endif /* CONFIG_RV40_DECODER */

static void wmv2_mspel8_v_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int w){
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
int i;
Expand Down Expand Up @@ -4411,6 +4428,13 @@ void dsputil_init(DSPContext* c, AVCodecContext *avctx)
#if defined(CONFIG_H264_ENCODER)
ff_h264dspenc_init(c,avctx);
#endif
#if defined(CONFIG_RV40_DECODER)
ff_rv40dsp_init(c,avctx);
c->put_rv40_qpel_pixels_tab[0][15] = put_rv40_qpel16_mc33_c;
c->avg_rv40_qpel_pixels_tab[0][15] = avg_rv40_qpel16_mc33_c;
c->put_rv40_qpel_pixels_tab[1][15] = put_rv40_qpel8_mc33_c;
c->avg_rv40_qpel_pixels_tab[1][15] = avg_rv40_qpel8_mc33_c;
#endif

c->put_mspel_pixels_tab[0]= put_mspel8_mc00_c;
c->put_mspel_pixels_tab[1]= put_mspel8_mc10_c;
Expand Down
6 changes: 6 additions & 0 deletions libavcodec/dsputil.h
Expand Up @@ -484,6 +484,12 @@ typedef struct DSPContext {
* @param shift number of bits to discard from product
*/
int32_t (*scalarproduct_int16)(int16_t *v1, int16_t *v2/*align 16*/, int len, int shift);

/* rv40 functions */
qpel_mc_func put_rv40_qpel_pixels_tab[4][16];
qpel_mc_func avg_rv40_qpel_pixels_tab[4][16];
h264_chroma_mc_func put_rv40_chroma_pixels_tab[3];
h264_chroma_mc_func avg_rv40_chroma_pixels_tab[3];
} DSPContext;

void dsputil_static_init(void);
Expand Down

0 comments on commit 2d8a081

Please sign in to comment.