Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(215)

Unified Diff: source/scale.cc

Issue 2347733002: Scale by 3/8 only if source is multiple of 8 tall. (Closed)
Patch Set: Scale by 3/8 only if source is multiple of 8 tall. Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « include/libyuv/version.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: source/scale.cc
diff --git a/source/scale.cc b/source/scale.cc
index 36e3fe52813a020c6e04cfe0c6a13a6773aac9f6..eba9afc2068cd224246aadb05c6e3f4a4f7f6834 100644
--- a/source/scale.cc
+++ b/source/scale.cc
@@ -1411,8 +1411,7 @@ void ScalePlane(const uint8* src, int src_stride,
}
if (dst_width <= Abs(src_width) && dst_height <= src_height) {
// Scale down.
- if (4 * dst_width == 3 * src_width &&
- 4 * dst_height == 3 * src_height) {
+ if (4 * dst_width == 3 * src_width && 4 * dst_height == 3 * src_height) {
// optimized, 3/4
ScalePlaneDown34(src_width, src_height, dst_width, dst_height,
src_stride, dst_stride, src, dst, filtering);
@@ -1425,8 +1424,7 @@ void ScalePlane(const uint8* src, int src_stride,
return;
}
// 3/8 rounded up for odd sized chroma height.
- if (8 * dst_width == 3 * src_width &&
- dst_height == ((src_height * 3 + 7) / 8)) {
+ if (8 * dst_width == 3 * src_width && 8 * dst_height == 3 * src_height) {
// optimized, 3/8
ScalePlaneDown38(src_width, src_height, dst_width, dst_height,
src_stride, dst_stride, src, dst, filtering);
@@ -1508,8 +1506,7 @@ void ScalePlane_16(const uint16* src, int src_stride,
return;
}
// 3/8 rounded up for odd sized chroma height.
- if (8 * dst_width == 3 * src_width &&
- dst_height == ((src_height * 3 + 7) / 8)) {
+ if (8 * dst_width == 3 * src_width && 8 * dst_height == 3 * src_height) {
// optimized, 3/8
ScalePlaneDown38_16(src_width, src_height, dst_width, dst_height,
src_stride, dst_stride, src, dst, filtering);
« no previous file with comments | « include/libyuv/version.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698