diff mbox series

[FFmpeg-devel,1/2] avcodec/mips: fix compilation with MIPS16

Message ID 20200412015433.249066-1-rosenp@gmail.com
State New
Headers show
Series [FFmpeg-devel,1/2] avcodec/mips: fix compilation with MIPS16 | expand

Checks

Context Check Description
andriy/default pending
andriy/make success Make finished
andriy/make_fate success Make fate finished

Commit Message

Rosen Penev April 12, 2020, 1:54 a.m. UTC
get_cabac_inline for mips uses inline asm that relies on mips32
instructions.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
 libavcodec/mips/cabac.h | 2 ++
 1 file changed, 2 insertions(+)

Comments

Michael Niedermayer April 12, 2020, 2:40 p.m. UTC | #1
On Sat, Apr 11, 2020 at 06:54:32PM -0700, Rosen Penev wrote:
> get_cabac_inline for mips uses inline asm that relies on mips32
> instructions.
> 
> Signed-off-by: Rosen Penev <rosenp@gmail.com>
> ---
>  libavcodec/mips/cabac.h | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/libavcodec/mips/cabac.h b/libavcodec/mips/cabac.h
> index 2a05e5ab3c..cc40dbba15 100644
> --- a/libavcodec/mips/cabac.h
> +++ b/libavcodec/mips/cabac.h
> @@ -28,6 +28,7 @@
>  #include "libavutil/mips/mmiutils.h"
>  #include "config.h"
>  

> +#ifndef __mips16

this should probably be something set by configure
something like HAVE_MIPS* i suspect

thx

[...]
Rosen Penev April 12, 2020, 10:11 p.m. UTC | #2
On Sun, Apr 12, 2020 at 7:40 AM Michael Niedermayer
<michael@niedermayer.cc> wrote:
>
> On Sat, Apr 11, 2020 at 06:54:32PM -0700, Rosen Penev wrote:
> > get_cabac_inline for mips uses inline asm that relies on mips32
> > instructions.
> >
> > Signed-off-by: Rosen Penev <rosenp@gmail.com>
> > ---
> >  libavcodec/mips/cabac.h | 2 ++
> >  1 file changed, 2 insertions(+)
> >
> > diff --git a/libavcodec/mips/cabac.h b/libavcodec/mips/cabac.h
> > index 2a05e5ab3c..cc40dbba15 100644
> > --- a/libavcodec/mips/cabac.h
> > +++ b/libavcodec/mips/cabac.h
> > @@ -28,6 +28,7 @@
> >  #include "libavutil/mips/mmiutils.h"
> >  #include "config.h"
> >
>
> > +#ifndef __mips16
>
> this should probably be something set by configure
> something like HAVE_MIPS* i suspect
config.h does not have a HAVE_MIPS16 macro defined anywhere.
>
> thx
>
> [...]
> --
> Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
>
> "I am not trying to be anyone's saviour, I'm trying to think about the
>  future and not be sad" - Elon Musk
>
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel@ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
>
> To unsubscribe, visit link above, or email
> ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".
diff mbox series

Patch

diff --git a/libavcodec/mips/cabac.h b/libavcodec/mips/cabac.h
index 2a05e5ab3c..cc40dbba15 100644
--- a/libavcodec/mips/cabac.h
+++ b/libavcodec/mips/cabac.h
@@ -28,6 +28,7 @@ 
 #include "libavutil/mips/mmiutils.h"
 #include "config.h"
 
+#ifndef __mips16
 #define get_cabac_inline get_cabac_inline_mips
 static av_always_inline int get_cabac_inline(CABACContext *c,
                                              uint8_t * const state){
@@ -116,4 +117,5 @@  static av_always_inline int get_cabac_inline(CABACContext *c,
     return bit;
 }
 
+#endif
 #endif /* AVCODEC_MIPS_CABAC_H */