Commit dd499580 authored by fbarchard@google.com's avatar fbarchard@google.com

Only do 1x1 work around for large source

BUG=302
TESTED=hammer effects

Review URL: https://webrtc-codereview.appspot.com/6549005

git-svn-id: http://libyuv.googlecode.com/svn/trunk@949 16f28f9a-4ce2-e073-06de-1de4eb20be90
parent a1b92bd7
Name: libyuv
URL: http://code.google.com/p/libyuv/
Version: 948
Version: 949
License: BSD
License File: LICENSE
......
......@@ -11,6 +11,6 @@
#ifndef INCLUDE_LIBYUV_VERSION_H_ // NOLINT
#define INCLUDE_LIBYUV_VERSION_H_
#define LIBYUV_VERSION 948
#define LIBYUV_VERSION 949
#endif // INCLUDE_LIBYUV_VERSION_H_ NOLINT
......@@ -681,10 +681,10 @@ void ScaleSlope(int src_width, int src_height,
assert(dst_width > 0);
assert(dst_height > 0);
// Check for 1 pixel and avoid FixedDiv overflow.
if (dst_width == 1) {
if (dst_width == 1 && src_width >= 32768) {
dst_width = src_width;
}
if (dst_height == 1) {
if (dst_height == 1 && src_height >= 32768) {
dst_height = src_height;
}
if (filtering == kFilterBox) {
......
......@@ -38,13 +38,12 @@ static const FourCCAliasEntry kFourCCAliases[] = {
{FOURCC_BGR3, FOURCC_24BG},
{FOURCC_CM32, FOURCC_BGRA}, // kCMPixelFormat_32ARGB
{FOURCC_CM24, FOURCC_RAW }, // kCMPixelFormat_24RGB
#if defined(__APPLE__)
{FOURCC_BGRA, FOURCC_ARGB}, // kCMPixelFormat_32BGRA
#endif
{FOURCC_L555, FOURCC_RGBO}, // kCMPixelFormat_16LE555
{FOURCC_L565, FOURCC_RGBP}, // kCMPixelFormat_16LE565
{FOURCC_5551, FOURCC_RGBO}, // kCMPixelFormat_16LE5551
};
// TODO(fbarchard): Consider mapping kCMPixelFormat_32BGRA to FOURCC_ARGB.
// {FOURCC_BGRA, FOURCC_ARGB}, // kCMPixelFormat_32BGRA
LIBYUV_API
uint32 CanonicalFourCC(uint32 fourcc) {
......
......@@ -56,11 +56,6 @@ TEST_F(libyuvTest, TestCanonicalFourCC) {
EXPECT_EQ(FOURCC_24BG, CanonicalFourCC(FOURCC_BGR3));
EXPECT_EQ(FOURCC_BGRA, CanonicalFourCC(FOURCC_CM32));
EXPECT_EQ(FOURCC_RAW, CanonicalFourCC(FOURCC_CM24));
#if defined(__APPLE__)
EXPECT_EQ(FOURCC_ARGB, CanonicalFourCC(FOURCC_BGRA));
#else
EXPECT_EQ(FOURCC_BGRA, CanonicalFourCC(FOURCC_BGRA));
#endif
EXPECT_EQ(FOURCC_RGBO, CanonicalFourCC(FOURCC_L555));
EXPECT_EQ(FOURCC_RGBP, CanonicalFourCC(FOURCC_L565));
EXPECT_EQ(FOURCC_RGBO, CanonicalFourCC(FOURCC_5551));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment