blob: 7952ee5bf73eaab4f1181f6385a055498316c23d [file] [log] [blame]
/*
* drivers/amlogic/media/common/vpp/vpp.h
*
* Copyright (C) 2015 Amlogic, Inc. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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 the GNU General Public License for
* more details.
*
* You should have received a copy of the GNU General Public License along
* with this program; if not, write to the Free Software Foundation, Inc.,
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#ifndef __VPP_H__
#define __VPP_H__
/* OSD csc defines */
enum vpp_matrix_sel_e {
VPP_MATRIX_0 = 0, /* OSD convert matrix - new from GXL */
VPP_MATRIX_1, /* vd1 matrix before post-blend */
VPP_MATRIX_2, /* post matrix */
VPP_MATRIX_3, /* xvycc matrix */
VPP_MATRIX_4, /* in video eotf - new from GXL */
VPP_MATRIX_5, /* in osd eotf - new from GXL */
VPP_MATRIX_6 /* vd2 matrix before pre-blend */
};
#define NUM_MATRIX 6
/* matrix names */
#define VPP_MATRIX_OSD VPP_MATRIX_0
#define VPP_MATRIX_VD1 VPP_MATRIX_1
#define VPP_MATRIX_POST VPP_MATRIX_2
#define VPP_MATRIX_XVYCC VPP_MATRIX_3
#define VPP_MATRIX_EOTF VPP_MATRIX_4
#define VPP_MATRIX_OSD_EOTF VPP_MATRIX_5
#define VPP_MATRIX_VD2 VPP_MATRIX_6
#define CSC_ON 1
#define CSC_OFF 0
enum vpp_lut_sel_e {
VPP_LUT_OSD_EOTF = 0,
VPP_LUT_OSD_OETF,
VPP_LUT_EOTF,
VPP_LUT_OETF
};
#define NUM_LUT 4
/* matrix registers */
struct matrix_s {
u16 pre_offset[3];
u16 matrix[3][3];
u16 offset[3];
u16 right_shift;
};
#endif