mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-06 16:56:55 +08:00
Work around for 1 pixel destination
BUG=302 TEST=*1x1* R=tpsiaki@google.com Review URL: https://webrtc-codereview.appspot.com/6519004 git-svn-id: http://libyuv.googlecode.com/svn/trunk@943 16f28f9a-4ce2-e073-06de-1de4eb20be90
This commit is contained in:
parent
90a36b29d3
commit
ac9b96c076
@ -634,6 +634,13 @@ void ScaleSlope(int src_width, int src_height,
|
|||||||
assert(src_height != 0);
|
assert(src_height != 0);
|
||||||
assert(dst_width > 0);
|
assert(dst_width > 0);
|
||||||
assert(dst_height > 0);
|
assert(dst_height > 0);
|
||||||
|
// Check for 1 pixel and avoid FixedDiv overflow.
|
||||||
|
if (dst_width == 1) {
|
||||||
|
dst_width = src_width;
|
||||||
|
}
|
||||||
|
if (dst_height == 1) {
|
||||||
|
dst_height = src_height;
|
||||||
|
}
|
||||||
if (filtering == kFilterBox) {
|
if (filtering == kFilterBox) {
|
||||||
// Scale step for point sampling duplicates all pixels equally.
|
// Scale step for point sampling duplicates all pixels equally.
|
||||||
*dx = FixedDiv(Abs(src_width), dst_width);
|
*dx = FixedDiv(Abs(src_width), dst_width);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user