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

Michael Niedermayer michael at niedermayer.cc
Mon Oct 14 00:51:45 EEST 2019


On Sun, Oct 13, 2019 at 05:23:55PM +0800, Shiyou Yin wrote:
> >-----Original Message-----
> >From: ffmpeg-devel-bounces at ffmpeg.org [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf Of gxw
> >Sent: Saturday, October 12, 2019 10:48 AM
> >To: ffmpeg-devel at 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

[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

Into a blind darkness they enter who follow after the Ignorance,
they as if into a greater darkness enter who devote themselves
to the Knowledge alone. -- Isha Upanishad
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20191013/c75602eb/attachment.sig>


More information about the ffmpeg-devel mailing list