[FFmpeg-cvslog] Merge commit 'd9d26a3674f31f482f54e936fcb382160830877a'

James Almer git at videolan.org
Sun Mar 19 20:06:21 EET 2017


ffmpeg | branch: master | James Almer <jamrial at gmail.com> | Sun Mar 19 14:54:25 2017 -0300| [4004d33fcbbb93eaf57b5a5f8b2412b7807f094f] | committer: James Almer

Merge commit 'd9d26a3674f31f482f54e936fcb382160830877a'

* commit 'd9d26a3674f31f482f54e936fcb382160830877a':
  vp56: Change type of stride parameters to ptrdiff_t

Merged-by: James Almer <jamrial at gmail.com>

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

 libavcodec/arm/vp6dsp_init_arm.c |  4 ++--
 libavcodec/vp56.h                |  4 ++--
 libavcodec/vp56dsp.c             |  3 ++-
 libavcodec/vp56dsp.h             | 10 ++++++----
 libavcodec/vp6.c                 |  8 ++++----
 libavcodec/vp6dsp.c              |  2 +-
 libavcodec/x86/vp6dsp.asm        |  5 +----
 libavcodec/x86/vp6dsp_init.c     |  4 ++--
 8 files changed, 20 insertions(+), 20 deletions(-)

diff --git a/libavcodec/arm/vp6dsp_init_arm.c b/libavcodec/arm/vp6dsp_init_arm.c
index ed68321..a2f986c 100644
--- a/libavcodec/arm/vp6dsp_init_arm.c
+++ b/libavcodec/arm/vp6dsp_init_arm.c
@@ -25,8 +25,8 @@
 #include "libavcodec/avcodec.h"
 #include "libavcodec/vp56dsp.h"
 
