[Ffmpeg-cvslog] CVS: ffmpeg/libavcodec cook.c,1.6,1.7
Benjamin Larsson CVS
banan
Mon Feb 6 12:03:39 CET 2006
Update of /cvsroot/ffmpeg/ffmpeg/libavcodec
In directory mail:/var2/tmp/cvs-serv27155
Modified Files:
cook.c
Log Message:
Small cosmetics and better variable names.
Index: cook.c
===================================================================
RCS file: /cvsroot/ffmpeg/ffmpeg/libavcodec/cook.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- cook.c 12 Jan 2006 22:43:14 -0000 1.6
+++ cook.c 6 Feb 2006 11:03:37 -0000 1.7
@@ -90,8 +90,8 @@
int samples_per_channel;
int samples_per_frame;
int subbands;
- int numvector_bits;
- int numvector_size; //1 << numvector_bits;
+ int log2_numvector_size;
+ int numvector_size; //1 << log2_numvector_size;
int js_subband_start;
int total_subbands;
int num_vectors;
@@ -698,7 +698,7 @@
memset(&category_index, 0, 128*sizeof(int));
decode_envelope(q, quant_index_table);
- q->num_vectors = get_bits(&q->gb,q->numvector_bits);
+ q->num_vectors = get_bits(&q->gb,q->log2_numvector_size);
dequant_envelope(q, quant_index_table, quant_value_table);
categorize(q, quant_index_table, category, category_index);
expand_category(q, category, category_index);
@@ -954,7 +954,6 @@
* @param inbuffer pointer to the inbuffer
* @param sub_packet_size subpacket size
* @param outbuffer pointer to the outbuffer
- * @param pos the subpacket number in the frame
*/
@@ -1119,6 +1118,7 @@
return avctx->block_align;
}
+
#ifdef COOKDEBUG
static void dump_cook_context(COOKContext *q, COOKextradata *e)
{
@@ -1140,11 +1140,12 @@
PRINT("random_state",q->random_state);
PRINT("mlt_size",q->mlt_size);
PRINT("js_subband_start",q->js_subband_start);
- PRINT("numvector_bits",q->numvector_bits);
+ PRINT("log2_numvector_size",q->log2_numvector_size);
PRINT("numvector_size",q->numvector_size);
PRINT("total_subbands",q->total_subbands);
}
#endif
+
/**
* Cook initialization
*
@@ -1191,7 +1192,7 @@
/* Initialize default data states. */
q->js_subband_start = 0;
- q->numvector_bits = 5;
+ q->log2_numvector_size = 5;
q->total_subbands = q->subbands;
/* Initialize version-dependent variables */
@@ -1224,10 +1225,10 @@
q->js_vlc_bits = e->js_vlc_bits;
}
if (q->samples_per_channel > 256) {
- q->numvector_bits++; // q->numvector_bits = 6
+ q->log2_numvector_size = 6
}
if (q->samples_per_channel > 512) {
- q->numvector_bits++; // q->numvector_bits = 7
+ q->log2_numvector_size = 7
}
break;
case MC_COOK:
@@ -1242,7 +1243,7 @@
/* Initialize variable relations */
q->mlt_size = q->samples_per_channel;
- q->numvector_size = (1 << q->numvector_bits);
+ q->numvector_size = (1 << q->log2_numvector_size);
/* Generate tables */
init_rootpow2table(q);
More information about the ffmpeg-cvslog
mailing list