comparison vp3.c @ 2721:7a6db2f4e6c0 libavcodec

clean up some warnings and dead code
author melanson
date Sat, 21 May 2005 02:06:27 +0000
parents 5444d77adcbe
children b552196f4123
comparison
equal deleted inserted replaced
2720:4a5ed2d916f6 2721:7a6db2f4e6c0
850 850
851 /* zero out all of the fragment information */ 851 /* zero out all of the fragment information */
852 s->coded_fragment_list_index = 0; 852 s->coded_fragment_list_index = 0;
853 for (i = 0; i < s->fragment_count; i++) { 853 for (i = 0; i < s->fragment_count; i++) {
854 s->all_fragments[i].coeff_count = 0; 854 s->all_fragments[i].coeff_count = 0;
855 s->all_fragments[i].motion_x = 0xbeef; 855 s->all_fragments[i].motion_x = 127;
856 s->all_fragments[i].motion_y = 0xbeef; 856 s->all_fragments[i].motion_y = 127;
857 s->all_fragments[i].next_coeff= NULL; 857 s->all_fragments[i].next_coeff= NULL;
858 s->coeffs[i].index= 858 s->coeffs[i].index=
859 s->coeffs[i].coeff=0; 859 s->coeffs[i].coeff=0;
860 s->coeffs[i].next= NULL; 860 s->coeffs[i].next= NULL;
861 } 861 }
862 } 862 }
2151 int first_fragment, 2151 int first_fragment,
2152 int width, 2152 int width,
2153 int height, 2153 int height,
2154 int plane /* 0 = Y, 1 = U, 2 = V */) 2154 int plane /* 0 = Y, 1 = U, 2 = V */)
2155 { 2155 {
2156 int x, y, j; 2156 int x, y;
2157 int m, n; 2157 int m, n;
2158 int i = first_fragment; 2158 int i = first_fragment;
2159 int16_t *dequantizer; 2159 int16_t *dequantizer;
2160 DCTELEM __align16 block[64]; 2160 DCTELEM __align16 block[64];
2161 unsigned char *output_plane; 2161 unsigned char *output_plane;
2236 motion_y= (motion_y>>1) | (motion_y&1); 2236 motion_y= (motion_y>>1) | (motion_y&1);
2237 } 2237 }
2238 2238
2239 src_x= (motion_x>>1) + x; 2239 src_x= (motion_x>>1) + x;
2240 src_y= (motion_y>>1) + y; 2240 src_y= (motion_y>>1) + y;
2241 if ((motion_x == 0xbeef) || (motion_y == 0xbeef)) 2241 if ((motion_x == 127) || (motion_y == 127))
2242 av_log(s->avctx, AV_LOG_ERROR, " help! got beefy vector! (%X, %X)\n", motion_x, motion_y); 2242 av_log(s->avctx, AV_LOG_ERROR, " help! got invalid motion vector! (%X, %X)\n", motion_x, motion_y);
2243 2243
2244 motion_halfpel_index = motion_x & 0x01; 2244 motion_halfpel_index = motion_x & 0x01;
2245 motion_source += (motion_x >> 1); 2245 motion_source += (motion_x >> 1);
2246 2246
2247 // motion_y = -motion_y;
2248 motion_halfpel_index |= (motion_y & 0x01) << 1; 2247 motion_halfpel_index |= (motion_y & 0x01) << 1;
2249 motion_source += ((motion_y >> 1) * stride); 2248 motion_source += ((motion_y >> 1) * stride);
2250 2249
2251 if(src_x<0 || src_y<0 || src_x + 9 >= width || src_y + 9 >= height){ 2250 if(src_x<0 || src_y<0 || src_x + 9 >= width || src_y + 9 >= height){
2252 uint8_t *temp= s->edge_emu_buffer; 2251 uint8_t *temp= s->edge_emu_buffer;