[cvs] / xvidcore / src / bitstream / bitstream.h Repository:
ViewVC logotype

Diff of /xvidcore/src/bitstream/bitstream.h

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

revision 1.23, Fri Apr 14 07:24:47 2006 UTC revision 1.25, Sat Dec 18 16:02:00 2010 UTC
# Line 137  Line 137 
137    
138  void BitstreamWriteVolHeader(Bitstream * const bs,  void BitstreamWriteVolHeader(Bitstream * const bs,
139                                                           const MBParam * pParam,                                                           const MBParam * pParam,
140                                                           const FRAMEINFO * const frame);                                                           const FRAMEINFO * const frame,
141                                                             const int num_slices);
142    
143  void BitstreamWriteVopHeader(Bitstream * const bs,  void BitstreamWriteVopHeader(Bitstream * const bs,
144                                                           const MBParam * pParam,                                                           const MBParam * pParam,
# Line 162  Line 163 
163                                 const FRAMEINFO * const frame,                                 const FRAMEINFO * const frame,
164                                 int mbnum);                                 int mbnum);
165    
166    /*****************************************************************************
167     * Bitstream
168     ****************************************************************************/
169    
170    /* Input buffer should be readable as full chunks of 8bytes, including
171    the end of the buffer. Padding might be appropriate. If only chunks
172    of 4bytes are applicable, define XVID_SAFE_BS_TAIL. Note that this will
173    slow decoding, so consider this as a last-resort solution */
174    /* #define XVID_SAFE_BS_TAIL */
175    
176  /* initialise bitstream structure */  /* initialise bitstream structure */
177    
178  static void __inline  static void __inline
# Line 263  Line 274 
274                  uint32_t tmp;                  uint32_t tmp;
275    
276                  bs->bufa = bs->bufb;                  bs->bufa = bs->bufb;
277    #if defined(XVID_SAFE_BS_TAIL)
278                    if (bs->tail<(bs->start+((bs->length+3)>>2)))
279    #endif
280                    {
281                  tmp = *((uint32_t *) bs->tail + 2);                  tmp = *((uint32_t *) bs->tail + 2);
282  #ifndef ARCH_IS_BIG_ENDIAN  #ifndef ARCH_IS_BIG_ENDIAN
283                  BSWAP(tmp);                  BSWAP(tmp);
284  #endif  #endif
285                  bs->bufb = tmp;                  bs->bufb = tmp;
286                  bs->tail++;                  bs->tail++;
287                    }
288    #if defined(XVID_SAFE_BS_TAIL)
289                    else {
290                            bs->bufb = 0;
291                    }
292    #endif
293                  bs->pos -= 32;                  bs->pos -= 32;
294          }          }
295  }  }

Legend:
Removed from v.1.23  
changed lines
  Added in v.1.25

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