[FFmpeg-devel] [PATCH] avcodec/libfdk_aacenc: enable 7.1 channel encoding

Michael Niedermayer michaelni at gmx.at
Sun Jan 26 00:01:51 CET 2014


On Sat, Jan 25, 2014 at 11:27:44PM +0100, Jean First wrote:
> 7.1(wide) and 7.1(wide-side) channel layouts are supported in fdk_aac since october 2013 (commit fa3eba1644)
> 
> Signed-off-by: Jean First <jeanfirst at gmail.com>
> ---
> 
> the encoding works, but I did not test it on a actual 7.1 setup.
> 
>  libavcodec/libfdk-aacenc.c | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/libavcodec/libfdk-aacenc.c b/libavcodec/libfdk-aacenc.c
> index 755b76f..82bfce1 100644
> --- a/libavcodec/libfdk-aacenc.c
> +++ b/libavcodec/libfdk-aacenc.c
> @@ -151,6 +151,16 @@ static av_cold int aac_encode_init(AVCodecContext *avctx)
>      case 4: mode = MODE_1_2_1;   sce = 2; cpe = 1; break;
>      case 5: mode = MODE_1_2_2;   sce = 1; cpe = 2; break;
>      case 6: mode = MODE_1_2_2_1; sce = 2; cpe = 2; break;
> +    case 8:
> +        sce = 2;
> +        cpe = 3;
> +        if (avctx->channel_layout == AV_CH_LAYOUT_7POINT1_WIDE_BACK) {
> +            mode = MODE_7_1_REAR_SURROUND;
> +        } else {
> +            // MODE_1_2_2_2_1 and MODE_7_1_FRONT_CENTER use the same channel layout
> +            mode = MODE_7_1_FRONT_CENTER;
> +        }
> +        break;
>      default:
>          av_log(avctx, AV_LOG_ERROR,
>                 "Unsupported number of channels %d\n", avctx->channels);
> @@ -384,6 +394,8 @@ static const uint64_t aac_channel_layout[] = {
>      AV_CH_LAYOUT_4POINT0,
>      AV_CH_LAYOUT_5POINT0_BACK,
>      AV_CH_LAYOUT_5POINT1_BACK,
> +    AV_CH_LAYOUT_7POINT1_WIDE,
> +    AV_CH_LAYOUT_7POINT1_WIDE_BACK,
>      0,
>  };

libavcodec/libfdk-aacenc.c: In function ‘aac_encode_init’:
libavcodec/libfdk-aacenc.c:158:20: error: ‘MODE_7_1_REAR_SURROUND’ undeclared (first use in this function)
libavcodec/libfdk-aacenc.c:158:20: note: each undeclared identifier is reported only once for each function it appears in
libavcodec/libfdk-aacenc.c:161:20: error: ‘MODE_7_1_FRONT_CENTER’ undeclared (first use in this function)

i guess this is missing some check in configure

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

The educated differ from the uneducated as much as the living from the
dead. -- Aristotle 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20140126/fed13c20/attachment.asc>


More information about the ffmpeg-devel mailing list