diff mbox

[FFmpeg-devel] avcodec/mips: Fixed four warnings in vc1dsp

Message ID 1570848499-28586-1-git-send-email-guxiwei-hf@loongson.cn
State New
Headers show

Commit Message

guxiwei Oct. 12, 2019, 2:48 a.m. UTC
Change the stride argument to ptrdiff_t in the following functions:
ff_put_no_rnd_vc1_chroma_mc8_mmi, ff_put_no_rnd_vc1_chroma_mc4_mmi,
ff_avg_no_rnd_vc1_chroma_mc8_mmi, ff_avg_no_rnd_vc1_chroma_mc4_mmi.
---
 libavcodec/mips/vc1dsp_mips.h | 8 ++++----
 libavcodec/mips/vc1dsp_mmi.c  | 8 ++++----
 2 files changed, 8 insertions(+), 8 deletions(-)

Comments

Shiyou Yin Oct. 13, 2019, 9:23 a.m. UTC | #1
>-----Original Message-----
>From: ffmpeg-devel-bounces@ffmpeg.org [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf Of gxw
>Sent: Saturday, October 12, 2019 10:48 AM
>To: ffmpeg-devel@ffmpeg.org
>Subject: [FFmpeg-devel] [PATCH] avcodec/mips: Fixed four warnings in vc1dsp
>
>Change the stride argument to ptrdiff_t in the following functions:
>ff_put_no_rnd_vc1_chroma_mc8_mmi, ff_put_no_rnd_vc1_chroma_mc4_mmi,
>ff_avg_no_rnd_vc1_chroma_mc8_mmi, ff_avg_no_rnd_vc1_chroma_mc4_mmi.
>---
> libavcodec/mips/vc1dsp_mips.h | 8 ++++----
> libavcodec/mips/vc1dsp_mmi.c  | 8 ++++----
> 2 files changed, 8 insertions(+), 8 deletions(-)
>
>diff --git a/libavcodec/mips/vc1dsp_mips.h b/libavcodec/mips/vc1dsp_mips.h
>index 5f72e60..5897dae 100644
>--- a/libavcodec/mips/vc1dsp_mips.h
>+++ b/libavcodec/mips/vc1dsp_mips.h
>@@ -180,16 +180,16 @@ void ff_vc1_h_loop_filter16_mmi(uint8_t *src, int stride, int pq);
>
> void ff_put_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
>                                       uint8_t *src /* align 1 */,
>-                                      int stride, int h, int x, int y);
>+                                      ptrdiff_t stride, int h, int x, int y);
> void ff_put_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */,
>                                       uint8_t *src /* align 1 */,
>-                                      int stride, int h, int x, int y);
>+                                      ptrdiff_t stride, int h, int x, int y);
> void ff_avg_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
>                                       uint8_t *src /* align 1 */,
>-                                      int stride, int h, int x, int y);
>+                                      ptrdiff_t stride, int h, int x, int y);
> void ff_avg_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */,
>                                       uint8_t *src /* align 1 */,
>-                                      int stride, int h, int x, int y);
>+                                      ptrdiff_t stride, int h, int x, int y);
>
> void ff_vc1_inv_trans_8x8_msa(int16_t block[64]);
> void ff_vc1_inv_trans_8x4_msa(uint8_t *dest, ptrdiff_t linesize, int16_t *block);
>diff --git a/libavcodec/mips/vc1dsp_mmi.c b/libavcodec/mips/vc1dsp_mmi.c
>index db314de..9837868 100644
>--- a/libavcodec/mips/vc1dsp_mmi.c
>+++ b/libavcodec/mips/vc1dsp_mmi.c
>@@ -2241,7 +2241,7 @@ DECLARE_FUNCTION(3, 3)
>
> void ff_put_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
>                                       uint8_t *src /* align 1 */,
>-                                      int stride, int h, int x, int y)
>+                                      ptrdiff_t stride, int h, int x, int y)
> {
>     const int A = (8 - x) * (8 - y);
>     const int B =     (x) * (8 - y);
>@@ -2296,7 +2296,7 @@ void ff_put_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
>
> void ff_put_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */,
>                                       uint8_t *src /* align 1 */,
>-                                      int stride, int h, int x, int y)
>+                                      ptrdiff_t stride, int h, int x, int y)
> {
>     const int A = (8 - x) * (8 - y);
>     const int B =     (x) * (8 - y);
>@@ -2349,7 +2349,7 @@ void ff_put_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */,
>
> void ff_avg_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
>                                       uint8_t *src /* align 1 */,
>-                                      int stride, int h, int x, int y)
>+                                      ptrdiff_t stride, int h, int x, int y)
> {
>     const int A = (8 - x) * (8 - y);
>     const int B =     (x) * (8 - y);
>@@ -2407,7 +2407,7 @@ void ff_avg_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
>
> void ff_avg_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */,
>                                       uint8_t *src /* align 1 */,
>-                                      int stride, int h, int x, int y)
>+                                      ptrdiff_t stride, int h, int x, int y)
> {
>     const int A = (8 - x) * (8 - y);
>     const int B = (    x) * (8 - y);
>--
>2.1.0
>

LGTM.
Michael Niedermayer Oct. 13, 2019, 9:51 p.m. UTC | #2
On Sun, Oct 13, 2019 at 05:23:55PM +0800, Shiyou Yin wrote:
> >-----Original Message-----
> >From: ffmpeg-devel-bounces@ffmpeg.org [mailto:ffmpeg-devel-bounces@ffmpeg.org] On Behalf Of gxw
> >Sent: Saturday, October 12, 2019 10:48 AM
> >To: ffmpeg-devel@ffmpeg.org
> >Subject: [FFmpeg-devel] [PATCH] avcodec/mips: Fixed four warnings in vc1dsp
> >
> >Change the stride argument to ptrdiff_t in the following functions:
> >ff_put_no_rnd_vc1_chroma_mc8_mmi, ff_put_no_rnd_vc1_chroma_mc4_mmi,
> >ff_avg_no_rnd_vc1_chroma_mc8_mmi, ff_avg_no_rnd_vc1_chroma_mc4_mmi.
> >---
> > libavcodec/mips/vc1dsp_mips.h | 8 ++++----
> > libavcodec/mips/vc1dsp_mmi.c  | 8 ++++----
> > 2 files changed, 8 insertions(+), 8 deletions(-)
> >
> >diff --git a/libavcodec/mips/vc1dsp_mips.h b/libavcodec/mips/vc1dsp_mips.h
> >index 5f72e60..5897dae 100644
> >--- a/libavcodec/mips/vc1dsp_mips.h
> >+++ b/libavcodec/mips/vc1dsp_mips.h
> >@@ -180,16 +180,16 @@ void ff_vc1_h_loop_filter16_mmi(uint8_t *src, int stride, int pq);
> >
> > void ff_put_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
> >                                       uint8_t *src /* align 1 */,
> >-                                      int stride, int h, int x, int y);
> >+                                      ptrdiff_t stride, int h, int x, int y);
> > void ff_put_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */,
> >                                       uint8_t *src /* align 1 */,
> >-                                      int stride, int h, int x, int y);
> >+                                      ptrdiff_t stride, int h, int x, int y);
> > void ff_avg_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
> >                                       uint8_t *src /* align 1 */,
> >-                                      int stride, int h, int x, int y);
> >+                                      ptrdiff_t stride, int h, int x, int y);
> > void ff_avg_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */,
> >                                       uint8_t *src /* align 1 */,
> >-                                      int stride, int h, int x, int y);
> >+                                      ptrdiff_t stride, int h, int x, int y);
> >
> > void ff_vc1_inv_trans_8x8_msa(int16_t block[64]);
> > void ff_vc1_inv_trans_8x4_msa(uint8_t *dest, ptrdiff_t linesize, int16_t *block);
> >diff --git a/libavcodec/mips/vc1dsp_mmi.c b/libavcodec/mips/vc1dsp_mmi.c
> >index db314de..9837868 100644
> >--- a/libavcodec/mips/vc1dsp_mmi.c
> >+++ b/libavcodec/mips/vc1dsp_mmi.c
> >@@ -2241,7 +2241,7 @@ DECLARE_FUNCTION(3, 3)
> >
> > void ff_put_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
> >                                       uint8_t *src /* align 1 */,
> >-                                      int stride, int h, int x, int y)
> >+                                      ptrdiff_t stride, int h, int x, int y)
> > {
> >     const int A = (8 - x) * (8 - y);
> >     const int B =     (x) * (8 - y);
> >@@ -2296,7 +2296,7 @@ void ff_put_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
> >
> > void ff_put_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */,
> >                                       uint8_t *src /* align 1 */,
> >-                                      int stride, int h, int x, int y)
> >+                                      ptrdiff_t stride, int h, int x, int y)
> > {
> >     const int A = (8 - x) * (8 - y);
> >     const int B =     (x) * (8 - y);
> >@@ -2349,7 +2349,7 @@ void ff_put_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */,
> >
> > void ff_avg_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
> >                                       uint8_t *src /* align 1 */,
> >-                                      int stride, int h, int x, int y)
> >+                                      ptrdiff_t stride, int h, int x, int y)
> > {
> >     const int A = (8 - x) * (8 - y);
> >     const int B =     (x) * (8 - y);
> >@@ -2407,7 +2407,7 @@ void ff_avg_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
> >
> > void ff_avg_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */,
> >                                       uint8_t *src /* align 1 */,
> >-                                      int stride, int h, int x, int y)
> >+                                      ptrdiff_t stride, int h, int x, int y)
> > {
> >     const int A = (8 - x) * (8 - y);
> >     const int B = (    x) * (8 - y);
> >--
> >2.1.0
> >
> 
> LGTM.

will apply

thx

[...]
diff mbox

Patch

diff --git a/libavcodec/mips/vc1dsp_mips.h b/libavcodec/mips/vc1dsp_mips.h
index 5f72e60..5897dae 100644
--- a/libavcodec/mips/vc1dsp_mips.h
+++ b/libavcodec/mips/vc1dsp_mips.h
@@ -180,16 +180,16 @@  void ff_vc1_h_loop_filter16_mmi(uint8_t *src, int stride, int pq);
 
 void ff_put_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
                                       uint8_t *src /* align 1 */,
-                                      int stride, int h, int x, int y);
+                                      ptrdiff_t stride, int h, int x, int y);
 void ff_put_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */,
                                       uint8_t *src /* align 1 */,
