| OLD | NEW |
| 1 // Copyright 2015 Google Inc. All Rights Reserved. | 1 // Copyright 2015 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 // Author: Mislav Bradac (mislavm@google.com) | 10 // Author: Mislav Bradac (mislavm@google.com) |
| 11 // | 11 // |
| 12 | 12 |
| 13 #include "./delta_palettization.h" | 13 #include "./delta_palettization_enc.h" |
| 14 | 14 |
| 15 #ifdef WEBP_EXPERIMENTAL_FEATURES | 15 #ifdef WEBP_EXPERIMENTAL_FEATURES |
| 16 #include "../webp/types.h" | 16 #include "../webp/types.h" |
| 17 #include "../dsp/lossless.h" | 17 #include "../dsp/lossless.h" |
| 18 | 18 |
| 19 #define MK_COL(r, g, b) (((r) << 16) + ((g) << 8) + (b)) | 19 #define MK_COL(r, g, b) (((r) << 16) + ((g) << 8) + (b)) |
| 20 | 20 |
| 21 // Format allows palette up to 256 entries, but more palette entries produce | 21 // Format allows palette up to 256 entries, but more palette entries produce |
| 22 // bigger entropy. In the future it will probably be useful to add more entries | 22 // bigger entropy. In the future it will probably be useful to add more entries |
| 23 // that are far from the origin of the palette or choose remaining entries | 23 // that are far from the origin of the palette or choose remaining entries |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 446 } | 446 } |
| 447 | 447 |
| 448 #else // !WEBP_EXPERIMENTAL_FEATURES | 448 #else // !WEBP_EXPERIMENTAL_FEATURES |
| 449 | 449 |
| 450 WebPEncodingError WebPSearchOptimalDeltaPalette(VP8LEncoder* const enc) { | 450 WebPEncodingError WebPSearchOptimalDeltaPalette(VP8LEncoder* const enc) { |
| 451 (void)enc; | 451 (void)enc; |
| 452 return VP8_ENC_ERROR_INVALID_CONFIGURATION; | 452 return VP8_ENC_ERROR_INVALID_CONFIGURATION; |
| 453 } | 453 } |
| 454 | 454 |
| 455 #endif // WEBP_EXPERIMENTAL_FEATURES | 455 #endif // WEBP_EXPERIMENTAL_FEATURES |
| OLD | NEW |