[svn] / branches / dev-api-4 / xvidcore / src / bitstream / mbcoding.c Repository:
ViewVC logotype

Diff of /branches/dev-api-4/xvidcore/src/bitstream/mbcoding.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 17, Sat Mar 9 15:57:02 2002 UTC revision 28, Fri Mar 15 09:20:03 2002 UTC
# Line 100  Line 100 
100                                                          level += max_level_ptr[run];                                                          level += max_level_ptr[run];
101                                                  else                                                  else
102                                                          level -= max_level_ptr[run];                                                          level -= max_level_ptr[run];
103                                                    DEBUG1("1) run:", run);
104                                                  run -= max_run_ptr[abs(level)] + 1;                                                  run -= max_run_ptr[abs(level)] + 1;
105                                                    DEBUG1("2) run:", run);
106    
107                                                  if(abs(level) <= max_level_ptr[run] &&                                                  if(abs(level) <= max_level_ptr[run] &&
108                                                          run <= max_run_ptr[abs(level)]) {                                                          run <= max_run_ptr[abs(level)]) {
# Line 126  Line 127 
127                                                          else                                                          else
128                                                                  run++;                                                                  run++;
129    
130                                                            DEBUG1("3) run:", run);
131    
132                                                          vlc[intra]->code = (uint32_t) ((0x1e + last) << 20) |                                                          vlc[intra]->code = (uint32_t) ((0x1e + last) << 20) |
133                                                                                  (l << 14) | (1 << 13) | ((k & 0xfff) << 1) | 1;                                                                                  (l << 14) | (1 << 13) | ((k & 0xfff) << 1) | 1;
134    
# Line 265  Line 268 
268  {  {
269          uint32_t i, mcbpc, cbpy, bits;          uint32_t i, mcbpc, cbpy, bits;
270    
         mcbpc = pMB->cbp & 3;  
271          cbpy = pMB->cbp >> 2;          cbpy = pMB->cbp >> 2;
272    
273      // write mcbpc      // write mcbpc
274          if(pParam->coding_type == I_VOP)          if(pParam->coding_type == I_VOP) {
275                  BitstreamPutBits(bs, mcbpc_I[mcbpc].code, mcbpc_I[mcbpc].len);              mcbpc = ((pMB->mode >> 1) & 3) | ((pMB->cbp & 3) << 2);
276      else                  BitstreamPutBits(bs, mcbpc_intra_tab[mcbpc].code, mcbpc_intra_tab[mcbpc].len);
277                  BitstreamPutBits(bs, mcbpc_P_intra[mcbpc].code, mcbpc_P_intra[mcbpc].len);          }
278            else {
279                mcbpc = (pMB->mode & 7) | ((pMB->cbp & 3) << 3);
280                    BitstreamPutBits(bs, mcbpc_inter_tab[mcbpc].code, mcbpc_inter_tab[mcbpc].len);
281            }
282    
283          // ac prediction flag          // ac prediction flag
284          if(pMB->acpred_directions[0])          if(pMB->acpred_directions[0])
# Line 316  Line 322 
322          int32_t i;          int32_t i;
323          uint32_t bits, mcbpc, cbpy;          uint32_t bits, mcbpc, cbpy;
324    
325          mcbpc = pMB->cbp & 3;      mcbpc = (pMB->mode & 7) | ((pMB->cbp & 3) << 3);
326          cbpy = 15 - (pMB->cbp >> 2);          cbpy = 15 - (pMB->cbp >> 2);
327    
328          // write mcbpc          // write mcbpc
329      if(pMB->mode == MODE_INTER4V)      BitstreamPutBits(bs, mcbpc_inter_tab[mcbpc].code, mcbpc_inter_tab[mcbpc].len);
                 BitstreamPutBits(bs, mcbpc_P_inter4v[mcbpc].code, mcbpc_P_inter4v[mcbpc].len);  
     else  
                 BitstreamPutBits(bs, mcbpc_P_inter[mcbpc].code, mcbpc_P_inter[mcbpc].len);  
330    
331          // write cbpy          // write cbpy
332          BitstreamPutBits(bs, cbpy_tab[cbpy].code, cbpy_tab[cbpy].len);          BitstreamPutBits(bs, cbpy_tab[cbpy].code, cbpy_tab[cbpy].len);

Legend:
Removed from v.17  
changed lines
  Added in v.28

No admin address has been configured
ViewVC Help
Powered by ViewVC 1.0.4