Unified · Split
| @@ -2663,8 +2663,6 @@ static int http_receive_data(HTTPContext *c) · 2662 unmodified lines | ||
| 2663 | 2663 | /* a packet has been received : write it in the store, except |
| 2664 | 2664 | if header */ |
| 2665 | 2665 | if (c->data_count > FFM_PACKET_SIZE) { |
| 2666 | − | |
| 2667 | − // printf("writing pos=0x%"PRIx64" size=0x%"PRIx64"\n", feed->feed_write_index, feed->feed_size); | |
| 2668 | 2666 | /* XXX: use llseek or url_seek */ |
| 2669 | 2667 | lseek(c->feed_fd, feed->feed_write_index, SEEK_SET); |
| 2670 | 2668 | if (write(c->feed_fd, c->buffer, FFM_PACKET_SIZE) < 0) { |
| @@ -699,8 +699,6 @@ skip_last_mv: · 698 unmodified lines | ||
| 699 | 699 | fixed[mb_xy] = MV_UNCHANGED; |
| 700 | 700 | } |
| 701 | 701 | } |
| 702 | − | |
| 703 | − // printf(".%d/%d", changed, score_sum); fflush(stdout); | |
| 704 | 702 | } |
| 705 | 703 | |
| 706 | 704 | if (none_left) |
| @@ -711,7 +709,6 @@ skip_last_mv: · 4 unmodified lines | ||
| 711 | 709 | if (fixed[mb_xy]) |
| 712 | 710 | fixed[mb_xy] = MV_FROZEN; |
| 713 | 711 | } |
| 714 | − // printf(":"); fflush(stdout); | |
| 715 | 712 | } |
| 716 | 713 | } |
| 717 | 714 | |
| @@ -789,7 +786,6 @@ static int is_intra_more_likely(MpegEncContext *s) · 71 unmodified lines | ||
| 789 | 786 | } |
| 790 | 787 | } |
| 791 | 788 | } |
| 792 | − // printf("is_intra_likely: %d type:%d\n", is_intra_likely, s->pict_type); | |
| 793 | 789 | return is_intra_likely > 0; |
| 794 | 790 | } |
| 795 | 791 | |
| @@ -383,7 +383,6 @@ static inline void update_vlc_state(VlcState * const state, const int v){ · 382 unmodified lines | ||
| 383 | 383 | |
| 384 | 384 | static inline void put_vlc_symbol(PutBitContext *pb, VlcState * const state, int v, int bits){ |
| 385 | 385 | int i, k, code; |
| 386 | −//printf("final: %d ", v); | |
| 387 | 386 | v = fold(v - state->bias, bits); |
| 388 | 387 | |
| 389 | 388 | i= state->count; |
| @@ -432,7 +431,7 @@ static inline int get_vlc_symbol(GetBitContext *gb, VlcState * const state, int · 42 unmodified lines | ||
| 432 | 431 | ret= fold(v + state->bias, bits); |
| 433 | 432 | |
| 434 | 433 | update_vlc_state(state, v); |
| 435 | −//printf("final: %d\n", ret); | |
| 434 | + | |
| 436 | 435 | return ret; |
| 437 | 436 | } |
| 438 | 437 | |
| @@ -1117,7 +1116,6 @@ static int encode_frame(AVCodecContext *avctx, AVPacket *pkt, · 678 unmodified lines | ||
| 1117 | 1116 | |
| 1118 | 1117 | if(!f->ac){ |
| 1119 | 1118 | used_count += ff_rac_terminate(c); |
| 1120 | −//printf("pos=%d\n", used_count); | |
| 1121 | 1119 | init_put_bits(&f->slice_context[0]->pb, pkt->data + used_count, pkt->size - used_count); |
| 1122 | 1120 | }else if (f->ac>1){ |
| 1123 | 1121 | int i; |
| @@ -1432,8 +1430,6 @@ static int read_quant_table(RangeCoder *c, int16_t *quant_table, int scale){ · 308 unmodified lines | ||
| 1432 | 1430 | while(len--){ |
| 1433 | 1431 | quant_table[i] = scale*v; |
| 1434 | 1432 | i++; |
| 1435 | −//printf("%2d ",v); | |
| 1436 | −//if(i%16==0) printf("\n"); | |
| 1437 | 1433 | } |
| 1438 | 1434 | } |
| 1439 | 1435 | |
| @@ -1704,7 +1700,6 @@ static int decode_frame(AVCodecContext *avctx, void *data, int *data_size, AVPac · 264 unmodified lines | ||
| 1704 | 1700 | if(!f->ac){ |
| 1705 | 1701 | bytes_read = c->bytestream - c->bytestream_start - 1; |
| 1706 | 1702 | if(bytes_read ==0) av_log(avctx, AV_LOG_ERROR, "error at end of AC stream\n"); //FIXME |
| 1707 | −//printf("pos=%d\n", bytes_read); | |
| 1708 | 1703 | init_get_bits(&f->slice_context[0]->gb, buf + bytes_read, (buf_size - bytes_read) * 8); |
| 1709 | 1704 | } else { |
| 1710 | 1705 | bytes_read = 0; /* avoid warning */ |
| @@ -228,7 +228,6 @@ static int decode_slice(MpegEncContext *s){ · 227 unmodified lines | ||
| 228 | 228 | if(s->loop_filter) |
| 229 | 229 | ff_h263_loop_filter(s); |
| 230 | 230 | |
| 231 | −//printf("%d %d %d %06X\n", s->mb_x, s->mb_y, s->gb.size*8 - get_bits_count(&s->gb), show_bits(&s->gb, 24)); | |
| 232 | 231 | ff_er_add_slice(s, s->resync_mb_x, s->resync_mb_y, s->mb_x, s->mb_y, ER_MB_END&part_mask); |
| 233 | 232 | |
| 234 | 233 | s->padding_bug_score--; |
| @@ -510,7 +509,6 @@ retry: · 275 unmodified lines | ||
| 510 | 509 | |
| 511 | 510 | if(s->divx_version>=0) |
| 512 | 511 | s->workaround_bugs|= FF_BUG_DIRECT_BLOCKSIZE; |
| 513 | −//printf("padding_bug_score: %d\n", s->padding_bug_score); | |
| 514 | 512 | if(s->divx_version==501 && s->divx_build==20020416) |
| 515 | 513 | s->padding_bug_score= 256*256*256*64; |
| 516 | 514 | |
| @@ -235,7 +235,6 @@ const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src, · 234 unmodified lines | ||
| 235 | 235 | if (dst == NULL) |
| 236 | 236 | return NULL; |
| 237 | 237 | |
| 238 | − // printf("decoding esc\n"); | |
| 239 | 238 | memcpy(dst, src, i); |
| 240 | 239 | si = di = i; |
| 241 | 240 | while (si + 2 < length) { |
| @@ -2134,7 +2133,6 @@ static int init_poc(H264Context *h) · 1892 unmodified lines | ||
| 2134 | 2133 | h->poc_msb = h->prev_poc_msb - max_poc_lsb; |
| 2135 | 2134 | else |
| 2136 | 2135 | h->poc_msb = h->prev_poc_msb; |
| 2137 | − // printf("poc: %d %d\n", h->poc_msb, h->poc_lsb); | |
| 2138 | 2136 | field_poc[0] = |
| 2139 | 2137 | field_poc[1] = h->poc_msb + h->poc_lsb; |
| 2140 | 2138 | if (s->picture_structure == PICT_FRAME) |
| @@ -4049,7 +4047,6 @@ out: · 1908 unmodified lines | ||
| 4049 | 4047 | |
| 4050 | 4048 | assert(pict->data[0] || !*data_size); |
| 4051 | 4049 | ff_print_debug_info(s, pict); |
| 4052 | − // printf("out %d\n", (int)pict->data[0]); | |
| 4053 | 4050 | |
| 4054 | 4051 | return get_consumed_bytes(s, buf_index, buf_size); |
| 4055 | 4052 | } |
| @@ -583,9 +583,7 @@ static av_always_inline void filter_mb_dir(H264Context *h, int mb_x, int mb_y, u · 582 unmodified lines | ||
| 583 | 583 | // value in IPCM macroblocks. |
| 584 | 584 | if(bS[0]+bS[1]+bS[2]+bS[3]){ |
| 585 | 585 | qp = (s->current_picture.f.qscale_table[mb_xy] + s->current_picture.f.qscale_table[mbm_xy] + 1) >> 1; |
| 586 | − //tprintf(s->avctx, "filter mb:%d/%d dir:%d edge:%d, QPy:%d, QPc:%d, QPcn:%d\n", mb_x, mb_y, dir, edge, qp, h->chroma_qp[0], s->current_picture.qscale_table[mbn_xy]); | |
| 587 | 586 | tprintf(s->avctx, "filter mb:%d/%d dir:%d edge:%d, QPy:%d ls:%d uvls:%d", mb_x, mb_y, dir, edge, qp, linesize, uvlinesize); |
| 588 | − //{ int i; for (i = 0; i < 4; i++) tprintf(s->avctx, " bS[%d]:%d", i, bS[i]); tprintf(s->avctx, "\n"); } | |
| 589 | 587 | chroma_qp_avg[0] = (h->chroma_qp[0] + get_chroma_qp(h, 0, s->current_picture.f.qscale_table[mbm_xy]) + 1) >> 1; |
| 590 | 588 | chroma_qp_avg[1] = (h->chroma_qp[1] + get_chroma_qp(h, 1, s->current_picture.f.qscale_table[mbm_xy]) + 1) >> 1; |
| 591 | 589 | if( dir == 0 ) { |
| @@ -668,9 +666,7 @@ static av_always_inline void filter_mb_dir(H264Context *h, int mb_x, int mb_y, u · 76 unmodified lines | ||
| 668 | 666 | // Do not use s->qscale as luma quantizer because it has not the same |
| 669 | 667 | // value in IPCM macroblocks. |
| 670 | 668 | qp = s->current_picture.f.qscale_table[mb_xy]; |
| 671 | − //tprintf(s->avctx, "filter mb:%d/%d dir:%d edge:%d, QPy:%d, QPc:%d, QPcn:%d\n", mb_x, mb_y, dir, edge, qp, h->chroma_qp[0], s->current_picture.qscale_table[mbn_xy]); | |
| 672 | 669 | tprintf(s->avctx, "filter mb:%d/%d dir:%d edge:%d, QPy:%d ls:%d uvls:%d", mb_x, mb_y, dir, edge, qp, linesize, uvlinesize); |
| 673 | − //{ int i; for (i = 0; i < 4; i++) tprintf(s->avctx, " bS[%d]:%d", i, bS[i]); tprintf(s->avctx, "\n"); } | |
| 674 | 670 | if( dir == 0 ) { |
| 675 | 671 | filter_mb_edgev( &img_y[4*edge << h->pixel_shift], linesize, bS, qp, a, b, h, 0 ); |
| 676 | 672 | if (chroma) { |
| @@ -37,7 +37,6 @@ static int ff_h264_find_frame_end(H264Context *h, const uint8_t *buf, int buf_si · 36 unmodified lines | ||
| 37 | 37 | int i; |
| 38 | 38 | uint32_t state; |
| 39 | 39 | ParseContext *pc = &(h->s.parse_context); |
| 40 | −//printf("first %02X%02X%02X%02X\n", buf[0], buf[1],buf[2],buf[3]); | |
| 41 | 40 | // mb_addr= pc->mb_addr - 1; |
| 42 | 41 | state= pc->state; |
| 43 | 42 | if(state>13) |
| @@ -174,7 +174,6 @@ static int encode_picture_lossless(AVCodecContext *avctx, AVPacket *pkt, · 173 unmodified lines | ||
| 174 | 174 | int pred; |
| 175 | 175 | |
| 176 | 176 | ptr = p->data[i] + (linesize * (v * mb_y + y)) + (h * mb_x + x); //FIXME optimize this crap |
| 177 | −//printf("%d %d %d %d %8X\n", mb_x, mb_y, x, y, ptr); | |
| 178 | 177 | PREDICT(pred, ptr[-linesize-1], ptr[-linesize], ptr[-1], predictor); |
| 179 | 178 | |
| 180 | 179 | if(i==0) |
| @@ -1178,8 +1178,6 @@ static int mjpeg_decode_app(MJpegDecodeContext *s) · 1177 unmodified lines | ||
| 1178 | 1178 | 4bytes field_size_less_padding |
| 1179 | 1179 | */ |
| 1180 | 1180 | s->buggy_avid = 1; |
| 1181 | −// if (s->first_picture) | |
| 1182 | −// printf("mjpeg: workarounding buggy AVID\n"); | |
| 1183 | 1181 | i = get_bits(&s->gb, 8); |
| 1184 | 1182 | if (i == 2) |
| 1185 | 1183 | s->bottom_field = 1; |
| @@ -1191,8 +1189,6 @@ static int mjpeg_decode_app(MJpegDecodeContext *s) · 5 unmodified lines | ||
| 1191 | 1189 | skip_bits(&s->gb, 32); |
| 1192 | 1190 | len -= 10; |
| 1193 | 1191 | #endif |
| 1194 | −// if (s->interlace_polarity) | |
| 1195 | −// printf("mjpeg: interlace polarity: %d\n", s->interlace_polarity); | |
| 1196 | 1192 | goto out; |
| 1197 | 1193 | } |
| 1198 | 1194 | |
| @@ -1314,8 +1310,6 @@ static int mjpeg_decode_com(MJpegDecodeContext *s) · 115 unmodified lines | ||
| 1314 | 1310 | /* buggy avid, it puts EOI only at every 10th frame */ |
| 1315 | 1311 | if (!strcmp(cbuf, "AVID")) { |
| 1316 | 1312 | s->buggy_avid = 1; |
| 1317 | − // if (s->first_picture) | |
| 1318 | − // printf("mjpeg: workarounding buggy AVID\n"); | |
| 1319 | 1313 | } else if (!strcmp(cbuf, "CS=ITU601")) |
| 1320 | 1314 | s->cs_itu601 = 1; |
| 1321 | 1315 | else if ((len > 20 && !strncmp(cbuf, "Intel(R) JPEG Library", 21)) || |
| @@ -1605,9 +1599,6 @@ eoi_parser: · 283 unmodified lines | ||
| 1605 | 1599 | av_log(avctx, AV_LOG_ERROR, |
| 1606 | 1600 | "mjpeg: unsupported coding type (%x)\n", start_code); |
| 1607 | 1601 | break; |
| 1608 | −// default: | |
| 1609 | −// printf("mjpeg: unsupported marker (%x)\n", start_code); | |
| 1610 | −// break; | |
| 1611 | 1602 | } |
| 1612 | 1603 | |
| 1613 | 1604 | not_the_end: |
| @@ -320,7 +320,6 @@ static void escape_FF(MpegEncContext *s, int start) · 319 unmodified lines | ||
| 320 | 320 | int v= buf[i]; |
| 321 | 321 | |
| 322 | 322 | if(v==0xFF){ |
| 323 | −//printf("%d %d\n", i, ff_count); | |
| 324 | 323 | buf[i+ff_count]= 0; |
| 325 | 324 | ff_count--; |
| 326 | 325 | } |
| @@ -395,12 +395,10 @@ static int sad_hpel_motion_search(MpegEncContext * s, · 394 unmodified lines | ||
| 395 | 395 | assert(flags == 0); |
| 396 | 396 | |
| 397 | 397 | if(c->skip){ |
| 398 | −// printf("S"); | |
| 399 | 398 | *mx_ptr = 0; |
| 400 | 399 | *my_ptr = 0; |
| 401 | 400 | return dmin; |
| 402 | 401 | } |
| 403 | −// printf("N"); | |
| 404 | 402 | |
| 405 | 403 | pix = c->src[src_index][0]; |
| 406 | 404 | |
| @@ -1314,7 +1312,6 @@ static int ff_estimate_motion_b(MpegEncContext * s, · 907 unmodified lines | ||
| 1314 | 1312 | if(c->avctx->me_sub_cmp != c->avctx->mb_cmp && !c->skip) |
| 1315 | 1313 | dmin= get_mb_score(s, mx, my, 0, ref_index, 0, 16, 1); |
| 1316 | 1314 | |
| 1317 | −//printf("%d %d %d %d//", s->mb_x, s->mb_y, mx, my); | |
| 1318 | 1315 | // s->mb_type[mb_y*s->mb_width + mb_x]= mb_type; |
| 1319 | 1316 | mv_table[mot_xy][0]= mx; |
| 1320 | 1317 | mv_table[mot_xy][1]= my; |
| @@ -1837,15 +1834,9 @@ int ff_get_best_fcode(MpegEncContext * s, int16_t (*mv_table)[2], int type) · 516 unmodified lines | ||
| 1837 | 1834 | best_score= score[i]; |
| 1838 | 1835 | best_fcode= i; |
| 1839 | 1836 | } |
| 1840 | −// printf("%d %d\n", i, score[i]); | |
| 1841 | 1837 | } |
| 1842 | 1838 | |
| 1843 | −// printf("fcode: %d type: %d\n", i, s->pict_type); | |
| 1844 | 1839 | return best_fcode; |
| 1845 | −/* for(i=0; i<=MAX_FCODE; i++){ | |
| 1846 | − printf("%d ", mv_num[i]); | |
| 1847 | − } | |
| 1848 | − printf("\n");*/ | |
| 1849 | 1840 | }else{ |
| 1850 | 1841 | return 1; |
| 1851 | 1842 | } |
| @@ -1865,7 +1856,6 @@ void ff_fix_long_p_mvs(MpegEncContext * s) · 13 unmodified lines | ||
| 1865 | 1856 | |
| 1866 | 1857 | if(c->avctx->me_range && range > c->avctx->me_range) range= c->avctx->me_range; |
| 1867 | 1858 | |
| 1868 | −//printf("%d no:%d %d//\n", clip, noclip, f_code); | |
| 1869 | 1859 | if(s->flags&CODEC_FLAG_4MV){ |
| 1870 | 1860 | const int wrap= s->b8_stride; |
| 1871 | 1861 | |
| @@ -367,13 +367,11 @@ static int qpel_motion_search(MpegEncContext * s, · 366 unmodified lines | ||
| 367 | 367 | assert((x) <= xmax);\ |
| 368 | 368 | assert((y) >= ymin);\ |
| 369 | 369 | assert((y) <= ymax);\ |
| 370 | −/*printf("check_mv %d %d\n", x, y);*/\ | |
| 371 | 370 | if(map[index]!=key){\ |
| 372 | 371 | d= cmp(s, x, y, 0, 0, size, h, ref_index, src_index, cmpf, chroma_cmpf, flags);\ |
| 373 | 372 | map[index]= key;\ |
| 374 | 373 | score_map[index]= d;\ |
| 375 | 374 | d += (mv_penalty[((x)<<shift)-pred_x] + mv_penalty[((y)<<shift)-pred_y])*penalty_factor;\ |
| 376 | −/*printf("score:%d\n", d);*/\ | |
| 377 | 375 | COPY3_IF_LT(dmin, d, best[0], x, best[1], y)\ |
| 378 | 376 | }\ |
| 379 | 377 | } |
| @@ -391,13 +389,11 @@ static int qpel_motion_search(MpegEncContext * s, · 11 unmodified lines | ||
| 391 | 389 | {\ |
| 392 | 390 | const unsigned key = ((y)<<ME_MAP_MV_BITS) + (x) + map_generation;\ |
| 393 | 391 | const int index= (((y)<<ME_MAP_SHIFT) + (x))&(ME_MAP_SIZE-1);\ |
| 394 | −/*printf("check_mv_dir %d %d %d\n", x, y, new_dir);*/\ | |
| 395 | 392 | if(map[index]!=key){\ |
| 396 | 393 | d= cmp(s, x, y, 0, 0, size, h, ref_index, src_index, cmpf, chroma_cmpf, flags);\ |
| 397 | 394 | map[index]= key;\ |
| 398 | 395 | score_map[index]= d;\ |
| 399 | 396 | d += (mv_penalty[((x)<<shift)-pred_x] + mv_penalty[((y)<<shift)-pred_y])*penalty_factor;\ |
| 400 | −/*printf("score:%d\n", d);*/\ | |
| 401 | 397 | if(d<dmin){\ |
| 402 | 398 | best[0]=x;\ |
| 403 | 399 | best[1]=y;\ |
| @@ -448,7 +444,6 @@ static av_always_inline int small_diamond_search(MpegEncContext * s, int *best, · 44 unmodified lines | ||
| 448 | 444 | const int y= best[1]; |
| 449 | 445 | next_dir=-1; |
| 450 | 446 | |
| 451 | −//printf("%d", dir); | |
| 452 | 447 | if(dir!=2 && x>xmin) CHECK_MV_DIR(x-1, y , 0) |
| 453 | 448 | if(dir!=3 && y>ymin) CHECK_MV_DIR(x , y-1, 1) |
| 454 | 449 | if(dir!=0 && x<xmax) CHECK_MV_DIR(x+1, y , 2) |
| @@ -660,13 +655,11 @@ static int full_search(MpegEncContext * s, int *best, int dmin, · 205 unmodified lines | ||
| 660 | 655 | {\ |
| 661 | 656 | const unsigned key = ((ay)<<ME_MAP_MV_BITS) + (ax) + map_generation;\ |
| 662 | 657 | const int index= (((ay)<<ME_MAP_SHIFT) + (ax))&(ME_MAP_SIZE-1);\ |
| 663 | −/*printf("sab check %d %d\n", ax, ay);*/\ | |
| 664 | 658 | if(map[index]!=key){\ |
| 665 | 659 | d= cmp(s, ax, ay, 0, 0, size, h, ref_index, src_index, cmpf, chroma_cmpf, flags);\ |
| 666 | 660 | map[index]= key;\ |
| 667 | 661 | score_map[index]= d;\ |
| 668 | 662 | d += (mv_penalty[((ax)<<shift)-pred_x] + mv_penalty[((ay)<<shift)-pred_y])*penalty_factor;\ |
| 669 | −/*printf("score: %d\n", d);*/\ | |
| 670 | 663 | if(d < minima[minima_count-1].height){\ |
| 671 | 664 | int j=0;\ |
| 672 | 665 | \ |
| @@ -974,7 +967,6 @@ static av_always_inline int epzs_motion_search_internal(MpegEncContext * s, int · 301 unmodified lines | ||
| 974 | 967 | *mx_ptr= best[0]; |
| 975 | 968 | *my_ptr= best[1]; |
| 976 | 969 | |
| 977 | −// printf("%d %d %d \n", best[0], best[1], dmin); | |
| 978 | 970 | return dmin; |
| 979 | 971 | } |
| 980 | 972 | |
| @@ -1020,7 +1012,7 @@ static int epzs_motion_search4(MpegEncContext * s, · 39 unmodified lines | ||
| 1020 | 1012 | map_generation= update_map_generation(c); |
| 1021 | 1013 | |
| 1022 | 1014 | dmin = 1000000; |
| 1023 | −//printf("%d %d %d %d //",xmin, ymin, xmax, ymax); | |
| 1015 | + | |
| 1024 | 1016 | /* first line */ |
| 1025 | 1017 | if (s->first_slice_line) { |
| 1026 | 1018 | CHECK_MV(P_LEFT[0]>>shift, P_LEFT[1]>>shift) |
| @@ -1050,7 +1042,6 @@ static int epzs_motion_search4(MpegEncContext * s, · 23 unmodified lines | ||
| 1050 | 1042 | *mx_ptr= best[0]; |
| 1051 | 1043 | *my_ptr= best[1]; |
| 1052 | 1044 | |
| 1053 | −// printf("%d %d %d \n", best[0], best[1], dmin); | |
| 1054 | 1045 | return dmin; |
| 1055 | 1046 | } |
| 1056 | 1047 | |
| @@ -1080,7 +1071,7 @@ static int epzs_motion_search2(MpegEncContext * s, · 23 unmodified lines | ||
| 1080 | 1071 | map_generation= update_map_generation(c); |
| 1081 | 1072 | |
| 1082 | 1073 | dmin = 1000000; |
| 1083 | −//printf("%d %d %d %d //",xmin, ymin, xmax, ymax); | |
| 1074 | + | |
| 1084 | 1075 | /* first line */ |
| 1085 | 1076 | if (s->first_slice_line) { |
| 1086 | 1077 | CHECK_MV(P_LEFT[0]>>shift, P_LEFT[1]>>shift) |
| @@ -1110,6 +1101,5 @@ static int epzs_motion_search2(MpegEncContext * s, · 23 unmodified lines | ||
| 1110 | 1101 | *mx_ptr= best[0]; |
| 1111 | 1102 | *my_ptr= best[1]; |
| 1112 | 1103 | |
| 1113 | −// printf("%d %d %d \n", best[0], best[1], dmin); | |
| 1114 | 1104 | return dmin; |
| 1115 | 1105 | } |
| @@ -1397,7 +1397,6 @@ no_output_pic: · 1396 unmodified lines | ||
| 1397 | 1397 | ff_copy_picture(&s->current_picture, s->current_picture_ptr); |
| 1398 | 1398 | |
| 1399 | 1399 | s->picture_number = s->new_picture.f.display_picture_number; |
| 1400 | − //printf("dpn:%d\n", s->picture_number); | |
| 1401 | 1400 | } else { |
| 1402 | 1401 | memset(&s->new_picture, 0, sizeof(Picture)); |
| 1403 | 1402 | } |
| @@ -1444,8 +1443,6 @@ int ff_MPV_encode_picture(AVCodecContext *avctx, AVPacket *pkt, · 40 unmodified lines | ||
| 1444 | 1443 | |
| 1445 | 1444 | s->pict_type = s->new_picture.f.pict_type; |
| 1446 | 1445 | //emms_c(); |
| 1447 | − //printf("qs:%f %f %d\n", s->new_picture.quality, | |
| 1448 | − // s->current_picture.quality, s->qscale); | |
| 1449 | 1446 | ff_MPV_frame_start(s, avctx); |
| 1450 | 1447 | vbv_retry: |
| 1451 | 1448 | if (encode_picture(s, s->picture_number) < 0) |
| @@ -2396,7 +2393,6 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 944 unmodified lines | ||
| 2396 | 2393 | uint8_t bit_buf2[2][MAX_MB_BYTES]; |
| 2397 | 2394 | uint8_t bit_buf_tex[2][MAX_MB_BYTES]; |
| 2398 | 2395 | PutBitContext pb[2], pb2[2], tex_pb[2]; |
| 2399 | −//printf("%d->%d\n", s->resync_mb_y, s->end_mb_y); | |
| 2400 | 2396 | |
| 2401 | 2397 | ff_check_alignment(); |
| 2402 | 2398 | |
| @@ -2446,7 +2442,6 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 43 unmodified lines | ||
| 2446 | 2442 | s->first_slice_line = 1; |
| 2447 | 2443 | s->ptr_lastgob = s->pb.buf; |
| 2448 | 2444 | for(mb_y= s->start_mb_y; mb_y < s->end_mb_y; mb_y++) { |
| 2449 | −// printf("row %d at %X\n", s->mb_y, (int)s); | |
| 2450 | 2445 | s->mb_x=0; |
| 2451 | 2446 | s->mb_y= mb_y; |
| 2452 | 2447 | |
| @@ -2918,7 +2913,6 @@ static int encode_thread(AVCodecContext *c, void *arg){ · 465 unmodified lines | ||
| 2918 | 2913 | s->mb_intra= 0; |
| 2919 | 2914 | motion_x= s->mv[0][0][0] = s->b_forw_mv_table[xy][0]; |
| 2920 | 2915 | motion_y= s->mv[0][0][1] = s->b_forw_mv_table[xy][1]; |
| 2921 | −// printf(" %d %d ", motion_x, motion_y); | |
| 2922 | 2916 | break; |
| 2923 | 2917 | case CANDIDATE_MB_TYPE_FORWARD_I: |
| 2924 | 2918 | s->mv_dir = MV_DIR_FORWARD; |
| @@ -3088,7 +3082,6 @@ static int estimate_qp(MpegEncContext *s, int dry_run){ · 163 unmodified lines | ||
| 3088 | 3082 | //FIXME broken |
| 3089 | 3083 | }else |
| 3090 | 3084 | s->lambda = s->current_picture.f.quality; |
| 3091 | −//printf("%d %d\n", s->avctx->global_quality, s->current_picture.quality); | |
| 3092 | 3085 | update_qscale(s); |
| 3093 | 3086 | return 0; |
| 3094 | 3087 | } |
| @@ -543,7 +543,6 @@ static int msmpeg4v34_decode_mb(MpegEncContext *s, DCTELEM block[6][64]) · 542 unmodified lines | ||
| 543 | 543 | |
| 544 | 544 | if (!s->mb_intra) { |
| 545 | 545 | int mx, my; |
| 546 | −//printf("P at %d %d\n", s->mb_x, s->mb_y); | |
| 547 | 546 | if(s->per_mb_rl_table && cbp){ |
| 548 | 547 | s->rl_table_index = decode012(&s->gb); |
| 549 | 548 | s->rl_chroma_table_index = s->rl_table_index; |
| @@ -858,8 +857,6 @@ int ff_msmpeg4_decode_ext_header(MpegEncContext * s, int buf_size) · 308 unmodified lines | ||
| 858 | 857 | s->flipflop_rounding= get_bits1(&s->gb); |
| 859 | 858 | else |
| 860 | 859 | s->flipflop_rounding= 0; |
| 861 | − | |
| 862 | −// printf("fps:%2d bps:%2d roundingType:%1d\n", fps, s->bit_rate/1024, s->flipflop_rounding); | |
| 863 | 860 | } |
| 864 | 861 | else if(left<length+8) |
| 865 | 862 | { |
| @@ -1043,7 +1040,6 @@ int ff_msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block, · 177 unmodified lines | ||
| 1043 | 1040 | |
| 1044 | 1041 | s->esc3_level_length= ll; |
| 1045 | 1042 | s->esc3_run_length= SHOW_UBITS(re, &s->gb, 2) + 3; SKIP_BITS(re, &s->gb, 2); |
| 1046 | −//printf("level length:%d, run length: %d\n", ll, s->esc3_run_length); | |
| 1047 | 1043 | UPDATE_CACHE(re, &s->gb); |
| 1048 | 1044 | } |
| 1049 | 1045 | run= SHOW_UBITS(re, &s->gb, s->esc3_run_length); |
| @@ -1056,7 +1052,7 @@ int ff_msmpeg4_decode_block(MpegEncContext * s, DCTELEM * block, · 6 unmodified lines | ||
| 1056 | 1052 | SKIP_BITS(re, &s->gb, s->esc3_level_length); |
| 1057 | 1053 | if(sign) level= -level; |
| 1058 | 1054 | } |
| 1059 | −//printf("level: %d, run: %d at %d %d\n", level, run, s->mb_x, s->mb_y); | |
| 1055 | + | |
| 1060 | 1056 | #if 0 // waste of time / this will detect very few errors |
| 1061 | 1057 | { |
| 1062 | 1058 | const int abs_level= FFABS(level); |
| @@ -1182,7 +1178,6 @@ int ff_msmpeg4_decode_motion(MpegEncContext * s, · 119 unmodified lines | ||
| 1182 | 1178 | return -1; |
| 1183 | 1179 | } |
| 1184 | 1180 | if (code == mv->n) { |
| 1185 | −//printf("MV ESC %X at %d %d\n", show_bits(&s->gb, 24), s->mb_x, s->mb_y); | |
| 1186 | 1181 | mx = get_bits(&s->gb, 6); |
| 1187 | 1182 | my = get_bits(&s->gb, 6); |
| 1188 | 1183 | } else { |
| @@ -193,9 +193,6 @@ static void find_best_tables(MpegEncContext * s) · 192 unmodified lines | ||
| 193 | 193 | } |
| 194 | 194 | } |
| 195 | 195 | |
| 196 | −// printf("type:%d, best:%d, qp:%d, var:%d, mcvar:%d, size:%d //\n", | |
| 197 | −// s->pict_type, best, s->qscale, s->mb_var_sum, s->mc_mb_var_sum, best_size); | |
| 198 | − | |
| 199 | 196 | if(s->pict_type==AV_PICTURE_TYPE_P) chroma_best= best; |
| 200 | 197 | |
| 201 | 198 | memset(s->ac_stats, 0, sizeof(int)*(MAX_LEVEL+1)*(MAX_RUN+1)*2*2*2); |
| @@ -130,13 +130,11 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value) · 129 unmodified lines | ||
| 130 | 130 | unsigned int bit_buf; |
| 131 | 131 | int bit_left; |
| 132 | 132 | |
| 133 | − // printf("put_bits=%d %x\n", n, value); | |
| 134 | 133 | assert(n <= 31 && value < (1U << n)); |
| 135 | 134 | |
| 136 | 135 | bit_buf = s->bit_buf; |
| 137 | 136 | bit_left = s->bit_left; |
| 138 | 137 | |
| 139 | − // printf("n=%d value=%x cnt=%d buf=%x\n", n, value, bit_cnt, bit_buf); | |
| 140 | 138 | /* XXX: optimize */ |
| 141 | 139 | #ifdef BITSTREAM_WRITER_LE |
| 142 | 140 | bit_buf |= value << (32 - bit_left); |
| @@ -155,7 +153,6 @@ static inline void put_bits(PutBitContext *s, int n, unsigned int value) · 12 unmodified lines | ||
| 155 | 153 | bit_buf<<=bit_left; |
| 156 | 154 | bit_buf |= value >> (n - bit_left); |
| 157 | 155 | AV_WB32(s->buf_ptr, bit_buf); |
| 158 | − //printf("bitbuf = %08x\n", bit_buf); | |
| 159 | 156 | s->buf_ptr+=4; |
| 160 | 157 | bit_left+=32 - n; |
| 161 | 158 | bit_buf = value; |
| @@ -444,7 +444,6 @@ static double modify_qscale(MpegEncContext *s, RateControlEntry *rce, double q, · 443 unmodified lines | ||
| 444 | 444 | if(s->avctx->rc_qmod_freq && frame_num%s->avctx->rc_qmod_freq==0 && pict_type==AV_PICTURE_TYPE_P) |
| 445 | 445 | q*= s->avctx->rc_qmod_amp; |
| 446 | 446 | |
| 447 | −//printf("q:%f\n", q); | |
| 448 | 447 | /* buffer overflow/underflow protection */ |
| 449 | 448 | if(buffer_size){ |
| 450 | 449 | double expected_size= rcc->buffer_index; |
| @@ -623,8 +622,6 @@ static void adaptive_quantization(MpegEncContext *s, double q){ · 172 unmodified lines | ||
| 623 | 622 | |
| 624 | 623 | if (intq > qmax) intq= qmax; |
| 625 | 624 | else if(intq < qmin) intq= qmin; |
| 626 | −//if(i%s->mb_width==0) printf("\n"); | |
| 627 | −//printf("%2d%3d ", intq, ff_sqrt(s->mc_mb_var[i])); | |
| 628 | 625 | s->lambda_table[mb_xy]= intq; |
| 629 | 626 | } |
| 630 | 627 | } |
| @@ -669,7 +666,6 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) · 38 unmodified lines | ||
| 669 | 666 | get_qminmax(&qmin, &qmax, s, pict_type); |
| 670 | 667 | |
| 671 | 668 | fps= 1/av_q2d(s->avctx->time_base); |
| 672 | −//printf("input_pic_num:%d pic_num:%d frame_rate:%d\n", s->input_picture_number, s->picture_number, s->frame_rate); | |
| 673 | 669 | /* update predictors */ |
| 674 | 670 | if(picture_number>2 && !dry_run){ |
| 675 | 671 | const int last_var= s->last_pict_type == AV_PICTURE_TYPE_I ? rcc->last_mb_var_sum : rcc->last_mc_mb_var_sum; |
| @@ -692,9 +688,6 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) · 16 unmodified lines | ||
| 692 | 688 | else |
| 693 | 689 | dts_pic= s->last_picture_ptr; |
| 694 | 690 | |
| 695 | −//if(dts_pic) | |
| 696 | −// av_log(NULL, AV_LOG_ERROR, "%Ld %Ld %Ld %d\n", s->current_picture_ptr->pts, s->user_specified_pts, dts_pic->pts, picture_number); | |
| 697 | − | |
| 698 | 691 | if (!dts_pic || dts_pic->f.pts == AV_NOPTS_VALUE) |
| 699 | 692 | wanted_bits= (uint64_t)(s->bit_rate*(double)picture_number/fps); |
| 700 | 693 | else |
| @@ -750,9 +743,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) · 49 unmodified lines | ||
| 750 | 743 | return -1; |
| 751 | 744 | |
| 752 | 745 | assert(q>0.0); |
| 753 | −//printf("%f ", q); | |
| 754 | 746 | q= get_diff_limited_q(s, rce, q); |
| 755 | −//printf("%f ", q); | |
| 756 | 747 | assert(q>0.0); |
| 757 | 748 | |
| 758 | 749 | if(pict_type==AV_PICTURE_TYPE_P || s->intra_only){ //FIXME type dependent blur like in 2-pass |
| @@ -761,9 +752,7 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run) · 2 unmodified lines | ||
| 761 | 752 | |
| 762 | 753 | rcc->short_term_qsum+= q; |
| 763 | 754 | rcc->short_term_qcount++; |
| 764 | −//printf("%f ", q); | |
| 765 | 755 | q= short_term_q= rcc->short_term_qsum/rcc->short_term_qcount; |
| 766 | −//printf("%f ", q); | |
| 767 | 756 | } |
| 768 | 757 | assert(q>0.0); |
| 769 | 758 | |
| @@ -888,7 +877,6 @@ static int init_pass2(MpegEncContext *s) · 118 unmodified lines | ||
| 888 | 877 | double bits; |
| 889 | 878 | rce->new_qscale= modify_qscale(s, rce, blurred_qscale[i], i); |
| 890 | 879 | bits= qp2bits(rce, rce->new_qscale) + rce->mv_bits + rce->misc_bits; |
| 891 | −//printf("%d %f\n", rce->new_bits, blurred_qscale[i]); | |
| 892 | 880 | bits += 8*ff_vbv_update(s, bits); |
| 893 | 881 | |
| 894 | 882 | rce->expected_bits= expected_bits; |
| @@ -551,7 +551,6 @@ void avcodec_default_release_buffer(AVCodecContext *s, AVFrame *pic) · 550 unmodified lines | ||
| 551 | 551 | for (i = 0; i < AV_NUM_DATA_POINTERS; i++) |
| 552 | 552 | pic->data[i] = NULL; |
| 553 | 553 | // pic->base[i]=NULL; |
| 554 | − //printf("R%X\n", pic->opaque); | |
| 555 | 554 | |
| 556 | 555 | if (s->debug & FF_DEBUG_BUFFERS) |
| 557 | 556 | av_log(s, AV_LOG_DEBUG, "default_release_buffer called on pic %p, %d " |
| @@ -851,7 +851,6 @@ static int wma_decode_superframe(AVCodecContext *avctx, void *data, · 850 unmodified lines | ||
| 851 | 851 | } |
| 852 | 852 | |
| 853 | 853 | if (s->last_superframe_len > 0) { |
| 854 | − // printf("skip=%d\n", s->last_bitoffset); | |
| 855 | 854 | /* add bit_offset bits to last frame */ |
| 856 | 855 | if ((s->last_superframe_len + ((bit_offset + 7) >> 3)) > |
| 857 | 856 | MAX_CODED_SUPERFRAME_SIZE) |
| @@ -244,8 +244,6 @@ static inline int wmv2_decode_motion(Wmv2Context *w, int *mx_ptr, int *my_ptr){ · 243 unmodified lines | ||
| 244 | 244 | else |
| 245 | 245 | w->hshift= 0; |
| 246 | 246 | |
| 247 | −//printf("%d %d ", *mx_ptr, *my_ptr); | |
| 248 | − | |
| 249 | 247 | return 0; |
| 250 | 248 | } |
| 251 | 249 | |
| @@ -314,7 +312,6 @@ static inline int wmv2_decode_inter_block(Wmv2Context *w, DCTELEM *block, int n, · 62 unmodified lines | ||
| 314 | 312 | // const uint8_t *scantable= w->abt_type-1 ? w->abt_scantable[1].permutated : w->abt_scantable[0].scantable; |
| 315 | 313 | |
| 316 | 314 | sub_cbp= sub_cbp_table[ decode012(&s->gb) ]; |
| 317 | −// printf("S%d", sub_cbp); | |
| 318 | 315 | |
| 319 | 316 | if(sub_cbp&1){ |
| 320 | 317 | if (ff_msmpeg4_decode_block(s, block, n, 1, scantable) < 0) |
| @@ -385,7 +382,6 @@ int ff_wmv2_decode_mb(MpegEncContext *s, DCTELEM block[6][64]) · 64 unmodified lines | ||
| 385 | 382 | |
| 386 | 383 | if (!s->mb_intra) { |
| 387 | 384 | int mx, my; |
| 388 | −//printf("P at %d %d\n", s->mb_x, s->mb_y); | |
| 389 | 385 | wmv2_pred_motion(w, &mx, &my); |
| 390 | 386 | |
| 391 | 387 | if(cbp){ |
| @@ -51,7 +51,7 @@ static void dct_unquantize_h263_intra_mmx(MpegEncContext *s, · 50 unmodified lines | ||
| 51 | 51 | nCoeffs=63; |
| 52 | 52 | else |
| 53 | 53 | nCoeffs= s->inter_scantable.raster_end[ s->block_last_index[n] ]; |
| 54 | −//printf("%d %d ", qmul, qadd); | |
| 54 | + | |
| 55 | 55 | __asm__ volatile( |
| 56 | 56 | "movd %1, %%mm6 \n\t" //qmul |
| 57 | 57 | "packssdw %%mm6, %%mm6 \n\t" |
| @@ -114,7 +114,7 @@ static void dct_unquantize_h263_inter_mmx(MpegEncContext *s, · 56 unmodified lines | ||
| 114 | 114 | assert(s->block_last_index[n]>=0 || s->h263_aic); |
| 115 | 115 | |
| 116 | 116 | nCoeffs= s->inter_scantable.raster_end[ s->block_last_index[n] ]; |
| 117 | −//printf("%d %d ", qmul, qadd); | |
| 117 | + | |
| 118 | 118 | __asm__ volatile( |
| 119 | 119 | "movd %1, %%mm6 \n\t" //qmul |
| 120 | 120 | "packssdw %%mm6, %%mm6 \n\t" |