-void ff_vp6_edge_filter_hor_neon(uint8_t *yuv, int stride, int t);
-void ff_vp6_edge_filter_ver_neon(uint8_t *yuv, int stride, int t);
+void ff_vp6_edge_filter_hor_neon(uint8_t *yuv, ptrdiff_t stride, int t);
+void ff_vp6_edge_filter_ver_neon(uint8_t *yuv, ptrdiff_t stride, int t);
 
 av_cold void ff_vp6dsp_init_arm(VP56DSPContext *s, enum AVCodecID codec)
 {
diff --git a/libavcodec/vp56.h b/libavcodec/vp56.h
index c049399..aacbe74 100644
--- a/libavcodec/vp56.h
+++ b/libavcodec/vp56.h
@@ -72,7 +72,7 @@ typedef struct VP56mv {
 typedef void (*VP56ParseVectorAdjustment)(VP56Context *s,
                                           VP56mv *vect);
 typedef void (*VP56Filter)(VP56Context *s, uint8_t *dst, uint8_t *src,
-                           int offset1, int offset2, int stride,
+                           int offset1, int offset2, ptrdiff_t stride,
                            VP56mv mv, int mask, int select, int luma);
 typedef int  (*VP56ParseCoeff)(VP56Context *s);
 typedef void (*VP56DefaultModelsInit)(VP56Context *s);
@@ -179,7 +179,7 @@ struct vp56_context {
     int flip;  /* are we flipping ? */
     int frbi;  /* first row block index in MB */
     int srbi;  /* second row block index in MB */
-    int stride[4];  /* stride for each plan */
+    ptrdiff_t stride[4];  /* stride for each plan */
 
     const uint8_t *vp56_coord_div;
     VP56ParseVectorAdjustment parse_vector_adjustment;
diff --git a/libavcodec/vp56dsp.c b/libavcodec/vp56dsp.c
index fa533ec..28565c5 100644
--- a/libavcodec/vp56dsp.c
+++ b/libavcodec/vp56dsp.c
@@ -58,7 +58,8 @@ static int vp6_adjust(int v, int t)
 
 
 #define VP56_EDGE_FILTER(pfx, suf, pix_inc, line_inc)                   \
-static void pfx##_edge_filter_##suf(uint8_t *yuv, int stride, int t)    \
+static void pfx ## _edge_filter_ ## suf(uint8_t *yuv, ptrdiff_t stride, \
+                                        int t)                          \
 {                                                                       \
     int pix2_inc = 2 * pix_inc;                                         \
     int i, v;                                                           \
diff --git a/libavcodec/vp56dsp.h b/libavcodec/vp56dsp.h
index 7807baa..9249c47 100644
--- a/libavcodec/vp56dsp.h
+++ b/libavcodec/vp56dsp.h
@@ -21,18 +21,20 @@
 #ifndef AVCODEC_VP56DSP_H
 #define AVCODEC_VP56DSP_H
 
+#include <stddef.h>
 #include <stdint.h>
+
 #include "avcodec.h"
 
 typedef struct VP56DSPContext {
-    void (*edge_filter_hor)(uint8_t *yuv, int stride, int t);
-    void (*edge_filter_ver)(uint8_t *yuv, int stride, int t);
+    void (*edge_filter_hor)(uint8_t *yuv, ptrdiff_t stride, int t);
+    void (*edge_filter_ver)(uint8_t *yuv, ptrdiff_t stride, int t);
 
-    void (*vp6_filter_diag4)(uint8_t *dst, uint8_t *src, int stride,
+    void (*vp6_filter_diag4)(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
                              const int16_t *h_weights,const int16_t *v_weights);
 } VP56DSPContext;
 
-void ff_vp6_filter_diag4_c(uint8_t *dst, uint8_t *src, int stride,
+void ff_vp6_filter_diag4_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
                            const int16_t *h_weights, const int16_t *v_weights);
 
 void ff_vp56dsp_init(VP56DSPContext *s, enum AVCodecID codec);
diff --git a/libavcodec/vp6.c b/libavcodec/vp6.c
index 4afd67b..c7e8f13 100644
--- a/libavcodec/vp6.c
+++ b/libavcodec/vp6.c
@@ -531,7 +531,7 @@ static int vp6_parse_coeff(VP56Context *s)
     return 0;
 }
 
-static int vp6_block_variance(uint8_t *src, int stride)
+static int vp6_block_variance(uint8_t *src, ptrdiff_t stride)
 {
     int sum = 0, square_sum = 0;
     int y, x;
@@ -546,7 +546,7 @@ static int vp6_block_variance(uint8_t *src, int stride)
     return (16*square_sum - sum*sum) >> 8;
 }
 
-static void vp6_filter_hv4(uint8_t *dst, uint8_t *src, int stride,
+static void vp6_filter_hv4(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
                            int delta, const int16_t *weights)
 {
     int x, y;
@@ -564,7 +564,7 @@ static void vp6_filter_hv4(uint8_t *dst, uint8_t *src, int stride,
 }
 
 static void vp6_filter_diag2(VP56Context *s, uint8_t *dst, uint8_t *src,
-                             int stride, int h_weight, int v_weight)
+                             ptrdiff_t stride, int h_weight, int v_weight)
 {
     uint8_t *tmp = s->edge_emu_buffer+16;
     s->h264chroma.put_h264_chroma_pixels_tab[0](tmp, src, stride, 9, h_weight, 0);
@@ -572,7 +572,7 @@ static void vp6_filter_diag2(VP56Context *s, uint8_t *dst, uint8_t *src,
 }
 
 static void vp6_filter(VP56Context *s, uint8_t *dst, uint8_t *src,
-                       int offset1, int offset2, int stride,
+                       int offset1, int offset2, ptrdiff_t stride,
                        VP56mv mv, int mask, int select, int luma)
 {
     int filter4 = 0;
diff --git a/libavcodec/vp6dsp.c b/libavcodec/vp6dsp.c
index 67c6be0..f7f6856 100644
--- a/libavcodec/vp6dsp.c
+++ b/libavcodec/vp6dsp.c
@@ -27,7 +27,7 @@
 #include "vp56dsp.h"
 
 
-void ff_vp6_filter_diag4_c(uint8_t *dst, uint8_t *src, int stride,
+void ff_vp6_filter_diag4_c(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
                            const int16_t *h_weights, const int16_t *v_weights)
 {
     int x, y;
diff --git a/libavcodec/x86/vp6dsp.asm b/libavcodec/x86/vp6dsp.asm
index 3d874ea..0be531e 100644
--- a/libavcodec/x86/vp6dsp.asm
+++ b/libavcodec/x86/vp6dsp.asm
@@ -115,7 +115,7 @@ SECTION .text
 %endmacro
 
 %macro vp6_filter_diag4 0
-; void ff_vp6_filter_diag4_<opt>(uint8_t *dst, uint8_t *src, int stride,
+; void ff_vp6_filter_diag4_<opt>(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
 ;                                const int16_t h_weight[4], const int16_t v_weights[4])
 cglobal vp6_filter_diag4, 5, 7, 8
     mov          r5, rsp         ; backup stack pointer
@@ -126,9 +126,6 @@ cglobal vp6_filter_diag4, 5, 7, 8
     sub         rsp, 8*15
     movq         m6, [pw_64]
 %endif
-%if ARCH_X86_64
-    movsxd       r2, r2d
-%endif
 
     sub          r1, r2
 
diff --git a/libavcodec/x86/vp6dsp_init.c b/libavcodec/x86/vp6dsp_init.c
index 81d371d..a72ec60 100644
--- a/libavcodec/x86/vp6dsp_init.c
+++ b/libavcodec/x86/vp6dsp_init.c
@@ -25,9 +25,9 @@
 #include "libavutil/x86/cpu.h"
 #include "libavcodec/vp56dsp.h"
 
-void ff_vp6_filter_diag4_mmx(uint8_t *dst, uint8_t *src, int stride,
+void ff_vp6_filter_diag4_mmx(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
                              const int16_t *h_weights,const int16_t *v_weights);
-void ff_vp6_filter_diag4_sse2(uint8_t *dst, uint8_t *src, int stride,
+void ff_vp6_filter_diag4_sse2(uint8_t *dst, uint8_t *src, ptrdiff_t stride,
                               const int16_t *h_weights,const int16_t *v_weights);
 
 av_cold void ff_vp6dsp_init_x86(VP56DSPContext* c, enum AVCodecID codec)


======================================================================

diff --cc libavcodec/vp56.h
index c049399,52fe318..aacbe74
--- a/libavcodec/vp56.h
+++ b/libavcodec/vp56.h
@@@ -72,9 -72,9 +72,9 @@@ typedef struct VP56mv 
  typedef void (*VP56ParseVectorAdjustment)(VP56Context *s,
                                            VP56mv *vect);
  typedef void (*VP56Filter)(VP56Context *s, uint8_t *dst, uint8_t *src,
-                            int offset1, int offset2, int stride,
+                            int offset1, int offset2, ptrdiff_t stride,
                             VP56mv mv, int mask, int select, int luma);
 -typedef void (*VP56ParseCoeff)(VP56Context *s);
 +typedef int  (*VP56ParseCoeff)(VP56Context *s);
  typedef void (*VP56DefaultModelsInit)(VP56Context *s);
  typedef void (*VP56ParseVectorModels)(VP56Context *s);
  typedef int  (*VP56ParseCoeffModels)(VP56Context *s);
diff --cc libavcodec/vp6.c
index 4afd67b,aa0d09e..c7e8f13
--- a/libavcodec/vp6.c
+++ b/libavcodec/vp6.c
@@@ -528,10 -512,9 +528,10 @@@ static int vp6_parse_coeff(VP56Context 
          s->left_block[ff_vp56_b6to4[b]].not_null_dc =
          s->above_blocks[s->above_block_idx[b]].not_null_dc = !!s->block_coeff[b][0];
      }
 +    return 0;
  }
  
- static int vp6_block_variance(uint8_t *src, int stride)
+ static int vp6_block_variance(uint8_t *src, ptrdiff_t stride)
  {
      int sum = 0, square_sum = 0;
      int y, x;



More information about the ffmpeg-cvslog mailing list