Message ID | 1557504354-27086-1-git-send-email-mypopydev@gmail.com |
---|---|
State | Accepted |
Commit | 014b0e5092a2dfd1bc0d661fc53d8530ec83d772 |
Headers | show |
On Sat, May 11, 2019 at 12:06 AM Jun Zhao <mypopydev@gmail.com> wrote: > > From: Jun Zhao <barryjzhao@tencent.com> > > Condition 'sum==2' is always true, so remove the check logic to > make the code clean. > > Signed-off-by: Jun Zhao <barryjzhao@tencent.com> > --- > libavcodec/aacenc_ltp.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/libavcodec/aacenc_ltp.c b/libavcodec/aacenc_ltp.c > index 674a2a0..f77f0b6 100644 > --- a/libavcodec/aacenc_ltp.c > +++ b/libavcodec/aacenc_ltp.c > @@ -144,7 +144,7 @@ void ff_aac_adjust_common_ltp(AACEncContext *s, ChannelElement *cpe) > int sum = sce0->ics.ltp.used[sfb] + sce1->ics.ltp.used[sfb]; > if (sum != 2) { > sce0->ics.ltp.used[sfb] = 0; > - } else if (sum == 2) { > + } else { > count++; > } > } > -- > 1.7.1 > Pushed, Thanks
diff --git a/libavcodec/aacenc_ltp.c b/libavcodec/aacenc_ltp.c index 674a2a0..f77f0b6 100644 --- a/libavcodec/aacenc_ltp.c +++ b/libavcodec/aacenc_ltp.c @@ -144,7 +144,7 @@ void ff_aac_adjust_common_ltp(AACEncContext *s, ChannelElement *cpe) int sum = sce0->ics.ltp.used[sfb] + sce1->ics.ltp.used[sfb]; if (sum != 2) { sce0->ics.ltp.used[sfb] = 0; - } else if (sum == 2) { + } else { count++; } }