[FFmpeg-cvslog] hevc/sao: use aligned copies

Carl Eugen Hoyos cehoyos at ag.or.at
Wed Feb 4 12:11:13 CET 2015


Christophe Gisquet <git <at> videolan.org> writes:

> hevc/sao: use aligned copies

This makes reading hevc files crash if compiled 
with icc 14.0.2 on Linux:
http://fate.ffmpeg.org/history.cgi?slot=x86_64-linux-gnu-icc-2013_sp1.0.080

Program received signal SIGSEGV, Segmentation fault.
0x000000000048af01 in copy_CTB (dst=<optimized out>, 
    src=0x7ffff67ed07f, width=<optimized out>, height=<optimized out>, 
    stride_dst=<optimized out>, stride_src=<optimized out>) 
at libavcodec/hevc_filter.c:150
150                     AV_COPY64(dst+j, src+j);

AV_COPY64() in libavutil/x86/intreadwrite.h looks like this:
    __asm__("movq   %1, %%mm0  \n\t"
            "movq   %%mm0, %0  \n\t"
            : "=m"(*(uint64_t*)d)
            : "m" (*(const uint64_t*)s)
            : "mm0");

(gdb) disass $pc-32,$pc+32
   0x000000000048aee1 <sao_filter_CTB+4209>:    test   $0xf,%edi
   0x000000000048aee7 <sao_filter_CTB+4215>:    je     0x48af0b
<sao_filter_CTB+4251>
   0x000000000048aee9 <sao_filter_CTB+4217>:    lea    0x0(,%r12,8),%r15d
   0x000000000048aef1 <sao_filter_CTB+4225>:    add    $0x2,%r12d
   0x000000000048aef5 <sao_filter_CTB+4229>:    movslq %r15d,%r15
   0x000000000048aef8 <sao_filter_CTB+4232>:    cmp    %r13d,%r12d
   0x000000000048aefb <sao_filter_CTB+4235>:    movdqu (%r15,%r8,1),%xmm0
=> 0x000000000048af01 <sao_filter_CTB+4241>:    movdqa %xmm0,(%r15,%r9,1)
   0x000000000048af07 <sao_filter_CTB+4247>:    jb     0x48aee9
<sao_filter_CTB+4217>
   0x000000000048af09 <sao_filter_CTB+4249>:    jmp    0x48af2b
<sao_filter_CTB+4283>
   0x000000000048af0b <sao_filter_CTB+4251>:    lea    0x0(,%r12,8),%r15d
   0x000000000048af13 <sao_filter_CTB+4259>:    add    $0x2,%r12d
   0x000000000048af17 <sao_filter_CTB+4263>:    movslq %r15d,%r15
   0x000000000048af1a <sao_filter_CTB+4266>:    cmp    %r13d,%r12d
   0x000000000048af1d <sao_filter_CTB+4269>:    movdqa (%r15,%r8,1),%xmm0
(gdb) info register
rax            0x4      4
rbx            0x1      1
rcx            0x42     66
rdx            0x9      9
rsi            0xa00    2560
rdi            0x0      0
rbp            0x0      0x0
rsp            0x7fffffffc9b0   0x7fffffffc9b0
r8             0x7ffff67ed07f   140737328894079
r9             0x7ffff6de2adf   140737335143135
r10            0x49     73
r11            0xa40    2624
r12            0x3      3
r13            0x9      9
r14            0x40     64
r15            0x8      8
rip            0x48af01 0x48af01 <sao_filter_CTB+4241>
eflags         0x10297  [ CF PF AF SF IF RF ]
cs             0x33     51
ss             0x2b     43
ds             0x0      0
es             0x0      0
fs             0x0      0
gs             0x0      0
ymm0 v2_int128 = {0x1b1b1b1b1b1c1c1c1d1d1d1d1d1e1f25, 
                  0x00000000000000000000000000000000}

Note that I do not know where to report icc bugs.

Carl Eugen



More information about the ffmpeg-cvslog mailing list