[FFmpeg-cvslog] avcodec/ffv1enc: Use av_clip_uint8()

Michael Niedermayer git at videolan.org
Sat Feb 21 16:05:37 CET 2015


ffmpeg | branch: master | Michael Niedermayer <michaelni at gmx.at> | Sat Feb 21 15:50:19 2015 +0100| [fbae0ac3e448f2e45c58e4c3729f5c377ef96fe9] | committer: Michael Niedermayer

avcodec/ffv1enc: Use av_clip_uint8()

Signed-off-by: Michael Niedermayer <michaelni at gmx.at>

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

 libavcodec/ffv1enc.c |    4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/libavcodec/ffv1enc.c b/libavcodec/ffv1enc.c
index 39a1501..c3bf759 100644
--- a/libavcodec/ffv1enc.c
+++ b/libavcodec/ffv1enc.c
@@ -924,7 +924,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
                         if (a+b)
                             p = 256.0 * b / (a + b);
                         s->initial_states[i][jp][k] =
-                            best_state[av_clip(round(p), 1, 255)][av_clip((a + b) / gob_count, 0, 255)];
+                            best_state[av_clip(round(p), 1, 255)][av_clip_uint8((a + b) / gob_count)];
                         for(jp++; jp<j; jp++)
                             s->initial_states[i][jp][k] = s->initial_states[i][jp-1][k];
                         a=b=0;
@@ -935,7 +935,7 @@ static av_cold int encode_init(AVCodecContext *avctx)
                         p = 256.0 * b / (a + b);
                     }
                     s->initial_states[i][j][k] =
-                        best_state[av_clip(round(p), 1, 255)][av_clip((a + b) / gob_count, 0, 255)];
+                        best_state[av_clip(round(p), 1, 255)][av_clip_uint8((a + b) / gob_count)];
                 }
             }
         }



More information about the ffmpeg-cvslog mailing list