42
43
void vorbis_inverse_coupling(float *mag, float *ang, int blocksize);
46
void ff_ac3_downmix_c(float (*samples)[256], float (*matrix)[2], int out_ch, int in_ch, int len);
45
49
void ff_flac_compute_autocorr(const int32_t *data, int len, int lag, double *autoc);
52
void ff_add_png_paeth_prediction(uint8_t *dst, uint8_t *src, uint8_t *top, int w, int bpp);
55
void ff_ea_idct_put_c(uint8_t *dest, int linesize, DCTELEM *block);
47
57
uint8_t ff_cropTbl[256 + 2 * MAX_NEG_CROP] = {0, };
48
58
uint32_t ff_squareTbl[512] = {0, };
60
// 0x7f7f7f7f or 0x7f7f7f7f7f7f7f7f or whatever, depending on the cpu's native arithmetic size
61
#define pb_7f (~0UL/255 * 0x7f)
62
#define pb_80 (~0UL/255 * 0x80)
50
64
const uint8_t ff_zigzag_direct[64] = {
51
65
0, 1, 8, 16, 9, 2, 3, 10,
52
66
17, 24, 32, 25, 18, 11, 4, 5,
439
/* draw the edges of width 'w' of an image of size width, height */
440
//FIXME check that this is ok for mpeg4 interlaced
441
static void draw_edges_c(uint8_t *buf, int wrap, int width, int height, int w)
443
uint8_t *ptr, *last_line;
446
last_line = buf + (height - 1) * wrap;
449
memcpy(buf - (i + 1) * wrap, buf, width);
450
memcpy(last_line + (i + 1) * wrap, last_line, width);
454
for(i=0;i<height;i++) {
455
memset(ptr - w, ptr[0], w);
456
memset(ptr + width, ptr[width-1], w);
461
memset(buf - (i + 1) * wrap - w, buf[0], w); /* top left */
462
memset(buf - (i + 1) * wrap + width, buf[width-1], w); /* top right */
463
memset(last_line + (i + 1) * wrap - w, last_line[0], w); /* top left */
464
memset(last_line + (i + 1) * wrap + width, last_line[width-1], w); /* top right */
469
* Copies a rectangular area of samples to a temporary buffer and replicates the boarder samples.
470
* @param buf destination buffer
471
* @param src source buffer
472
* @param linesize number of bytes between 2 vertically adjacent samples in both the source and destination buffers
473
* @param block_w width of block
474
* @param block_h height of block
475
* @param src_x x coordinate of the top left sample of the block in the source buffer
476
* @param src_y y coordinate of the top left sample of the block in the source buffer
477
* @param w width of the source buffer
478
* @param h height of the source buffer
480
void ff_emulated_edge_mc(uint8_t *buf, uint8_t *src, int linesize, int block_w, int block_h,
481
int src_x, int src_y, int w, int h){
483
int start_y, start_x, end_y, end_x;
486
src+= (h-1-src_y)*linesize;
488
}else if(src_y<=-block_h){
489
src+= (1-block_h-src_y)*linesize;
495
}else if(src_x<=-block_w){
496
src+= (1-block_w-src_x);
500
start_y= FFMAX(0, -src_y);
501
start_x= FFMAX(0, -src_x);
502
end_y= FFMIN(block_h, h-src_y);
503
end_x= FFMIN(block_w, w-src_x);
505
// copy existing part
506
for(y=start_y; y<end_y; y++){
507
for(x=start_x; x<end_x; x++){
508
buf[x + y*linesize]= src[x + y*linesize];
513
for(y=0; y<start_y; y++){
514
for(x=start_x; x<end_x; x++){
515
buf[x + y*linesize]= buf[x + start_y*linesize];
520
for(y=end_y; y<block_h; y++){
521
for(x=start_x; x<end_x; x++){
522
buf[x + y*linesize]= buf[x + (end_y-1)*linesize];
526
for(y=0; y<block_h; y++){
528
for(x=0; x<start_x; x++){
529
buf[x + y*linesize]= buf[start_x + y*linesize];
533
for(x=end_x; x<block_w; x++){
534
buf[x + y*linesize]= buf[end_x - 1 + y*linesize];
399
539
static void get_pixels_c(DCTELEM *restrict block, const uint8_t *pixels, int line_size)
1459
1609
assert(x<8 && y<8 && x>=0 && y>=0);\
1463
OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\
1464
OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\
1465
OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\
1466
OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\
1612
for(i=0; i<h; i++){\
1613
OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\
1614
OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\
1615
OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\
1616
OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\
1622
const int step= C ? stride : 1;\
1623
for(i=0; i<h; i++){\
1624
OP(dst[0], (A*src[0] + E*src[step+0]));\
1625
OP(dst[1], (A*src[1] + E*src[step+1]));\
1626
OP(dst[2], (A*src[2] + E*src[step+2]));\
1627
OP(dst[3], (A*src[3] + E*src[step+3]));\
1479
1641
assert(x<8 && y<8 && x>=0 && y>=0);\
1483
OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\
1484
OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\
1485
OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\
1486
OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\
1487
OP(dst[4], (A*src[4] + B*src[5] + C*src[stride+4] + D*src[stride+5]));\
1488
OP(dst[5], (A*src[5] + B*src[6] + C*src[stride+5] + D*src[stride+6]));\
1489
OP(dst[6], (A*src[6] + B*src[7] + C*src[stride+6] + D*src[stride+7]));\
1490
OP(dst[7], (A*src[7] + B*src[8] + C*src[stride+7] + D*src[stride+8]));\
1644
for(i=0; i<h; i++){\
1645
OP(dst[0], (A*src[0] + B*src[1] + C*src[stride+0] + D*src[stride+1]));\
1646
OP(dst[1], (A*src[1] + B*src[2] + C*src[stride+1] + D*src[stride+2]));\
1647
OP(dst[2], (A*src[2] + B*src[3] + C*src[stride+2] + D*src[stride+3]));\
1648
OP(dst[3], (A*src[3] + B*src[4] + C*src[stride+3] + D*src[stride+4]));\
1649
OP(dst[4], (A*src[4] + B*src[5] + C*src[stride+4] + D*src[stride+5]));\
1650
OP(dst[5], (A*src[5] + B*src[6] + C*src[stride+5] + D*src[stride+6]));\
1651
OP(dst[6], (A*src[6] + B*src[7] + C*src[stride+6] + D*src[stride+7]));\
1652
OP(dst[7], (A*src[7] + B*src[8] + C*src[stride+7] + D*src[stride+8]));\
1658
const int step= C ? stride : 1;\
1659
for(i=0; i<h; i++){\
1660
OP(dst[0], (A*src[0] + E*src[step+0]));\
1661
OP(dst[1], (A*src[1] + E*src[step+1]));\
1662
OP(dst[2], (A*src[2] + E*src[step+2]));\
1663
OP(dst[3], (A*src[3] + E*src[step+3]));\
1664
OP(dst[4], (A*src[4] + E*src[step+4]));\
1665
OP(dst[5], (A*src[5] + E*src[step+5]));\
1666
OP(dst[6], (A*src[6] + E*src[step+6]));\
1667
OP(dst[7], (A*src[7] + E*src[step+7]));\
2562
2740
#endif /* CONFIG_VC1_DECODER||CONFIG_WMV3_DECODER */
2564
#if defined(CONFIG_H264_ENCODER)
2742
void ff_intrax8dsp_init(DSPContext* c, AVCodecContext *avctx);
2565
2744
/* H264 specific */
2566
2745
void ff_h264dspenc_init(DSPContext* c, AVCodecContext *avctx);
2567
#endif /* CONFIG_H264_ENCODER */
2747
#if CONFIG_RV30_DECODER
2748
void ff_rv30dsp_init(DSPContext* c, AVCodecContext *avctx);
2749
#endif /* CONFIG_RV30_DECODER */
2751
#if CONFIG_RV40_DECODER
2752
static void put_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride){
2753
put_pixels16_xy2_c(dst, src, stride, 16);
2755
static void avg_rv40_qpel16_mc33_c(uint8_t *dst, uint8_t *src, int stride){
2756
avg_pixels16_xy2_c(dst, src, stride, 16);
2758
static void put_rv40_qpel8_mc33_c(uint8_t *dst, uint8_t *src, int stride){
2759
put_pixels8_xy2_c(dst, src, stride, 8);
2761
static void avg_rv40_qpel8_mc33_c(uint8_t *dst, uint8_t *src, int stride){
2762
avg_pixels8_xy2_c(dst, src, stride, 8);
2765
void ff_rv40dsp_init(DSPContext* c, AVCodecContext *avctx);
2766
#endif /* CONFIG_RV40_DECODER */
2569
2768
static void wmv2_mspel8_v_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int w){
2570
2769
uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;
2793
2992
h264_loop_filter_luma_c(pix, 1, stride, alpha, beta, tc0);
2995
static inline void h264_loop_filter_luma_intra_c(uint8_t *pix, int xstride, int ystride, int alpha, int beta)
2998
for( d = 0; d < 16; d++ ) {
2999
const int p2 = pix[-3*xstride];
3000
const int p1 = pix[-2*xstride];
3001
const int p0 = pix[-1*xstride];
3003
const int q0 = pix[ 0*xstride];
3004
const int q1 = pix[ 1*xstride];
3005
const int q2 = pix[ 2*xstride];
3007
if( FFABS( p0 - q0 ) < alpha &&
3008
FFABS( p1 - p0 ) < beta &&
3009
FFABS( q1 - q0 ) < beta ) {
3011
if(FFABS( p0 - q0 ) < (( alpha >> 2 ) + 2 )){
3012
if( FFABS( p2 - p0 ) < beta)
3014
const int p3 = pix[-4*xstride];
3016
pix[-1*xstride] = ( p2 + 2*p1 + 2*p0 + 2*q0 + q1 + 4 ) >> 3;
3017
pix[-2*xstride] = ( p2 + p1 + p0 + q0 + 2 ) >> 2;
3018
pix[-3*xstride] = ( 2*p3 + 3*p2 + p1 + p0 + q0 + 4 ) >> 3;
3021
pix[-1*xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2;
3023
if( FFABS( q2 - q0 ) < beta)
3025
const int q3 = pix[3*xstride];
3027
pix[0*xstride] = ( p1 + 2*p0 + 2*q0 + 2*q1 + q2 + 4 ) >> 3;
3028
pix[1*xstride] = ( p0 + q0 + q1 + q2 + 2 ) >> 2;
3029
pix[2*xstride] = ( 2*q3 + 3*q2 + q1 + q0 + p0 + 4 ) >> 3;
3032
pix[0*xstride] = ( 2*q1 + q0 + p1 + 2 ) >> 2;
3036
pix[-1*xstride] = ( 2*p1 + p0 + q1 + 2 ) >> 2;
3037
pix[ 0*xstride] = ( 2*q1 + q0 + p1 + 2 ) >> 2;
3043
static void h264_v_loop_filter_luma_intra_c(uint8_t *pix, int stride, int alpha, int beta)
3045
h264_loop_filter_luma_intra_c(pix, stride, 1, alpha, beta);
3047
static void h264_h_loop_filter_luma_intra_c(uint8_t *pix, int stride, int alpha, int beta)
3049
h264_loop_filter_luma_intra_c(pix, 1, stride, alpha, beta);
2796
3052
static inline void h264_loop_filter_chroma_c(uint8_t *pix, int xstride, int ystride, int alpha, int beta, int8_t *tc0)
3237
3498
static void add_bytes_c(uint8_t *dst, uint8_t *src, int w){
3239
for(i=0; i+7<w; i+=8){
3240
dst[i+0] += src[i+0];
3241
dst[i+1] += src[i+1];
3242
dst[i+2] += src[i+2];
3243
dst[i+3] += src[i+3];
3244
dst[i+4] += src[i+4];
3245
dst[i+5] += src[i+5];
3246
dst[i+6] += src[i+6];
3247
dst[i+7] += src[i+7];
3250
dst[i+0] += src[i+0];
3500
for(i=0; i<=w-sizeof(long); i+=sizeof(long)){
3501
long a = *(long*)(src+i);
3502
long b = *(long*)(dst+i);
3503
*(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
3506
dst[i+0] += src[i+0];
3509
static void add_bytes_l2_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
3511
for(i=0; i<=w-sizeof(long); i+=sizeof(long)){
3512
long a = *(long*)(src1+i);
3513
long b = *(long*)(src2+i);
3514
*(long*)(dst+i) = ((a&pb_7f) + (b&pb_7f)) ^ ((a^b)&pb_80);
3517
dst[i] = src1[i]+src2[i];
3253
3520
static void diff_bytes_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w){
3522
#if !HAVE_FAST_UNALIGNED
3523
if((long)src2 & (sizeof(long)-1)){
3524
for(i=0; i+7<w; i+=8){
3525
dst[i+0] = src1[i+0]-src2[i+0];
3526
dst[i+1] = src1[i+1]-src2[i+1];
3527
dst[i+2] = src1[i+2]-src2[i+2];
3528
dst[i+3] = src1[i+3]-src2[i+3];
3529
dst[i+4] = src1[i+4]-src2[i+4];
3530
dst[i+5] = src1[i+5]-src2[i+5];
3531
dst[i+6] = src1[i+6]-src2[i+6];
3532
dst[i+7] = src1[i+7]-src2[i+7];
3536
for(i=0; i<=w-sizeof(long); i+=sizeof(long)){
3537
long a = *(long*)(src1+i);
3538
long b = *(long*)(src2+i);
3539
*(long*)(dst+i) = ((a|pb_80) - (b&pb_7f)) ^ ((a^b^pb_80)&pb_80);
3542
dst[i+0] = src1[i+0]-src2[i+0];
3545
static void add_hfyu_median_prediction_c(uint8_t *dst, uint8_t *src1, uint8_t *diff, int w, int *left, int *left_top){
3255
for(i=0; i+7<w; i+=8){
3256
dst[i+0] = src1[i+0]-src2[i+0];
3257
dst[i+1] = src1[i+1]-src2[i+1];
3258
dst[i+2] = src1[i+2]-src2[i+2];
3259
dst[i+3] = src1[i+3]-src2[i+3];
3260
dst[i+4] = src1[i+4]-src2[i+4];
3261
dst[i+5] = src1[i+5]-src2[i+5];
3262
dst[i+6] = src1[i+6]-src2[i+6];
3263
dst[i+7] = src1[i+7]-src2[i+7];
3553
l= mid_pred(l, src1[i], (l + src1[i] - lt)&0xFF) + diff[i];
3266
dst[i+0] = src1[i+0]-src2[i+0];
3269
3562
static void sub_hfyu_median_prediction_c(uint8_t *dst, uint8_t *src1, uint8_t *src2, int w, int *left, int *left_top){
3717
WARPER8_16_SQ(hadamard8_diff8x8_c, hadamard8_diff16_c)
3718
WARPER8_16_SQ(hadamard8_intra8x8_c, hadamard8_intra16_c)
3719
WARPER8_16_SQ(dct_sad8x8_c, dct_sad16_c)
3721
WARPER8_16_SQ(dct264_sad8x8_c, dct264_sad16_c)
4016
WRAPPER8_16_SQ(hadamard8_diff8x8_c, hadamard8_diff16_c)
4017
WRAPPER8_16_SQ(hadamard8_intra8x8_c, hadamard8_intra16_c)
4018
WRAPPER8_16_SQ(dct_sad8x8_c, dct_sad16_c)
4020
WRAPPER8_16_SQ(dct264_sad8x8_c, dct264_sad16_c)
3723
WARPER8_16_SQ(dct_max8x8_c, dct_max16_c)
3724
WARPER8_16_SQ(quant_psnr8x8_c, quant_psnr16_c)
3725
WARPER8_16_SQ(rd8x8_c, rd16_c)
3726
WARPER8_16_SQ(bit8x8_c, bit16_c)
4022
WRAPPER8_16_SQ(dct_max8x8_c, dct_max16_c)
4023
WRAPPER8_16_SQ(quant_psnr8x8_c, quant_psnr16_c)
4024
WRAPPER8_16_SQ(rd8x8_c, rd16_c)
4025
WRAPPER8_16_SQ(bit8x8_c, bit16_c)
3728
4027
static void vector_fmul_c(float *dst, const float *src, int len){
3744
4043
dst[i*step] = src0[i] * src1[i] + src2[i] + src3;
3747
void ff_float_to_int16_c(int16_t *dst, const float *src, int len){
3749
for(i=0; i<len; i++) {
3750
int_fast32_t tmp = ((int32_t*)src)[i];
3752
tmp = (0x43c0ffff - tmp)>>31;
3753
// is this faster on some gcc/cpu combinations?
3754
// if(tmp > 0x43c0ffff) tmp = 0xFFFF;
4046
void ff_vector_fmul_window_c(float *dst, const float *src0, const float *src1, const float *win, float add_bias, int len){
4051
for(i=-len, j=len-1; i<0; i++, j--) {
4056
dst[i] = s0*wj - s1*wi + add_bias;
4057
dst[j] = s0*wi + s1*wj + add_bias;
4061
static void int32_to_float_fmul_scalar_c(float *dst, const int *src, float mul, int len){
4063
for(i=0; i<len; i++)
4064
dst[i] = src[i] * mul;
4067
static av_always_inline int float_to_int16_one(const float *src){
4068
int_fast32_t tmp = *(const int32_t*)src;
4070
tmp = (0x43c0ffff - tmp)>>31;
4071
// is this faster on some gcc/cpu combinations?
4072
// if(tmp > 0x43c0ffff) tmp = 0xFFFF;
4075
return tmp - 0x8000;
4078
void ff_float_to_int16_c(int16_t *dst, const float *src, long len){
4080
for(i=0; i<len; i++)
4081
dst[i] = float_to_int16_one(src+i);
4084
void ff_float_to_int16_interleave_c(int16_t *dst, const float **src, long len, int channels){
4087
for(i=0; i<len; i++){
4088
dst[2*i] = float_to_int16_one(src[0]+i);
4089
dst[2*i+1] = float_to_int16_one(src[1]+i);
3757
dst[i] = tmp - 0x8000;
4092
for(c=0; c<channels; c++)
4093
for(i=0, j=c; i<len; i++, j+=channels)
4094
dst[j] = float_to_int16_one(src[c]+i);
4098
static void add_int16_c(int16_t * v1, int16_t * v2, int order)
4104
static void sub_int16_c(int16_t * v1, int16_t * v2, int order)
4110
static int32_t scalarproduct_int16_c(int16_t * v1, int16_t * v2, int order, int shift)
4115
res += (*v1++ * *v2++) >> shift;
4121
#define W1 2841 /* 2048*sqrt (2)*cos (1*pi/16) */
4122
#define W2 2676 /* 2048*sqrt (2)*cos (2*pi/16) */
4123
#define W3 2408 /* 2048*sqrt (2)*cos (3*pi/16) */
4124
#define W4 2048 /* 2048*sqrt (2)*cos (4*pi/16) */
4125
#define W5 1609 /* 2048*sqrt (2)*cos (5*pi/16) */
4126
#define W6 1108 /* 2048*sqrt (2)*cos (6*pi/16) */
4127
#define W7 565 /* 2048*sqrt (2)*cos (7*pi/16) */
4129
static void wmv2_idct_row(short * b)
4132
int a0,a1,a2,a3,a4,a5,a6,a7;
4134
a1 = W1*b[1]+W7*b[7];
4135
a7 = W7*b[1]-W1*b[7];
4136
a5 = W5*b[5]+W3*b[3];
4137
a3 = W3*b[5]-W5*b[3];
4138
a2 = W2*b[2]+W6*b[6];
4139
a6 = W6*b[2]-W2*b[6];
4140
a0 = W0*b[0]+W0*b[4];
4141
a4 = W0*b[0]-W0*b[4];
4143
s1 = (181*(a1-a5+a7-a3)+128)>>8;//1,3,5,7,
4144
s2 = (181*(a1-a5-a7+a3)+128)>>8;
4146
b[0] = (a0+a2+a1+a5 + (1<<7))>>8;
4147
b[1] = (a4+a6 +s1 + (1<<7))>>8;
4148
b[2] = (a4-a6 +s2 + (1<<7))>>8;
4149
b[3] = (a0-a2+a7+a3 + (1<<7))>>8;
4150
b[4] = (a0-a2-a7-a3 + (1<<7))>>8;
4151
b[5] = (a4-a6 -s2 + (1<<7))>>8;
4152
b[6] = (a4+a6 -s1 + (1<<7))>>8;
4153
b[7] = (a0+a2-a1-a5 + (1<<7))>>8;
4155
static void wmv2_idct_col(short * b)
4158
int a0,a1,a2,a3,a4,a5,a6,a7;
4159
/*step 1, with extended precision*/
4160
a1 = (W1*b[8*1]+W7*b[8*7] + 4)>>3;
4161
a7 = (W7*b[8*1]-W1*b[8*7] + 4)>>3;
4162
a5 = (W5*b[8*5]+W3*b[8*3] + 4)>>3;
4163
a3 = (W3*b[8*5]-W5*b[8*3] + 4)>>3;
4164
a2 = (W2*b[8*2]+W6*b[8*6] + 4)>>3;
4165
a6 = (W6*b[8*2]-W2*b[8*6] + 4)>>3;
4166
a0 = (W0*b[8*0]+W0*b[8*4] )>>3;
4167
a4 = (W0*b[8*0]-W0*b[8*4] )>>3;
4169
s1 = (181*(a1-a5+a7-a3)+128)>>8;
4170
s2 = (181*(a1-a5-a7+a3)+128)>>8;
4172
b[8*0] = (a0+a2+a1+a5 + (1<<13))>>14;
4173
b[8*1] = (a4+a6 +s1 + (1<<13))>>14;
4174
b[8*2] = (a4-a6 +s2 + (1<<13))>>14;
4175
b[8*3] = (a0-a2+a7+a3 + (1<<13))>>14;
4177
b[8*4] = (a0-a2-a7-a3 + (1<<13))>>14;
4178
b[8*5] = (a4-a6 -s2 + (1<<13))>>14;
4179
b[8*6] = (a4+a6 -s1 + (1<<13))>>14;
4180
b[8*7] = (a0+a2-a1-a5 + (1<<13))>>14;
4182
void ff_wmv2_idct_c(short * block){
4186
wmv2_idct_row(block+i);
4189
wmv2_idct_col(block+i);
3761
4192
/* XXX: those functions should be suppressed ASAP when all IDCTs are
4194
static void ff_wmv2_idct_put_c(uint8_t *dest, int line_size, DCTELEM *block)
4196
ff_wmv2_idct_c(block);
4197
put_pixels_clamped_c(block, dest, line_size);
4199
static void ff_wmv2_idct_add_c(uint8_t *dest, int line_size, DCTELEM *block)
4201
ff_wmv2_idct_c(block);
4202
add_pixels_clamped_c(block, dest, line_size);
3763
4204
static void ff_jref_idct_put(uint8_t *dest, int line_size, DCTELEM *block)
3765
4206
j_rev_dct (block);
3893
4334
c->idct_add= ff_jref_idct_add;
3894
4335
c->idct = j_rev_dct;
3895
4336
c->idct_permutation_type= FF_LIBMPEG2_IDCT_PERM;
3896
}else if((ENABLE_VP3_DECODER || ENABLE_VP5_DECODER || ENABLE_VP6_DECODER || ENABLE_THEORA_DECODER ) &&
4337
}else if((CONFIG_VP3_DECODER || CONFIG_VP5_DECODER || CONFIG_VP6_DECODER || CONFIG_THEORA_DECODER ) &&
3897
4338
avctx->idct_algo==FF_IDCT_VP3){
3898
4339
c->idct_put= ff_vp3_idct_put_c;
3899
4340
c->idct_add= ff_vp3_idct_add_c;
3900
4341
c->idct = ff_vp3_idct_c;
3901
4342
c->idct_permutation_type= FF_NO_IDCT_PERM;
4343
}else if(avctx->idct_algo==FF_IDCT_WMV2){
4344
c->idct_put= ff_wmv2_idct_put_c;
4345
c->idct_add= ff_wmv2_idct_add_c;
4346
c->idct = ff_wmv2_idct_c;
4347
c->idct_permutation_type= FF_NO_IDCT_PERM;
4348
}else if(avctx->idct_algo==FF_IDCT_FAAN){
4349
c->idct_put= ff_faanidct_put;
4350
c->idct_add= ff_faanidct_add;
4351
c->idct = ff_faanidct;
4352
c->idct_permutation_type= FF_NO_IDCT_PERM;
4353
}else if(CONFIG_EATGQ_DECODER && avctx->idct_algo==FF_IDCT_EA) {
4354
c->idct_put= ff_ea_idct_put_c;
4355
c->idct_permutation_type= FF_NO_IDCT_PERM;
3902
4356
}else{ //accurate/default
3903
c->idct_put= simple_idct_put;
3904
c->idct_add= simple_idct_add;
3905
c->idct = simple_idct;
4357
c->idct_put= ff_simple_idct_put;
4358
c->idct_add= ff_simple_idct_add;
4359
c->idct = ff_simple_idct;
3906
4360
c->idct_permutation_type= FF_NO_IDCT_PERM;
3910
if (ENABLE_H264_DECODER) {
4364
if (CONFIG_H264_DECODER) {
3911
4365
c->h264_idct_add= ff_h264_idct_add_c;
3912
4366
c->h264_idct8_add= ff_h264_idct8_add_c;
3913
4367
c->h264_idct_dc_add= ff_h264_idct_dc_add_c;
3914
4368
c->h264_idct8_dc_add= ff_h264_idct8_dc_add_c;
4369
c->h264_idct_add16 = ff_h264_idct_add16_c;
4370
c->h264_idct8_add4 = ff_h264_idct8_add4_c;
4371
c->h264_idct_add8 = ff_h264_idct_add8_c;
4372
c->h264_idct_add16intra= ff_h264_idct_add16intra_c;
3917
4375
c->get_pixels = get_pixels_c;
4050
4509
c->biweight_h264_pixels_tab[8]= biweight_h264_pixels2x4_c;
4051
4510
c->biweight_h264_pixels_tab[9]= biweight_h264_pixels2x2_c;
4053
#ifdef CONFIG_CAVS_DECODER
4512
c->draw_edges = draw_edges_c;
4514
#if CONFIG_CAVS_DECODER
4054
4515
ff_cavsdsp_init(c,avctx);
4056
#if defined(CONFIG_VC1_DECODER) || defined(CONFIG_WMV3_DECODER)
4517
#if CONFIG_VC1_DECODER || CONFIG_WMV3_DECODER
4057
4518
ff_vc1dsp_init(c,avctx);
4059
#if defined(CONFIG_H264_ENCODER)
4060
ff_h264dspenc_init(c,avctx);
4520
#if CONFIG_WMV2_DECODER || CONFIG_VC1_DECODER || CONFIG_WMV3_DECODER
4521
ff_intrax8dsp_init(c,avctx);
4523
#if CONFIG_RV30_DECODER
4524
ff_rv30dsp_init(c,avctx);
4526
#if CONFIG_RV40_DECODER
4527
ff_rv40dsp_init(c,avctx);
4528
c->put_rv40_qpel_pixels_tab[0][15] = put_rv40_qpel16_mc33_c;
4529
c->avg_rv40_qpel_pixels_tab[0][15] = avg_rv40_qpel16_mc33_c;
4530
c->put_rv40_qpel_pixels_tab[1][15] = put_rv40_qpel8_mc33_c;
4531
c->avg_rv40_qpel_pixels_tab[1][15] = avg_rv40_qpel8_mc33_c;
4063
4534
c->put_mspel_pixels_tab[0]= put_mspel8_mc00_c;
4104
4578
c->ssd_int8_vs_int16 = ssd_int8_vs_int16_c;
4106
4580
c->add_bytes= add_bytes_c;
4581
c->add_bytes_l2= add_bytes_l2_c;
4107
4582
c->diff_bytes= diff_bytes_c;
4583
c->add_hfyu_median_prediction= add_hfyu_median_prediction_c;
4108
4584
c->sub_hfyu_median_prediction= sub_hfyu_median_prediction_c;
4109
4585
c->bswap_buf= bswap_buf;
4586
#if CONFIG_PNG_DECODER
4587
c->add_png_paeth_prediction= ff_add_png_paeth_prediction;
4111
4590
c->h264_v_loop_filter_luma= h264_v_loop_filter_luma_c;
4112
4591
c->h264_h_loop_filter_luma= h264_h_loop_filter_luma_c;
4592
c->h264_v_loop_filter_luma_intra= h264_v_loop_filter_luma_intra_c;
4593
c->h264_h_loop_filter_luma_intra= h264_h_loop_filter_luma_intra_c;
4113
4594
c->h264_v_loop_filter_chroma= h264_v_loop_filter_chroma_c;
4114
4595
c->h264_h_loop_filter_chroma= h264_h_loop_filter_chroma_c;
4115
4596
c->h264_v_loop_filter_chroma_intra= h264_v_loop_filter_chroma_intra_c;
4116
4597
c->h264_h_loop_filter_chroma_intra= h264_h_loop_filter_chroma_intra_c;
4117
4598
c->h264_loop_filter_strength= NULL;
4119
if (ENABLE_ANY_H263) {
4600
if (CONFIG_ANY_H263) {
4120
4601
c->h263_h_loop_filter= h263_h_loop_filter_c;
4121
4602
c->h263_v_loop_filter= h263_v_loop_filter_c;
4605
if (CONFIG_VP3_DECODER || CONFIG_THEORA_DECODER) {
4606
c->vp3_h_loop_filter= ff_vp3_h_loop_filter_c;
4607
c->vp3_v_loop_filter= ff_vp3_v_loop_filter_c;
4609
if (CONFIG_VP6_DECODER) {
4610
c->vp6_filter_diag4= ff_vp6_filter_diag4_c;
4124
4613
c->h261_loop_filter= h261_loop_filter_c;
4126
4615
c->try_8x8basis= try_8x8basis_c;
4127
4616
c->add_8x8basis= add_8x8basis_c;
4129
#ifdef CONFIG_SNOW_DECODER
4618
#if CONFIG_SNOW_DECODER
4130
4619
c->vertical_compose97i = ff_snow_vertical_compose97i;
4131
4620
c->horizontal_compose97i = ff_snow_horizontal_compose97i;
4132
4621
c->inner_add_yblock = ff_snow_inner_add_yblock;
4135
#ifdef CONFIG_VORBIS_DECODER
4624
#if CONFIG_VORBIS_DECODER
4136
4625
c->vorbis_inverse_coupling = vorbis_inverse_coupling;
4138
#ifdef CONFIG_FLAC_ENCODER
4627
#if CONFIG_AC3_DECODER
4628
c->ac3_downmix = ff_ac3_downmix_c;
4630
#if CONFIG_FLAC_ENCODER
4139
4631
c->flac_compute_autocorr = ff_flac_compute_autocorr;
4141
4633
c->vector_fmul = vector_fmul_c;
4142
4634
c->vector_fmul_reverse = vector_fmul_reverse_c;
4143
4635
c->vector_fmul_add_add = ff_vector_fmul_add_add_c;
4636
c->vector_fmul_window = ff_vector_fmul_window_c;
4637
c->int32_to_float_fmul_scalar = int32_to_float_fmul_scalar_c;
4144
4638
c->float_to_int16 = ff_float_to_int16_c;
4639
c->float_to_int16_interleave = ff_float_to_int16_interleave_c;
4640
c->add_int16 = add_int16_c;
4641
c->sub_int16 = sub_int16_c;
4642
c->scalarproduct_int16 = scalarproduct_int16_c;
4146
4644
c->shrink[0]= ff_img_copy_plane;
4147
4645
c->shrink[1]= ff_shrink22;
4153
4651
memset(c->put_2tap_qpel_pixels_tab, 0, sizeof(c->put_2tap_qpel_pixels_tab));
4154
4652
memset(c->avg_2tap_qpel_pixels_tab, 0, sizeof(c->avg_2tap_qpel_pixels_tab));
4156
if (ENABLE_MMX) dsputil_init_mmx (c, avctx);
4157
if (ENABLE_ARMV4L) dsputil_init_armv4l(c, avctx);
4158
if (ENABLE_MLIB) dsputil_init_mlib (c, avctx);
4159
if (ENABLE_VIS) dsputil_init_vis (c, avctx);
4160
if (ENABLE_ALPHA) dsputil_init_alpha (c, avctx);
4161
if (ENABLE_POWERPC) dsputil_init_ppc (c, avctx);
4162
if (ENABLE_MMI) dsputil_init_mmi (c, avctx);
4163
if (ENABLE_SH4) dsputil_init_sh4 (c, avctx);
4164
if (ENABLE_BFIN) dsputil_init_bfin (c, avctx);
4654
if (HAVE_MMX) dsputil_init_mmx (c, avctx);
4655
if (ARCH_ARM) dsputil_init_arm (c, avctx);
4656
if (CONFIG_MLIB) dsputil_init_mlib (c, avctx);
4657
if (HAVE_VIS) dsputil_init_vis (c, avctx);
4658
if (ARCH_ALPHA) dsputil_init_alpha (c, avctx);
4659
if (ARCH_PPC) dsputil_init_ppc (c, avctx);
4660
if (HAVE_MMI) dsputil_init_mmi (c, avctx);
4661
if (ARCH_SH4) dsputil_init_sh4 (c, avctx);
4662
if (ARCH_BFIN) dsputil_init_bfin (c, avctx);
4166
4664
for(i=0; i<64; i++){
4167
4665
if(!c->put_2tap_qpel_pixels_tab[0][i])