[FFmpeg-devel] [PATCH] avcodec/aacenc: set pce value by options pce

Hendrik Leppkes h.leppkes at gmail.com
Fri Nov 2 14:20:06 EET 2018


On Fri, Nov 2, 2018 at 1:13 PM Carl Eugen Hoyos <ceffmpeg at gmail.com> wrote:
>
> 2018-11-02 11:13 GMT+01:00, Hendrik Leppkes <h.leppkes at gmail.com>:
> > On Fri, Nov 2, 2018 at 10:17 AM Steven Liu <lq at chinaffmpeg.org> wrote:
> >>
> >> fix ticket: 7504
> >>
> >> Signed-off-by: Steven Liu <lq at chinaffmpeg.org>
> >> ---
> >>  libavcodec/aacenc.c | 2 +-
> >>  1 file changed, 1 insertion(+), 1 deletion(-)
> >>
> >> diff --git a/libavcodec/aacenc.c b/libavcodec/aacenc.c
> >> index 4d0abb107f..26175bdb39 100644
> >> --- a/libavcodec/aacenc.c
> >> +++ b/libavcodec/aacenc.c
> >> @@ -973,7 +973,7 @@ static av_cold int aac_encode_init(AVCodecContext
> >> *avctx)
> >>      /* Channel map and unspecified bitrate guessing */
> >>      s->channels = avctx->channels;
> >>
> >> -    s->needs_pce = 1;
> >> +    s->needs_pce = s->options.pce;
> >>      for (i = 0; i < FF_ARRAY_ELEMS(aac_normal_chan_layouts); i++) {
> >>          if (avctx->channel_layout == aac_normal_chan_layouts[i]) {
> >>              s->needs_pce = s->options.pce;
> >
> > This doesn't seem correct. PCE should be used if you feed the
> > encode a channel layout thats not supported without PCE
>
> Isn't the main issue that FFmpeg suddenly started to assume for
> some very common layouts that they are not supported while
> they were supported without PCE before and worked fine in every
> sensible use-case?

How can a layout be supported without PCE if its not part of the
default channel layout map?
Does it give you a best guess match? That seems terrible. It should
explicitly encode what you give it, and not "interpet" it, thats up to
the user.

- Hendrik


More information about the ffmpeg-devel mailing list