comparison snow.c @ 6402:3164768539be libavcodec

Remove commented-out av_log calls.
author diego
date Mon, 25 Feb 2008 22:44:35 +0000
parents a1d0b3a421f6
children 7f615bfc21a2
comparison
equal deleted inserted replaced
6401:345cffb2c613 6402:3164768539be
525 static IDWTELEM * slice_buffer_load_line(slice_buffer * buf, int line) 525 static IDWTELEM * slice_buffer_load_line(slice_buffer * buf, int line)
526 { 526 {
527 int offset; 527 int offset;
528 IDWTELEM * buffer; 528 IDWTELEM * buffer;
529 529
530 // av_log(NULL, AV_LOG_DEBUG, "Cache hit: %d\n", line);
531
532 assert(buf->data_stack_top >= 0); 530 assert(buf->data_stack_top >= 0);
533 // assert(!buf->line[line]); 531 // assert(!buf->line[line]);
534 if (buf->line[line]) 532 if (buf->line[line])
535 return buf->line[line]; 533 return buf->line[line];
536 534
537 offset = buf->line_width * line; 535 offset = buf->line_width * line;
538 buffer = buf->data_stack[buf->data_stack_top]; 536 buffer = buf->data_stack[buf->data_stack_top];
539 buf->data_stack_top--; 537 buf->data_stack_top--;
540 buf->line[line] = buffer; 538 buf->line[line] = buffer;
541
542 // av_log(NULL, AV_LOG_DEBUG, "slice_buffer_load_line: line: %d remaining: %d\n", line, buf->data_stack_top + 1);
543 539
544 return buffer; 540 return buffer;
545 } 541 }
546 542
547 static void slice_buffer_release(slice_buffer * buf, int line) 543 static void slice_buffer_release(slice_buffer * buf, int line)
555 offset = buf->line_width * line; 551 offset = buf->line_width * line;
556 buffer = buf->line[line]; 552 buffer = buf->line[line];
557 buf->data_stack_top++; 553 buf->data_stack_top++;
558 buf->data_stack[buf->data_stack_top] = buffer; 554 buf->data_stack[buf->data_stack_top] = buffer;
559 buf->line[line] = NULL; 555 buf->line[line] = NULL;
560
561 // av_log(NULL, AV_LOG_DEBUG, "slice_buffer_release: line: %d remaining: %d\n", line, buf->data_stack_top + 1);
562 } 556 }
563 557
564 static void slice_buffer_flush(slice_buffer * buf) 558 static void slice_buffer_flush(slice_buffer * buf)
565 { 559 {
566 int i; 560 int i;
567 for (i = 0; i < buf->line_count; i++) 561 for (i = 0; i < buf->line_count; i++)
568 { 562 {
569 if (buf->line[i]) 563 if (buf->line[i])
570 {
571 // av_log(NULL, AV_LOG_DEBUG, "slice_buffer_flush: line: %d \n", i);
572 slice_buffer_release(buf, i); 564 slice_buffer_release(buf, i);
573 }
574 } 565 }
575 } 566 }
576 567
577 static void slice_buffer_destroy(slice_buffer * buf) 568 static void slice_buffer_destroy(slice_buffer * buf)
578 { 569 {
3807 h>>= s->chroma_v_shift; 3798 h>>= s->chroma_v_shift;
3808 } 3799 }
3809 s->plane[plane_index].width = w; 3800 s->plane[plane_index].width = w;
3810 s->plane[plane_index].height= h; 3801 s->plane[plane_index].height= h;
3811 3802
3812 //av_log(NULL, AV_LOG_DEBUG, "%d %d\n", w, h);
3813 for(level=s->spatial_decomposition_count-1; level>=0; level--){ 3803 for(level=s->spatial_decomposition_count-1; level>=0; level--){
3814 for(orientation=level ? 1 : 0; orientation<4; orientation++){ 3804 for(orientation=level ? 1 : 0; orientation<4; orientation++){
3815 SubBand *b= &s->plane[plane_index].band[level][orientation]; 3805 SubBand *b= &s->plane[plane_index].band[level][orientation];
3816 3806
3817 b->buf= s->spatial_dwt_buffer; 3807 b->buf= s->spatial_dwt_buffer;
3925 error += d*d; 3915 error += d*d;
3926 } 3916 }
3927 } 3917 }
3928 3918
3929 b->qlog= (int)(log(352256.0/sqrt(error)) / log(pow(2.0, 1.0/QROOT))+0.5); 3919 b->qlog= (int)(log(352256.0/sqrt(error)) / log(pow(2.0, 1.0/QROOT))+0.5);
3930 // av_log(NULL, AV_LOG_DEBUG, "%d %d %d\n", level, orientation, b->qlog/*, sqrt(error)*/);
3931 } 3920 }
3932 } 3921 }
3933 } 3922 }
3934 3923
3935 #define QUANTIZE2 0 3924 #define QUANTIZE2 0
4431 assert(b->parent==NULL || b->parent->stride == b->stride*2); 4420 assert(b->parent==NULL || b->parent->stride == b->stride*2);
4432 if(orientation==0) 4421 if(orientation==0)
4433 correlate(s, b, b->ibuf, b->stride, 1, 0); 4422 correlate(s, b, b->ibuf, b->stride, 1, 0);
4434 } 4423 }
4435 } 4424 }
4436 // av_log(NULL, AV_LOG_DEBUG, "plane:%d bits:%d\n", plane_index, put_bits_count(&s->c.pb) - bits);
4437 4425
4438 for(level=0; level<s->spatial_decomposition_count; level++){ 4426 for(level=0; level<s->spatial_decomposition_count; level++){
4439 for(orientation=level ? 1 : 0; orientation<4; orientation++){ 4427 for(orientation=level ? 1 : 0; orientation<4; orientation++){
4440 SubBand *b= &p->band[level][orientation]; 4428 SubBand *b= &p->band[level][orientation];
4441 4429