[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.3, Sat Mar 9 21:40:36 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[64];
337                                                  // TODO                                                  bs_get_matrix(bs, matrix);
338                                                  return -1;                                                  set_intra_matrix(matrix);
339                                          }                                          }
340                                            else
341                                                    set_intra_matrix(get_default_intra_matrix());
342    
343                                          if (BitstreamGetBit(bs))                // load_inter_quant_mat                                          if (BitstreamGetBit(bs))                // load_inter_quant_mat
344                                          {                                          {
345                                                  DEBUG("TODO: load_inter_quant_mat");                                                  uint8_t matrix[64];
346                                                  // TODO                                                  bs_get_matrix(bs, matrix);
347                                                  return -1;                                                  set_inter_matrix(matrix);
348                                          }                                          }
349                                            else
350                                                    set_inter_matrix(get_default_inter_matrix());
351    
352                                          if (dec->shape == VIDOBJLAY_SHAPE_GRAYSCALE)                                          if (dec->shape == VIDOBJLAY_SHAPE_GRAYSCALE)
353                                          {                                          {
# Line 331  Line 355 
355                                                  DEBUG("TODO: grayscale matrix stuff");                                                  DEBUG("TODO: grayscale matrix stuff");
356                                                  return -1;                                                  return -1;
357                                          }                                          }
358    
359                                  }                                  }
360    
361    
# Line 609  Line 634 
634    
635          // quant_type   0=h.263  1=mpeg4(quantizer tables)          // quant_type   0=h.263  1=mpeg4(quantizer tables)
636          BitstreamPutBit(bs, quant_type);          BitstreamPutBit(bs, quant_type);
637  /*  
638          if (quant_type)          if (quant_type)
639          {          {
640                  BitstreamPutBit(bs, qmatrix->custom_intra);             // load_intra_quant_mat                  BitstreamPutBit(bs, get_intra_matrix_status()); // load_intra_quant_mat
641                  if (qmatrix->custom_intra)                  if (get_intra_matrix_status())
642                  {                  {
643                          bs_put_matrix(bs, qmatrix->intra);                          bs_put_matrix(bs, get_intra_matrix());
644                  }                  }
645    
646                  BitstreamPutBit(bs, qmatrix->custom_inter);             // load_inter_quant_mat                  BitstreamPutBit(bs, get_inter_matrix_status());         // load_inter_quant_mat
647                  if (qmatrix->custom_inter)                  if (get_inter_matrix_status())
648                  {                  {
649                          bs_put_matrix(bs, qmatrix->inter);                          bs_put_matrix(bs, get_inter_matrix());
650                  }                  }
651    
652          }          }
 */  
         if (quant_type)  
         {  
                 BitstreamPutBit(bs, 0);         // load_intra_quant_mat  
                 BitstreamPutBit(bs, 0);         // load_inter_quant_mat  
         }  
653    
654          BitstreamPutBit(bs, 1);         // complexity_estimation_disable          BitstreamPutBit(bs, 1);         // complexity_estimation_disable
655          BitstreamPutBit(bs, 1);         // resync_marker_disable          BitstreamPutBit(bs, 1);         // resync_marker_disable

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

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