[FFmpeg-devel] [PATCH v4 1/2] libavcodec/flacdec: Implement decoding of 32 bit-per-sample PCM

Andreas Rheinhardt andreas.rheinhardt at outlook.com
Wed Sep 14 20:10:59 EEST 2022


Martijn van Beurden:
> Op wo 14 sep. 2022 om 15:03 schreef Andreas Rheinhardt <
> andreas.rheinhardt at outlook.com>:
> 
>>> --- a/libavcodec/flacdec.c
>>> +++ b/libavcodec/flacdec.c
>>> @@ -64,6 +64,9 @@ typedef struct FLACContext {
>>>      int32_t *decoded[FLAC_MAX_CHANNELS];    ///< decoded samples
>>>      uint8_t *decoded_buffer;
>>>      unsigned int decoded_buffer_size;
>>> +    int64_t *decoded_33bps;                  ///< decoded samples for a
>> 33 bps subframe
>>> +    uint8_t *decoded_buffer_33bps;
>>
>> Why do you need a new buffer here instead of just reusing decoded_buffer?
>>
>>
> I don't follow, do you mean I could have decoded_33bps use decoded_buffer
> too? Wouldn't that kind of aliasing lead to problems?
> 

I was actually asking you whether it could lead to any problems. Or in
other words, whether decoded_buffer and decoded_buffer_33bps are used at
the same time, because it appeared to me that they are not. Now that I
have taken a second look I know the answer to be "no" because of
decorrelate_33bps().

- Andreas


More information about the ffmpeg-devel mailing list