| 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 // Alpha-plane decompression. | 10 // Alpha-plane decompression. |
| 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 #include "./alphai.h" | 15 #include "./alphai_dec.h" |
| 16 #include "./vp8i.h" | 16 #include "./vp8i_dec.h" |
| 17 #include "./vp8li.h" | 17 #include "./vp8li_dec.h" |
| 18 #include "../dsp/dsp.h" | 18 #include "../dsp/dsp.h" |
| 19 #include "../utils/quant_levels_dec.h" | 19 #include "../utils/quant_levels_dec_utils.h" |
| 20 #include "../utils/utils.h" | 20 #include "../utils/utils.h" |
| 21 #include "../webp/format_constants.h" | 21 #include "../webp/format_constants.h" |
| 22 | 22 |
| 23 //------------------------------------------------------------------------------ | 23 //------------------------------------------------------------------------------ |
| 24 // ALPHDecoder object. | 24 // ALPHDecoder object. |
| 25 | 25 |
| 26 // Allocates a new alpha decoder instance. | 26 // Allocates a new alpha decoder instance. |
| 27 static ALPHDecoder* ALPHNew(void) { | 27 static ALPHDecoder* ALPHNew(void) { |
| 28 ALPHDecoder* const dec = (ALPHDecoder*)WebPSafeCalloc(1ULL, sizeof(*dec)); | 28 ALPHDecoder* const dec = (ALPHDecoder*)WebPSafeCalloc(1ULL, sizeof(*dec)); |
| 29 return dec; | 29 return dec; |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 } | 223 } |
| 224 } | 224 } |
| 225 | 225 |
| 226 // Return a pointer to the current decoded row. | 226 // Return a pointer to the current decoded row. |
| 227 return dec->alpha_plane_ + row * width; | 227 return dec->alpha_plane_ + row * width; |
| 228 | 228 |
| 229 Error: | 229 Error: |
| 230 WebPDeallocateAlphaMemory(dec); | 230 WebPDeallocateAlphaMemory(dec); |
| 231 return NULL; | 231 return NULL; |
| 232 } | 232 } |
| OLD | NEW |