Re: [libav-devel] [PATCH] Add unconditional return statement to yuva420_rgb32_MMX() / yuva420_bgr32_MMX().

2011-04-11 Thread Kostya
On Sun, Apr 10, 2011 at 09:44:51PM +0200, Diego Biurrun wrote:
 When HAVE_7REGS was not defined these functions had an empty body
 causing the following warnings during compilation.
 In file included from libswscale/x86/yuv2rgb_mmx.c:58:
 libswscale/x86/yuv2rgb_template.c: In function ‘yuva420_rgb32_MMX’:
 libswscale/x86/yuv2rgb_template.c:412: warning: no return statement in 
 function returning non-void
 libswscale/x86/yuv2rgb_template.c: In function ‘yuva420_bgr32_MMX’:
 libswscale/x86/yuv2rgb_template.c:457: warning: no return statement in 
 function returning non-void
 
 Signed-off-by: Diego Biurrun di...@biurrun.de
 ---

looks ok now
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] Add unconditional return statement to yuva420_rgb32_MMX() / yuva420_bgr32_MMX().

2011-04-11 Thread Diego Biurrun
On Mon, Apr 11, 2011 at 11:25:49AM +0200, Luca Barbato wrote:
 On 04/10/2011 09:44 PM, Diego Biurrun wrote:
  When HAVE_7REGS was not defined these functions had an empty body
  causing the following warnings during compilation.
  In file included from libswscale/x86/yuv2rgb_mmx.c:58:
  libswscale/x86/yuv2rgb_template.c: In function ‘yuva420_rgb32_MMX’:
  libswscale/x86/yuv2rgb_template.c:412: warning: no return statement in 
  function returning non-void
  libswscale/x86/yuv2rgb_template.c: In function ‘yuva420_bgr32_MMX’:
  libswscale/x86/yuv2rgb_template.c:457: warning: no return statement in 
  function returning non-void
 
 Probably there is a saner way, patch ok.

Pushed, Diego
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] Add unconditional return statement to yuva420_rgb32_MMX() / yuva420_bgr32_MMX().

2011-04-11 Thread Luca Barbato
On 04/11/2011 03:44 PM, Ronald S. Bultje wrote:
 This isn't right. You're declaring empty functions for stuff that is
 supposed to do something. In x86/yuv2rgb_mmx.c, you'll see these
 functions are only called under if (HAVE_7REGS) anyway, so the proper
 fix is to not declare these functions at all, i.e. move the #if
 HAVE_7REGS outside the function declaration. Dead code elimination
 should take care of the rest.

The cleanup should take care of it.

lu

-- 

Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] Add unconditional return statement to yuva420_rgb32_MMX() / yuva420_bgr32_MMX().

2011-04-11 Thread Ronald S. Bultje
Hi,

On Mon, Apr 11, 2011 at 10:01 AM, Luca Barbato lu_z...@gentoo.org wrote:
 On 04/11/2011 03:44 PM, Ronald S. Bultje wrote:
 This isn't right. You're declaring empty functions for stuff that is
 supposed to do something. In x86/yuv2rgb_mmx.c, you'll see these
 functions are only called under if (HAVE_7REGS) anyway, so the proper
 fix is to not declare these functions at all, i.e. move the #if
 HAVE_7REGS outside the function declaration. Dead code elimination
 should take care of the rest.

 The cleanup should take care of it.

That's still no reason to apply a broken patch before that... But
anyway, let's not take this too far, let's get your cleanup in, that's
much more exciting, and then let's fix whatever's left after.

Ronald
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] Add unconditional return statement to yuva420_rgb32_MMX() / yuva420_bgr32_MMX().

