Reduce cost of setting video mode information when using vsync_adjust=1/2 or vscale_mode=4/5 from 90ms to 5ms (worst case, most instances are less than 1ms). Split video initialization into video_init and video_set_mode. video_init is called once, video_set_mode is called whenever the mode changes. Split hdmi_config into hdmi_config_init and hdmi_config_set_mode. Same as video_, hdmi_config_init does the bulk of the initialization, hdmi_config_set_mode is just for parameters that can change based on the mode. Load video filter data in loadScalerCfg and persist it. Calculate a digest for scaler data and use that to determine whether new data needs to be sent. Only send gamma information if the filename has changed. Offload fb module parameter writing to a separate thread via the new offload system. Reduce the amount of work being done in set_vrr_mode when vrr is disabled.
62 lines
1.4 KiB
C
62 lines
1.4 KiB
C
#ifndef VIDEO_H
|
|
#define VIDEO_H
|
|
|
|
#define VFILTER_HORZ 0
|
|
#define VFILTER_VERT 1
|
|
#define VFILTER_SCAN 2
|
|
|
|
struct VideoInfo
|
|
{
|
|
uint32_t width;
|
|
uint32_t height;
|
|
uint32_t htime;
|
|
uint32_t vtime;
|
|
uint32_t ptime;
|
|
uint32_t vtimeh;
|
|
uint32_t arx;
|
|
uint32_t ary;
|
|
uint32_t arxy;
|
|
uint32_t fb_en;
|
|
uint32_t fb_fmt;
|
|
uint32_t fb_width;
|
|
uint32_t fb_height;
|
|
|
|
bool interlaced;
|
|
bool rotated;
|
|
};
|
|
|
|
void video_init();
|
|
|
|
int video_get_scaler_flt(int type);
|
|
void video_set_scaler_flt(int type, int n);
|
|
char* video_get_scaler_coeff(int type, int only_name = 1);
|
|
void video_set_scaler_coeff(int type, const char *name);
|
|
|
|
int video_get_gamma_en();
|
|
void video_set_gamma_en(int n);
|
|
char* video_get_gamma_curve(int only_name = 1);
|
|
void video_set_gamma_curve(const char *name);
|
|
|
|
int video_get_shadow_mask_mode();
|
|
void video_set_shadow_mask_mode(int n);
|
|
char* video_get_shadow_mask(int only_name = 1);
|
|
void video_set_shadow_mask(const char *name);
|
|
void video_loadPreset(char *name);
|
|
|
|
void video_mode_adjust();
|
|
|
|
int hasAPI1_5();
|
|
|
|
void video_fb_enable(int enable, int n = 0);
|
|
int video_fb_state();
|
|
void video_menu_bg(int n, int idle = 0);
|
|
int video_bg_has_picture();
|
|
int video_chvt(int num);
|
|
void video_cmd(char *cmd);
|
|
|
|
void video_core_description(char *str, size_t len);
|
|
void video_scaler_description(char *str, size_t len);
|
|
char* video_get_core_mode_name(int with_vrefresh = 1);
|
|
|
|
#endif // VIDEO_H
|