mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-11-26 19:01:44 +02:00
Remove some disabled printf debug cruft.
This commit is contained in:
parent
09cbf60f8e
commit
2e15305b70
1
ffmpeg.c
1
ffmpeg.c
@ -3212,7 +3212,6 @@ static void opt_input_file(const char *filename)
|
||||
case AVMEDIA_TYPE_AUDIO:
|
||||
input_codecs[nb_input_codecs-1] = avcodec_find_decoder_by_name(audio_codec_name);
|
||||
set_context_opts(dec, avcodec_opts[AVMEDIA_TYPE_AUDIO], AV_OPT_FLAG_AUDIO_PARAM | AV_OPT_FLAG_DECODING_PARAM, input_codecs[nb_input_codecs-1]);
|
||||
//fprintf(stderr, "\nInput Audio channels: %d", dec->channels);
|
||||
channel_layout = dec->channel_layout;
|
||||
audio_channels = dec->channels;
|
||||
audio_sample_rate = dec->sample_rate;
|
||||
|
@ -450,17 +450,6 @@ static int decode_frame(AVCodecContext *avctx,
|
||||
idct_put(a, mb_x, mb_y);
|
||||
}
|
||||
}
|
||||
#if 0
|
||||
int i;
|
||||
printf("%d %d\n", 8*buf_size, get_bits_count(&a->gb));
|
||||
for(i=get_bits_count(&a->gb); i<8*buf_size; i++){
|
||||
printf("%d", get_bits1(&a->gb));
|
||||
}
|
||||
|
||||
for(i=0; i<s->avctx->extradata_size; i++){
|
||||
printf("%c\n", ((uint8_t*)s->avctx->extradata)[i]);
|
||||
}
|
||||
#endif
|
||||
|
||||
*picture= *(AVFrame*)&a->picture;
|
||||
*data_size = sizeof(AVPicture);
|
||||
|
@ -493,25 +493,6 @@ static void idct248_error(const char *name,
|
||||
if (v > err_max)
|
||||
err_max = v;
|
||||
}
|
||||
#if 0
|
||||
printf("ref=\n");
|
||||
for(i=0;i<8;i++) {
|
||||
int j;
|
||||
for(j=0;j<8;j++) {
|
||||
printf(" %3d", img_dest1[i*8+j]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
|
||||
printf("out=\n");
|
||||
for(i=0;i<8;i++) {
|
||||
int j;
|
||||
for(j=0;j<8;j++) {
|
||||
printf(" %3d", img_dest[i*8+j]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
#endif
|
||||
}
|
||||
printf("%s %s: err_inf=%d\n",
|
||||
1 ? "IDCT248" : "DCT248",
|
||||
|
@ -3327,13 +3327,6 @@ static int hadamard8_diff8x8_c(/*MpegEncContext*/ void *s, uint8_t *dst, uint8_t
|
||||
+BUTTERFLYA(temp[8*2+i], temp[8*6+i])
|
||||
+BUTTERFLYA(temp[8*3+i], temp[8*7+i]);
|
||||
}
|
||||
#if 0
|
||||
static int maxi=0;
|
||||
if(sum>maxi){
|
||||
maxi=sum;
|
||||
printf("MAX:%d\n", maxi);
|
||||
}
|
||||
#endif
|
||||
return sum;
|
||||
}
|
||||
|
||||
|
@ -552,14 +552,6 @@ retry:
|
||||
s->workaround_bugs, s->lavc_build, s->xvid_build, s->divx_version, s->divx_build,
|
||||
s->divx_packed ? "p" : "");
|
||||
|
||||
#if 0 // dump bits per frame / qp / complexity
|
||||
{
|
||||
static FILE *f=NULL;
|
||||
if(!f) f=fopen("rate_qp_cplx.txt", "w");
|
||||
fprintf(f, "%d %d %f\n", buf_size, s->qscale, buf_size*(double)s->qscale);
|
||||
}
|
||||
#endif
|
||||
|
||||
#if HAVE_MMX
|
||||
if (s->codec_id == CODEC_ID_MPEG4 && s->xvid_build>=0 && avctx->idct_algo == FF_IDCT_AUTO && (av_get_cpu_flags() & AV_CPU_FLAG_MMX)) {
|
||||
avctx->idct_algo= FF_IDCT_XVIDMMX;
|
||||
|
@ -152,10 +152,6 @@ const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src, int *dst_l
|
||||
h->nal_unit_type= src[0]&0x1F;
|
||||
|
||||
src++; length--;
|
||||
#if 0
|
||||
for(i=0; i<length; i++)
|
||||
printf("%2X ", src[i]);
|
||||
#endif
|
||||
|
||||
#if HAVE_FAST_UNALIGNED
|
||||
# if HAVE_FAST_64BIT
|
||||
@ -2748,12 +2744,6 @@ static int decode_nal_units(H264Context *h, const uint8_t *buf, int buf_size){
|
||||
int next_avc= h->is_avc ? 0 : buf_size;
|
||||
|
||||
h->max_contexts = avctx->thread_count;
|
||||
#if 0
|
||||
int i;
|
||||
for(i=0; i<50; i++){
|
||||
av_log(NULL, AV_LOG_ERROR,"%02X ", buf[i]);
|
||||
}
|
||||
#endif
|
||||
if(!(s->flags2 & CODEC_FLAG2_CHUNKS)){
|
||||
h->current_slice = 0;
|
||||
if (!s->first_field)
|
||||
|
@ -352,11 +352,6 @@ static int read_huffman_tables(HYuvContext *s, const uint8_t *src, int length){
|
||||
if(generate_bits_table(s->bits[i], s->len[i])<0){
|
||||
return -1;
|
||||
}
|
||||
#if 0
|
||||
for(j=0; j<256; j++){
|
||||
printf("%6X, %2d, %3d\n", s->bits[i][j], s->len[i][j], j);
|
||||
}
|
||||
#endif
|
||||
free_vlc(&s->vlc[i]);
|
||||
init_vlc(&s->vlc[i], VLC_BITS, 256, s->len[i], 1, 1, s->bits[i], 4, 4, 0);
|
||||
}
|
||||
|
@ -632,25 +632,6 @@ static int funny_diamond_search(MpegEncContext * s, int *best, int dmin,
|
||||
|
||||
if(x!=best[0] || y!=best[1])
|
||||
dia_size=0;
|
||||
#if 0
|
||||
{
|
||||
int dx, dy, i;
|
||||
static int stats[8*8];
|
||||
dx= FFABS(x-best[0]);
|
||||
dy= FFABS(y-best[1]);
|
||||
if(dy>dx){
|
||||
dx^=dy; dy^=dx; dx^=dy;
|
||||
}
|
||||
stats[dy*8 + dx] ++;
|
||||
if(256*256*256*64 % (stats[0]+1)==0){
|
||||
for(i=0; i<64; i++){
|
||||
if((i&7)==0) printf("\n");
|
||||
printf("%8d ", stats[i]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return dmin;
|
||||
}
|
||||
@ -983,22 +964,6 @@ static int var_diamond_search(MpegEncContext * s, int *best, int dmin,
|
||||
|
||||
if(x!=best[0] || y!=best[1])
|
||||
dia_size=0;
|
||||
#if 0
|
||||
{
|
||||
int dx, dy, i;
|
||||
static int stats[8*8];
|
||||
dx= FFABS(x-best[0]);
|
||||
dy= FFABS(y-best[1]);
|
||||
stats[dy*8 + dx] ++;
|
||||
if(256*256*256*64 % (stats[0]+1)==0){
|
||||
for(i=0; i<64; i++){
|
||||
if((i&7)==0) printf("\n");
|
||||
printf("%6d ", stats[i]);
|
||||
}
|
||||
printf("\n");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
}
|
||||
return dmin;
|
||||
}
|
||||
|
@ -888,10 +888,6 @@ static void mpeg1_encode_block(MpegEncContext *s,
|
||||
j = s->intra_scantable.permutated[i];
|
||||
level = block[j];
|
||||
next_coef:
|
||||
#if 0
|
||||
if (level != 0)
|
||||
av_dlog(s->avctx, "level[%d]=%d\n", i, level);
|
||||
#endif
|
||||
/* encode using VLC */
|
||||
if (level != 0) {
|
||||
run = i - last_non_zero - 1;
|
||||
|
@ -585,13 +585,6 @@ static void compute_bit_allocation(MpegAudioContext *s,
|
||||
}
|
||||
*padding = max_frame_size - current_frame_size;
|
||||
assert(*padding >= 0);
|
||||
|
||||
#if 0
|
||||
for(i=0;i<s->sblimit;i++) {
|
||||
printf("%d ", bit_alloc[i]);
|
||||
}
|
||||
printf("\n");
|
||||
#endif
|
||||
}
|
||||
|
||||
/*
|
||||
@ -713,15 +706,7 @@ static void encode_frame(MpegAudioContext *s,
|
||||
/* group the 3 values to save bits */
|
||||
put_bits(p, -bits,
|
||||
q[0] + steps * (q[1] + steps * q[2]));
|
||||
#if 0
|
||||
printf("%d: gr1 %d\n",
|
||||
i, q[0] + steps * (q[1] + steps * q[2]));
|
||||
#endif
|
||||
} else {
|
||||
#if 0
|
||||
printf("%d: gr3 %d %d %d\n",
|
||||
i, q[0], q[1], q[2]);
|
||||
#endif
|
||||
put_bits(p, bits, q[0]);
|
||||
put_bits(p, bits, q[1]);
|
||||
put_bits(p, bits, q[2]);
|
||||
|
@ -617,10 +617,6 @@ void msmpeg4_encode_mb(MpegEncContext * s,
|
||||
}
|
||||
coded_cbp |= val << (5 - i);
|
||||
}
|
||||
#if 0
|
||||
if (coded_cbp)
|
||||
printf("cbp=%x %x\n", cbp, coded_cbp);
|
||||
#endif
|
||||
|
||||
if(s->msmpeg4_version<=2){
|
||||
if (s->pict_type == FF_I_TYPE) {
|
||||
@ -1383,17 +1379,6 @@ int msmpeg4_decode_picture_header(MpegEncContext * s)
|
||||
{
|
||||
int code;
|
||||
|
||||
#if 0
|
||||
{
|
||||
int i;
|
||||
for(i=0; i<s->gb.size_in_bits; i++)
|
||||
av_log(s->avctx, AV_LOG_DEBUG, "%d", get_bits1(&s->gb));
|
||||
// get_bits1(&s->gb);
|
||||
av_log(s->avctx, AV_LOG_DEBUG, "END\n");
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
if(s->msmpeg4_version==1){
|
||||
int start_code = get_bits_long(&s->gb, 32);
|
||||
if(start_code!=0x00000100){
|
||||
|
@ -806,14 +806,6 @@ float ff_rate_estimate_qscale(MpegEncContext *s, int dry_run)
|
||||
rcc->last_mc_mb_var_sum= pic->mc_mb_var_sum;
|
||||
rcc->last_mb_var_sum= pic->mb_var_sum;
|
||||
}
|
||||
#if 0
|
||||
{
|
||||
static int mvsum=0, texsum=0;
|
||||
mvsum += s->mv_bits;
|
||||
texsum += s->i_tex_bits + s->p_tex_bits;
|
||||
printf("%d %d//\n\n", mvsum, texsum);
|
||||
}
|
||||
#endif
|
||||
return q;
|
||||
}
|
||||
|
||||
|
@ -293,23 +293,6 @@ static int rv20_decode_picture_header(MpegEncContext *s)
|
||||
{
|
||||
int seq, mb_pos, i;
|
||||
|
||||
#if 0
|
||||
GetBitContext gb= s->gb;
|
||||
for(i=0; i<64; i++){
|
||||
av_log(s->avctx, AV_LOG_DEBUG, "%d", get_bits1(&gb));
|
||||
if(i%4==3) av_log(s->avctx, AV_LOG_DEBUG, " ");
|
||||
}
|
||||
av_log(s->avctx, AV_LOG_DEBUG, "\n");
|
||||
#endif
|
||||
#if 0
|
||||
av_log(s->avctx, AV_LOG_DEBUG, "%3dx%03d/%02Xx%02X ", s->width, s->height, s->width/4, s->height/4);
|
||||
for(i=0; i<s->avctx->extradata_size; i++){
|
||||
av_log(s->avctx, AV_LOG_DEBUG, "%02X ", ((uint8_t*)s->avctx->extradata)[i]);
|
||||
if(i%4==3) av_log(s->avctx, AV_LOG_DEBUG, " ");
|
||||
}
|
||||
av_log(s->avctx, AV_LOG_DEBUG, "\n");
|
||||
#endif
|
||||
|
||||
if(s->avctx->sub_id == 0x30202002 || s->avctx->sub_id == 0x30203002){
|
||||
if (get_bits(&s->gb, 3)){
|
||||
av_log(s->avctx, AV_LOG_ERROR, "unknown triplet set\n");
|
||||
|
@ -378,13 +378,6 @@ static int svq1_motion_inter_block (MpegEncContext *s, GetBitContext *bitbuf,
|
||||
if(x + (mv.x >> 1)<0)
|
||||
mv.x= 0;
|
||||
|
||||
#if 0
|
||||
int w= (s->width+15)&~15;
|
||||
int h= (s->height+15)&~15;
|
||||
if(x + (mv.x >> 1)<0 || y + (mv.y >> 1)<0 || x + (mv.x >> 1) + 16 > w || y + (mv.y >> 1) + 16> h)
|
||||
av_log(s->avctx, AV_LOG_INFO, "%d %d %d %d\n", x, y, x + (mv.x >> 1), y + (mv.y >> 1));
|
||||
#endif
|
||||
|
||||
src = &previous[(x + (mv.x >> 1)) + (y + (mv.y >> 1))*pitch];
|
||||
dst = current;
|
||||
|
||||
@ -461,12 +454,6 @@ static int svq1_motion_inter_4v_block (MpegEncContext *s, GetBitContext *bitbuf,
|
||||
if(x + (mvx >> 1)<0)
|
||||
mvx= 0;
|
||||
|
||||
#if 0
|
||||
int w= (s->width+15)&~15;
|
||||
int h= (s->height+15)&~15;
|
||||
if(x + (mvx >> 1)<0 || y + (mvy >> 1)<0 || x + (mvx >> 1) + 8 > w || y + (mvy >> 1) + 8> h)
|
||||
av_log(s->avctx, AV_LOG_INFO, "%d %d %d %d\n", x, y, x + (mvx >> 1), y + (mvy >> 1));
|
||||
#endif
|
||||
src = &previous[(x + (mvx >> 1)) + (y + (mvy >> 1))*pitch];
|
||||
dst = current;
|
||||
|
||||
|
@ -178,15 +178,6 @@ static void wma_lsp_to_curve_init(WMACodecContext *s, int frame_len)
|
||||
s->lsp_pow_m_table2[i] = b - a;
|
||||
b = a;
|
||||
}
|
||||
#if 0
|
||||
for(i=1;i<20;i++) {
|
||||
float v, r1, r2;
|
||||
v = 5.0 / i;
|
||||
r1 = pow_m1_4(s, v);
|
||||
r2 = pow(v,-0.25);
|
||||
printf("%f^-0.25=%f e=%f\n", v, r1, r2 - r1);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -116,16 +116,6 @@ int ff_wmv2_decode_picture_header(MpegEncContext * s)
|
||||
Wmv2Context * const w= (Wmv2Context*)s;
|
||||
int code;
|
||||
|
||||
#if 0
|
||||
{
|
||||
int i;
|
||||
for(i=0; i<s->gb.size*8; i++)
|
||||
printf("%d", get_bits1(&s->gb));
|
||||
// get_bits1(&s->gb);
|
||||
printf("END\n");
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
if(s->picture_number==0)
|
||||
decode_ext_header(w);
|
||||
|
||||
@ -316,10 +306,6 @@ static inline int wmv2_decode_inter_block(Wmv2Context *w, DCTELEM *block, int n,
|
||||
|
||||
if(w->per_block_abt)
|
||||
w->abt_type= decode012(&s->gb);
|
||||
#if 0
|
||||
if(w->per_block_abt)
|
||||
printf("B%d", w->abt_type);
|
||||
#endif
|
||||
w->abt_type_table[n]= w->abt_type;
|
||||
|
||||
if(w->abt_type){
|
||||
|
@ -417,9 +417,6 @@ static int ffm_read_packet(AVFormatContext *s, AVPacket *pkt)
|
||||
if (ffm->header[1] & FLAG_DTS)
|
||||
if (ffm_read_data(s, ffm->header+16, 4, 1) != 4)
|
||||
return -1;
|
||||
#if 0
|
||||
av_hexdump_log(s, AV_LOG_DEBUG, ffm->header, FRAME_HEADER_SIZE);
|
||||
#endif
|
||||
ffm->read_state = READ_DATA;
|
||||
/* fall thru */
|
||||
case READ_DATA:
|
||||
|
@ -662,9 +662,6 @@ static int mpegts_push_data(MpegTSFilter *filter,
|
||||
if (pes->data_index == PES_START_SIZE) {
|
||||
/* we got all the PES or section header. We can now
|
||||
decide */
|
||||
#if 0
|
||||
av_hex_dump_log(pes->stream, AV_LOG_DEBUG, pes->header, pes->data_index);
|
||||
#endif
|
||||
if (pes->header[0] == 0x00 && pes->header[1] == 0x00 &&
|
||||
pes->header[2] == 0x01) {
|
||||
/* it must be an mpeg2 PES stream */
|
||||
|
Loading…
Reference in New Issue
Block a user