kopia lustrzana https://github.com/hoglet67/RGBtoHDMI
Add force interlace option
rodzic
eb620884c7
commit
2f58ada76b
|
@ -561,7 +561,8 @@ typedef struct {
|
|||
#define VSYNC_NONINTERLACED_DEJITTER 4
|
||||
#define VSYNC_BLANKING 5
|
||||
#define VSYNC_POLARITY 6
|
||||
#define NUM_VSYNC 7
|
||||
#define VSYNC_FORCE_INTERLACE 7
|
||||
#define NUM_VSYNC 8
|
||||
|
||||
#define VIDEO_PROGRESSIVE 0
|
||||
#define VIDEO_INTERLACED 1
|
||||
|
|
|
@ -33,7 +33,8 @@ static const char *vsync_names[] = {
|
|||
"Non Interlaced",
|
||||
"Flywheel",
|
||||
"Blanking",
|
||||
"Polarity"
|
||||
"Polarity",
|
||||
"Force Interlaced"
|
||||
};
|
||||
|
||||
static const char *setup_names[] = {
|
||||
|
@ -376,6 +377,10 @@ void geometry_get_fb_params(capture_info_t *capinfo) {
|
|||
capinfo->video_type = VIDEO_PROGRESSIVE;
|
||||
}
|
||||
|
||||
if (capinfo->vsync_type == VSYNC_FORCE_INTERLACE) {
|
||||
capinfo->vsync_type = VSYNC_INTERLACED;
|
||||
}
|
||||
|
||||
capinfo->sizex2 = geometry->fb_sizex2;
|
||||
switch(geometry->fb_bpp) {
|
||||
case BPP_4:
|
||||
|
|
|
@ -1043,11 +1043,14 @@ int calibrate_sampling_clock(int profile_changed) {
|
|||
|
||||
// Instead, calculate the number of lines per frame
|
||||
double lines_per_2_vsyncs_double = ((double) vsync_time_ns) / (((double) nlines_time_ns) / ((double) nlines));
|
||||
|
||||
one_line_time_ns = nlines_time_ns / nlines;
|
||||
|
||||
// If number of lines is odd, then we must be interlaced
|
||||
interlaced = ((int)(lines_per_2_vsyncs_double + 0.5)) % 2;
|
||||
if (geometry_get_value(VSYNC_TYPE) == VSYNC_FORCE_INTERLACE) {
|
||||
interlaced = 1;
|
||||
} else {
|
||||
// If number of lines is odd, then we must be interlaced
|
||||
interlaced = ((int)(lines_per_2_vsyncs_double + 0.5)) % 2;
|
||||
}
|
||||
one_vsync_time_ns = vsync_time_ns >> 1;
|
||||
lines_per_vsync = ((int) (lines_per_2_vsyncs_double + 0.5) >> 1);
|
||||
lines_per_2_vsyncs = (int) (lines_per_2_vsyncs_double + 0.5);
|
||||
|
|
Ładowanie…
Reference in New Issue