History

fix 7.1 with PCE mapping (#79)

refs https://code.videolan.org/videolan/vlc/-/issues/27421

François Cartegnie committed 4 years ago

Commit b9bd2eb1 parent df42c6f1 file · +12 −6Browse files

Unified · Split

libfaad/decoder.c+12−6
@@ -615,24 +615,30 @@ static void create_channel_config(NeAACDecStruct *hDecoder, NeAACDecFrameInfo *h · 614 unmodified lines
615 if (hDecoder->pce_set)615 if (hDecoder->pce_set)
616 {616 {
617 uint8_t i, chpos = 0;617 uint8_t i, chpos = 0;
618 uint8_t chdir, back_center = 0;618 uint8_t chdir, back_center = 0, total = 0;
619 619
620 hInfo->num_front_channels = hDecoder->pce.num_front_channels;620 hInfo->num_front_channels = hDecoder->pce.num_front_channels;
621 total += hInfo->num_front_channels;
621 hInfo->num_side_channels = hDecoder->pce.num_side_channels;622 hInfo->num_side_channels = hDecoder->pce.num_side_channels;
623 total += hInfo->num_side_channels;
622 hInfo->num_back_channels = hDecoder->pce.num_back_channels;624 hInfo->num_back_channels = hDecoder->pce.num_back_channels;
625 total += hInfo->num_back_channels;
623 hInfo->num_lfe_channels = hDecoder->pce.num_lfe_channels;626 hInfo->num_lfe_channels = hDecoder->pce.num_lfe_channels;
627 total += hInfo->num_lfe_channels;
624 628
625 chdir = hInfo->num_front_channels;629 chdir = hInfo->num_front_channels;
626 if (chdir & 1)630 if (chdir & 1)
627 {631 {
628#if (defined(PS_DEC) || defined(DRM_PS))632#if (defined(PS_DEC) || defined(DRM_PS))
629 /* When PS is enabled output is always stereo */633 if( total == 1 )
630 hInfo->channel_position[chpos++] = FRONT_CHANNEL_LEFT;634 {
631 hInfo->channel_position[chpos++] = FRONT_CHANNEL_RIGHT;635 /* When PS is enabled output is always stereo */
632#else636 hInfo->channel_position[chpos++] = FRONT_CHANNEL_LEFT;
637 hInfo->channel_position[chpos++] = FRONT_CHANNEL_RIGHT;
638 } else
639#endif
633 hInfo->channel_position[chpos++] = FRONT_CHANNEL_CENTER;640 hInfo->channel_position[chpos++] = FRONT_CHANNEL_CENTER;
634 chdir--;641 chdir--;
635#endif
636 }642 }
637 for (i = 0; i < chdir; i += 2)643 for (i = 0; i < chdir; i += 2)
638 {644 {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t