-                                      int stride, int h, int x, int y);
+                                      ptrdiff_t stride, int h, int x, int y);
 void ff_avg_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
                                       uint8_t *src /* align 1 */,
-                                      int stride, int h, int x, int y);
+                                      ptrdiff_t stride, int h, int x, int y);
 void ff_avg_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */,
                                       uint8_t *src /* align 1 */,
-                                      int stride, int h, int x, int y);
+                                      ptrdiff_t stride, int h, int x, int y);
 
 void ff_vc1_inv_trans_8x8_msa(int16_t block[64]);
 void ff_vc1_inv_trans_8x4_msa(uint8_t *dest, ptrdiff_t linesize, int16_t *block);
diff --git a/libavcodec/mips/vc1dsp_mmi.c b/libavcodec/mips/vc1dsp_mmi.c
index db314de..9837868 100644
--- a/libavcodec/mips/vc1dsp_mmi.c
+++ b/libavcodec/mips/vc1dsp_mmi.c
@@ -2241,7 +2241,7 @@  DECLARE_FUNCTION(3, 3)
 
 void ff_put_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
                                       uint8_t *src /* align 1 */,
-                                      int stride, int h, int x, int y)
+                                      ptrdiff_t stride, int h, int x, int y)
 {
     const int A = (8 - x) * (8 - y);
     const int B =     (x) * (8 - y);
@@ -2296,7 +2296,7 @@  void ff_put_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
 
 void ff_put_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */,
                                       uint8_t *src /* align 1 */,
-                                      int stride, int h, int x, int y)
+                                      ptrdiff_t stride, int h, int x, int y)
 {
     const int A = (8 - x) * (8 - y);
     const int B =     (x) * (8 - y);
@@ -2349,7 +2349,7 @@  void ff_put_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */,
 
 void ff_avg_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
                                       uint8_t *src /* align 1 */,
-                                      int stride, int h, int x, int y)
+                                      ptrdiff_t stride, int h, int x, int y)
 {
     const int A = (8 - x) * (8 - y);
     const int B =     (x) * (8 - y);
@@ -2407,7 +2407,7 @@  void ff_avg_no_rnd_vc1_chroma_mc8_mmi(uint8_t *dst /* align 8 */,
 
 void ff_avg_no_rnd_vc1_chroma_mc4_mmi(uint8_t *dst /* align 8 */,
                                       uint8_t *src /* align 1 */,
-                                      int stride, int h, int x, int y)
+                                      ptrdiff_t stride, int h, int x, int y)
 {
     const int A = (8 - x) * (8 - y);
     const int B = (    x) * (8 - y);