[Mp4-tech] Re: [Audio] CCE buffers
Alex Converse
alexc improvsys.com
Wed Apr 16 13:13:47 EDT 2008
Ralph Sperschneider wrote:
> Alex Converse wrote:
>> Dear Experts:
>>
>>
>> I'm having trouble understanding part of the AAC CCE procedures. From
>> 14496-3 section 4.6.8.3.3:
>> ""
>> spectrum_l(idx, domain) Pointer to the spectral data associated
>> with the left channel of the
>> channel_pair_element() with index idx.
>> Depending on the value of
>> "domain", the spectral coefficients before
>> (0) or after (1) TNS decoding are
>> pointed to.
>> ""
>>
>> ""
>> decode_coupling_channel()
>> {
>> - decode spectral coefficients of embedded single_channel_element
>> into buffer "cc_spectrum[]".
>>
>> ...
>>
>> couple_channel( cc_spectrum, spectrum_l(
>> cc_target_tag_select[c], cc_domain ), list_index++ ) );
>>
>>
>> ...
>> }
>>
>> couple_channel( source_spectrum[], dest_spectrum[], gain_list_index ) {
>> ...
>> dest_spectrum[g][b][sfb][i] += cc_gain[idx][g][sfb] *
>> source_spectrum[g][b][sfb][i];
>> ...
>> }
>> ""
>>
>>
>>
>> Now besides obvious the extraneous parenthesis on couple_channel(),
>> the procedure seems to reading the output buffer, modifying it and
>> witting over the input buffer!!! Am I missing something here or did
>> the buffers get swapped in error in the spec?
>>
>> Thanks,
>> Alex Converse
>>
>>
> Dear Alex,
>
> I checked your observations. With regard to the extraneous parenthesis
> you are definitely right. However, wrt. source and destination I think
> the standard is correct:
>
> Here, the destination is derived (in place derivation):
>
> dest_spectrum[g][b][sfb][i] += cc_gain[idx][g][sfb] *
> source_spectrum[g][b][sfb][i];
>
> Thus, the target channel is mixed with the coupling channel, using
> cc_gain as attenuation factor.
>
> Therefore, the relationship:
>
> source_spectrum = cc_spectrum = the spectrum of the coupling channel
> destination_spectrum = spectrum_[rlm] = the spectrum of the output
> channel
>
> seems to me correct.
>
> Best regards,
> Ralph
>
Hi Ralph,
That makes a lot of sense. It initially read to me like the "decode
spectral coefficients of embedded single_channel_element into buffer
'cc_spectrum[]'" was a post condition/description of the code below. But
I guess it's really more of a precondition.
Thanks for the help,
Alex Converse
More information about the Mp4-tech
mailing list