[FFmpeg-cvslog] avfilter/vf_blend: Fix argument types, fix segfault in asm

Michael Niedermayer git at videolan.org
Sat Oct 3 22:01:42 CEST 2015


ffmpeg | branch: master | Michael Niedermayer <michael at niedermayer.cc> | Sat Oct  3 21:49:42 2015 +0200| [fd9a528523d020764044dcc5a4873d030eeb2b63] | committer: Michael Niedermayer

avfilter/vf_blend: Fix argument types, fix segfault in asm

Signed-off-by: Michael Niedermayer <michael at niedermayer.cc>

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

 libavfilter/blend.h             |    2 +-
 libavfilter/vf_blend.c          |    8 ++++----
 libavfilter/x86/vf_blend_init.c |   24 ++++++++++++------------
 3 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/libavfilter/blend.h b/libavfilter/blend.h
index c22ecd2..fcedd41 100644
--- a/libavfilter/blend.h
+++ b/libavfilter/blend.h
@@ -63,7 +63,7 @@ typedef struct FilterParams {
     void (*blend)(const uint8_t *top, ptrdiff_t top_linesize,
                   const uint8_t *bottom, ptrdiff_t bottom_linesize,
                   uint8_t *dst, ptrdiff_t dst_linesize,
-                  int width, int start, int end,
+                  ptrdiff_t width, ptrdiff_t start, ptrdiff_t end,
                   struct FilterParams *param, double *values);
 } FilterParams;
 
