Intel® Integrated Performance Primitives
Deliberate problems developing high-performance vision, signal, security, and storage applications.
Announcements
FPGA community forums and blogs on community.intel.com are migrating to the new Altera Community and are read-only. For urgent support needs during this transition, please visit the FPGA Design Resources page or contact an Altera Authorized Distributor.

Bug in mp3enc_api_fp.c

m3driver
Beginner
566 Views

The memory for state->pMDCTSpec36 & state->pMDCTSpec12 is allocated using ippsMDCTFwdInitAlloc_32f() and should be freed in mp3encClose_layer3() using ippsMDCTFwdFree_32f() not ippsFree()

This was found in 5.3.4.087

0 Kudos
3 Replies
Vladimir_Dudnik
Employee
566 Views
Thanks, I'll let development team to know about your report. By the way, did you check IPP 6.0 beta where this issue might be already solved?
Regards,
Vladimir

0 Kudos
m3driver
Beginner
566 Views
Quoting - vdudnik
Thanks, I'll let development team to know about your report. By the way, did you check IPP 6.0 beta where this issue might be already solved?
Regards,
Vladimir

No, the beta is considerably different in structure. Is it safe to swictch the beta yet? If not, when is release anticipated?

0 Kudos
m3driver
Beginner
566 Views
I compiled the 6.0 beta and found it has a different memory leak - the psychoacoustic_block.IIRfilterState is not being free'd. mp3encClose() needs to change to:
[cpp]MP3Status mp3encClose(MP3Enc *state)
{
  if (NULL == state){
    return MP3_OK;
  }

  switch(state->com.header.layer) {
      case 1:
        break;
      case 2:
        break;
      case 3:
	{
	   int i;
	  mp3encClose_layer3(state);
	  for (i=0; i<4; i++)
	  {
	     ippsIIRFree_32f(state->psychoacoustic_block.IIRfilterState);
	  }
	}
       break;
      default:
        break;
  }

  return MP3_OK;
}[/cpp]

0 Kudos
Reply