Hi All,<div><br></div><div>I'm now upgrading our application to use the latest ffmpeg version.</div><div><br></div><div>In old version the AAC decoder supports <font color="#ff0000">packed </font>sample but the latest AAC decoder only supports <font color="#ff0000">planar</font> sample format.</div>
<div><br></div><div>Our application uses avcodec_decode_audio3(AVCodecContext *avctx, int16_t *samples, int *frame_size_ptr, AVPacket *avpkt)</div><div>to decode a frame.</div><div><br></div><div>While the sample data is stored in a simple array. I want to know how the data will be laid out in this array.</div>
<div><br></div><div>Let's assume audio has 2 channels: A and B.</div><div><br></div><div>1. will the output sample array be laid out like A1B1A2B2A3B3... if we use avcodec_decode_audio3 with old version AAC decoder</div>
<div>2. will the output sample array be laid out like A1A2A3....B1B2B3... if use avcodec_decode_audio3  with latest AAC decoder</div><div><br></div><div>and I also want to know what's the result if I use avcodec_decode_audio4 to decode a frame, because <span style="background-color:rgb(255,255,255)"><font color="#ff0000">unlike the decode_audio3</font></span>, </div>
<div>the decoded samples are stored in an two-dimensional array uint8_t *AVFrame::data[AV_NUM_DATA_POINTERS];</div><div><br></div><div>3. will the output sample array be laid out like</div><div>data[0] : A1B1A2B2A3B3....</div>
<div>data[1] : 0</div><div>data[2] : 0</div><div> if we use avcodec_decode_audio4 with old version AAC decoder</div><div><br></div><div>4. will the output sample array be laid out like</div><div>data[0] : A1A2A3...</div><div>
data[1] : B1B2B3</div><div>data[2] : 0</div><div> if we use avcodec_decode_audio4 with latest version AAC decoder?</div><div><br></div><div>I don't have code at hand now so I can't run application myself to check the result.</div>
<div><br></div><div>Another thing is about libavresample and libswresample. I know this two libraries provide interfaces to convert data format.</div><div>But if what I want is just array re-layout (as AAC decoder upgraded from packed sample format to planar format). May I just</div>
<div>do that by array manipulation, without using these two libraries?</div><div><br></div><div>Great thanks!</div><div><br></div><div><br></div><div><br></div>