[FFmpeg-cvslog] h264: use struct offsets in get_cabac_bypass_sign_x86().

Michael Niedermayer michaelni at gmx.at
Sun Apr 1 23:57:50 CEST 2012


On Sun, Apr 01, 2012 at 02:07:56PM +0200, Aurélien Nephtali wrote:
> Hi,
> 
> On Sun, Apr 1, 2012 at 1:09 PM, Michael Niedermayer <michaelni at gmx.at> wrote:
> > On Sun, Apr 01, 2012 at 12:30:26PM +0200, Aurélien Nephtali wrote:
> >> Hi,
> >>
> >> On Thu, Mar 29, 2012 at 4:32 AM, Ronald S. Bultje <git at videolan.org> wrote:
> >> > ffmpeg | branch: master | Ronald S. Bultje <rsbultje at gmail.com> | Fri Mar 16 22:41:17 2012 -0700| [db025929f202bc32459a1278ee06920a06564762] | committer: Ronald S. Bultje
> >> >
> >> > h264: use struct offsets in get_cabac_bypass_sign_x86().
> >> >
> >> >> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=db025929f202bc32459a1278ee06920a06564762
> >> > ---
> >> >
> >> >  libavcodec/x86/cabac.h |   19 +++++++++++--------
> >> >  1 files changed, 11 insertions(+), 8 deletions(-)
> >> >
> >>
> >> This change makes libavcodec crash when decoding H.264 streams involving CABAC.
> >>
> >> (test done on Mac OS X 10.7.3 with : gcc version 4.2.1 (Based on Apple
> >> Inc. build 5658) (LLVM build 2336.1.00))
> > [...]
> >> 0x0000000100797b8e <get_cabac_bypass_sign_x86+30>:    mov    0x4(%rsi),%edx
> >> 0x0000000100797b91 <get_cabac_bypass_sign_x86+33>:    mov    (%rsi),%eax
> >> 0x0000000100797b93 <get_cabac_bypass_sign_x86+35>:    shl    $0x11,%edx
> >> 0x0000000100797b96 <get_cabac_bypass_sign_x86+38>:    add    %eax,%eax
> >> 0x0000000100797b98 <get_cabac_bypass_sign_x86+40>:    sub    %edx,%eax
> > [...]
> > +        "movl %a5(%2), %k1                      \n\t"
> > +        "movl %a3(%2), %%eax                    \n\t"
> >         "shl $17, %k1                           \n\t"
> >         "add %%eax, %%eax                       \n\t"
> >         "sub %k1, %%eax                         \n\t"
> > [...]
> > +        : "+c"(val), "=&r"(tmp)
> > +        : "r"(c),
> > +          "i"(offsetof(CABACContext, low)),
> > +          "i"(offsetof(CABACContext, bytestream)),
> > +          "i"(offsetof(CABACContext, range))
> > +        : "%eax", "%edx", "memory"
> >
> > your compiler is violating the clobber list constraint for edx
> >
> 
> I trust you on that but what should I do then ?

several options
1. revert these changes
2. use a different compiler
3. fix the compiler
4. something else i didnt think of

Is there an easily available alternative without disadvantages on OSX
to this compiler version ?

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

When you are offended at any man's fault, turn to yourself and study your
own failings. Then you will forget your anger. -- Epictetus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20120401/460f9e64/attachment.asc>


More information about the ffmpeg-cvslog mailing list