Unified · Split
| @@ -2185,10 +2185,8 @@ static int open_input_stream(HTTPContext *c, const char *info) · 2184 unmodified lines | |||
| 2185 | } | 2185 | } |
| 2186 | } | 2186 | } |
| 2187 | 2187 | ||
| 2188 | #if 1 | ||
| 2189 | if (c->fmt_in->iformat->read_seek) | 2188 | if (c->fmt_in->iformat->read_seek) |
| 2190 | av_seek_frame(c->fmt_in, -1, stream_pos, 0); | 2189 | av_seek_frame(c->fmt_in, -1, stream_pos, 0); |
| 2191 | #endif | ||
| 2192 | /* set the start time (needed for maxtime and RTP packet timing) */ | 2190 | /* set the start time (needed for maxtime and RTP packet timing) */ |
| 2193 | c->start_time = cur_time; | 2191 | c->start_time = cur_time; |
| 2194 | c->first_pts = AV_NOPTS_VALUE; | 2192 | c->first_pts = AV_NOPTS_VALUE; |
| @@ -312,18 +312,16 @@ static void dct_error(const char *name, int is_idct, · 311 unmodified lines | |||
| 312 | } | 312 | } |
| 313 | for(i=0; i<64; i++) sysErrMax= FFMAX(sysErrMax, FFABS(sysErr[i])); | 313 | for(i=0; i<64; i++) sysErrMax= FFMAX(sysErrMax, FFABS(sysErr[i])); |
| 314 | 314 | ||
| 315 | #if 1 // dump systematic errors | ||
| 316 | for(i=0; i<64; i++){ | 315 | for(i=0; i<64; i++){ |
| 317 | if(i%8==0) printf("\n"); | 316 | if(i%8==0) printf("\n"); |
| 318 | printf("%7d ", (int)sysErr[i]); | 317 | printf("%7d ", (int)sysErr[i]); |
| 319 | } | 318 | } |
| 320 | printf("\n"); | 319 | printf("\n"); |
| 321 | #endif | ||
| 322 | 320 | ||
| 323 | printf("%s %s: err_inf=%d err2=%0.8f syserr=%0.8f maxout=%d blockSumErr=%d\n", | 321 | printf("%s %s: err_inf=%d err2=%0.8f syserr=%0.8f maxout=%d blockSumErr=%d\n", |
| 324 | is_idct ? "IDCT" : "DCT", | 322 | is_idct ? "IDCT" : "DCT", |
| 325 | name, err_inf, (double)err2 / NB_ITS / 64.0, (double)sysErrMax / NB_ITS, maxout, blockSumErrMax); | 323 | name, err_inf, (double)err2 / NB_ITS / 64.0, (double)sysErrMax / NB_ITS, maxout, blockSumErrMax); |
| 326 | #if 1 //Speed test | 324 | |
| 327 | /* speed test */ | 325 | /* speed test */ |
| 328 | for(i=0;i<64;i++) | 326 | for(i=0;i<64;i++) |
| 329 | block1[i] = 0; | 327 | block1[i] = 0; |
| @@ -376,7 +374,6 @@ static void dct_error(const char *name, int is_idct, · 46 unmodified lines | |||
| 376 | printf("%s %s: %0.1f kdct/s\n", | 374 | printf("%s %s: %0.1f kdct/s\n", |
| 377 | is_idct ? "IDCT" : "DCT", | 375 | is_idct ? "IDCT" : "DCT", |
| 378 | name, (double)it1 * 1000.0 / (double)ti1); | 376 | name, (double)it1 * 1000.0 / (double)ti1); |
| 379 | #endif | ||
| 380 | } | 377 | } |
| 381 | 378 | ||
| 382 | DECLARE_ALIGNED(8, static uint8_t, img_dest)[64]; | 379 | DECLARE_ALIGNED(8, static uint8_t, img_dest)[64]; |
| @@ -2100,7 +2100,6 @@ QPEL_MC(0, avg_ , _ , op_avg) · 2099 unmodified lines | |||
| 2100 | #define put_no_rnd_qpel8_mc00_c ff_put_pixels8x8_c | 2100 | #define put_no_rnd_qpel8_mc00_c ff_put_pixels8x8_c |
| 2101 | #define put_no_rnd_qpel16_mc00_c ff_put_pixels16x16_c | 2101 | #define put_no_rnd_qpel16_mc00_c ff_put_pixels16x16_c |
| 2102 | 2102 | ||
| 2103 | #if 1 | ||
| 2104 | #define H264_LOWPASS(OPNAME, OP, OP2) \ | 2103 | #define H264_LOWPASS(OPNAME, OP, OP2) \ |
| 2105 | static av_unused void OPNAME ## h264_qpel2_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride){\ | 2104 | static av_unused void OPNAME ## h264_qpel2_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride){\ |
| 2106 | const int h=2;\ | 2105 | const int h=2;\ |
| @@ -2522,7 +2521,6 @@ H264_MC(avg_, 16) · 415 unmodified lines | |||
| 2522 | #undef op_put | 2521 | #undef op_put |
| 2523 | #undef op2_avg | 2522 | #undef op2_avg |
| 2524 | #undef op2_put | 2523 | #undef op2_put |
| 2525 | #endif | ||
| 2526 | 2524 | ||
| 2527 | #define put_h264_qpel8_mc00_c ff_put_pixels8x8_c | 2525 | #define put_h264_qpel8_mc00_c ff_put_pixels8x8_c |
| 2528 | #define avg_h264_qpel8_mc00_c ff_avg_pixels8x8_c | 2526 | #define avg_h264_qpel8_mc00_c ff_avg_pixels8x8_c |
| @@ -786,7 +786,6 @@ void ff_er_frame_end(MpegEncContext *s){ · 785 unmodified lines | |||
| 786 | } | 786 | } |
| 787 | } | 787 | } |
| 788 | 788 | ||
| 789 | #if 1 | ||
| 790 | /* handle overlapping slices */ | 789 | /* handle overlapping slices */ |
| 791 | for(error_type=1; error_type<=3; error_type++){ | 790 | for(error_type=1; error_type<=3; error_type++){ |
| 792 | int end_ok=0; | 791 | int end_ok=0; |
| @@ -807,8 +806,7 @@ void ff_er_frame_end(MpegEncContext *s){ · 14 unmodified lines | |||
| 807 | end_ok=0; | 806 | end_ok=0; |
| 808 | } | 807 | } |
| 809 | } | 808 | } |
| 810 | #endif | 809 | |
| 811 | #if 1 | ||
| 812 | /* handle slices with partitions of different length */ | 810 | /* handle slices with partitions of different length */ |
| 813 | if(s->partitioned_frame){ | 811 | if(s->partitioned_frame){ |
| 814 | int end_ok=0; | 812 | int end_ok=0; |
| @@ -829,7 +827,7 @@ void ff_er_frame_end(MpegEncContext *s){ · 14 unmodified lines | |||
| 829 | end_ok=0; | 827 | end_ok=0; |
| 830 | } | 828 | } |
| 831 | } | 829 | } |
| 832 | #endif | 830 | |
| 833 | /* handle missing slices */ | 831 | /* handle missing slices */ |
| 834 | if(s->error_recognition>=4){ | 832 | if(s->error_recognition>=4){ |
| 835 | int end_ok=1; | 833 | int end_ok=1; |
| @@ -853,7 +851,6 @@ void ff_er_frame_end(MpegEncContext *s){ · 17 unmodified lines | |||
| 853 | } | 851 | } |
| 854 | } | 852 | } |
| 855 | 853 | ||
| 856 | #if 1 | ||
| 857 | /* backward mark errors */ | 854 | /* backward mark errors */ |
| 858 | distance=9999999; | 855 | distance=9999999; |
| 859 | for(error_type=1; error_type<=3; error_type++){ | 856 | for(error_type=1; error_type<=3; error_type++){ |
| @@ -878,7 +875,6 @@ void ff_er_frame_end(MpegEncContext *s){ · 18 unmodified lines | |||
| 878 | distance= 9999999; | 875 | distance= 9999999; |
| 879 | } | 876 | } |
| 880 | } | 877 | } |
| 881 | #endif | ||
| 882 | 878 | ||
| 883 | /* forward mark errors */ | 879 | /* forward mark errors */ |
| 884 | error=0; | 880 | error=0; |
| @@ -893,7 +889,7 @@ void ff_er_frame_end(MpegEncContext *s){ · 8 unmodified lines | |||
| 893 | s->error_status_table[mb_xy]|= error; | 889 | s->error_status_table[mb_xy]|= error; |
| 894 | } | 890 | } |
| 895 | } | 891 | } |
| 896 | #if 1 | 892 | |
| 897 | /* handle not partitioned case */ | 893 | /* handle not partitioned case */ |
| 898 | if(!s->partitioned_frame){ | 894 | if(!s->partitioned_frame){ |
| 899 | for(i=0; i<s->mb_num; i++){ | 895 | for(i=0; i<s->mb_num; i++){ |
| @@ -904,7 +900,6 @@ void ff_er_frame_end(MpegEncContext *s){ · 4 unmodified lines | |||
| 904 | s->error_status_table[mb_xy]= error; | 900 | s->error_status_table[mb_xy]= error; |
| 905 | } | 901 | } |
| 906 | } | 902 | } |
| 907 | #endif | ||
| 908 | 903 | ||
| 909 | dc_error= ac_error= mv_error=0; | 904 | dc_error= ac_error= mv_error=0; |
| 910 | for(i=0; i<s->mb_num; i++){ | 905 | for(i=0; i<s->mb_num; i++){ |
| @@ -1065,16 +1060,15 @@ void ff_er_frame_end(MpegEncContext *s){ · 154 unmodified lines | |||
| 1065 | s->dc_val[2][mb_x + mb_y*s->mb_stride]= (dcv+4)>>3; | 1060 | s->dc_val[2][mb_x + mb_y*s->mb_stride]= (dcv+4)>>3; |
| 1066 | } | 1061 | } |
| 1067 | } | 1062 | } |
| 1068 | #if 1 | 1063 | |
| 1069 | /* guess DC for damaged blocks */ | 1064 | /* guess DC for damaged blocks */ |
| 1070 | guess_dc(s, s->dc_val[0], s->mb_width*2, s->mb_height*2, s->b8_stride, 1); | 1065 | guess_dc(s, s->dc_val[0], s->mb_width*2, s->mb_height*2, s->b8_stride, 1); |
| 1071 | guess_dc(s, s->dc_val[1], s->mb_width , s->mb_height , s->mb_stride, 0); | 1066 | guess_dc(s, s->dc_val[1], s->mb_width , s->mb_height , s->mb_stride, 0); |
| 1072 | guess_dc(s, s->dc_val[2], s->mb_width , s->mb_height , s->mb_stride, 0); | 1067 | guess_dc(s, s->dc_val[2], s->mb_width , s->mb_height , s->mb_stride, 0); |
| 1073 | #endif | 1068 | |
| 1074 | /* filter luma DC */ | 1069 | /* filter luma DC */ |
| 1075 | filter181(s->dc_val[0], s->mb_width*2, s->mb_height*2, s->b8_stride); | 1070 | filter181(s->dc_val[0], s->mb_width*2, s->mb_height*2, s->b8_stride); |
| 1076 | 1071 | ||
| 1077 | #if 1 | ||
| 1078 | /* render DC only intra */ | 1072 | /* render DC only intra */ |
| 1079 | for(mb_y=0; mb_y<s->mb_height; mb_y++){ | 1073 | for(mb_y=0; mb_y<s->mb_height; mb_y++){ |
| 1080 | for(mb_x=0; mb_x<s->mb_width; mb_x++){ | 1074 | for(mb_x=0; mb_x<s->mb_width; mb_x++){ |
| @@ -1094,7 +1088,6 @@ void ff_er_frame_end(MpegEncContext *s){ · 13 unmodified lines | |||
| 1094 | put_dc(s, dest_y, dest_cb, dest_cr, mb_x, mb_y); | 1088 | put_dc(s, dest_y, dest_cb, dest_cr, mb_x, mb_y); |
| 1095 | } | 1089 | } |
| 1096 | } | 1090 | } |
| 1097 | #endif | ||
| 1098 | 1091 | ||
| 1099 | if(s->avctx->error_concealment&FF_EC_DEBLOCK){ | 1092 | if(s->avctx->error_concealment&FF_EC_DEBLOCK){ |
| 1100 | /* filter horizontal block boundaries */ | 1093 | /* filter horizontal block boundaries */ |
| @@ -997,7 +997,6 @@ static void fill_decode_caches(H264Context *h, int mb_type){ · 996 unmodified lines | |||
| 997 | } | 997 | } |
| 998 | } | 998 | } |
| 999 | 999 | ||
| 1000 | #if 1 | ||
| 1001 | if(IS_INTER(mb_type) || (IS_DIRECT(mb_type) && h->direct_spatial_mv_pred)){ | 1000 | if(IS_INTER(mb_type) || (IS_DIRECT(mb_type) && h->direct_spatial_mv_pred)){ |
| 1002 | int list; | 1001 | int list; |
| 1003 | for(list=0; list<h->list_count; list++){ | 1002 | for(list=0; list<h->list_count; list++){ |
| @@ -1172,7 +1171,6 @@ static void fill_decode_caches(H264Context *h, int mb_type){ · 168 unmodified lines | |||
| 1172 | } | 1171 | } |
| 1173 | } | 1172 | } |
| 1174 | } | 1173 | } |
| 1175 | #endif | ||
| 1176 | 1174 | ||
| 1177 | h->neighbor_transform_size= !!IS_8x8DCT(top_type) + !!IS_8x8DCT(left_type[0]); | 1175 | h->neighbor_transform_size= !!IS_8x8DCT(top_type) + !!IS_8x8DCT(left_type[0]); |
| 1178 | } | 1176 | } |
| @@ -158,7 +158,6 @@ static int hpel_motion_search(MpegEncContext * s, · 157 unmodified lines | |||
| 158 | const int b= score_map[(index+(1<<ME_MAP_SHIFT))&(ME_MAP_SIZE-1)] | 158 | const int b= score_map[(index+(1<<ME_MAP_SHIFT))&(ME_MAP_SIZE-1)] |
| 159 | + (mv_penalty[bx - pred_x] + mv_penalty[by+2 - pred_y])*c->penalty_factor; | 159 | + (mv_penalty[bx - pred_x] + mv_penalty[by+2 - pred_y])*c->penalty_factor; |
| 160 | 160 | ||
| 161 | #if 1 | ||
| 162 | int key; | 161 | int key; |
| 163 | int map_generation= c->map_generation; | 162 | int map_generation= c->map_generation; |
| 164 | #ifndef NDEBUG | 163 | #ifndef NDEBUG |
| @@ -172,7 +171,6 @@ static int hpel_motion_search(MpegEncContext * s, · 7 unmodified lines | |||
| 172 | assert(map[(index+1)&(ME_MAP_SIZE-1)] == key); | 171 | assert(map[(index+1)&(ME_MAP_SIZE-1)] == key); |
| 173 | key= ((my)<<ME_MAP_MV_BITS) + (mx-1) + map_generation; | 172 | key= ((my)<<ME_MAP_MV_BITS) + (mx-1) + map_generation; |
| 174 | assert(map[(index-1)&(ME_MAP_SIZE-1)] == key); | 173 | assert(map[(index-1)&(ME_MAP_SIZE-1)] == key); |
| 175 | #endif | ||
| 176 | if(t<=b){ | 174 | if(t<=b){ |
| 177 | CHECK_HALF_MV(0, 1, mx ,my-1) | 175 | CHECK_HALF_MV(0, 1, mx ,my-1) |
| 178 | if(l<=r){ | 176 | if(l<=r){ |
| @@ -985,10 +985,9 @@ void ff_msmpeg4_encode_block(MpegEncContext * s, DCTELEM * block, int n) · 984 unmodified lines | |||
| 985 | if(level<=MAX_LEVEL && run<=MAX_RUN){ | 985 | if(level<=MAX_LEVEL && run<=MAX_RUN){ |
| 986 | s->ac_stats[s->mb_intra][n>3][level][run][last]++; | 986 | s->ac_stats[s->mb_intra][n>3][level][run][last]++; |
| 987 | } | 987 | } |
| 988 | #if 0 | 988 | |
| 989 | else | 989 | s->ac_stats[s->mb_intra][n > 3][40][63][0]++; //esc3 like |
| 990 | s->ac_stats[s->mb_intra][n>3][40][63][0]++; //esc3 like | 990 | |
| 991 | #endif | ||
| 992 | code = get_rl_index(rl, last, run, level); | 991 | code = get_rl_index(rl, last, run, level); |
| 993 | put_bits(&s->pb, rl->table_vlc[code][1], rl->table_vlc[code][0]); | 992 | put_bits(&s->pb, rl->table_vlc[code][1], rl->table_vlc[code][0]); |
| 994 | if (code == rl->n) { | 993 | if (code == rl->n) { |
| @@ -897,7 +897,6 @@ QPEL_MC(0, avg_ , _ , op_avg) · 896 unmodified lines | |||
| 897 | #undef op_put | 897 | #undef op_put |
| 898 | #undef op_put_no_rnd | 898 | #undef op_put_no_rnd |
| 899 | 899 | ||
| 900 | #if 1 | ||
| 901 | #define H264_LOWPASS(OPNAME, OP, OP2) \ | 900 | #define H264_LOWPASS(OPNAME, OP, OP2) \ |
| 902 | static inline void OPNAME ## h264_qpel_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride,int w,int h){\ | 901 | static inline void OPNAME ## h264_qpel_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride,int w,int h){\ |
| 903 | uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\ | 902 | uint8_t *cm = ff_cropTbl + MAX_NEG_CROP;\ |
| @@ -1298,7 +1297,6 @@ H264_MC(avg_, 16) · 394 unmodified lines | |||
| 1298 | #undef op_put | 1297 | #undef op_put |
| 1299 | #undef op2_avg | 1298 | #undef op2_avg |
| 1300 | #undef op2_put | 1299 | #undef op2_put |
| 1301 | #endif | ||
| 1302 | 1300 | ||
| 1303 | static void wmv2_mspel8_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int h){ | 1301 | static void wmv2_mspel8_h_lowpass(uint8_t *dst, uint8_t *src, int dstStride, int srcStride, int h){ |
| 1304 | uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; | 1302 | uint8_t *cm = ff_cropTbl + MAX_NEG_CROP; |
| @@ -3299,10 +3299,8 @@ static void iterative_me(SnowContext *s){ · 3298 unmodified lines | |||
| 3299 | } | 3299 | } |
| 3300 | best_rd= ref_rd; | 3300 | best_rd= ref_rd; |
| 3301 | *block= ref_b; | 3301 | *block= ref_b; |
| 3302 | #if 1 | ||
| 3303 | check_block(s, mb_x, mb_y, color, 1, *obmc_edged, &best_rd); | 3302 | check_block(s, mb_x, mb_y, color, 1, *obmc_edged, &best_rd); |
| 3304 | //FIXME RD style color selection | 3303 | //FIXME RD style color selection |
| 3305 | #endif | ||
| 3306 | if(!same_block(block, &backup)){ | 3304 | if(!same_block(block, &backup)){ |
| 3307 | if(tb ) tb ->type &= ~BLOCK_OPT; | 3305 | if(tb ) tb ->type &= ~BLOCK_OPT; |
| 3308 | if(lb ) lb ->type &= ~BLOCK_OPT; | 3306 | if(lb ) lb ->type &= ~BLOCK_OPT; |
| @@ -175,7 +175,6 @@ static void build_frame_code(AVFormatContext *s){ · 174 unmodified lines | |||
| 175 | } | 175 | } |
| 176 | 176 | ||
| 177 | key_frame= intra_only; | 177 | key_frame= intra_only; |
| 178 | #if 1 | ||
| 179 | if(is_audio){ | 178 | if(is_audio){ |
| 180 | int frame_bytes= codec->frame_size*(int64_t)codec->bit_rate / (8*codec->sample_rate); | 179 | int frame_bytes= codec->frame_size*(int64_t)codec->bit_rate / (8*codec->sample_rate); |
| 181 | int pts; | 180 | int pts; |
| @@ -199,7 +198,6 @@ static void build_frame_code(AVFormatContext *s){ · 17 unmodified lines | |||
| 199 | ft->pts_delta=1; | 198 | ft->pts_delta=1; |
| 200 | start2++; | 199 | start2++; |
| 201 | } | 200 | } |
| 202 | #endif | ||
| 203 | 201 | ||
| 204 | if(codec->has_b_frames){ | 202 | if(codec->has_b_frames){ |
| 205 | pred_count=5; | 203 | pred_count=5; |
| @@ -218,7 +218,6 @@ int main(void){ · 217 unmodified lines | |||
| 218 | printf("\n"); | 218 | printf("\n"); |
| 219 | } | 219 | } |
| 220 | 220 | ||
| 221 | #if 1 | ||
| 222 | for(i=0; i<LEN; i++){ | 221 | for(i=0; i<LEN; i++){ |
| 223 | double v[LEN]; | 222 | double v[LEN]; |
| 224 | double error=0; | 223 | double error=0; |
| @@ -233,7 +232,7 @@ int main(void){ · 8 unmodified lines | |||
| 233 | printf("%f ", error); | 232 | printf("%f ", error); |
| 234 | } | 233 | } |
| 235 | printf("\n"); | 234 | printf("\n"); |
| 236 | #endif | 235 | |
| 237 | for(i=0; i<LEN; i++){ | 236 | for(i=0; i<LEN; i++){ |
| 238 | for(j=0; j<LEN; j++){ | 237 | for(j=0; j<LEN; j++){ |
| 239 | printf("%9.6f ", eigenvector[i + j*LEN]); | 238 | printf("%9.6f ", eigenvector[i + j*LEN]); |