彼らは少しトリッキー:)それは実際に私のgitのチェックアウトとquant.c
ライン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;\
}
EDIT:私は、あなたが探していた本であるアセンブリコードは、ライン(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
希望に役立ちます!
私はそれがasmの使用法を除外したときに呼び出されるものだと思います。問題のあるものはasmで書かれています(少なくとも私はそう仮定します)。そして、それはsse2サフィックスを持っています。 – moose
更新されたアセンブリは探していたものですか? – mevatron
これがあれば... x264_coeff_last64_sse2()とcoeff_last64の関係は何ですか? – moose