<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: AAC SBR Problem in Intel® Integrated Performance Primitives</title>
    <link>https://community.intel.com/t5/Intel-Integrated-Performance/AAC-SBR-Problem/m-p/906487#M13561</link>
    <description>&lt;DIV&gt;&lt;/DIV&gt;
Actually I found strange behavior: SBR decoder doesn't upsample. I encode 44100 with SBR ADTS stream and get 22050 samplerate after encoding. I guess SBR decoder should upsample back to 44100. Do I need special initialization for this ?&lt;BR /&gt;</description>
    <pubDate>Tue, 22 Sep 2009 01:25:05 GMT</pubDate>
    <dc:creator>ksubox</dc:creator>
    <dc:date>2009-09-22T01:25:05Z</dc:date>
    <item>
      <title>AAC SBR Problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/AAC-SBR-Problem/m-p/906485#M13559</link>
      <description>Hi,&lt;BR /&gt;I tried to test AAC SBR encoding in IPP, but finally got failed.&lt;BR /&gt;Here is what I did:&lt;BR /&gt;1. I have raw input audio file with 44100kHz/stereo samples.&lt;BR /&gt;2. I encode &amp;amp; decode this file and put decoded audiosamples in other file&lt;BR /&gt;3. If I don't specify SBR everything is OK. If I specify I get strange artifacts. I checked with VLC encoded ADTS stream - also bad results.&lt;BR /&gt;4. What's wrong with this source code and how to make it works ???:&lt;BR /&gt;&lt;BR /&gt;#include "stdafx.h"&lt;BR /&gt;&lt;BR /&gt;#include "umc_aac_encoder_params.h"&lt;BR /&gt;#include "umc_audio_codec.h"&lt;BR /&gt;&lt;BR /&gt;#include "umc_aac_encoder.h"&lt;BR /&gt;#include "umc_aac_decoder.h"&lt;BR /&gt;#include "umc_aac_decoder_params.h"&lt;BR /&gt;&lt;BR /&gt;using namespace UMC;&lt;BR /&gt;&lt;BR /&gt;class MyMediaData : public UMC::MediaData {&lt;BR /&gt; DYNAMIC_CAST_DECL_BASE(MyMediaData)&lt;BR /&gt;public:&lt;BR /&gt; MyMediaData(size_t length = 0):MediaData(length) {}&lt;BR /&gt;&lt;BR /&gt; void	Pack() {&lt;BR /&gt; if (m_pBufferPointer != NULL &amp;amp;&amp;amp; m_nBufferSize &amp;gt; 0 &amp;amp;&amp;amp; m_pDataPointer &amp;gt; m_pBufferPointer) {&lt;BR /&gt; if (m_nDataSize &amp;gt; 0) {&lt;BR /&gt; ippsCopy_8u(m_pDataPointer, m_pBufferPointer, m_nDataSize);&lt;BR /&gt; }&lt;BR /&gt; m_pDataPointer = m_pBufferPointer;&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; UMC::Status	AddData(Ipp8u *ptr, size_t size) {&lt;BR /&gt; if (!m_pBufferPointer)&lt;BR /&gt; return UMC::UMC_ERR_NULL_PTR;&lt;BR /&gt;&lt;BR /&gt; if (size &amp;gt; (m_nBufferSize - (m_pDataPointer - m_pBufferPointer) - m_nDataSize))&lt;BR /&gt; return UMC::UMC_ERR_FAILED;&lt;BR /&gt;&lt;BR /&gt; ippsCopy_8u(ptr, m_pDataPointer, size);&lt;BR /&gt; m_nDataSize += size;&lt;BR /&gt; return UMC::UMC_OK;&lt;BR /&gt; }&lt;BR /&gt;};&lt;BR /&gt;&lt;BR /&gt;short int readbuf[16384], compbuf[4096], writebuf[16384];&lt;BR /&gt;&lt;BR /&gt;int&lt;BR /&gt;main(int argc, char* argv[]) {&lt;BR /&gt; if (argc &amp;lt; 3)&lt;BR /&gt; return 0;&lt;BR /&gt;&lt;BR /&gt; Status istat;&lt;BR /&gt; {&lt;BR /&gt; UMC::AACEncoder *encoder = new UMC::AACEncoder();&lt;BR /&gt; UMC::AACEncoderParams iparams;&lt;BR /&gt; iparams.m_info_in.sample_frequency = 44100;&lt;BR /&gt; iparams.m_info_in.channels = 2;&lt;BR /&gt; iparams.m_info_out.bitrate = 24000;&lt;BR /&gt; iparams.audioObjectType = AOT_AAC_LC;&lt;BR /&gt; //iparams.auxAudioObjectType = AOT_UNDEF; // works fine&lt;BR /&gt; iparams.auxAudioObjectType = AOT_SBR; // DOESN'T WORK :(&lt;BR /&gt; iparams.stereo_mode = UMC_AAC_JOINT_STEREO;&lt;BR /&gt; iparams.ns_mode = 1;&lt;BR /&gt; iparams.outputFormat = UMC_AAC_ADTS;&lt;BR /&gt; iparams.m_info_out.sample_frequency = 44100; // not important&lt;BR /&gt; istat = encoder-&amp;gt;Init(&amp;amp;iparams);&lt;BR /&gt;&lt;BR /&gt; UMC::AACDecoder *decoder = new UMC::AACDecoder();&lt;BR /&gt; //UMC::AudioCodecParams oparams;&lt;BR /&gt; UMC::AACDecoderParams oparams;&lt;BR /&gt; oparams.m_info_in.stream_type = UNDEF_AUDIO;&lt;BR /&gt; oparams.m_pData = NULL;&lt;BR /&gt; oparams.ModeDecodeHEAACprofile = HEAAC_LP_MODE; // try to specify - not important&lt;BR /&gt; oparams.ModeDwnsmplHEAACprofile = HEAAC_DWNSMPL_ON; //try to specify - not important&lt;BR /&gt; oparams.flag_SBR_support_lev = SBR_ENABLE; // try to specify - not important&lt;BR /&gt; Status istat = decoder-&amp;gt;Init(&amp;amp;oparams);&lt;BR /&gt;&lt;BR /&gt; MyMediaData *indata = new MyMediaData();&lt;BR /&gt; MyMediaData *compdata = new MyMediaData(4096);&lt;BR /&gt; MyMediaData *outdata = new MyMediaData();&lt;BR /&gt;&lt;BR /&gt; UMC::BaseCodecParams audio_codec_params;&lt;BR /&gt; encoder-&amp;gt;GetInfo(&amp;amp;audio_codec_params);&lt;BR /&gt; Ipp32s needSize = audio_codec_params.m_SuggestedInputSize;&lt;BR /&gt;&lt;BR /&gt; FILE *fin = NULL, *fout = NULL, *fcomp = NULL;&lt;BR /&gt; fin = fopen(argv[1],"r+b");&lt;BR /&gt; fout = fopen(argv[2],"w+b");&lt;BR /&gt; fcomp = fopen("d:\\_comp.aac","w+b");&lt;BR /&gt; if (fin != NULL &amp;amp;&amp;amp; fout != NULL) {&lt;BR /&gt; do {&lt;BR /&gt; int got = fread(readbuf,1,needSize,fin);&lt;BR /&gt; if (got != needSize)&lt;BR /&gt; break;&lt;BR /&gt; indata-&amp;gt;SetBufferPointer((Ipp8u*)readbuf,sizeof(readbuf));&lt;BR /&gt; indata-&amp;gt;SetDataSize(got);&lt;BR /&gt; compdata-&amp;gt;SetBufferPointer((Ipp8u*)compbuf,sizeof(compbuf));&lt;BR /&gt; istat = encoder-&amp;gt;GetFrame(indata,compdata);&lt;BR /&gt; if (istat == UMC_OK) {&lt;BR /&gt; fwrite(compdata-&amp;gt;GetDataPointer(),1,compdata-&amp;gt;GetDataSize(),fcomp);&lt;BR /&gt; outdata-&amp;gt;SetBufferPointer((Ipp8u*)writebuf,sizeof(writebuf));&lt;BR /&gt; istat = decoder-&amp;gt;GetFrame(compdata,outdata);&lt;BR /&gt; if (istat == UMC_OK) {&lt;BR /&gt; UMC::BaseCodecParams audio_codec_params1;&lt;BR /&gt; decoder-&amp;gt;GetInfo(&amp;amp;audio_codec_params1);&lt;BR /&gt; int written = fwrite(outdata-&amp;gt;GetDataPointer(),1,outdata-&amp;gt;GetDataSize(),fout);&lt;BR /&gt; if (written &amp;lt;= 0 || written != outdata-&amp;gt;GetDataSize())&lt;BR /&gt; break;&lt;BR /&gt; }&lt;BR /&gt; }&lt;BR /&gt; } while (true);&lt;BR /&gt; }&lt;BR /&gt; if (fin)&lt;BR /&gt; fclose(fin);&lt;BR /&gt; if (fout)&lt;BR /&gt; fclose(fout);&lt;BR /&gt; if (fcomp)&lt;BR /&gt; fclose(fcomp);&lt;BR /&gt;&lt;BR /&gt; delete indata;&lt;BR /&gt; delete compdata;&lt;BR /&gt; delete outdata;&lt;BR /&gt;&lt;BR /&gt; delete encoder;&lt;BR /&gt; delete decoder;&lt;BR /&gt; }&lt;BR /&gt; return 0;&lt;BR /&gt;}&lt;BR /&gt;&lt;BR /&gt;</description>
      <pubDate>Thu, 30 Jul 2009 08:38:10 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/AAC-SBR-Problem/m-p/906485#M13559</guid>
      <dc:creator>ksubox</dc:creator>
      <dc:date>2009-07-30T08:38:10Z</dc:date>
    </item>
    <item>
      <title>Re: AAC SBR Problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/AAC-SBR-Problem/m-p/906486#M13560</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;BR /&gt;You can try audio_codec_con application in the UMC sample code? If the result are the same as yours, it is possiblly because UMC AAC SBR encoder not as good as AAC LC and MP3 encoders. If the result are different, could you also provided the bistream? so we can have further check on the problem. &lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Chao &lt;BR /&gt;&lt;/DIV&gt;
