1/******************************************************************************
2*
3* Copyright (C) 2012 Ittiam Systems Pvt Ltd, Bangalore
4*
5* Licensed under the Apache License, Version 2.0 (the "License");
6* you may not use this file except in compliance with the License.
7* You may obtain a copy of the License at:
8*
9* http://www.apache.org/licenses/LICENSE-2.0
10*
11* Unless required by applicable law or agreed to in writing, software
12* distributed under the License is distributed on an "AS IS" BASIS,
13* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14* See the License for the specific language governing permissions and
15* limitations under the License.
16*
17******************************************************************************/
18/*****************************************************************************/
19/*                                                                           */
20/*  File Name         : ihevcd_ittiam_logo.h.h                               */
21/*                                                                           */
22/*  Description       : This file contains all the necessary function headers*/
23/*                      to insert ittiam logo to a yuv buffer.               */
24/*                                                                           */
25/*  List of Functions : None                                                 */
26/*                                                                           */
27/*  Issues / Problems : None                                                 */
28/*                                                                           */
29/*  Revision History  :                                                      */
30/*                                                                           */
31/*         DD MM YYYY   Author(s)       Changes (Describe the changes made)  */
32/*         10 10 2005   Ittiam          Draft                                */
33/*                                                                           */
34/*****************************************************************************/
35
36#ifndef LOGO_INSERT_H
37#define LOGO_INSERT_H
38
39//#define LOGO_EN
40
41#define LOGO_WD 90
42#define LOGO_HT 36
43
44#define LOGO_WD_Y       LOGO_WD
45#define LOGO_HT_Y       LOGO_HT
46
47#define LOGO_WD_RGBA8888       160
48#define LOGO_HT_RGBA8888       64
49
50#define LOGO_WD_RGB565       160
51#define LOGO_HT_RGB565       64
52
53#define LOGO_WD_444_UV  LOGO_WD
54#define LOGO_HT_444_UV  LOGO_HT
55
56
57#define LOGO_WD_420_UV  (LOGO_WD >> 1)
58#define LOGO_HT_420_UV  (LOGO_HT >> 1)
59
60#define LOGO_WD_420SP_UV  (LOGO_WD)
61#define LOGO_HT_420SP_UV  (LOGO_HT >> 1)
62
63#define LOGO_WD_420SP_VU  (LOGO_WD)
64#define LOGO_HT_420SP_VU  (LOGO_HT >> 1)
65
66#define LOGO_WD_422_UV  (LOGO_WD >> 1)
67#define LOGO_HT_422_UV  (LOGO_HT)
68
69#define LOGO_WD_422V_UV  (LOGO_WD)
70#define LOGO_HT_422V_UV  (LOGO_HT >> 1)
71
72#define LOGO_WD_411_UV  (LOGO_WD >> 2)
73#define LOGO_HT_411_UV  (LOGO_HT)
74
75#define LOGO_CODEC_WD 80
76#define LOGO_CODEC_HT  24
77
78#define LOGO_CODEC_WD_Y       LOGO_CODEC_WD
79#define LOGO_CODEC_HT_Y       LOGO_CODEC_HT
80
81
82#define LOGO_CODEC_WD_444_UV  LOGO_CODEC_WD
83#define LOGO_CODEC_HT_444_UV  LOGO_CODEC_HT
84
85
86#define LOGO_CODEC_WD_420_UV  (LOGO_CODEC_WD >> 1)
87#define LOGO_CODEC_HT_420_UV  (LOGO_CODEC_HT >> 1)
88
89#define LOGO_CODEC_WD_420SP_UV  (LOGO_CODEC_WD)
90#define LOGO_CODEC_HT_420SP_UV  (LOGO_CODEC_HT >> 1)
91
92#define LOGO_CODEC_WD_420SP_VU  (LOGO_CODEC_WD)
93#define LOGO_CODEC_HT_420SP_VU  (LOGO_CODEC_HT >> 1)
94
95#define LOGO_CODEC_WD_422_UV  (LOGO_CODEC_WD >> 1)
96#define LOGO_CODEC_HT_422_UV  (LOGO_CODEC_HT)
97
98#define LOGO_CODEC_WD_422V_UV  (LOGO_CODEC_WD)
99#define LOGO_CODEC_HT_422V_UV  (LOGO_CODEC_HT >> 1)
100
101#define LOGO_CODEC_WD_411_UV  (LOGO_CODEC_WD >> 2)
102#define LOGO_CODEC_HT_411_UV  (LOGO_CODEC_HT)
103
104
105
106
107#define START_X_ITT_LOGO        0
108#define START_Y_ITT_LOGO        0
109
110#define WD_ITT_LOGO             128
111#define HT_ITT_LOGO             60
112
113void ihevcd_insert_logo(UWORD8 *buf_y, UWORD8 *buf_u, UWORD8 *buf_v,
114                        UWORD32 stride,
115                        UWORD32 x_pos,
116                        UWORD32 y_pos,
117                        UWORD32 yuv_fmt,
118                        UWORD32 u4_disp_wd,
119                        UWORD32 u4_disp_ht);
120
121#ifdef LOGO_EN
122#define INSERT_LOGO(buf_y, buf_u, buf_v, stride, x_pos, y_pos, yuv_fmt,disp_wd,disp_ht) ihevcd_insert_logo(buf_y, buf_u, buf_v, stride, x_pos, y_pos, yuv_fmt,disp_wd,disp_ht);
123#else
124#define INSERT_LOGO(buf_y, buf_u, buf_v, stride, x_pos, y_pos, yuv_fmt,disp_wd,disp_ht)
125#endif
126
127#endif /* LOGO_INSERT_H */
128
129