Add film mode 25/30Hz

pull/360/head
IanSB 2023-11-08 21:53:39 +00:00
rodzic 2ce3367a3b
commit 1a0fd8c713
6 zmienionych plików z 10 dodań i 2 usunięć

Wyświetl plik

@ -399,6 +399,7 @@ static param_t features[] = {
{ F_NORMAL_DEINTERLACE, "Normal Deinterlace", "normal_deinterlace", 0, NUM_DEINTERLACES - 1, 1 },
{ F_MODE7_SCALING, "Teletext Scaling", "teletext_scaling", 0, NUM_ESCALINGS - 1, 1 },
{ F_NORMAL_SCALING, "Normal Scaling", "normal_scaling", 0, NUM_ESCALINGS - 1, 1 },
{ F_FILM_MODE,"Film Mode (25/30Hz)", "film_mode", 0, 1, 1 },
{ F_FFOSD, "FFOSD Overlay", "ffosd_overlay", 0, 1, 1 },
{ F_SWAP_ASPECT,"Swap Aspect 625<>525", "swap_aspect", 0, 1, 1 },
{ F_OUTPUT_COLOUR, "Output Colour", "output_colour", 0, NUM_COLOURS - 1, 1 },
@ -709,6 +710,7 @@ static param_menu_item_t m7deinterlace_ref = { I_FEATURE, &features[F_MODE7_DE
static param_menu_item_t deinterlace_ref = { I_FEATURE, &features[F_NORMAL_DEINTERLACE] };
static param_menu_item_t m7scaling_ref = { I_FEATURE, &features[F_MODE7_SCALING] };
static param_menu_item_t normalscaling_ref = { I_FEATURE, &features[F_NORMAL_SCALING] };
static param_menu_item_t film_mode_ref = { I_FEATURE, &features[F_FILM_MODE] };
static param_menu_item_t ffosd_ref = { I_FEATURE, &features[F_FFOSD] };
static param_menu_item_t stretch_ref = { I_FEATURE, &features[F_SWAP_ASPECT] };
static param_menu_item_t scanlines_ref = { I_FEATURE, &features[F_SCANLINES] };
@ -843,6 +845,7 @@ static menu_t preferences_menu = {
(base_menu_item_t *) &capscale_ref,
(base_menu_item_t *) &yuv_pixel_ref,
(base_menu_item_t *) &aspect_ref,
(base_menu_item_t *) &film_mode_ref,
(base_menu_item_t *) &res_status_ref,
NULL
}

Wyświetl plik

@ -263,6 +263,7 @@ enum {
F_NORMAL_DEINTERLACE,
F_MODE7_SCALING,
F_NORMAL_SCALING,
F_FILM_MODE,
F_FFOSD,
F_SWAP_ASPECT,
F_OUTPUT_COLOUR,

Wyświetl plik

@ -2699,7 +2699,8 @@ int get_lines_per_vsync(int compensate) {
if (compensate) {
int lines = geometry_get_value(LINES_FRAME);
int clock_ppm = geometry_get_value(CLOCK_PPM);
int frame_window = 20 + clock_ppm * lines / 1000000;
int frame_window = (clock_ppm * lines / 1000000) + 2;
if (frame_window < 20) frame_window = 20;
if (lines_per_vsync >= (lines - frame_window) && lines_per_vsync <= (lines + 1)) {
return lines_per_vsync;
} else {
@ -3539,7 +3540,7 @@ void rgb_to_hdmi_main() {
int old_palette_control = capinfo->palette_control;
int old_flags = flags;
if (half_frame_rate) { //half frame rate display detected (4K @ 25Hz / 30Hz)
if (get_parameter(F_FILM_MODE) != 0 || half_frame_rate) { //half frame rate display detected (4K @ 25Hz / 30Hz)
if (capinfo->vsync_type != VSYNC_NONINTERLACED_DEJITTER) { //inhibit alternate frame dropping when using the vertical dejitter mode as that stops it working
//if ((flags & BIT_OSD) == 0) {
// capinfo->palette_control |= INHIBIT_PALETTE_DIMMING_16_BIT; //if OSD not enabled then stop screen dimming when blank OSD turned on below

Wyświetl plik

@ -29,6 +29,7 @@ scanlines=0
scanline_level=6
yuv_pixel_double=0
integer_aspect=0
film_mode=0
powerup_message=1
crop_border=0
screencap_size=0

Wyświetl plik

@ -29,6 +29,7 @@ scanlines=0
scanline_level=6
yuv_pixel_double=0
integer_aspect=0
film_mode=0
powerup_message=1
crop_border=0
screencap_size=0

Wyświetl plik

@ -29,6 +29,7 @@ scanlines=0
scanline_level=6
yuv_pixel_double=0
integer_aspect=0
film_mode=0
powerup_message=1
crop_border=0
screencap_size=0