add auto YPbPr CSC option

This commit is contained in:
marqs 2019-05-11 13:40:06 +03:00
parent 125814225f
commit 3d49b74667
3 changed files with 6689 additions and 6668 deletions

File diff suppressed because it is too large Load Diff

View File

@ -175,6 +175,18 @@ void set_lpf(alt_u8 lpf)
}
}
void set_csc(alt_u8 csc)
{
if (csc > 1) {
if (target_type == VIDEO_HDTV)
csc = 1;
else
csc = 0;
}
tvp_sel_csc(&csc_coeffs[csc]);
}
inline int check_linecnt(alt_u8 progressive, alt_u32 totlines) {
if (progressive)
return (totlines >= MIN_LINES_PROGRESSIVE);
@ -331,7 +343,7 @@ status_t get_status(tvp_input_t input, video_format format)
tvp_set_hpllcoast(tc.pre_coast, tc.post_coast);
if (tc.ypbpr_cs != cm.cc.ypbpr_cs)
tvp_sel_csc(&csc_coeffs[tc.ypbpr_cs]);
set_csc(tc.ypbpr_cs);
if (tc.video_lpf != cm.cc.video_lpf)
set_lpf(tc.video_lpf);
@ -584,6 +596,7 @@ void program_mode()
cm.cc.tvp_hpll2x && (video_modes[cm.id].flags & MODE_PLLDIVBY2),
(alt_u8)h_synclen_px);
set_lpf(cm.cc.video_lpf);
set_csc(cm.cc.ypbpr_cs);
cm.sample_sel = tvp_set_hpll_phase(video_modes[cm.id].sampler_phase, cm.sample_mult);
update_sc_config();
@ -833,7 +846,7 @@ int main()
printf("### DIY VIDEO DIGITIZER / SCANCONVERTER INIT OK ###\n\n");
sniprintf(row1, LCD_ROW_LEN+1, "OSSC fw. %u.%.2u" FW_SUFFIX1 FW_SUFFIX2, FW_VER_MAJOR, FW_VER_MINOR);
#ifndef DEBUG
strncpy(row2, "2014-2018 marqs", LCD_ROW_LEN+1);
strncpy(row2, "2014-2019 marqs", LCD_ROW_LEN+1);
#else
strncpy(row2, "** DEBUG BUILD *", LCD_ROW_LEN+1);
#endif

View File

@ -53,7 +53,7 @@ alt_u8 vm_sel, vm_edit;
static const char *off_on_desc[] = { LNG("Off","オフ"), LNG("On","オン") };
static const char *video_lpf_desc[] = { LNG("Auto","オート"), LNG("Off","オフ"), "95MHz (HDTV II)", "35MHz (HDTV I)", "16MHz (EDTV)", "9MHz (SDTV)" };
static const char *ypbpr_cs_desc[] = { "Rec. 601", "Rec. 709" };
static const char *ypbpr_cs_desc[] = { "Rec. 601", "Rec. 709", "Auto" };
static const char *s480p_mode_desc[] = { LNG("Auto","オート"), "DTV 480p", "VESA 640x480@60" };
static const char *sync_lpf_desc[] = { LNG("2.5MHz (max)","2.5MHz (サイダイ)"), LNG("10MHz (med)","10MHz (チュウイ)"), LNG("33MHz (min)","33MHz (サイショウ)"), LNG("Off","オフ") };
static const char *l3_mode_desc[] = { LNG("Generic 16:9","ジェネリック 16:9"), LNG("Generic 4:3","ジェネリック 4:3"), LNG("512x240 optim.","512x240 サイテキカ."), LNG("320x240 optim.","320x240 サイテキカ."), LNG("256x240 optim.","256x240 サイテキカ.") };