[x264-devel] commit: fix an arithmetic overflow that disabled SEA threshold after finding a mv with SAD < mvcost. (Loren Merritt )
git version control
git at videolan.org
Tue Mar 25 21:14:16 CET 2008
x264 | branch: master | Loren Merritt <pengvado at akuvian.org> | Tue Mar 25 07:31:51 2008 -0600| [17e5dac11adae8af7521c95a9dd1d70549a13b64]
fix an arithmetic overflow that disabled SEA threshold after finding a mv with SAD < mvcost.
> http://git.videolan.org/gitweb.cgi/x264.git/?a=commit;h=17e5dac11adae8af7521c95a9dd1d70549a13b64
---
encoder/me.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/encoder/me.c b/encoder/me.c
index cd5a9fc..310c586 100644
--- a/encoder/me.c
+++ b/encoder/me.c
@@ -498,7 +498,7 @@ me_hex2:
int ycost = p_cost_mvy[my<<2];
bsad -= ycost;
xn = h->pixf.ads[i_pixel]( enc_dc, sums_base + min_x + my * stride, delta,
- cost_fpel_mvx+min_x, xs, width, bsad*17/16 );
+ cost_fpel_mvx+min_x, xs, width, X264_MAX(bsad,0)*17/16 );
for( i=0; i<xn-2; i+=3 )
{
uint8_t *ref = p_fref+min_x+my*stride;
@@ -569,7 +569,7 @@ me_hex2:
{
bcost -= p_cost_mvy[my<<2];
xn = h->pixf.ads[i_pixel]( enc_dc, sums_base + min_x + my * stride, delta,
- cost_fpel_mvx+min_x, xs, width, bcost );
+ cost_fpel_mvx+min_x, xs, width, X264_MAX(bcost,0) );
for( i=0; i<xn-2; i+=3 )
COST_MV_X3_ABS( min_x+xs[i],my, min_x+xs[i+1],my, min_x+xs[i+2],my );
bcost += p_cost_mvy[my<<2];
More information about the x264-devel
mailing list