| OLD | NEW |
| 1 // Copyright 2011 Google Inc. All Rights Reserved. | 1 // Copyright 2011 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 // Everything about WebPDecBuffer | 10 // Everything about WebPDecBuffer |
| 11 // | 11 // |
| 12 // Author: Skal (pascal.massimino@gmail.com) | 12 // Author: Skal (pascal.massimino@gmail.com) |
| 13 | 13 |
| 14 #include <stdlib.h> | 14 #include <stdlib.h> |
| 15 | 15 |
| 16 #include "./vp8i.h" | 16 #include "./vp8i.h" |
| 17 #include "./webpi.h" | 17 #include "./webpi.h" |
| 18 #include "../utils/utils.h" | 18 #include "../utils/utils.h" |
| 19 | 19 |
| 20 #if defined(__cplusplus) || defined(c_plusplus) | |
| 21 extern "C" { | |
| 22 #endif | |
| 23 | |
| 24 //------------------------------------------------------------------------------ | 20 //------------------------------------------------------------------------------ |
| 25 // WebPDecBuffer | 21 // WebPDecBuffer |
| 26 | 22 |
| 27 // Number of bytes per pixel for the different color-spaces. | 23 // Number of bytes per pixel for the different color-spaces. |
| 28 static const int kModeBpp[MODE_LAST] = { | 24 static const int kModeBpp[MODE_LAST] = { |
| 29 3, 4, 3, 4, 4, 2, 2, | 25 3, 4, 3, 4, 4, 2, 2, |
| 30 4, 4, 4, 2, // pre-multiplied modes | 26 4, 4, 4, 2, // pre-multiplied modes |
| 31 1, 1 }; | 27 1, 1 }; |
| 32 | 28 |
| 33 // Check that webp_csp_mode is within the bounds of WEBP_CSP_MODE. | 29 // Check that webp_csp_mode is within the bounds of WEBP_CSP_MODE. |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 205 *dst = *src; | 201 *dst = *src; |
| 206 if (src->private_memory != NULL) { | 202 if (src->private_memory != NULL) { |
| 207 src->is_external_memory = 1; // src relinquishes ownership | 203 src->is_external_memory = 1; // src relinquishes ownership |
| 208 src->private_memory = NULL; | 204 src->private_memory = NULL; |
| 209 } | 205 } |
| 210 } | 206 } |
| 211 } | 207 } |
| 212 | 208 |
| 213 //------------------------------------------------------------------------------ | 209 //------------------------------------------------------------------------------ |
| 214 | 210 |
| 215 #if defined(__cplusplus) || defined(c_plusplus) | |
| 216 } // extern "C" | |
| 217 #endif | |
| OLD | NEW |