diff mbox

[FFmpeg-devel] Delete unused branch in libaomenc

Message ID 20190915210250.78677-1-elliottk@google.com
State New
Headers show

Commit Message

elliottk Sept. 15, 2019, 9:02 p.m. UTC
---
 libavcodec/libaomenc.c | 14 +++++---------
 1 file changed, 5 insertions(+), 9 deletions(-)

Comments

James Zern Sept. 18, 2019, 6:42 p.m. UTC | #1
On Sun, Sep 15, 2019 at 2:03 PM Elliott Karpilovsky
<elliottk-at-google.com@ffmpeg.org> wrote:
>
> ---
>  libavcodec/libaomenc.c | 14 +++++---------
>  1 file changed, 5 insertions(+), 9 deletions(-)
>

lgtm. This is leftover from libvpxenc, only vp8 can hit the path there.

> diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c
> index 7f47707a09..0b369d50a7 100644
> --- a/libavcodec/libaomenc.c
> +++ b/libavcodec/libaomenc.c
> @@ -572,15 +572,11 @@ static av_cold int aom_init(AVCodecContext *avctx,
>          enccfg.rc_target_bitrate = av_rescale_rnd(avctx->bit_rate, 1, 1000,
>                                                    AV_ROUND_NEAR_INF);
>      } else if (enccfg.rc_end_usage != AOM_Q) {
> -        if (enccfg.rc_end_usage == AOM_CQ) {
> -            enccfg.rc_target_bitrate = 1000000;
> -        } else {
> -            enccfg.rc_end_usage = AOM_Q;
> -            ctx->crf = 32;
> -            av_log(avctx, AV_LOG_WARNING,
> -                   "Neither bitrate nor constrained quality specified, using default CRF of %d\n",
> -                   ctx->crf);
> -        }
> +      enccfg.rc_end_usage = AOM_Q;
> +      ctx->crf = 32;
> +      av_log(avctx, AV_LOG_WARNING,
> +             "Neither bitrate nor constrained quality specified, using default CRF of %d\n",
> +             ctx->crf);

Indent is off, I can fix this locally.

>      }
>
>      if (avctx->qmin >= 0)
James Zern Sept. 18, 2019, 6:49 p.m. UTC | #2
On Wed, Sep 18, 2019 at 11:42 AM James Zern <jzern@google.com> wrote:
>
> On Sun, Sep 15, 2019 at 2:03 PM Elliott Karpilovsky
> <elliottk-at-google.com@ffmpeg.org> wrote:
> >
> > ---
> >  libavcodec/libaomenc.c | 14 +++++---------
> >  1 file changed, 5 insertions(+), 9 deletions(-)
> >
>
> lgtm. This is leftover from libvpxenc, only vp8 can hit the path there.
>
> > diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c
> > index 7f47707a09..0b369d50a7 100644
> > --- a/libavcodec/libaomenc.c
> > +++ b/libavcodec/libaomenc.c
> > @@ -572,15 +572,11 @@ static av_cold int aom_init(AVCodecContext *avctx,
> >          enccfg.rc_target_bitrate = av_rescale_rnd(avctx->bit_rate, 1, 1000,
> >                                                    AV_ROUND_NEAR_INF);
> >      } else if (enccfg.rc_end_usage != AOM_Q) {

Looks like this check might be unnecessary given the other checks in
the block above, but reorganizing that can be done in another patch.

> > -        if (enccfg.rc_end_usage == AOM_CQ) {
> > -            enccfg.rc_target_bitrate = 1000000;
> > -        } else {
> > -            enccfg.rc_end_usage = AOM_Q;
> > -            ctx->crf = 32;
> > -            av_log(avctx, AV_LOG_WARNING,
> > -                   "Neither bitrate nor constrained quality specified, using default CRF of %d\n",
> > -                   ctx->crf);
> > -        }
> > +      enccfg.rc_end_usage = AOM_Q;
> > +      ctx->crf = 32;
> > +      av_log(avctx, AV_LOG_WARNING,
> > +             "Neither bitrate nor constrained quality specified, using default CRF of %d\n",
> > +             ctx->crf);
>
> Indent is off, I can fix this locally.
>
> >      }
> >
> >      if (avctx->qmin >= 0)
James Zern Sept. 20, 2019, 6:59 a.m. UTC | #3
On Wed, Sep 18, 2019 at 11:42 AM James Zern <jzern@google.com> wrote:
>
> On Sun, Sep 15, 2019 at 2:03 PM Elliott Karpilovsky
> <elliottk-at-google.com@ffmpeg.org> wrote:
> >
> > ---
> >  libavcodec/libaomenc.c | 14 +++++---------
> >  1 file changed, 5 insertions(+), 9 deletions(-)
> >
>
> lgtm. This is leftover from libvpxenc, only vp8 can hit the path there.
>

applied, thanks.
diff mbox

Patch

diff --git a/libavcodec/libaomenc.c b/libavcodec/libaomenc.c
index 7f47707a09..0b369d50a7 100644
--- a/libavcodec/libaomenc.c
+++ b/libavcodec/libaomenc.c
@@ -572,15 +572,11 @@  static av_cold int aom_init(AVCodecContext *avctx,
         enccfg.rc_target_bitrate = av_rescale_rnd(avctx->bit_rate, 1, 1000,
                                                   AV_ROUND_NEAR_INF);
     } else if (enccfg.rc_end_usage != AOM_Q) {
-        if (enccfg.rc_end_usage == AOM_CQ) {
-            enccfg.rc_target_bitrate = 1000000;
-        } else {
-            enccfg.rc_end_usage = AOM_Q;
-            ctx->crf = 32;
-            av_log(avctx, AV_LOG_WARNING,
-                   "Neither bitrate nor constrained quality specified, using default CRF of %d\n",
-                   ctx->crf);
-        }
+      enccfg.rc_end_usage = AOM_Q;
+      ctx->crf = 32;
+      av_log(avctx, AV_LOG_WARNING,
+             "Neither bitrate nor constrained quality specified, using default CRF of %d\n",
+             ctx->crf);
     }
 
     if (avctx->qmin >= 0)