1

x264libはいつものようにWindowsでクラッシュしています。今、私はそれを修正しようとしています、そして私は一つのことを理解していません。コードでは、関数のシグネチャのみを確認できます。

int x264_coeff_last64_sse2( dctcoef *dct );

ただし、*。h、*。c、または*.asmソースには実装がありません。そんなことがあるものか???

(関数が呼び出されてクラッシュしたため、リンクする必要があります)

4

1 に答える 1

0

それらは少しトリッキーです:)それは実際にquant.cは私のgitチェックアウトで356行目のマクロとして定義されています。

定義は次のとおりです。

#define last(num)\
static int x264_coeff_last##num( dctcoef *l )\
{\
    int i_last = num-1;\
    while( i_last >= 0 && l[i_last] == 0 )\
        i_last--;\
    return i_last;\
}

編集:これはあなたが探していたアセンブリコードだと思います:の行(1317-1363)x264\common\x86\quant-a.asmです

%ifndef ARCH_X86_64
cglobal coeff_last64, 1, 5-mmsize/16
    pxor m2, m2
    LAST_MASK 16, r2d, r0+SIZEOF_DCTCOEF* 32, r4d
    LAST_MASK 16, r3d, r0+SIZEOF_DCTCOEF* 48, r4d
    shl r3d, 16
    or  r2d, r3d
    xor r2d, -1
    jne .secondhalf
    LAST_MASK 16, r1d, r0+SIZEOF_DCTCOEF* 0, r4d
    LAST_MASK 16, r3d, r0+SIZEOF_DCTCOEF*16, r4d
    shl r3d, 16
    or  r1d, r3d
    not r1d
    BSR eax, r1d, 0x1f
    RET
.secondhalf:
    BSR eax, r2d, 0x1f
    add eax, 32
    RET
%else
cglobal coeff_last64, 1,4
    pxor m2, m2
    LAST_MASK 16, r1d, r0+SIZEOF_DCTCOEF* 0
    LAST_MASK 16, r2d, r0+SIZEOF_DCTCOEF*16
    LAST_MASK 16, r3d, r0+SIZEOF_DCTCOEF*32
    LAST_MASK 16, r0d, r0+SIZEOF_DCTCOEF*48
    shl r2d, 16
    shl r0d, 16
    or  r1d, r2d
    or  r3d, r0d
    shl r3,  32
    or  r1,  r3
    not r1
    BSR rax, r1, 0x3f
    RET
%endif
%endmacro

%ifndef ARCH_X86_64
INIT_MMX mmx2
COEFF_LAST
%endif
INIT_XMM sse2
COEFF_LAST
INIT_XMM sse2, lzcnt
COEFF_LAST

お役に立てば幸いです。

于 2011-12-16T15:27:51.963 に答える