rework so that rice parameters and raw_bits from the entropy coding method struct are sized dynamically

This commit is contained in:
Josh Coalson
2002-08-17 15:23:43 +00:00
parent cda4c3c7b3
commit b7023aa1b4
3 changed files with 141 additions and 59 deletions

View File

@@ -182,14 +182,19 @@ extern const char * const FLAC__EntropyCodingMethodTypeString[];
typedef struct {
unsigned order;
/**< The partition order, i.e. # of contexts = 2 ^ order. */
/**< The partition order, i.e. # of contexts = 2 ^ \a order. */
unsigned parameters[1 << FLAC__MAX_RICE_PARTITION_ORDER];
unsigned *parameters;
/**< The Rice parameters for each context. */
unsigned raw_bits[1 << FLAC__MAX_RICE_PARTITION_ORDER];
unsigned *raw_bits;
/**< Widths for escape-coded partitions. */
unsigned capacity_by_order;
/**< The capacity of the \a parameters and \a raw_bits arrays
* specified as an order, i.e. the number of array elements
* allocated is 2 ^ \a capacity_by_order.
*/
} FLAC__EntropyCodingMethod_PartitionedRice;
extern const unsigned FLAC__ENTROPY_CODING_METHOD_PARTITIONED_RICE_ORDER_LEN; /**< == 4 (bits) */