yading@10: /* yading@10: * RV30/40 decoder motion compensation functions yading@10: * Copyright (c) 2008 Konstantin Shishkov yading@10: * yading@10: * This file is part of Libav. yading@10: * yading@10: * Libav is free software; you can redistribute it and/or yading@10: * modify it under the terms of the GNU Lesser General Public yading@10: * License as published by the Free Software Foundation; either yading@10: * version 2.1 of the License, or (at your option) any later version. yading@10: * yading@10: * Libav is distributed in the hope that it will be useful, yading@10: * but WITHOUT ANY WARRANTY; without even the implied warranty of yading@10: * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU yading@10: * Lesser General Public License for more details. yading@10: * yading@10: * You should have received a copy of the GNU Lesser General Public yading@10: * License along with Libav; if not, write to the Free Software yading@10: * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA yading@10: */ yading@10: yading@10: /** yading@10: * @file yading@10: * RV30/40 decoder motion compensation functions yading@10: */ yading@10: yading@10: #ifndef AVCODEC_RV34DSP_H yading@10: #define AVCODEC_RV34DSP_H yading@10: yading@10: #include "dsputil.h" yading@10: #include "h264chroma.h" yading@10: yading@10: typedef void (*rv40_weight_func)(uint8_t *dst/*align width (8 or 16)*/, yading@10: uint8_t *src1/*align width (8 or 16)*/, yading@10: uint8_t *src2/*align width (8 or 16)*/, yading@10: int w1, int w2, ptrdiff_t stride); yading@10: yading@10: typedef void (*rv34_inv_transform_func)(int16_t *block); yading@10: yading@10: typedef void (*rv34_idct_add_func)(uint8_t *dst, ptrdiff_t stride, int16_t *block); yading@10: typedef void (*rv34_idct_dc_add_func)(uint8_t *dst, ptrdiff_t stride, yading@10: int dc); yading@10: yading@10: typedef void (*rv40_weak_loop_filter_func)(uint8_t *src, ptrdiff_t stride, yading@10: int filter_p1, int filter_q1, yading@10: int alpha, int beta, yading@10: int lims, int lim_q1, int lim_p1); yading@10: yading@10: typedef void (*rv40_strong_loop_filter_func)(uint8_t *src, ptrdiff_t stride, yading@10: int alpha, int lims, yading@10: int dmode, int chroma); yading@10: yading@10: typedef int (*rv40_loop_filter_strength_func)(uint8_t *src, ptrdiff_t stride, yading@10: int beta, int beta2, int edge, yading@10: int *p1, int *q1); yading@10: yading@10: typedef struct RV34DSPContext { yading@10: qpel_mc_func put_pixels_tab[4][16]; yading@10: qpel_mc_func avg_pixels_tab[4][16]; yading@10: h264_chroma_mc_func put_chroma_pixels_tab[3]; yading@10: h264_chroma_mc_func avg_chroma_pixels_tab[3]; yading@10: /** yading@10: * Biweight functions, first dimension is transform size (16/8), yading@10: * second is whether the weight is prescaled by 1/512 to skip yading@10: * the intermediate shifting. yading@10: */ yading@10: rv40_weight_func rv40_weight_pixels_tab[2][2]; yading@10: rv34_inv_transform_func rv34_inv_transform; yading@10: rv34_inv_transform_func rv34_inv_transform_dc; yading@10: rv34_idct_add_func rv34_idct_add; yading@10: rv34_idct_dc_add_func rv34_idct_dc_add; yading@10: rv40_weak_loop_filter_func rv40_weak_loop_filter[2]; yading@10: rv40_strong_loop_filter_func rv40_strong_loop_filter[2]; yading@10: rv40_loop_filter_strength_func rv40_loop_filter_strength[2]; yading@10: } RV34DSPContext; yading@10: yading@10: void ff_rv30dsp_init(RV34DSPContext *c); yading@10: void ff_rv34dsp_init(RV34DSPContext *c); yading@10: void ff_rv40dsp_init(RV34DSPContext *c); yading@10: yading@10: void ff_rv34dsp_init_arm(RV34DSPContext *c); yading@10: void ff_rv34dsp_init_x86(RV34DSPContext *c); yading@10: yading@10: void ff_rv40dsp_init_x86(RV34DSPContext *c); yading@10: void ff_rv40dsp_init_arm(RV34DSPContext *c); yading@10: yading@10: #endif /* AVCODEC_RV34DSP_H */