aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Poliakovski <maximumspatium@googlemail.com>2015-06-07 12:52:06 +0200
committerMichael Niedermayer <michaelni@gmx.at>2015-06-08 11:45:22 +0200
commit4b343f7c359bf402017e0bf56e48654c139e88cd (patch)
tree6fcc07d49aaad56c539c896c033c28e693cf4f06
parentd765e07322a139a6c3c28d9c4c36f820db78986f (diff)
downloadffmpeg-4b343f7c359bf402017e0bf56e48654c139e88cd.tar.gz
atrac3plus: give the phase_shift flag a better name.
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
-rw-r--r--libavcodec/atrac3plus.c2
-rw-r--r--libavcodec/atrac3plus.h2
-rw-r--r--libavcodec/atrac3plusdsp.c12
3 files changed, 8 insertions, 8 deletions
diff --git a/libavcodec/atrac3plus.c b/libavcodec/atrac3plus.c
index 3d75749c0b..b16a13971d 100644
--- a/libavcodec/atrac3plus.c
+++ b/libavcodec/atrac3plus.c
@@ -1724,7 +1724,7 @@ static int decode_tones_info(GetBitContext *gb, Atrac3pChanUnitCtx *ctx,
if (num_channels == 2) {
get_subband_flags(gb, ctx->waves_info->tone_sharing, ctx->waves_info->num_tone_bands);
get_subband_flags(gb, ctx->waves_info->tone_master, ctx->waves_info->num_tone_bands);
- get_subband_flags(gb, ctx->waves_info->phase_shift, ctx->waves_info->num_tone_bands);
+ get_subband_flags(gb, ctx->waves_info->invert_phase, ctx->waves_info->num_tone_bands);
}
ctx->waves_info->tones_index = 0;
diff --git a/libavcodec/atrac3plus.h b/libavcodec/atrac3plus.h
index 1b001fae6d..a33c38a3ee 100644
--- a/libavcodec/atrac3plus.h
+++ b/libavcodec/atrac3plus.h
@@ -122,7 +122,7 @@ typedef struct Atrac3pWaveSynthParams {
int num_tone_bands; ///< number of PQF bands with tones
uint8_t tone_sharing[ATRAC3P_SUBBANDS]; ///< 1 - subband-wise tone sharing flags
uint8_t tone_master[ATRAC3P_SUBBANDS]; ///< 1 - subband-wise tone channel swapping
- uint8_t phase_shift[ATRAC3P_SUBBANDS]; ///< 1 - subband-wise 180° phase shifting
+ uint8_t invert_phase[ATRAC3P_SUBBANDS]; ///< 1 - subband-wise phase inversion
int tones_index; ///< total sum of tones in this unit
Atrac3pWaveParam waves[48];
} Atrac3pWaveSynthParams;
diff --git a/libavcodec/atrac3plusdsp.c b/libavcodec/atrac3plusdsp.c
index 50ac1346a2..17c6437707 100644
--- a/libavcodec/atrac3plusdsp.c
+++ b/libavcodec/atrac3plusdsp.c
@@ -117,7 +117,7 @@ av_cold void ff_atrac3p_init_wave_synth(void)
* @param[in] waves_info parameters for each sine wave
* @param[in] envelope envelope data for all waves in a group
* @param[in] fdsp ptr to floating-point DSP context
- * @param[in] phase_shift flag indicates 180° phase shift
+ * @param[in] invert_phase flag indicating 180° phase shift
* @param[in] reg_offset region offset for trimming envelope data
* @param[out] out receives sythesized data
*/
@@ -125,7 +125,7 @@ static void waves_synth(Atrac3pWaveSynthParams *synth_param,
Atrac3pWavesData *waves_info,
Atrac3pWaveEnvelope *envelope,
AVFloatDSPContext *fdsp,
- int phase_shift, int reg_offset, float *out)
+ int invert_phase, int reg_offset, float *out)
{
int i, wn, inc, pos;
double amp;
@@ -148,8 +148,8 @@ static void waves_synth(Atrac3pWaveSynthParams *synth_param,
}
}
- /* 180° phase shift if requested */
- if (phase_shift)
+ /* invert phase if requested */
+ if (invert_phase)
fdsp->vector_fmul_scalar(out, out, -1.0f, 128);
/* fade in with steep Hann window if requested */
@@ -222,12 +222,12 @@ void ff_atrac3p_generate_tones(Atrac3pChanUnitCtx *ch_unit, AVFloatDSPContext *f
/* synthesize waves for both overlapping regions */
if (tones_now->num_wavs && reg1_env_nonzero)
waves_synth(ch_unit->waves_info_prev, tones_now, &tones_now->curr_env,
- fdsp, ch_unit->waves_info_prev->phase_shift[sb] & ch_num,
+ fdsp, ch_unit->waves_info_prev->invert_phase[sb] & ch_num,
128, wavreg1);
if (tones_next->num_wavs && reg2_env_nonzero)
waves_synth(ch_unit->waves_info, tones_next, &tones_next->curr_env, fdsp,
- ch_unit->waves_info->phase_shift[sb] & ch_num, 0, wavreg2);
+ ch_unit->waves_info->invert_phase[sb] & ch_num, 0, wavreg2);
/* Hann windowing for non-faded wave signals */
if (tones_now->num_wavs && tones_next->num_wavs &&