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
4949 AAC_CODER_NB,
5050 }AACCoder;
5151
52+/**
53+ * Predictor State
54+ */
55+typedef 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+
5266 typedef struct AACEncOptions {
5367 int coder;
5468 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