Skip to content

Commit

Permalink
Fix SBR multichannel noise
Browse files Browse the repository at this point in the history
for 5.1 ch, the channel elements are as follows: SCE - CPE - CPE - LFE
and the channel-mapping table for 5.1 ch is :
{ 2, 0, 1, 4, 5, 3,255,255}, /* 5.1ch */

For the last LFE channel, sbr decoder returns error, SBRDEC_UNSUPPORTED_CONFIG;
  • Loading branch information
ezicomezigo authored and mstorsjo committed Dec 20, 2017
1 parent ee8df6b commit ebf81b8
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion libSBRdec/src/sbrdecoder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1444,7 +1444,7 @@ sbrDecoder_DecodeElement (
self->flags |= (applyPs) ? SBRDEC_PS_DECODED : 0;
}

if (channelMapping[0] == 255 || channelMapping[1] == 255)
if (channelMapping[0] == 255 || ((*numOutChannels == 2) && channelMapping[1] == 255))
return SBRDEC_UNSUPPORTED_CONFIG;
if (!pSbrChannel[0]->SbrDec.LppTrans.pSettings)
return SBRDEC_UNSUPPORTED_CONFIG;
Expand Down

0 comments on commit ebf81b8

Please sign in to comment.