[FFmpeg-cvslog] avcodec/tta: fix minor code style issues

Paul B Mahol git at videolan.org
Wed Aug 16 22:38:13 EEST 2023


ffmpeg | branch: master | Paul B Mahol <onemda at gmail.com> | Wed Aug 16 20:03:42 2023 +0200| [082133fc076e67640a0e846c11389d67d7ea5ec6] | committer: Paul B Mahol

avcodec/tta: fix minor code style issues

> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=082133fc076e67640a0e846c11389d67d7ea5ec6
---

 libavcodec/tta.c     | 9 +++++----
 libavcodec/ttadata.c | 3 ++-
 libavcodec/ttadsp.c  | 3 ++-
 3 files changed, 9 insertions(+), 6 deletions(-)

diff --git a/libavcodec/tta.c b/libavcodec/tta.c
index 3e89571f16..f5e39df98d 100644
--- a/libavcodec/tta.c
+++ b/libavcodec/tta.c
@@ -211,7 +211,7 @@ static av_cold int tta_decode_init(AVCodecContext * avctx)
         av_log(avctx, AV_LOG_DEBUG, "data_length: %d frame_length: %d last: %d total: %d\n",
             s->data_length, s->frame_length, s->last_frame_length, total_frames);
 
-        if(s->frame_length >= UINT_MAX / (s->channels * sizeof(int32_t))){
+        if (s->frame_length >= UINT_MAX / (s->channels * sizeof(int32_t))) {
             av_log(avctx, AV_LOG_ERROR, "frame_length too large\n");
             return AVERROR_INVALIDDATA;
         }
@@ -306,14 +306,14 @@ static int tta_decode_frame(AVCodecContext *avctx, AVFrame *frame,
             rice->sum1 += value - (rice->sum1 >> 4);
             if (rice->k1 > 0 && rice->sum1 < ff_tta_shift_16[rice->k1])
                 rice->k1--;
-            else if(rice->sum1 > ff_tta_shift_16[rice->k1 + 1])
+            else if (rice->sum1 > ff_tta_shift_16[rice->k1 + 1])
                 rice->k1++;
             value += ff_tta_shift_1[rice->k0];
         default:
             rice->sum0 += value - (rice->sum0 >> 4);
             if (rice->k0 > 0 && rice->sum0 < ff_tta_shift_16[rice->k0])
                 rice->k0--;
-            else if(rice->sum0 > ff_tta_shift_16[rice->k0 + 1])
+            else if (rice->sum0 > ff_tta_shift_16[rice->k0 + 1])
                 rice->k0++;
         }
 
@@ -399,7 +399,8 @@ error:
     return ret;
 }
 
-static av_cold int tta_decode_close(AVCodecContext *avctx) {
+static av_cold int tta_decode_close(AVCodecContext *avctx)
+{
     TTAContext *s = avctx->priv_data;
 
     if (s->bps < 3)
diff --git a/libavcodec/ttadata.c b/libavcodec/ttadata.c
index 297d709480..2137a23033 100644
--- a/libavcodec/ttadata.c
+++ b/libavcodec/ttadata.c
@@ -47,7 +47,8 @@ void ff_tta_rice_init(TTARice *c, uint32_t k0, uint32_t k1)
     c->sum1 = ff_tta_shift_16[k1];
 }
 
-void ff_tta_filter_init(TTAFilter *c, int32_t shift) {
+void ff_tta_filter_init(TTAFilter *c, int32_t shift)
+{
     memset(c, 0, sizeof(TTAFilter));
     c->shift = shift;
     c->round = ff_tta_shift_1[shift-1];
diff --git a/libavcodec/ttadsp.c b/libavcodec/ttadsp.c
index fe9e3c69e4..5dda19587c 100644
--- a/libavcodec/ttadsp.c
+++ b/libavcodec/ttadsp.c
@@ -22,7 +22,8 @@
 
 static void tta_filter_process_c(int32_t *qmi, int32_t *dx, int32_t *dl,
                                  int32_t *error, int32_t *in, int32_t shift,
-                                 int32_t round) {
+                                 int32_t round)
+{
     uint32_t *qm = qmi;
 
     if (*error < 0) {



More information about the ffmpeg-cvslog mailing list