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

Diff of /xvidcore/src/bitstream/bitstream.c

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

revision 1.1, Fri Mar 8 02:44:34 2002 UTC revision 1.2, Fri Mar 8 19:17:24 2002 UTC
# Line 52  Line 52 
52    
53  #include "bitstream.h"  #include "bitstream.h"
54  #include "zigzag.h"  #include "zigzag.h"
55    #include "../quant/quant_matrix.h"
56    
57  static int __inline log2bin(int value)  static int __inline log2bin(int value)
58  {  {
# Line 79  Line 79 
79  };  };
80    
81    
82    void bs_get_matrix(Bitstream * bs, uint8_t * matrix)
83    {
84            int i = 0;
85        int last, value = 0;
86    
87        do
88            {
89                    last = value;
90            value = BitstreamGetBits(bs, 8);
91            matrix[ scan_tables[0][i++] ]  = value;
92        }
93        while (value != 0 && i < 64);
94    
95            while (i < 64)
96            {
97                    matrix[ scan_tables[0][i++] ]  = last;
98            }
99    }
100    
101  /*  /*
102  decode headers  decode headers
103  returns coding_type, or -1 if error  returns coding_type, or -1 if error
# Line 314  Line 333 
333                                  {                                  {
334                                          if (BitstreamGetBit(bs))                // load_intra_quant_mat                                          if (BitstreamGetBit(bs))                // load_intra_quant_mat
335                                          {                                          {
336                                                  DEBUG("TODO: load_intra_quant_mat");                                                  uint8_t *matrix;
337                                                  // TODO                                                  bs_get_matrix(bs, matrix);
338                                                  return -1;                                                  set_intra_matrix(matrix);
339                                          }                                          }
340    
341                                          if (BitstreamGetBit(bs))                // load_inter_quant_mat                                          if (BitstreamGetBit(bs))                // load_inter_quant_mat
342                                          {                                          {
343                                                  DEBUG("TODO: load_inter_quant_mat");                                                  uint8_t *matrix;
344                                                  // TODO                                                  bs_get_matrix(bs, matrix);
345                                                  return -1;                                                  set_inter_matrix(matrix);
346                                          }                                          }
347    
348                                          if (dec->shape == VIDOBJLAY_SHAPE_GRAYSCALE)                                          if (dec->shape == VIDOBJLAY_SHAPE_GRAYSCALE)
# Line 331  Line 351 
351                                                  DEBUG("TODO: grayscale matrix stuff");                                                  DEBUG("TODO: grayscale matrix stuff");
352                                                  return -1;                                                  return -1;
353                                          }                                          }
354    
355                                  }                                  }
356    
357    
# Line 609  Line 630 
630    
631          // quant_type   0=h.263  1=mpeg4(quantizer tables)          // quant_type   0=h.263  1=mpeg4(quantizer tables)
632          BitstreamPutBit(bs, quant_type);          BitstreamPutBit(bs, quant_type);
633  /*  
634          if (quant_type)          if (quant_type)
635          {          {
636                  BitstreamPutBit(bs, qmatrix->custom_intra);             // load_intra_quant_mat                  BitstreamPutBit(bs, get_intra_matrix_status()); // load_intra_quant_mat
637                  if (qmatrix->custom_intra)                  if (get_intra_matrix_status())
638                  {                  {
639                          bs_put_matrix(bs, qmatrix->intra);                          bs_put_matrix(bs, get_intra_matrix());
640                  }                  }
641    
642                  BitstreamPutBit(bs, qmatrix->custom_inter);             // load_inter_quant_mat                  BitstreamPutBit(bs, get_inter_matrix_status());         // load_inter_quant_mat
643                  if (qmatrix->custom_inter)                  if (get_inter_matrix_status())
644                  {                  {
645                          bs_put_matrix(bs, qmatrix->inter);                          bs_put_matrix(bs, get_inter_matrix());
646                  }                  }
647    
648          }          }
 */  
         if (quant_type)  
         {  
                 BitstreamPutBit(bs, 0);         // load_intra_quant_mat  
                 BitstreamPutBit(bs, 0);         // load_inter_quant_mat  
         }  
649    
650          BitstreamPutBit(bs, 1);         // complexity_estimation_disable          BitstreamPutBit(bs, 1);         // complexity_estimation_disable
651          BitstreamPutBit(bs, 1);         // resync_marker_disable          BitstreamPutBit(bs, 1);         // resync_marker_disable

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

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