/* SPDX-License-Identifier: LGPL-2.1-only OR BSD-3-Clause */
/******************************************************************************
 *
 * This file is provided under a dual license.  When you use or
 * distribute this software, you may choose to be licensed under
 * version 2.1 of the GNU Lesser General Public License
 * ("LGPLv2.1 License") or BSD License.
 *
 * LGPLv2.1 License
 *
 * Copyright(C) 2019 MediaTek Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of version 2.1 of the GNU Lesser General Public
 * License as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful, but
 * WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 * See https://www.gnu.org/licenses/old-licenses/lgpl-2.1.html for more
 * details.
 *
 * BSD LICENSE
 *
 * Copyright(C) 2019 MediaTek Inc.
 * All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 *
 *  * Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 *  * Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in
 *    the documentation and/or other materials provided with the
 *    distribution.
 *  * Neither the name of the copyright holder nor the names of its
 *    contributors may be used to endorse or promote products derived
 *    from this software without specific prior written permission.
 *
 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
 * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
 * HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
 * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
 * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
 *
 *****************************************************************************/

/*----------------------------------------------------------------------------*/
/*! @file u_gif.h 
 *  $RCSfile: $
 *  $Revision: #1 $
 *  $Date: 2015/05/29 $
 *  $Author: brianpc.huang $
 *  
 *  @par Description:
 *         This file exports all GIF specific definitions and structures.
 */
/*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*/
/*! @addtogroup groupMW_IMG
 *  @{ 
 */
/*----------------------------------------------------------------------------*/
#ifndef _U_GIF_H_
#define _U_GIF_H_

/*-----------------------------------------------------------------------------
                     include files
  ----------------------------------------------------------------------------*/
#include "u_rm_dev_types.h"



#ifdef __cplusplus
extern "C" {
#endif

/*-----------------------------------------------------------------------------
                     macros, defines, typedefs, enums
  ----------------------------------------------------------------------------*/
#define GIF_SW_DEC_TYPE         DRVT_UNKNOWN    /**<gif sw decode type        */
#define GIF_SW_DEC_COMP         0    /**<gif sw decode component        */

/* GIF Color Table Max Item Number */
#define IMG_GIF_CLR_TBL_MAX_CLUT_NUM    0x100    /**<GIF Color Table Max Item Number */
#define IMG_GIF_CLR_TBL_MAX_SIZE        0x300    /**<GIF Color Table Max Size        */

/*------------------------------------------------------------------*/
/*! @enum IMG_GIF_DISPOSAL_T
 *  @brief This structure enumerates all the disposal methods for GIF decoder
 *  @code
 *  typedef enum
 *  {
 *      GIF_NOT_SPECIFIED       = 0,
 *      GIF_NOT_DISPOSE         = 1,
 *      GIF_RESTORE_TO_BG       = 2,
 *      GIF_RESTORE_TO_PREVIOUS = 3,
 *      GIF_DISPOSE_NOT_DEFINED
 *  } IMG_GIF_DISPOSAL_T;
 *  @endcode
 *  @li@c  GIF_NOT_SPECIFIED                            - not specified
 *  @li@c  GIF_NOT_DISPOSE                              - not dispose
 *  @li@c  GIF_RESTORE_TO_BG                            - restore to background
 *  @li@c  GIF_RESTORE_TO_PREVIOUS                      - restore to previous
 *  @li@c  GIF_DISPOSE_NOT_DEFINED                      - enum check
 */
/*------------------------------------------------------------------*/
typedef enum
{
    GIF_NOT_SPECIFIED       = 0,
    GIF_NOT_DISPOSE         = 1,
    GIF_RESTORE_TO_BG       = 2,
    GIF_RESTORE_TO_PREVIOUS = 3,
    GIF_DISPOSE_NOT_DEFINED
} IMG_GIF_DISPOSAL_T;
/*------------------------------------------------------------------*/
/*! @struct IMG_GIF_FRM_RECT_T
 *  @brief This sturcture provides GIF frame rectangle info for disposal method 
 *          area frame rectangle is in unit of pixel and relative to the edge of 
 *          the logical screen
 *  @code
 *  typedef struct
 *  {
 *      UINT16              ui2_frame_x;
 *      UINT16              ui2_frame_y;
 *      UINT16              ui2_frame_width;
 *      UINT16              ui2_frame_height;
 *  } IMG_GIF_FRM_RECT_T;
 *  @endcode
 *  @li@c  ui2_frame_x                               - x position of a frame
 *  @li@c  ui2_frame_y                               - y position of a frame
 *  @li@c  ui2_frame_width                           - width of frame
 *  @li@c  ui2_frame_height                          - height of frame
 */
/*------------------------------------------------------------------*/
typedef struct
{
    UINT16              ui2_frame_x;
    UINT16              ui2_frame_y;
    UINT16              ui2_frame_width;
    UINT16              ui2_frame_height;
} IMG_GIF_FRM_RECT_T;




#ifdef __cplusplus
}
#endif


#endif
/*----------------------------------------------------------------------------*/
/*! @} */   /* end of  groupMW_IMG*/
/*----------------------------------------------------------------------------*/
