comparison mpeg12.c @ 2615:0d88e3f89379 libavcodec

avoid UPDATE_CACHE() in GET_RL_VLC() if not needed
author michael
date Mon, 18 Apr 2005 20:07:48 +0000
parents 65874d96c2da
children 616d8c4fde6d
comparison
equal deleted inserted replaced
2614:5e24800ab329 2615:0d88e3f89379
1505 { 1505 {
1506 OPEN_READER(re, &s->gb); 1506 OPEN_READER(re, &s->gb);
1507 /* now quantify & encode AC coefs */ 1507 /* now quantify & encode AC coefs */
1508 for(;;) { 1508 for(;;) {
1509 UPDATE_CACHE(re, &s->gb); 1509 UPDATE_CACHE(re, &s->gb);
1510 GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2); 1510 GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0);
1511 1511
1512 if(level == 127){ 1512 if(level == 127){
1513 break; 1513 break;
1514 } else if(level != 0) { 1514 } else if(level != 0) {
1515 i += run; 1515 i += run;
1581 } 1581 }
1582 1582
1583 /* now quantify & encode AC coefs */ 1583 /* now quantify & encode AC coefs */
1584 for(;;) { 1584 for(;;) {
1585 UPDATE_CACHE(re, &s->gb); 1585 UPDATE_CACHE(re, &s->gb);
1586 GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2); 1586 GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0);
1587 1587
1588 if(level == 127){ 1588 if(level == 127){
1589 break; 1589 break;
1590 } else if(level != 0) { 1590 } else if(level != 0) {
1591 i += run; 1591 i += run;
1654 } 1654 }
1655 1655
1656 /* now quantify & encode AC coefs */ 1656 /* now quantify & encode AC coefs */
1657 for(;;) { 1657 for(;;) {
1658 UPDATE_CACHE(re, &s->gb); 1658 UPDATE_CACHE(re, &s->gb);
1659 GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2); 1659 GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0);
1660 1660
1661 if(level == 127){ 1661 if(level == 127){
1662 break; 1662 break;
1663 } else if(level != 0) { 1663 } else if(level != 0) {
1664 i += run; 1664 i += run;
1735 } 1735 }
1736 1736
1737 /* now quantify & encode AC coefs */ 1737 /* now quantify & encode AC coefs */
1738 for(;;) { 1738 for(;;) {
1739 UPDATE_CACHE(re, &s->gb); 1739 UPDATE_CACHE(re, &s->gb);
1740 GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2); 1740 GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0);
1741 1741
1742 if(level == 127){ 1742 if(level == 127){
1743 break; 1743 break;
1744 } else if(level != 0) { 1744 } else if(level != 0) {
1745 i += run; 1745 i += run;
1803 } 1803 }
1804 1804
1805 /* now quantify & encode AC coefs */ 1805 /* now quantify & encode AC coefs */
1806 for(;;) { 1806 for(;;) {
1807 UPDATE_CACHE(re, &s->gb); 1807 UPDATE_CACHE(re, &s->gb);
1808 GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2); 1808 GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0);
1809 1809
1810 if(level == 127){ 1810 if(level == 127){
1811 break; 1811 break;
1812 } else if(level != 0) { 1812 } else if(level != 0) {
1813 i += run; 1813 i += run;
1877 { 1877 {
1878 OPEN_READER(re, &s->gb); 1878 OPEN_READER(re, &s->gb);
1879 /* now quantify & encode AC coefs */ 1879 /* now quantify & encode AC coefs */
1880 for(;;) { 1880 for(;;) {
1881 UPDATE_CACHE(re, &s->gb); 1881 UPDATE_CACHE(re, &s->gb);
1882 GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2); 1882 GET_RL_VLC(level, run, re, &s->gb, rl->rl_vlc[0], TEX_VLC_BITS, 2, 0);
1883 1883
1884 if(level == 127){ 1884 if(level == 127){
1885 break; 1885 break;
1886 } else if(level != 0) { 1886 } else if(level != 0) {
1887 i += run; 1887 i += run;