2016-06-12 20:43:24 +00:00
|
|
|
//
|
2019-05-07 21:05:16 +00:00
|
|
|
// Copyright (C) 2015-2019 Markus Hiienkari <mhiienka@niksula.hut.fi>
|
2016-06-12 20:43:24 +00:00
|
|
|
//
|
|
|
|
// This file is part of Open Source Scan Converter project.
|
|
|
|
//
|
|
|
|
// 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 3 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, see <http://www.gnu.org/licenses/>.
|
|
|
|
//
|
|
|
|
|
|
|
|
#ifndef AVCONFIG_H_
|
|
|
|
#define AVCONFIG_H_
|
|
|
|
|
|
|
|
#include "alt_types.h"
|
2016-08-20 12:54:28 +00:00
|
|
|
#include "tvp7002.h"
|
2016-06-12 20:43:24 +00:00
|
|
|
|
2020-02-09 18:21:53 +00:00
|
|
|
#define SIGNED_NUMVAL_ZERO 128
|
|
|
|
|
2016-06-12 20:43:24 +00:00
|
|
|
#define SCANLINESTR_MAX 15
|
2018-03-07 09:21:18 +00:00
|
|
|
#define SL_HYBRIDSTR_MAX 28
|
2018-03-28 17:09:40 +00:00
|
|
|
#define H_MASK_MAX 255
|
|
|
|
#define V_MASK_MAX 63
|
2017-01-23 22:18:15 +00:00
|
|
|
#define HV_MASK_MAX_BR 15
|
2016-06-12 20:43:24 +00:00
|
|
|
#define VIDEO_LPF_MAX 5
|
|
|
|
#define SAMPLER_PHASE_MAX 31
|
|
|
|
#define SYNC_VTH_MAX 31
|
|
|
|
#define VSYNC_THOLD_MIN 10
|
|
|
|
#define VSYNC_THOLD_MAX 200
|
2016-08-14 15:57:50 +00:00
|
|
|
#define SD_SYNC_WIN_MAX 255
|
2016-06-12 20:43:24 +00:00
|
|
|
#define PLL_COAST_MAX 5
|
2017-09-27 20:43:26 +00:00
|
|
|
#define REVERSE_LPF_MAX 31
|
2018-04-14 09:52:38 +00:00
|
|
|
#define COARSE_GAIN_MAX 15
|
2020-02-09 18:21:53 +00:00
|
|
|
#define ALC_H_FILTER_MAX 7
|
|
|
|
#define ALC_V_FILTER_MAX 10
|
|
|
|
#define CLAMP_OFFSET_MIN (SIGNED_NUMVAL_ZERO-100)
|
|
|
|
#define CLAMP_OFFSET_MAX (SIGNED_NUMVAL_ZERO+100)
|
2016-06-12 20:43:24 +00:00
|
|
|
|
|
|
|
#define SL_MODE_MAX 2
|
2016-07-09 20:12:35 +00:00
|
|
|
#define SL_TYPE_MAX 2
|
2016-06-12 20:43:24 +00:00
|
|
|
|
2018-03-02 21:11:52 +00:00
|
|
|
#define AUDIO_GAIN_M12DB 0
|
|
|
|
#define AUDIO_GAIN_0DB 12
|
|
|
|
#define AUDIO_GAIN_12DB 24
|
|
|
|
#define AUDIO_GAIN_MAX AUDIO_GAIN_12DB
|
|
|
|
|
2017-02-07 21:04:30 +00:00
|
|
|
#define L5FMT_1920x1080 0
|
|
|
|
#define L5FMT_1600x1200 1
|
|
|
|
#define L5FMT_1920x1200 2
|
|
|
|
|
2020-06-16 23:22:24 +00:00
|
|
|
static const char *avinput_str[] = { "Test pattern", "AV1_RGBS", "AV1_RGsB", "AV1_YPbPr", "AV2_YPbPr", "AV2_RGsB", "AV3_RGBHV", "AV3_RGBS", "AV3_RGsB", "AV3_YPbPr", "Last used" };
|
2018-03-12 18:37:35 +00:00
|
|
|
|
|
|
|
typedef enum {
|
|
|
|
AV_TESTPAT = 0,
|
|
|
|
AV1_RGBs = 1,
|
|
|
|
AV1_RGsB = 2,
|
|
|
|
AV1_YPBPR = 3,
|
|
|
|
AV2_YPBPR = 4,
|
|
|
|
AV2_RGsB = 5,
|
|
|
|
AV3_RGBHV = 6,
|
|
|
|
AV3_RGBs = 7,
|
|
|
|
AV3_RGsB = 8,
|
|
|
|
AV3_YPBPR = 9,
|
|
|
|
AV_LAST = 10
|
|
|
|
} avinput_t;
|
|
|
|
|
2016-06-12 20:43:24 +00:00
|
|
|
typedef struct {
|
|
|
|
alt_u8 sl_mode;
|
|
|
|
alt_u8 sl_type;
|
2018-03-11 23:24:17 +00:00
|
|
|
alt_u8 sl_hybr_str;
|
2018-02-09 11:44:55 +00:00
|
|
|
alt_u8 sl_method;
|
2019-03-22 22:09:46 +00:00
|
|
|
alt_u8 sl_altern;
|
|
|
|
alt_u8 sl_altiv;
|
2016-06-12 20:43:24 +00:00
|
|
|
alt_u8 sl_str;
|
|
|
|
alt_u8 sl_id;
|
2019-03-22 22:09:46 +00:00
|
|
|
alt_u8 sl_cust_l_str[5];
|
|
|
|
alt_u8 sl_cust_c_str[6];
|
2016-06-12 20:43:24 +00:00
|
|
|
alt_u8 linemult_target;
|
2017-05-09 15:55:24 +00:00
|
|
|
alt_u8 l2_mode;
|
2016-06-12 20:43:24 +00:00
|
|
|
alt_u8 l3_mode;
|
2017-01-22 22:56:17 +00:00
|
|
|
alt_u8 l4_mode;
|
|
|
|
alt_u8 l5_mode;
|
2017-02-07 21:04:30 +00:00
|
|
|
alt_u8 l5_fmt;
|
2017-01-22 22:56:17 +00:00
|
|
|
alt_u8 pm_240p;
|
|
|
|
alt_u8 pm_384p;
|
|
|
|
alt_u8 pm_480i;
|
|
|
|
alt_u8 pm_480p;
|
2017-02-07 21:04:30 +00:00
|
|
|
alt_u8 pm_1080i;
|
|
|
|
alt_u8 ar_256col;
|
2016-06-12 20:43:24 +00:00
|
|
|
alt_u8 h_mask;
|
|
|
|
alt_u8 v_mask;
|
2017-01-23 22:18:15 +00:00
|
|
|
alt_u8 mask_br;
|
2019-09-30 16:31:05 +00:00
|
|
|
alt_u8 mask_color;
|
2016-06-12 20:43:24 +00:00
|
|
|
alt_u8 tx_mode;
|
2017-05-18 20:35:43 +00:00
|
|
|
alt_u8 hdmi_itc;
|
2016-06-12 20:43:24 +00:00
|
|
|
alt_u8 s480p_mode;
|
2019-08-02 22:29:24 +00:00
|
|
|
alt_u8 s400p_mode;
|
2017-02-07 21:04:30 +00:00
|
|
|
alt_u8 tvp_hpll2x;
|
2017-08-09 21:06:35 +00:00
|
|
|
alt_u8 upsample2x;
|
2016-06-12 20:43:24 +00:00
|
|
|
alt_u8 ypbpr_cs;
|
|
|
|
alt_u8 sync_vth;
|
2016-09-05 17:49:41 +00:00
|
|
|
alt_u8 linelen_tol;
|
2016-06-12 20:43:24 +00:00
|
|
|
alt_u8 vsync_thold;
|
|
|
|
alt_u8 sync_lpf;
|
2020-02-09 18:21:53 +00:00
|
|
|
alt_u8 stc_lpf;
|
2016-06-12 20:43:24 +00:00
|
|
|
alt_u8 video_lpf;
|
|
|
|
alt_u8 pre_coast;
|
|
|
|
alt_u8 post_coast;
|
2017-05-29 17:43:24 +00:00
|
|
|
alt_u8 full_tx_setup;
|
|
|
|
alt_u8 vga_ilace_fix;
|
2019-06-25 20:22:41 +00:00
|
|
|
alt_u8 av3_alt_rgb;
|
2019-07-01 15:56:39 +00:00
|
|
|
alt_u8 panasonic_hack;
|
2017-09-27 20:43:26 +00:00
|
|
|
alt_u8 reverse_lpf;
|
2016-11-06 13:24:26 +00:00
|
|
|
alt_u8 audio_dw_sampl;
|
|
|
|
alt_u8 audio_swap_lr;
|
2018-03-02 21:11:52 +00:00
|
|
|
alt_u8 audio_gain;
|
2019-07-29 18:26:28 +00:00
|
|
|
alt_u8 default_vic;
|
2020-02-09 18:21:53 +00:00
|
|
|
alt_u8 clamp_offset;
|
|
|
|
alt_u8 alc_h_filter;
|
|
|
|
alt_u8 alc_v_filter;
|
2016-08-20 12:54:28 +00:00
|
|
|
color_setup_t col;
|
2018-03-12 18:37:35 +00:00
|
|
|
avinput_t link_av;
|
2016-06-22 20:22:59 +00:00
|
|
|
} __attribute__((packed)) avconfig_t;
|
2016-06-12 20:43:24 +00:00
|
|
|
|
|
|
|
int set_default_avconfig();
|
|
|
|
|
|
|
|
#endif
|