comparison dv.c @ 3142:5d305fcbf54e libavcodec

dont lowwer qnos of more blocks then needed
author michael
date Thu, 23 Feb 2006 13:05:37 +0000
parents d6e057513aa8
children ef36cc95e4ab
comparison
equal deleted inserted replaced
3141:25493c849d70 3142:5d305fcbf54e
729 { 729 {
730 int size[5]; 730 int size[5];
731 int i, j, k, a, prev, a2; 731 int i, j, k, a, prev, a2;
732 EncBlockInfo* b; 732 EncBlockInfo* b;
733 733
734 size[4]= 1<<24;
734 do { 735 do {
735 b = blks; 736 b = blks;
736 for (i=0; i<5; i++) { 737 for (i=0; i<5; i++) {
737 if (!qnos[i]) 738 if (!qnos[i])
738 continue; 739 continue;
764 b->prev[a+1]= prev; 765 b->prev[a+1]= prev;
765 } 766 }
766 size[i] += b->bit_size[a]; 767 size[i] += b->bit_size[a];
767 } 768 }
768 } 769 }
770 if(vs_total_ac_bits >= size[0] + size[1] + size[2] + size[3] + size[4])
771 return;
769 } 772 }
770 if(vs_total_ac_bits >= size[0] + size[1] + size[2] + size[3] + size[4])
771 return;
772 } while (qnos[0]|qnos[1]|qnos[2]|qnos[3]|qnos[4]); 773 } while (qnos[0]|qnos[1]|qnos[2]|qnos[3]|qnos[4]);
773 774
774 775
775 for(a=2; a==2 || vs_total_ac_bits < size[0]; a+=a){ 776 for(a=2; a==2 || vs_total_ac_bits < size[0]; a+=a){
776 b = blks; 777 b = blks;