History

avcodec/aacdec: PredictorState array out of SingleChannelElement

sizeof(PredictorState) is different for the floating-point and the fixed-point AAC decoders; this is an obstacle for deduplicating code between these decoders. So don't include this array in SingleChannelElement, instead add a union of pointers to the fixed-point PredictorState and the floating-point PredictorState. The actual arrays are part of the extended ChannelElement to be allocated by ff_aac_sbr_ctx_alloc_init(); it also sets the pointers.

Andreas Rheinhardt committed 2 years ago

Commit fc3c2ea1 parent 8b2261e6 files · +53 −22Browse files

Showing the changes to libavcodec/aacenc.h (1 of 6 files). Show all

Unified · Split

libavcodec/aacenc.h+14−0
@@ -49,6 +49,20 @@ typedef enum AACCoder { · 48 unmodified lines
49 AAC_CODER_NB,49 AAC_CODER_NB,
50}AACCoder;50}AACCoder;
51 51
52/**
53 * Predictor State
54 */
55typedef struct PredictorState {
56 float cor0;
57 float cor1;
58 float var0;
59 float var1;
60 float r0;
61 float r1;
62 float k1;
63 float x_est;
64} PredictorState;
65
52typedef struct AACEncOptions {66typedef struct AACEncOptions {
53 int coder;67 int coder;
54 int pns;68 int pns;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t