mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2026-03-13 09:00:40 +08:00
avcodec/snow: Reduce sizeof(SnowContext)
Each SubBand currently contains an array of 519 uint8_t[32], yet most of these are unused: For both the decoder and the encoder, at most 34 contexts are actually used: The only variable index is context+2, where context is the result of av_log2() and therefore in the 0..31 range. There are also several accesses using compile-time indices, the highest of which is 30. FATE passes with 31 contexts and maybe these are enough, but I don't know. Reducing the number to 34 reduces sizeof(SnowContext) from 2141664B to 155104B here (on x64). Signed-off-by: Andreas Rheinhardt <andreas.rheinhardt@outlook.com>
This commit is contained in:
@@ -92,7 +92,7 @@ typedef struct SubBand{
|
||||
int stride_line; ///< Stride measured in lines, not pixels.
|
||||
x_and_coeff * x_coeff;
|
||||
struct SubBand *parent;
|
||||
uint8_t state[/*7*2*/ 7 + 512][32];
|
||||
uint8_t state[34][32];
|
||||
}SubBand;
|
||||
|
||||
typedef struct Plane{
|
||||
|
||||
Reference in New Issue
Block a user