[FFmpeg-cvslog] h264: use struct offsets in get_cabac_bypass_sign_x86().
Aurélien Nephtali
aurelien.nephtali at gmail.com
Sun Apr 1 14:07:56 CEST 2012
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 ?
--
Aurélien Nephtali
More information about the ffmpeg-cvslog
mailing list