2011-04-11 Thread Kostya
On Mon, Apr 11, 2011 at 10:06:43AM -0400, Ronald S. Bultje wrote:
 Hi,
 
 On Mon, Apr 11, 2011 at 10:01 AM, Luca Barbato lu_z...@gentoo.org wrote:
  On 04/11/2011 03:44 PM, Ronald S. Bultje wrote:
  This isn't right. You're declaring empty functions for stuff that is
  supposed to do something. In x86/yuv2rgb_mmx.c, you'll see these
  functions are only called under if (HAVE_7REGS) anyway, so the proper
  fix is to not declare these functions at all, i.e. move the #if
  HAVE_7REGS outside the function declaration. Dead code elimination
  should take care of the rest.
 
  The cleanup should take care of it.
 
 That's still no reason to apply a broken patch before that... But
 anyway, let's not take this too far, let's get your cleanup in, that's
 much more exciting, and then let's fix whatever's left after.

It's not that broken since dead code elimination should work fine in that case
too regardless if it's totally empty function or with one return.
___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


[libav-devel] [PATCH] Add unconditional return statement to yuva420_rgb32_MMX() / yuva420_bgr32_MMX().

2011-04-10 Thread Diego Biurrun
When HAVE_7REGS was not defined these functions had an empty body
causing the following warnings during compilation.
In file included from libswscale/x86/yuv2rgb_mmx.c:58:
libswscale/x86/yuv2rgb_template.c: In function ‘yuva420_rgb32_MMX’:
libswscale/x86/yuv2rgb_template.c:412: warning: no return statement in function 
returning non-void
libswscale/x86/yuv2rgb_template.c: In function ‘yuva420_bgr32_MMX’:
libswscale/x86/yuv2rgb_template.c:457: warning: no return statement in function 
returning non-void

Signed-off-by: Diego Biurrun di...@biurrun.de
---
 libswscale/x86/yuv2rgb_template.c |4 
 1 files changed, 4 insertions(+), 0 deletions(-)

diff --git a/libswscale/x86/yuv2rgb_template.c 
b/libswscale/x86/yuv2rgb_template.c
index 9f0d33b..cf8f0d3 100644
--- a/libswscale/x86/yuv2rgb_template.c
+++ b/libswscale/x86/yuv2rgb_template.c
@@ -406,6 +406,8 @@ static inline int RENAME(yuva420_rgb32)(SwsContext *c, 
const uint8_t *src[],
 YUV2RGB_ENDLOOP(4)
 YUV2RGB_OPERANDS_ALPHA
 YUV2RGB_ENDFUNC
+#else
+return 0;
 #endif
 }
 
@@ -449,5 +451,7 @@ static inline int RENAME(yuva420_bgr32)(SwsContext *c, 
const uint8_t *src[],
 YUV2RGB_ENDLOOP(4)
 YUV2RGB_OPERANDS_ALPHA
 YUV2RGB_ENDFUNC
+#else
+return 0;
 #endif
 }
-- 
1.5.6.5

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] Add unconditional return statement to yuva420_rgb32_MMX() / yuva420_bgr32_MMX().

2011-04-10 Thread Luca Barbato
On 04/10/2011 09:44 PM, Diego Biurrun wrote:
 causing the following warnings during compilation.

Could you please try to rebase it on my github swscale cleanup branch?

(Help to squash and push it here welcome)

lu

-- 

Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel


Re: [libav-devel] [PATCH] Add unconditional return statement to yuva420_rgb32_MMX() / yuva420_bgr32_MMX().

2011-04-10 Thread Luca Barbato
On 04/10/2011 10:11 PM, Diego Biurrun wrote:
 On Sun, Apr 10, 2011 at 09:53:44PM +0200, Luca Barbato wrote:
 On 04/10/2011 09:44 PM, Diego Biurrun wrote:
 causing the following warnings during compilation.

 Could you please try to rebase it on my github swscale cleanup branch?
 
 Can we do that later?  This is inspired by an opensuse distro patch.
 I'd like to get this upstreamed so they can drop their patch.  Adding
 it to your swscale cleanup branch should not hold this one up.

Even if incomplete thanks to Josh right now should give identical
results so I'm considering merging it now and add the remaining changes
on a later time.

lu

-- 

Luca Barbato
Gentoo/linux
http://dev.gentoo.org/~lu_zero

___
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel