bf561 汇编指令集(四)
全文浏览:http://www.analogcn.com/Article/wz3/200711/20071120020608.html
专用视频指令。这些指令大概是最有用的了,只是使用限制比较多。
Video Pixel Operations
ALIGN8, ALIGN16, ALIGN24
// If r3 = 0xABCD 1234 and r4 = 0xBEEF DEAD, then . . .
r0 = align8 (r3, r4) ; /* produces r0 = 0x34BE EFDE, */
r0 = align16 (r3, r4) ; /* produces r0 = 0x1234 BEEF, and */
r0 = align24 (r3, r4) ; /* produces r0 = 0xCD12 34BE, */
DISALGNEXCPT
disalgnexcpt || r1 = [i0++] || r3 = [i1++] ; /* three instructions in parallel */
BYTEOP3P
(Dual 16-Bit Add / Clip)
r3 = byteop3p (r1:0, r3:2) (lo) ;
r3 = byteop3p (r1:0, r3:2) (hi) ;
r3 = byteop3p (r1:0, r3:2) (lo, r) ;
BYTEOP16P
(Quad 8-Bit Add)
(r1,r2)= byteop16p (r3:2,r1:0) ;
BYTEOP1P
(Quad 8-Bit Average – Byte)
r3 = byteop1p (r1:0, r3:2) (t,r) ;
r3 = byteop1p (r1:0, r3:2) ;
BYTEOP2P
(Quad 8-Bit Average – Half-Word)
r3 = byteop2p (r1:0, r3:2) (tl) ;
r3 = byteop2p (r1:0, r3:2) (th) ;
r3 = byteop2p (r1:0, r3:2) (rndl, r) ;
BYTEPACK
(Quad 8-Bit Pack)
r2 = bytepack (r4,r5) ;
BYTEOP16M
(Quad 8-Bit Subtract)
(r1,r2)= byteop16m (r3:2,r1:0) ;
SAA
(Quad 8-Bit Subtract-Absolute-Accumulate)
saa (r1:0, r3:2) || r0 = [i0++] || r2 = [i1++] ; /* parallel fill instructions */
saa (r1:0, r3:2) (R) || r1 = [i0++] || r3 = [i1++] ; /* reverse, parallel fill instructions */
saa (r1:0, r3:2) ; /* last SAA in a loop, no more fill required */
/*Special Applications
Use the Quad 8-Bit Subtract-Absolute-Accumulate instruction for block-based video motion estimation algorithms using block Sum of Absolute Difference (SAD) calculations to measure distortion. */
BYTEUNPACK
(Quad 8-Bit Unpack)
(r6,r5) = byteunpack r1:0 ;
全文浏览:http://www.analogcn.com/Article/wz3/200711/20071120020608.html
http://www.analogcn.com/Article/wz3/200711/20071120020608.html