mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2026-01-01 03:12:16 +08:00
clip by adjusting pointer
BUG=302 TEST=ARGBScaleDownClipBy2_None R=tpsiaki@google.com Review URL: https://webrtc-codereview.appspot.com/6529004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@945 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
6dc80ab585
commit
667de22fd3
@ -676,11 +676,15 @@ static void ScaleARGB(const uint8* src, int src_stride,
|
||||
ScaleSlope(src_width, src_height, dst_width, dst_height, filtering,
|
||||
&x, &y, &dx, &dy);
|
||||
if (clip_x) {
|
||||
x += clip_x * dx;
|
||||
int64 clipf = static_cast<int64>(clip_x) * dx;
|
||||
x += (clipf & 0xffff);
|
||||
src += (clipf >> 16) * 4;
|
||||
dst += clip_x * 4;
|
||||
}
|
||||
if (clip_y) {
|
||||
y += clip_y * dy;
|
||||
int64 clipf = static_cast<int64>(clip_y) * dy;
|
||||
y += (clipf & 0xffff);
|
||||
src += (clipf >> 16) * src_stride;
|
||||
dst += clip_y * dst_stride;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user