mirror of
https://github.com/marqs85/ossc.git
synced 2025-01-06 00:30:04 +00:00
make H. samplerate fine-tuning more intuitive
This commit is contained in:
parent
550e57a22b
commit
f0a14679d9
2
ossc.qsf
2
ossc.qsf
@ -224,7 +224,7 @@ set_global_assignment -name ENABLE_SIGNALTAP OFF
|
||||
set_global_assignment -name USE_SIGNALTAP_FILE output_files/ossc_la.stp
|
||||
|
||||
set_global_assignment -name FITTER_EFFORT "AUTO FIT"
|
||||
set_global_assignment -name SEED 10
|
||||
set_global_assignment -name SEED 14
|
||||
|
||||
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -303,7 +303,7 @@ status_t get_status(tvp_input_t input, video_format format)
|
||||
status = (status < MODE_CHANGE) ? MODE_CHANGE : status;
|
||||
|
||||
if (update_cur_vm) {
|
||||
cm.h_mult_total = (video_modes[cm.id].h_total*cm.sample_mult) + (video_modes[cm.id].h_total_adj % cm.sample_mult);
|
||||
cm.h_mult_total = (video_modes[cm.id].h_total*cm.sample_mult) + ((cm.sample_mult*video_modes[cm.id].h_total_adj*5 + 50) / 100);
|
||||
tvp_setup_hpll(cm.h_mult_total, clkcnt, cm.cc.tvp_hpll2x && (video_modes[cm.id].flags & MODE_PLLDIVBY2));
|
||||
cm.sample_sel = tvp_set_hpll_phase(video_modes[cm.id].sampler_phase, cm.sample_mult);
|
||||
status = (status < SC_CONFIG_CHANGE) ? SC_CONFIG_CHANGE : status;
|
||||
@ -586,7 +586,7 @@ void program_mode()
|
||||
}
|
||||
vm_sel = cm.id;
|
||||
|
||||
cm.h_mult_total = (video_modes[cm.id].h_total*cm.sample_mult) + (video_modes[cm.id].h_total_adj % cm.sample_mult);
|
||||
cm.h_mult_total = (video_modes[cm.id].h_total*cm.sample_mult) + ((cm.sample_mult*video_modes[cm.id].h_total_adj*5 + 50) / 100);
|
||||
|
||||
target_type = target_typemask & video_modes[cm.id].type;
|
||||
h_synclen_px = ((alt_u32)h_syncinlen * (alt_u32)cm.h_mult_total) / cm.clkcnt;
|
||||
|
@ -1,5 +1,5 @@
|
||||
//
|
||||
// Copyright (C) 2015-2017 Markus Hiienkari <mhiienka@niksula.hut.fi>
|
||||
// Copyright (C) 2015-2019 Markus Hiienkari <mhiienka@niksula.hut.fi>
|
||||
//
|
||||
// This file is part of Open Source Scan Converter project.
|
||||
//
|
||||
@ -24,7 +24,7 @@
|
||||
#include "sysconfig.h"
|
||||
|
||||
#define FW_VER_MAJOR 0
|
||||
#define FW_VER_MINOR 83
|
||||
#define FW_VER_MINOR 84
|
||||
|
||||
#ifdef ENABLE_AUDIO
|
||||
#define FW_SUFFIX1 "a"
|
||||
|
@ -46,8 +46,7 @@ extern alt_u8 auto_input, auto_av1_ypbpr, auto_av2_ypbpr, auto_av3_ypbpr;
|
||||
extern alt_u8 update_cur_vm;
|
||||
extern char target_profile_name[PROFILE_NAME_LEN+1];
|
||||
|
||||
alt_u16 tc_h_samplerate, tc_h_samplerate_adj, tc_h_synclen, tc_h_bporch, tc_h_active, tc_v_synclen, tc_v_bporch, tc_v_active;
|
||||
alt_u8 tc_sampler_phase;
|
||||
alt_u16 tc_h_samplerate, tc_h_samplerate_adj, tc_h_synclen, tc_h_bporch, tc_h_active, tc_v_synclen, tc_v_bporch, tc_v_active, tc_sampler_phase;
|
||||
alt_u8 menu_active;
|
||||
alt_u8 vm_sel, vm_edit;
|
||||
|
||||
@ -106,7 +105,7 @@ MENU(menu_advtiming, P99_PROTECT({ \
|
||||
{ LNG("V. synclen","V. ドウキナガサ"), OPT_AVCONFIG_NUMVAL_U16,{ .num_u16 = { &tc_v_synclen, V_SYNCLEN_MIN, V_SYNCLEN_MAX, vm_tweak } } },
|
||||
{ LNG("V. backporch","V. バックポーチ"), OPT_AVCONFIG_NUMVAL_U16,{ .num_u16 = { &tc_v_bporch, V_BPORCH_MIN, V_BPORCH_MAX, vm_tweak } } },
|
||||
{ LNG("V. active","V. アクティブ"), OPT_AVCONFIG_NUMVAL_U16,{ .num_u16 = { &tc_v_active, V_ACTIVE_MIN, V_ACTIVE_MAX, vm_tweak } } },
|
||||
{ LNG("Sampling phase","サンプリングフェーズ"), OPT_AVCONFIG_NUMVALUE, { .num = { &tc_sampler_phase, OPT_WRAP, 0, SAMPLER_PHASE_MAX, sampler_phase_tweak } } },
|
||||
{ LNG("Sampling phase","サンプリングフェーズ"), OPT_AVCONFIG_NUMVAL_U16, { .num_u16 = { &tc_sampler_phase, 0, SAMPLER_PHASE_MAX, vm_tweak } } },
|
||||
}))
|
||||
|
||||
MENU(menu_cust_sl, P99_PROTECT({ \
|
||||
@ -360,7 +359,7 @@ void display_menu(alt_u8 forcedisp)
|
||||
navi[navlvl].m->items[navi[navlvl].mp].num.df(*(navi[navlvl].m->items[navi[navlvl].mp].num.data));
|
||||
break;
|
||||
case OPT_AVCONFIG_NUMVAL_U16:
|
||||
navi[navlvl].m->items[navi[navlvl].mp].num_u16.df(*(navi[navlvl].m->items[navi[navlvl].mp].num_u16.data));
|
||||
navi[navlvl].m->items[navi[navlvl].mp].num_u16.df(navi[navlvl].m->items[navi[navlvl].mp].num_u16.data);
|
||||
break;
|
||||
case OPT_SUBMENU:
|
||||
if (navi[navlvl].m->items[navi[navlvl].mp].sub.arg_info)
|
||||
@ -396,7 +395,7 @@ static void vm_select() {
|
||||
tc_sampler_phase = video_modes[vm_edit].sampler_phase;
|
||||
}
|
||||
|
||||
static void vm_tweak(alt_u16 v) {
|
||||
static void vm_tweak(alt_u16 *v) {
|
||||
if (cm.sync_active && (cm.id == vm_edit)) {
|
||||
if ((video_modes[cm.id].h_total != tc_h_samplerate) ||
|
||||
(video_modes[cm.id].h_total_adj != (alt_u8)tc_h_samplerate_adj) ||
|
||||
@ -405,7 +404,8 @@ static void vm_tweak(alt_u16 v) {
|
||||
(video_modes[cm.id].h_active != tc_h_active) ||
|
||||
(video_modes[cm.id].v_synclen != tc_v_synclen) ||
|
||||
(video_modes[cm.id].v_backporch != (alt_u8)tc_v_bporch) ||
|
||||
(video_modes[cm.id].v_active != tc_v_active))
|
||||
(video_modes[cm.id].v_active != tc_v_active) ||
|
||||
(video_modes[cm.id].sampler_phase != tc_sampler_phase))
|
||||
update_cur_vm = 1;
|
||||
}
|
||||
video_modes[vm_edit].h_total = tc_h_samplerate;
|
||||
@ -416,14 +416,12 @@ static void vm_tweak(alt_u16 v) {
|
||||
video_modes[vm_edit].v_synclen = (alt_u8)tc_v_synclen;
|
||||
video_modes[vm_edit].v_backporch = (alt_u8)tc_v_bporch;
|
||||
video_modes[vm_edit].v_active = tc_v_active;
|
||||
|
||||
sniprintf(menu_row2, LCD_ROW_LEN+1, "%u", v);
|
||||
}
|
||||
|
||||
static void sampler_phase_tweak(alt_u8 v) {
|
||||
if (cm.sync_active && (cm.id == vm_edit) && (video_modes[cm.id].sampler_phase != tc_sampler_phase))
|
||||
update_cur_vm = 1;
|
||||
|
||||
video_modes[vm_edit].sampler_phase = tc_sampler_phase;
|
||||
sniprintf(menu_row2, LCD_ROW_LEN+1, LNG("%d deg","%d ド"), (v*1125)/100);
|
||||
|
||||
if (v == &tc_sampler_phase)
|
||||
sniprintf(menu_row2, LCD_ROW_LEN+1, LNG("%d deg","%d ド"), ((*v)*1125)/100);
|
||||
else if (v == &tc_h_samplerate_adj)
|
||||
sniprintf(menu_row2, LCD_ROW_LEN+1, "%u.%.2u", video_modes[vm_edit].h_total, (*v)*5);
|
||||
else
|
||||
sniprintf(menu_row2, LCD_ROW_LEN+1, "%u", *v);
|
||||
}
|
||||
|
@ -34,7 +34,7 @@ typedef enum {
|
||||
typedef int (*func_call)(void);
|
||||
typedef void (*arg_func)(void);
|
||||
typedef void (*disp_func)(alt_u8);
|
||||
typedef void (*disp_func_u16)(alt_u16);
|
||||
typedef void (*disp_func_u16)(alt_u16*);
|
||||
|
||||
typedef struct {
|
||||
alt_u8 *data;
|
||||
@ -116,7 +116,7 @@ typedef struct {
|
||||
|
||||
void display_menu(alt_u8 forcedisp);
|
||||
static void vm_select();
|
||||
static void vm_tweak(alt_u16 v);
|
||||
static void vm_tweak(alt_u16 *v);
|
||||
static void sampler_phase_tweak(alt_u8 v);
|
||||
|
||||
#endif
|
||||
|
@ -25,7 +25,7 @@
|
||||
|
||||
#define H_TOTAL_MIN 300
|
||||
#define H_TOTAL_MAX 2800
|
||||
#define H_TOTAL_ADJ_MAX 5
|
||||
#define H_TOTAL_ADJ_MAX 19
|
||||
#define H_SYNCLEN_MIN 10
|
||||
#define H_SYNCLEN_MAX 255
|
||||
#define H_BPORCH_MIN 1
|
||||
@ -93,9 +93,9 @@ typedef struct {
|
||||
char name[10];
|
||||
alt_u16 h_active;
|
||||
alt_u16 v_active;
|
||||
alt_u16 h_total:12;
|
||||
alt_u8 h_total_adj:4;
|
||||
alt_u16 v_total;
|
||||
alt_u16 h_total;
|
||||
alt_u8 h_total_adj:5;
|
||||
alt_u16 v_total:11;
|
||||
alt_u8 h_backporch;
|
||||
alt_u8 v_backporch;
|
||||
alt_u8 h_synclen;
|
||||
|
Loading…
Reference in New Issue
Block a user