mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-01-08 13:22:53 +02:00
Deobfuscade decodeTonalComponents calling logic.
Originally committed as revision 8757 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
1e8391777d
commit
b8c4a51598
@ -409,22 +409,19 @@ static int decodeSpectrum (GetBitContext *gb, float *pOut)
|
|||||||
* Restore the quantized tonal components
|
* Restore the quantized tonal components
|
||||||
*
|
*
|
||||||
* @param gb the GetBit context
|
* @param gb the GetBit context
|
||||||
* @param numComponents tonal components to report back
|
|
||||||
* @param pComponent tone component
|
* @param pComponent tone component
|
||||||
* @param numBands amount of coded bands
|
* @param numBands amount of coded bands
|
||||||
*/
|
*/
|
||||||
|
|
||||||
static int decodeTonalComponents (GetBitContext *gb, int *numComponents, tonal_component *pComponent, int numBands)
|
static int decodeTonalComponents (GetBitContext *gb, tonal_component *pComponent, int numBands)
|
||||||
{
|
{
|
||||||
int i,j,k,cnt;
|
int i,j,k,cnt;
|
||||||
int component_count, components, coding_mode_selector, coding_mode, coded_values_per_component;
|
int components, coding_mode_selector, coding_mode, coded_values_per_component;
|
||||||
int sfIndx, coded_values, max_coded_values, quant_step_index, coded_components;
|
int sfIndx, coded_values, max_coded_values, quant_step_index, coded_components;
|
||||||
int band_flags[4], mantissa[8];
|
int band_flags[4], mantissa[8];
|
||||||
float *pCoef;
|
float *pCoef;
|
||||||
float scalefactor;
|
float scalefactor;
|
||||||
|
int component_count = 0;
|
||||||
component_count = 0;
|
|
||||||
*numComponents = 0;
|
|
||||||
|
|
||||||
components = get_bits(gb,5);
|
components = get_bits(gb,5);
|
||||||
|
|
||||||
@ -480,9 +477,7 @@ static int decodeTonalComponents (GetBitContext *gb, int *numComponents, tonal_c
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
*numComponents = component_count;
|
return component_count;
|
||||||
|
|
||||||
return 0;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -739,8 +734,8 @@ static int decodeChannelSoundUnit (ATRAC3Context *q, GetBitContext *gb, channel_
|
|||||||
result = decodeGainControl (gb, &(pSnd->gainBlock[pSnd->gcBlkSwitch]), pSnd->bandsCoded);
|
result = decodeGainControl (gb, &(pSnd->gainBlock[pSnd->gcBlkSwitch]), pSnd->bandsCoded);
|
||||||
if (result) return result;
|
if (result) return result;
|
||||||
|
|
||||||
result = decodeTonalComponents (gb, &pSnd->numComponents, pSnd->components, pSnd->bandsCoded);
|
pSnd->numComponents = decodeTonalComponents (gb, pSnd->components, pSnd->bandsCoded);
|
||||||
if (result) return result;
|
if (pSnd->numComponents == -1) return -1;
|
||||||
|
|
||||||
numSubbands = decodeSpectrum (gb, pSnd->spectrum);
|
numSubbands = decodeSpectrum (gb, pSnd->spectrum);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user