&lt;BR /&gt;</description>
      <pubDate>Mon, 03 Aug 2009 07:14:26 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/AAC-SBR-Problem/m-p/906486#M13560</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2009-08-03T07:14:26Z</dc:date>
    </item>
    <item>
      <title>Re: AAC SBR Problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/AAC-SBR-Problem/m-p/906487#M13561</link>
      <description>&lt;DIV&gt;&lt;/DIV&gt;
Actually I found strange behavior: SBR decoder doesn't upsample. I encode 44100 with SBR ADTS stream and get 22050 samplerate after encoding. I guess SBR decoder should upsample back to 44100. Do I need special initialization for this ?&lt;BR /&gt;</description>
      <pubDate>Tue, 22 Sep 2009 01:25:05 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/AAC-SBR-Problem/m-p/906487#M13561</guid>
      <dc:creator>ksubox</dc:creator>
      <dc:date>2009-09-22T01:25:05Z</dc:date>
    </item>
    <item>
      <title>Re: AAC SBR Problem</title>
      <link>https://community.intel.com/t5/Intel-Integrated-Performance/AAC-SBR-Problem/m-p/906488#M13562</link>
      <description>&lt;DIV style="margin:0px;"&gt;&lt;BR /&gt;Hello, &lt;BR /&gt;&lt;BR /&gt;See the comments from our AAC expert: &lt;BR /&gt;&lt;BR /&gt;You can check explaination in the document: &lt;BR /&gt;&lt;BR /&gt;Flags&lt;BR /&gt;&lt;BR /&gt;The following members of UMC::AACDecoderParams affect on AAC decoder behavior:&lt;BR /&gt;ModeDecodeHEAACprofile (HEAAC_HQ_MODE | HEAAC_LP_MODE)  SBR part of AAC decoders work either high quality or low process mode&lt;BR /&gt;ModeDwnmxHEAACprofile (HEAAC_DWNSMPL_ON | HEAAC_DWNSMPL_OFF)  downsampling mode enable (disable)&lt;BR /&gt;flag_SBR_support_lev (SBR_ENABLE | SBR_DISABLE)  SBR support enable (disable) (if SBR support desable AAC decoder will ingnore all SBR extensions)&lt;BR /&gt;Default parameters  HEAAC_HQ_MODE, HEAAC_DWNSMPL_ON, SBR_ENABLE.&lt;BR /&gt;&lt;BR /&gt;HEAAC_DWNSMPL_ON | HEAAC_DWNSMPL_OFF flags affects upsampling.&lt;BR /&gt;&lt;/DIV&gt;
&lt;BR /&gt;Thanks,&lt;BR /&gt;Chao &lt;BR /&gt;</description>
      <pubDate>Wed, 23 Sep 2009 01:49:17 GMT</pubDate>
      <guid>https://community.intel.com/t5/Intel-Integrated-Performance/AAC-SBR-Problem/m-p/906488#M13562</guid>
      <dc:creator>Chao_Y_Intel</dc:creator>
      <dc:date>2009-09-23T01:49:17Z</dc:date>
    </item>
  </channel>
</rss>

