diff mbox series

[FFmpeg-devel,1/4] avcodec/siren: replace magic numbers with macro value

Message ID 52654437a219b6d23d7779be9a9268d45850de3b.1631006828.git.pross@xvid.org
State Accepted
Commit e8aec714d322cb479da2f625f977a3d5b8b8c024
Headers show
Series [FFmpeg-devel,1/4] avcodec/siren: replace magic numbers with macro value
Related show

Checks

Context Check Description
andriy/make_x86 success Make finished
andriy/make_fate_x86 success Make fate finished
andriy/make_ppc success Make finished
andriy/make_fate_ppc success Make fate finished

Commit Message

Peter Ross Sept. 7, 2021, 9:27 a.m. UTC
---
 libavcodec/siren.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Comments

Paul B Mahol Sept. 7, 2021, 9:32 a.m. UTC | #1
lgtm
diff mbox series

Patch

diff --git a/libavcodec/siren.c b/libavcodec/siren.c
index 5b172c5ab7..93a2d14d25 100644
--- a/libavcodec/siren.c
+++ b/libavcodec/siren.c
@@ -698,7 +698,7 @@  static int siren_decode(AVCodecContext *avctx, void *data,
     SirenContext *s = avctx->priv_data;
     GetBitContext *gb = &s->gb;
     AVFrame *frame = data;
-    int ret, number_of_valid_coefs = 20 * s->number_of_regions;
+    int ret, number_of_valid_coefs = REGION_SIZE * s->number_of_regions;
     int frame_error = 0, rate_control = 0;
     int bits_per_frame;
 
@@ -765,7 +765,7 @@  static int siren_decode(AVCodecContext *avctx, void *data,
     if ((ret = ff_get_buffer(avctx, frame, 0)) < 0)
         return ret;
 
-    for (int i = 0; i < 320; i += 2)
+    for (int i = 0; i < FRAME_SIZE; i += 2)
         s->imdct_in[i] *= -1;
 
     s->tx_fn(s->tx_ctx, s->imdct_out, s->imdct_in, sizeof(float));