From: Marton Balint <cus@passwd.hu> To: Lynne via ffmpeg-devel <ffmpeg-devel@ffmpeg.org> Subject: Re: [FFmpeg-devel] [PATCH v2 8/8] aacdec: add a decoder for AAC USAC (xHE-AAC) Date: Wed, 22 May 2024 22:15:05 +0200 (CEST) Message-ID: <fee8c0d6-9f07-5e49-8d40-2e0f2cfb18e3@passwd.hu> (raw) In-Reply-To: <558894aa-62f8-4628-8727-67a3c6bd558d@lynne.ee> On Wed, 22 May 2024, Lynne via ffmpeg-devel wrote: > On 21/05/2024 23:33, Hendrik Leppkes wrote: >> On Tue, May 21, 2024 at 9:52 PM Lynne via ffmpeg-devel >> <ffmpeg-devel@ffmpeg.org> wrote: >>> >>> >>> It should be the case here, we shouldn't need reordering as NATIVE just >>> lets you specify what order the elements appear in the bitstream. >> >> NATIVE means "the FFmpeg native ordering", not "bitstream order". >> CUSTOM lets you specify an arbitrary order but requires metadata to >> that effect, but it makes it particularly hard to map to any standard >> when playing or transcoding, so some efforts to try to unify it into a >> NATIVE format is always appreciated if possible. > > Right, I forgot about that, thanks. > Amended in my git repo to use Marton's code. > > > ret = av_channel_layout_custom_init(&ac->oc[1].ch_layout, nb_channels); > if (ret < 0) > return ret; > > for (int i = 0; i < nb_channels; i++) { > AVChannelCustom *cm = &ac->oc[1].ch_layout.u.map[i]; > cm->id = usac_ch_pos_to_av[get_bits(gb, 5)]; /* bsOutputChannelPos */ > if (cm->id) > cm->id = AV_CHAN_UNKNOWN; if (cm->id == AV_CHAN_NONE) cm->id = AV_CHAN_UNKNOWN; > } > > ret = av_channel_layout_retype(&ac->oc[1].ch_layout, > AV_CHANNEL_ORDER_NATIVE, > AV_CHANNEL_LAYOUT_RETYPE_FLAG_CANONICAL); You can simply pass 0 instead of AV_CHANNEL_ORDER_NATIVE as the order parameter, because AV_CHANNEL_LAYOUT_RETYPE_FLAG_CANONICAL automatically uses the canonical order and ignores the order parameter. > if (ret < 0) > return ret; > > av_channel_layout_copy(&avctx->ch_layout, &ac->oc[1].ch_layout); Missing error check. Thanks, Marton _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
next prev parent reply other threads:[~2024-05-22 20:15 UTC|newest] Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top 2024-05-19 16:54 [FFmpeg-devel] [PATCH v2 0/8] aacdec: add a native xHE-AAC decoder Lynne via ffmpeg-devel 2024-05-19 16:54 ` [FFmpeg-devel] [PATCH v2 1/8] aacdec: move from scalefactor ranged arrays to flat arrays Lynne via ffmpeg-devel 2024-05-19 16:54 ` [FFmpeg-devel] [PATCH v2 2/8] aacdec: expose channel layout related functions Lynne via ffmpeg-devel 2024-05-19 16:54 ` [FFmpeg-devel] [PATCH v2 3/8] aacdec: expose decode_tns Lynne via ffmpeg-devel 2024-05-19 16:54 ` [FFmpeg-devel] [PATCH v2 4/8] aacdec_dsp: implement 768-point transform and windowing Lynne via ffmpeg-devel 2024-05-19 16:54 ` [FFmpeg-devel] [PATCH v2 5/8] aactab: add deemphasis tables for USAC Lynne via ffmpeg-devel 2024-05-19 16:54 ` [FFmpeg-devel] [PATCH v2 6/8] aactab: add tables for the new USAC arithmetic coder Lynne via ffmpeg-devel 2024-05-19 16:54 ` [FFmpeg-devel] [PATCH v2 7/8] aactab: add new scalefactor offset tables for 96/768pt windows Lynne via ffmpeg-devel 2024-05-19 16:54 ` [FFmpeg-devel] [PATCH v2 8/8] aacdec: add a decoder for AAC USAC (xHE-AAC) Lynne via ffmpeg-devel 2024-05-19 19:39 ` Marton Balint 2024-05-19 19:50 ` Lynne via ffmpeg-devel 2024-05-21 7:16 ` Marton Balint 2024-05-21 17:58 ` Lynne via ffmpeg-devel 2024-05-21 19:40 ` Marton Balint 2024-05-21 19:52 ` Lynne via ffmpeg-devel 2024-05-21 20:12 ` Marton Balint 2024-05-21 21:33 ` Hendrik Leppkes 2024-05-21 22:09 ` Lynne via ffmpeg-devel 2024-05-22 20:15 ` Marton Balint [this message] 2024-05-22 20:25 ` Lynne via ffmpeg-devel 2024-05-19 23:19 ` Michael Niedermayer 2024-05-20 1:11 ` Lynne via ffmpeg-devel
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=fee8c0d6-9f07-5e49-8d40-2e0f2cfb18e3@passwd.hu \ --to=cus@passwd.hu \ --cc=ffmpeg-devel@ffmpeg.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Git Inbox Mirror of the ffmpeg-devel mailing list - see https://ffmpeg.org/mailman/listinfo/ffmpeg-devel This inbox may be cloned and mirrored by anyone: git clone --mirror https://master.gitmailbox.com/ffmpegdev/0 ffmpegdev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 ffmpegdev ffmpegdev/ https://master.gitmailbox.com/ffmpegdev \ ffmpegdev@gitmailbox.com public-inbox-index ffmpegdev Example config snippet for mirrors. AGPL code for this site: git clone https://public-inbox.org/public-inbox.git