diff --git a/libavfilter/vf_blend.c b/libavfilter/vf_blend.c
index b19eb6b..8032de1 100644
--- a/libavfilter/vf_blend.c
+++ b/libavfilter/vf_blend.c
@@ -120,7 +120,7 @@ AVFILTER_DEFINE_CLASS(blend);
 static void blend_normal(const uint8_t *top, ptrdiff_t top_linesize,
                          const uint8_t *bottom, ptrdiff_t bottom_linesize,
                          uint8_t *dst, ptrdiff_t dst_linesize,
-                         int width, int start, int end,
+                         ptrdiff_t width, ptrdiff_t start, ptrdiff_t end,
                          FilterParams *param, double *values)
 {
     av_image_copy_plane(dst, dst_linesize, top, top_linesize, width, end - start);
@@ -130,7 +130,7 @@ static void blend_normal(const uint8_t *top, ptrdiff_t top_linesize,
 static void blend_## name##_8bit(const uint8_t *top, ptrdiff_t top_linesize,         \
                                  const uint8_t *bottom, ptrdiff_t bottom_linesize,   \
                                  uint8_t *dst, ptrdiff_t dst_linesize,               \
-                                 int width, int start, int end,                \
+                                 ptrdiff_t width, ptrdiff_t start, ptrdiff_t end,                \
                                  FilterParams *param, double *values)          \
 {                                                                              \
     double opacity = param->opacity;                                           \
@@ -150,7 +150,7 @@ static void blend_## name##_8bit(const uint8_t *top, ptrdiff_t top_linesize,
 static void blend_## name##_16bit(const uint8_t *_top, ptrdiff_t top_linesize,       \
                                   const uint8_t *_bottom, ptrdiff_t bottom_linesize, \
                                   uint8_t *_dst, ptrdiff_t dst_linesize,             \
-                                  int width, int start, int end,               \
+                                  ptrdiff_t width, ptrdiff_t start, ptrdiff_t end,               \
                                   FilterParams *param, double *values)         \
 {                                                                              \
     const uint16_t *top = (uint16_t*)_top;                                     \
@@ -252,7 +252,7 @@ DEFINE_BLEND16(linearlight,av_clip_uint16((B < 32768) ? B + 2 * A - 65535 : B +
 static void blend_expr_## name(const uint8_t *_top, ptrdiff_t top_linesize,          \
                                const uint8_t *_bottom, ptrdiff_t bottom_linesize,    \
                                uint8_t *_dst, ptrdiff_t dst_linesize,                \
-                               int width, int start, int end,                  \
+                               ptrdiff_t width, ptrdiff_t start, ptrdiff_t end,                  \
                                FilterParams *param, double *values)            \
 {                                                                              \
     const type *top = (type*)_top;                                             \
diff --git a/libavfilter/x86/vf_blend_init.c b/libavfilter/x86/vf_blend_init.c
index 2436063..61e90f8 100644
--- a/libavfilter/x86/vf_blend_init.c
+++ b/libavfilter/x86/vf_blend_init.c
@@ -26,73 +26,73 @@
 void ff_blend_addition_sse2(const uint8_t *top, ptrdiff_t top_linesize,
                             const uint8_t *bottom, ptrdiff_t bottom_linesize,
                             uint8_t *dst, ptrdiff_t dst_linesize,
-                            int width, int start, int end,
+                            ptrdiff_t width, ptrdiff_t start, ptrdiff_t end,
                             struct FilterParams *param, double *values);
 
 void ff_blend_addition128_sse2(const uint8_t *top, ptrdiff_t top_linesize,
                                const uint8_t *bottom, ptrdiff_t bottom_linesize,
                                uint8_t *dst, ptrdiff_t dst_linesize,
-                               int width, int start, int end,
+                               ptrdiff_t width, ptrdiff_t start, ptrdiff_t end,
                                struct FilterParams *param, double *values);
 
 void ff_blend_average_sse2(const uint8_t *top, ptrdiff_t top_linesize,
                            const uint8_t *bottom, ptrdiff_t bottom_linesize,
                            uint8_t *dst, ptrdiff_t dst_linesize,
-                           int width, int start, int end,
+                           ptrdiff_t width, ptrdiff_t start, ptrdiff_t end,
                            struct FilterParams *param, double *values);
 
 void ff_blend_and_sse2(const uint8_t *top, ptrdiff_t top_linesize,
                        const uint8_t *bottom, ptrdiff_t bottom_linesize,
                        uint8_t *dst, ptrdiff_t dst_linesize,
-                       int width, int start, int end,
+                       ptrdiff_t width, ptrdiff_t start, ptrdiff_t end,
                        struct FilterParams *param, double *values);
 
 void ff_blend_darken_sse2(const uint8_t *top, ptrdiff_t top_linesize,
                           const uint8_t *bottom, ptrdiff_t bottom_linesize,
                           uint8_t *dst, ptrdiff_t dst_linesize,
-                          int width, int start, int end,
+                          ptrdiff_t width, ptrdiff_t start, ptrdiff_t end,
                           struct FilterParams *param, double *values);
 
 void ff_blend_difference128_sse2(const uint8_t *top, ptrdiff_t top_linesize,
                                  const uint8_t *bottom, ptrdiff_t bottom_linesize,
                                  uint8_t *dst, ptrdiff_t dst_linesize,
-                                 int width, int start, int end,
+                                 ptrdiff_t width, ptrdiff_t start, ptrdiff_t end,
                                  struct FilterParams *param, double *values);
 
 void ff_blend_lighten_sse2(const uint8_t *top, ptrdiff_t top_linesize,
                            const uint8_t *bottom, ptrdiff_t bottom_linesize,
                            uint8_t *dst, ptrdiff_t dst_linesize,
-                           int width, int start, int end,
+                           ptrdiff_t width, ptrdiff_t start, ptrdiff_t end,
                            struct FilterParams *param, double *values);
 
 void ff_blend_or_sse2(const uint8_t *top, ptrdiff_t top_linesize,
                       const uint8_t *bottom, ptrdiff_t bottom_linesize,
                       uint8_t *dst, ptrdiff_t dst_linesize,
-                      int width, int start, int end,
+                      ptrdiff_t width, ptrdiff_t start, ptrdiff_t end,
                       struct FilterParams *param, double *values);
 
 void ff_blend_subtract_sse2(const uint8_t *top, ptrdiff_t top_linesize,
                             const uint8_t *bottom, ptrdiff_t bottom_linesize,
                             uint8_t *dst, ptrdiff_t dst_linesize,
-                            int width, int start, int end,
+                            ptrdiff_t width, ptrdiff_t start, ptrdiff_t end,
                             struct FilterParams *param, double *values);
 
 void ff_blend_xor_sse2(const uint8_t *top, ptrdiff_t top_linesize,
                        const uint8_t *bottom, ptrdiff_t bottom_linesize,
                        uint8_t *dst, ptrdiff_t dst_linesize,
-                       int width, int start, int end,
+                       ptrdiff_t width, ptrdiff_t start, ptrdiff_t end,
                        struct FilterParams *param, double *values);
 
 void ff_blend_difference_ssse3(const uint8_t *top, ptrdiff_t top_linesize,
                                const uint8_t *bottom, ptrdiff_t bottom_linesize,
                                uint8_t *dst, ptrdiff_t dst_linesize,
-                               int width, int start, int end,
+                               ptrdiff_t width, ptrdiff_t start, ptrdiff_t end,
                                struct FilterParams *param, double *values);
 
 void ff_blend_negation_ssse3(const uint8_t *top, ptrdiff_t top_linesize,
                              const uint8_t *bottom, ptrdiff_t bottom_linesize,
                              uint8_t *dst, ptrdiff_t dst_linesize,
-                             int width, int start, int end,
+                             ptrdiff_t width, ptrdiff_t start, ptrdiff_t end,
                              struct FilterParams *param, double *values);
 
 av_cold void ff_blend_init_x86(FilterParams *param, int is_16bit)



More information about the ffmpeg-cvslog mailing list