diff options
author | jzern@chromium.org <jzern@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-20 17:23:14 +0000 |
---|---|---|
committer | jzern@chromium.org <jzern@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2013-06-20 17:23:14 +0000 |
commit | 97f8a48ec3d16c16bc966063f745b1fc1b45dac7 (patch) | |
tree | 9cd29705cbaee0bcffa3fe2385f6a7b51d787092 /third_party/libwebp/enc/picture.c | |
parent | 0323baf298763af020217eb11b0e86ac7a0e260a (diff) | |
download | chromium_src-97f8a48ec3d16c16bc966063f745b1fc1b45dac7.zip chromium_src-97f8a48ec3d16c16bc966063f745b1fc1b45dac7.tar.gz chromium_src-97f8a48ec3d16c16bc966063f745b1fc1b45dac7.tar.bz2 |
libwebp-0.3.1
Bug fix rollup + incremental decode support for extended format files
(alpha/icc + vp8).
BUG=
Review URL: https://chromiumcodereview.appspot.com/16871017
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@207471 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/libwebp/enc/picture.c')
-rw-r--r-- | third_party/libwebp/enc/picture.c | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/third_party/libwebp/enc/picture.c b/third_party/libwebp/enc/picture.c index 1e51a8d..5aaa385 100644 --- a/third_party/libwebp/enc/picture.c +++ b/third_party/libwebp/enc/picture.c @@ -1,8 +1,10 @@ // Copyright 2011 Google Inc. All Rights Reserved. // -// This code is licensed under the same terms as WebM: -// Software License Agreement: http://www.webmproject.org/license/software/ -// Additional IP Rights Grant: http://www.webmproject.org/license/additional/ +// Use of this source code is governed by a BSD-style license +// that can be found in the COPYING file in the root of the source +// tree. An additional intellectual property rights grant can be found +// in the file PATENTS. All contributing project authors may +// be found in the AUTHORS file in the root of the source tree. // ----------------------------------------------------------------------------- // // WebPPicture utils: colorspace conversion, crop, ... @@ -709,7 +711,7 @@ static int Import(WebPPicture* const picture, for (y = 0; y < height; ++y) { for (x = 0; x < width; ++x) { const int offset = step * x + y * rgb_stride; - const uint32_t argb = (a_ptr[offset] << 24) | + const uint32_t argb = ((uint32_t)a_ptr[offset] << 24) | (r_ptr[offset] << 16) | (g_ptr[offset] << 8) | (b_ptr[offset]); @@ -809,7 +811,7 @@ int WebPPictureYUVAToARGB(WebPPicture* picture) { const uint8_t* const src = picture->a + y * picture->a_stride; int x; for (x = 0; x < width; ++x) { - argb_dst[x] = (argb_dst[x] & 0x00ffffffu) | (src[x] << 24); + argb_dst[x] = (argb_dst[x] & 0x00ffffffu) | ((uint32_t)src[x] << 24); } } } |