faster dering
Originally committed as revision 2479 to svn://svn.mplayerhq.hu/mplayer/trunk/postproc
This commit is contained in:
parent
2e2126188f
commit
9927c7ee0d
2 changed files with 26 additions and 18 deletions
|
@ -1978,16 +1978,19 @@ FIND_MIN_MAX((%0, %1, 8))
|
||||||
"movq " #lx ", " #t1 " \n\t" /* src[-1] */\
|
"movq " #lx ", " #t1 " \n\t" /* src[-1] */\
|
||||||
PAVGB(t0, lx) /* (src[-1] + src[+1])/2 */\
|
PAVGB(t0, lx) /* (src[-1] + src[+1])/2 */\
|
||||||
PAVGB(sx, lx) /* (src[-1] + 2src[0] + src[+1])/4 */\
|
PAVGB(sx, lx) /* (src[-1] + 2src[0] + src[+1])/4 */\
|
||||||
"psubusb temp0, " #t1 " \n\t"\
|
PAVGB(lx, pplx) \
|
||||||
"psubusb temp0, " #t0 " \n\t"\
|
"movq " #lx ", temp1 \n\t"\
|
||||||
"psubusb temp0, " #sx " \n\t"\
|
"movq temp0, " #lx " \n\t"\
|
||||||
"pcmpeqb b00, " #t1 " \n\t" /* src[-1] > a ? 0 : -1*/\
|
"psubusb " #lx ", " #t1 " \n\t"\
|
||||||
"pcmpeqb b00, " #t0 " \n\t" /* src[+1] > a ? 0 : -1*/\
|
"psubusb " #lx ", " #t0 " \n\t"\
|
||||||
"pcmpeqb b00, " #sx " \n\t" /* src[0] > a ? 0 : -1*/\
|
"psubusb " #lx ", " #sx " \n\t"\
|
||||||
|
"movq b00, " #lx " \n\t"\
|
||||||
|
"pcmpeqb " #lx ", " #t1 " \n\t" /* src[-1] > a ? 0 : -1*/\
|
||||||
|
"pcmpeqb " #lx ", " #t0 " \n\t" /* src[+1] > a ? 0 : -1*/\
|
||||||
|
"pcmpeqb " #lx ", " #sx " \n\t" /* src[0] > a ? 0 : -1*/\
|
||||||
"paddb " #t1 ", " #t0 " \n\t"\
|
"paddb " #t1 ", " #t0 " \n\t"\
|
||||||
"paddb " #t0 ", " #sx " \n\t"\
|
"paddb " #t0 ", " #sx " \n\t"\
|
||||||
\
|
\
|
||||||
PAVGB(lx, pplx) \
|
|
||||||
PAVGB(plx, pplx) /* filtered */\
|
PAVGB(plx, pplx) /* filtered */\
|
||||||
"movq " #dst ", " #t0 " \n\t" /* dst */\
|
"movq " #dst ", " #t0 " \n\t" /* dst */\
|
||||||
"movq " #t0 ", " #t1 " \n\t" /* dst */\
|
"movq " #t0 ", " #t1 " \n\t" /* dst */\
|
||||||
|
@ -1999,11 +2002,12 @@ FIND_MIN_MAX((%0, %1, 8))
|
||||||
"paddb " #psx ", " #ppsx " \n\t"\
|
"paddb " #psx ", " #ppsx " \n\t"\
|
||||||
"#paddb b02, " #ppsx " \n\t"\
|
"#paddb b02, " #ppsx " \n\t"\
|
||||||
"pand b08, " #ppsx " \n\t"\
|
"pand b08, " #ppsx " \n\t"\
|
||||||
"pcmpeqb b00, " #ppsx " \n\t"\
|
"pcmpeqb " #lx ", " #ppsx " \n\t"\
|
||||||
"pand " #ppsx ", " #pplx " \n\t"\
|
"pand " #ppsx ", " #pplx " \n\t"\
|
||||||
"pandn " #dst ", " #ppsx " \n\t"\
|
"pandn " #dst ", " #ppsx " \n\t"\
|
||||||
"por " #pplx ", " #ppsx " \n\t"\
|
"por " #pplx ", " #ppsx " \n\t"\
|
||||||
"movq " #ppsx ", " #dst " \n\t"
|
"movq " #ppsx ", " #dst " \n\t"\
|
||||||
|
"movq temp1, " #lx " \n\t"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
0000000
|
0000000
|
||||||
|
|
|
@ -1978,16 +1978,19 @@ FIND_MIN_MAX((%0, %1, 8))
|
||||||
"movq " #lx ", " #t1 " \n\t" /* src[-1] */\
|
"movq " #lx ", " #t1 " \n\t" /* src[-1] */\
|
||||||
PAVGB(t0, lx) /* (src[-1] + src[+1])/2 */\
|
PAVGB(t0, lx) /* (src[-1] + src[+1])/2 */\
|
||||||
PAVGB(sx, lx) /* (src[-1] + 2src[0] + src[+1])/4 */\
|
PAVGB(sx, lx) /* (src[-1] + 2src[0] + src[+1])/4 */\
|
||||||
"psubusb temp0, " #t1 " \n\t"\
|
PAVGB(lx, pplx) \
|
||||||
"psubusb temp0, " #t0 " \n\t"\
|
"movq " #lx ", temp1 \n\t"\
|
||||||
"psubusb temp0, " #sx " \n\t"\
|
"movq temp0, " #lx " \n\t"\
|
||||||
"pcmpeqb b00, " #t1 " \n\t" /* src[-1] > a ? 0 : -1*/\
|
"psubusb " #lx ", " #t1 " \n\t"\
|
||||||
"pcmpeqb b00, " #t0 " \n\t" /* src[+1] > a ? 0 : -1*/\
|
"psubusb " #lx ", " #t0 " \n\t"\
|
||||||
"pcmpeqb b00, " #sx " \n\t" /* src[0] > a ? 0 : -1*/\
|
"psubusb " #lx ", " #sx " \n\t"\
|
||||||
|
"movq b00, " #lx " \n\t"\
|
||||||
|
"pcmpeqb " #lx ", " #t1 " \n\t" /* src[-1] > a ? 0 : -1*/\
|
||||||
|
"pcmpeqb " #lx ", " #t0 " \n\t" /* src[+1] > a ? 0 : -1*/\
|
||||||
|
"pcmpeqb " #lx ", " #sx " \n\t" /* src[0] > a ? 0 : -1*/\
|
||||||
"paddb " #t1 ", " #t0 " \n\t"\
|
"paddb " #t1 ", " #t0 " \n\t"\
|
||||||
"paddb " #t0 ", " #sx " \n\t"\
|
"paddb " #t0 ", " #sx " \n\t"\
|
||||||
\
|
\
|
||||||
PAVGB(lx, pplx) \
|
|
||||||
PAVGB(plx, pplx) /* filtered */\
|
PAVGB(plx, pplx) /* filtered */\
|
||||||
"movq " #dst ", " #t0 " \n\t" /* dst */\
|
"movq " #dst ", " #t0 " \n\t" /* dst */\
|
||||||
"movq " #t0 ", " #t1 " \n\t" /* dst */\
|
"movq " #t0 ", " #t1 " \n\t" /* dst */\
|
||||||
|
@ -1999,11 +2002,12 @@ FIND_MIN_MAX((%0, %1, 8))
|
||||||
"paddb " #psx ", " #ppsx " \n\t"\
|
"paddb " #psx ", " #ppsx " \n\t"\
|
||||||
"#paddb b02, " #ppsx " \n\t"\
|
"#paddb b02, " #ppsx " \n\t"\
|
||||||
"pand b08, " #ppsx " \n\t"\
|
"pand b08, " #ppsx " \n\t"\
|
||||||
"pcmpeqb b00, " #ppsx " \n\t"\
|
"pcmpeqb " #lx ", " #ppsx " \n\t"\
|
||||||
"pand " #ppsx ", " #pplx " \n\t"\
|
"pand " #ppsx ", " #pplx " \n\t"\
|
||||||
"pandn " #dst ", " #ppsx " \n\t"\
|
"pandn " #dst ", " #ppsx " \n\t"\
|
||||||
"por " #pplx ", " #ppsx " \n\t"\
|
"por " #pplx ", " #ppsx " \n\t"\
|
||||||
"movq " #ppsx ", " #dst " \n\t"
|
"movq " #ppsx ", " #dst " \n\t"\
|
||||||
|
"movq temp1, " #lx " \n\t"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
0000000
|
0000000
|
||||||
|
|
Loading…
Add table
Reference in a new issue