15d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Copyright 2013 Google Inc. All Rights Reserved. 25d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// 35d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Use of this source code is governed by a BSD-style license 45d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// that can be found in the COPYING file in the root of the source 55d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// tree. An additional intellectual property rights grant can be found 65d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// in the file PATENTS. All contributing project authors may 75d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// be found in the AUTHORS file in the root of the source tree. 85d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// ----------------------------------------------------------------------------- 95d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// 105d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Alpha decoder: internal header. 115d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// 125d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Author: Urvang (urvang@google.com) 135d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 145d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#ifndef WEBP_DEC_ALPHAI_H_ 155d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#define WEBP_DEC_ALPHAI_H_ 165d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 175d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "./webpi.h" 185d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#include "../utils/filters.h" 195d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 205d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#ifdef __cplusplus 215d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)extern "C" { 225d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#endif 235d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 245d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)struct VP8LDecoder; // Defined in dec/vp8li.h. 255d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 265d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)typedef struct ALPHDecoder ALPHDecoder; 275d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)struct ALPHDecoder { 285d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) int width_; 295d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) int height_; 305d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) int method_; 315d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) WEBP_FILTER_TYPE filter_; 325d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) int pre_processing_; 335d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) struct VP8LDecoder* vp8l_dec_; 345d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) VP8Io io_; 355d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) int use_8b_decode; // Although alpha channel requires only 1 byte per 365d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // pixel, sometimes VP8LDecoder may need to allocate 375d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) // 4 bytes per pixel internally during decode. 385d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)}; 395d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 405d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)//------------------------------------------------------------------------------ 415d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// internal functions. Not public. 425d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 435d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Allocates a new alpha decoder instance. 445d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)ALPHDecoder* ALPHNew(void); 455d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 465d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)// Clears and deallocates an alpha decoder instance. 475d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)void ALPHDelete(ALPHDecoder* const dec); 485d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 495d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)//------------------------------------------------------------------------------ 505d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 515d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#ifdef __cplusplus 525d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)} // extern "C" 535d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#endif 545d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles) 555d1f7b1de12d16ceb2c938c56701a3e8bfa558f7Torne (Richard Coles)#endif /* WEBP_DEC_ALPHAI_H_ */ 56