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
30#ifndef AVCODEC_AAC_H30#ifndef AVCODEC_AAC_H
31#define AVCODEC_AAC_H31#define AVCODEC_AAC_H
32 32
33
34#include "aac_defines.h"
35
36#define MAX_CHANNELS 6433#define MAX_CHANNELS 64
37#define MAX_ELEM_ID 1634#define MAX_ELEM_ID 16
38 35
@@ -85,20 +82,6 @@ enum ChannelPosition { · 46 unmodified lines
85 AAC_CHANNEL_CC = 5,82 AAC_CHANNEL_CC = 5,
86};83};
87 84
88/**
89 * Predictor State
90 */
91typedef 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
102#define MAX_PREDICTORS 67285#define MAX_PREDICTORS 672
103 86
104#define SCALE_DIV_512 36 ///< scalefactor difference that corresponds to scale difference in 512 times87#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