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

Side by Side Diff: third_party/libwebp/enc/picture_rescale_enc.c

Issue 2651883004: libwebp-0.6.0-rc1 (Closed)
Patch Set: Created 3 years, 10 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 unified diff | Download patch
« no previous file with comments | « third_party/libwebp/enc/picture_rescale.c ('k') | third_party/libwebp/enc/picture_tools.c » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 Google Inc. All Rights Reserved. 1 // Copyright 2014 Google Inc. All Rights Reserved.
2 // 2 //
3 // Use of this source code is governed by a BSD-style license 3 // Use of this source code is governed by a BSD-style license
4 // that can be found in the COPYING file in the root of the source 4 // that can be found in the COPYING file in the root of the source
5 // tree. An additional intellectual property rights grant can be found 5 // tree. An additional intellectual property rights grant can be found
6 // in the file PATENTS. All contributing project authors may 6 // in the file PATENTS. All contributing project authors may
7 // be found in the AUTHORS file in the root of the source tree. 7 // be found in the AUTHORS file in the root of the source tree.
8 // ----------------------------------------------------------------------------- 8 // -----------------------------------------------------------------------------
9 // 9 //
10 // WebPPicture tools: copy, crop, rescaling and view. 10 // WebPPicture tools: copy, crop, rescaling and view.
11 // 11 //
12 // Author: Skal (pascal.massimino@gmail.com) 12 // Author: Skal (pascal.massimino@gmail.com)
13 13
14 #include <assert.h> 14 #include <assert.h>
15 #include <stdlib.h> 15 #include <stdlib.h>
16 16
17 #include "./vp8enci.h" 17 #include "./vp8i_enc.h"
18 #include "../utils/rescaler.h" 18 #include "../utils/rescaler_utils.h"
19 #include "../utils/utils.h" 19 #include "../utils/utils.h"
20 20
21 #define HALVE(x) (((x) + 1) >> 1) 21 #define HALVE(x) (((x) + 1) >> 1)
22 22
23 // Grab the 'specs' (writer, *opaque, width, height...) from 'src' and copy them 23 // Grab the 'specs' (writer, *opaque, width, height...) from 'src' and copy them
24 // into 'dst'. Mark 'dst' as not owning any memory. 24 // into 'dst'. Mark 'dst' as not owning any memory.
25 static void PictureGrabSpecs(const WebPPicture* const src, 25 static void PictureGrabSpecs(const WebPPicture* const src,
26 WebPPicture* const dst) { 26 WebPPicture* const dst) {
27 assert(src != NULL && dst != NULL); 27 assert(src != NULL && dst != NULL);
28 *dst = *src; 28 *dst = *src;
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 work, 4); 255 work, 4);
256 AlphaMultiplyARGB(&tmp, 1); 256 AlphaMultiplyARGB(&tmp, 1);
257 } 257 }
258 WebPPictureFree(pic); 258 WebPPictureFree(pic);
259 WebPSafeFree(work); 259 WebPSafeFree(work);
260 *pic = tmp; 260 *pic = tmp;
261 return 1; 261 return 1;
262 } 262 }
263 263
264 //------------------------------------------------------------------------------ 264 //------------------------------------------------------------------------------
OLDNEW
« no previous file with comments | « third_party/libwebp/enc/picture_rescale.c ('k') | third_party/libwebp/enc/picture_tools.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698