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/aac.h (1 of 6 files). Show all

Unified · Split

libavcodec/aac.h+0−17
@@ -30,9 +30,6 @@ · 29 unmodified lines
3030 #ifndef AVCODEC_AAC_H
3131 #define AVCODEC_AAC_H
3232
33−
34−#include "aac_defines.h"
35−
3633 #define MAX_CHANNELS 64
3734 #define MAX_ELEM_ID 16
3835
@@ -85,20 +82,6 @@ enum ChannelPosition { · 46 unmodified lines
8582 AAC_CHANNEL_CC = 5,
8683 };
8784
88−/**
89− * Predictor State
90− */
91−typedef struct PredictorState {
92− AAC_FLOAT cor0;
93− AAC_FLOAT cor1;
94− AAC_FLOAT var0;
95− AAC_FLOAT var1;
96− AAC_FLOAT r0;
97− AAC_FLOAT r1;
98− AAC_FLOAT k1;
99− AAC_FLOAT x_est;
100−} PredictorState;
101−
10285 #define MAX_PREDICTORS 672
10386
10487 #define SCALE_DIV_512 36 ///< scalefactor difference that corresponds to scale difference in 512 times

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