mirror of
https://chromium.googlesource.com/libyuv/libyuv
synced 2025-12-07 01:06:46 +08:00
Scale by 3/8 only if source is multiple of 8 tall.
BUG=libyuv:635 TEST=try bots R=harryjin@google.com Review URL: https://codereview.chromium.org/2347733002 .
This commit is contained in:
parent
137aa63afe
commit
8279df963e
@ -1,6 +1,6 @@
|
|||||||
Name: libyuv
|
Name: libyuv
|
||||||
URL: http://code.google.com/p/libyuv/
|
URL: http://code.google.com/p/libyuv/
|
||||||
Version: 1617
|
Version: 1618
|
||||||
License: BSD
|
License: BSD
|
||||||
License File: LICENSE
|
License File: LICENSE
|
||||||
|
|
||||||
|
|||||||
@ -11,6 +11,6 @@
|
|||||||
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
|
||||||
#define INCLUDE_LIBYUV_VERSION_H_
|
#define INCLUDE_LIBYUV_VERSION_H_
|
||||||
|
|
||||||
#define LIBYUV_VERSION 1617
|
#define LIBYUV_VERSION 1618
|
||||||
|
|
||||||
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
|
||||||
|
|||||||
@ -1411,8 +1411,7 @@ void ScalePlane(const uint8* src, int src_stride,
|
|||||||
}
|
}
|
||||||
if (dst_width <= Abs(src_width) && dst_height <= src_height) {
|
if (dst_width <= Abs(src_width) && dst_height <= src_height) {
|
||||||
// Scale down.
|
// Scale down.
|
||||||
if (4 * dst_width == 3 * src_width &&
|
if (4 * dst_width == 3 * src_width && 4 * dst_height == 3 * src_height) {
|
||||||
4 * dst_height == 3 * src_height) {
|
|
||||||
// optimized, 3/4
|
// optimized, 3/4
|
||||||
ScalePlaneDown34(src_width, src_height, dst_width, dst_height,
|
ScalePlaneDown34(src_width, src_height, dst_width, dst_height,
|
||||||
src_stride, dst_stride, src, dst, filtering);
|
src_stride, dst_stride, src, dst, filtering);
|
||||||
@ -1425,8 +1424,7 @@ void ScalePlane(const uint8* src, int src_stride,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 3/8 rounded up for odd sized chroma height.
|
// 3/8 rounded up for odd sized chroma height.
|
||||||
if (8 * dst_width == 3 * src_width &&
|
if (8 * dst_width == 3 * src_width && 8 * dst_height == 3 * src_height) {
|
||||||
dst_height == ((src_height * 3 + 7) / 8)) {
|
|
||||||
// optimized, 3/8
|
// optimized, 3/8
|
||||||
ScalePlaneDown38(src_width, src_height, dst_width, dst_height,
|
ScalePlaneDown38(src_width, src_height, dst_width, dst_height,
|
||||||
src_stride, dst_stride, src, dst, filtering);
|
src_stride, dst_stride, src, dst, filtering);
|
||||||
@ -1508,8 +1506,7 @@ void ScalePlane_16(const uint16* src, int src_stride,
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// 3/8 rounded up for odd sized chroma height.
|
// 3/8 rounded up for odd sized chroma height.
|
||||||
if (8 * dst_width == 3 * src_width &&
|
if (8 * dst_width == 3 * src_width && 8 * dst_height == 3 * src_height) {
|
||||||
dst_height == ((src_height * 3 + 7) / 8)) {
|
|
||||||
// optimized, 3/8
|
// optimized, 3/8
|
||||||
ScalePlaneDown38_16(src_width, src_height, dst_width, dst_height,
|
ScalePlaneDown38_16(src_width, src_height, dst_width, dst_height,
|
||||||
src_stride, dst_stride, src, dst, filtering);
|
src_stride, dst_stride, src, dst, filtering);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user