Commit Graph

131 Commits

Author SHA1 Message Date
misteraddons
0f667a8442 Video: Automatic Direct Video dv_dac.txt Parsing Fix (#1036)
* Simple Auto Direct Video

direct_video=2
Checks for 1024x768 HDMI resolution and sets direct_video=1
No hot plug detect
No EDID parsing
No device whitelist
No hdmi_limited set based on EDID whitelist

* Add EDID detection and set hdmi_limited for common DACs

- AG6200 sets hdmi_limited=2
- CS5213 sets hdmi_limited=0

* Fix logic to pass normal EDID resolution if not 1024x768

* Update MiSTer.ini

* Remove 1024x768 resolution check

- Only use mfg_id from EDID to identify known compatible DACs

* Add DAC id and settings to dv_dac.txt and dv_dac_user.txt

- mfg_id
- rgb range
- hdmi_audio_96khz
- composite_sync: 0, 1, or "" (default is "")
- dv_dac_user.txt for HDMI video upscalers that support direct video
  - device commented out by default

* Fix parsing of dv_dac.txt

DAC model name wasn't being displayed due to empty composite_sync field
2025-09-14 18:13:51 +08:00
misteraddons
4b591f58fc Automatic Direct Video (#1035)
* Simple Auto Direct Video

direct_video=2
Checks for 1024x768 HDMI resolution and sets direct_video=1
No hot plug detect
No EDID parsing
No device whitelist
No hdmi_limited set based on EDID whitelist

* Add EDID detection and set hdmi_limited for common DACs

- AG6200 sets hdmi_limited=2
- CS5213 sets hdmi_limited=0

* Fix logic to pass normal EDID resolution if not 1024x768

* Update MiSTer.ini

* Remove 1024x768 resolution check

- Only use mfg_id from EDID to identify known compatible DACs

* Add DAC id and settings to dv_dac.txt and dv_dac_user.txt

- mfg_id
- rgb range
- hdmi_audio_96khz
- composite_sync: 0, 1, or "" (default is "")
- dv_dac_user.txt for HDMI video upscalers that support direct video
  - device commented out by default
2025-09-12 14:08:50 +08:00
misteraddons
eef9cbd6d9 video: Support for chroma subcarrier over VGA
Adds "subcarrier" config flag, used to enable chroma subcarrier output over VGA Vsync for external RGB to NTSC/PAL converters.
2025-08-14 14:32:07 +08:00
zakk4223
5921122070 video: guard division by zero in spd_config_dv 2025-05-20 14:56:53 +08:00
zakk4223
1d201a300b Add interlaced video vertical filter (#976) 2025-03-31 14:30:30 +08:00
zakk4223
1976bbe81f Require at least one video info change before triggering change notification (#951) 2025-01-15 13:55:15 +08:00
MikeS11
9e2e0d7088 Increase YC Mode Arrary (#940)
Current Saturn core extends the requirements beyond 10 to 14 potentially more, increasing the array to 20 to fix the current limitation and allow for some buffer.
2024-12-16 12:58:10 +08:00
Sorgelig
e20d5e85ca video: skip dot files from backgrounds. 2024-11-27 18:59:24 +08:00
zakk4223
7f57504f92 Screenshot: don't squish video when it is rotated (#929) 2024-11-14 19:07:04 +08:00
Sorgelig
77b41d0c6a MGL/MRA: add same_dir attribute for setname. 2024-03-26 01:11:12 +08:00
Sorgelig
7b01e79b70 video: adjust SPD data. 2024-01-10 22:29:09 +08:00
Sorgelig
613f808ffb video: fix SPD infoframe. 2023-12-30 02:39:55 +08:00
Sorgelig
18b2ee21e9 video: send SPD info frame in direct_video mode. 2023-12-23 06:48:31 +08:00
Sorgelig
0419387578 video: support for direct_video=2 mode (experimental). 2023-12-20 21:37:55 +08:00
MikeS11
222d61776f Update to YC Key Compare (#836)
- Add an expanded key option to include core pixel freq in key E.g. Corename_FPS_Fpix=PhaseInc
- Fixes issue with matching YC key when Saturn core changes from low res to high res mode, as the FPS remains the same when the pixel clocks change (E.g. 6.71Mhz vs 7.16Mhz)
- Tested with existing yc.txt list as well as new Saturn keys for yc.txt
2023-10-13 19:31:57 +08:00
Sorgelig
15a6841d35 video: wallpeper dir follows config name. 2023-05-08 00:42:35 +08:00
Sam Hardeman
6a8eda7d43 Add functionality to change MaxCLL (peak nits) and MaxFALL (avg nits) + HDR with HDMI limited bugfix (#740) 2023-02-12 23:54:32 +08:00
Sorgelig
6dcd754ac9 video: support for PAL-60 and PAL-M modes for S-Video and CVBS. 2023-02-08 22:53:45 +08:00
Sorgelig
a91f03d56e Support for YC phase_inc override. 2023-02-08 20:47:35 +08:00
Sorgelig
8d735d4e77 Add control for S-Video/CVBS module. Add vga_mode parameter into INI. 2023-02-08 10:22:50 +08:00
Martin Donlon
4d0caf154b video: default preset and reset option.
`preset_default` option added to ini. Filename is relative to the presets/ path.

"Reset to defaults" option added to video processing menu which will delete the config files and reload the default configuration.
2023-02-07 02:55:52 +08:00
Sorgelig
5a3d8cd36f Fix text formatting. 2023-01-30 03:40:25 +08:00
Sam Hardeman
12597108ab Fix color controls bug affecting YPbPr + direct_video (#735) 2023-01-30 03:35:29 +08:00
Sam Hardeman
bfc6dfde3d video: Re-ordering of HDR options to make HLG default + clean-up in ini explanation (#730) 2023-01-15 04:37:52 +08:00
Sam Hardeman
2eb0e538ea video: HLG HDR mode with hdr=3
* Replace HDR metadata with one correctly tuned for BT2020

* Add HLG HDR mode for hdr=3, by request of Mathieulh
2023-01-05 00:06:37 +08:00
Sam Hardeman
9276306cf1 Replace HDR metadata with one correctly tuned for BT2020 (#721) 2023-01-02 16:27:07 +08:00
Sam Hardeman
2b279d1488 video: HDR display/output support (BT2020 / DCI P3) (#718)
* Merge branch 'hdr' of https://github.com/wickerwaka/Main_MiSTer into feature-hdr

Merged in wickerwaka's old HDR branch and integrated the BT2020 and DCI P3 color space conversion matrices. Changed "hdr" option to be a selection of matrix instead of saturation option.

* Add HDR example to MiSTer ini
2022-12-22 02:43:15 +08:00
Sam Hardeman
3214046c50 Feature: HDMI color controls via tranceiver CSC (#715)
* Addition of HDMI color controls (brightness, contrast, saturation, hue, gain, offset) that can be tweaked via MiSTer.ini (examples in-file). These controls are used to construct a matrix for the HDMI chip's color space converter. Due to the nature of this change, HDMI limited and YCbCr options have been reworked and combined into the color matrix routine (hdmi_config_set_csc)

* Change cc_ prefix to video_, as per suggestion and inline with existing video options.
2022-12-21 13:38:47 +08:00
Martin Donlon
801a5ea0d2 If errors are detected in INI settings display an info message for 5 seconds at core startup. (#696)
Added `cfg_error` function for reporting errors in the ini.
Report errors when parsing video_mode information.
Report out of bounds settings.
Report unknown settings.
Detect numeric parse failures.
2022-09-25 04:32:39 +08:00
Martin Donlon
1341b2ae8a Don't mess with YCC quantization bits (#678)
Some capture cards don't see to like it. Standard says it should match the RGB quantization, but also says sinks should ignore it.
2022-08-17 15:30:24 +08:00
zakk4223
ce2da62288 Test for existence of hdmi clock before querying edid (#676)
Don't forget to close fd

Co-authored-by: Zakk <zakk@rsdio.com>
2022-08-10 19:09:38 +08:00
Martin Donlon
7ab42bf375 Initialize has_gamma in video_init (#675)
It was being initialize as a side effect of calling setGamma, but setGamma could early out if no gamma cfg was set already.
2022-08-10 19:08:40 +08:00
Sorgelig
3192baa0f3 Add video_off timeout in MiSTer.ini 2022-08-04 02:43:58 +08:00
Martin Donlon
173fcda187 video: Correctly setup a fallback NN filter when parsing fails (#667) 2022-07-20 00:54:46 +08:00
Martin Donlon
ad695d0848 Video mode switching optimizations.
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.
2022-07-18 16:30:00 -07:00
Martin Donlon
cebd306abd Spike profiler 2022-07-17 11:58:16 -07:00
Martin Donlon
46854fdc1f video: Tweak front and back porch calculations (#656) 2022-07-13 03:47:50 +08:00
Sorgelig
bb6ef14e70 video: limit max_fr from EDID by 62hz. 2022-07-13 00:01:32 +08:00
Sorgelig
9eca861734 video: another method to make a base VRR video mode. 2022-07-01 04:11:45 +08:00
Sorgelig
0afae31c31 video: don't use VRR logic if vsync_adjust is not 0. 2022-07-01 00:16:06 +08:00
Sorgelig
84ade779df video: adjust VRR vblank to a minimum possible value instead of discarding. 2022-06-30 22:59:16 +08:00
Sorgelig
d1e2d37421 video: support for fractional frame rate in video_mode parameter. 2022-06-30 22:47:47 +08:00
zakk4223
b38dada0b5 video: don't modify hdmi packet enable register when doing initial config
Co-authored-by: Zakk <zakk@rsdio.com>
2022-06-29 23:34:50 +08:00
Sorgelig
7d8b477efc video: don't use VRR logic if vsync_adjust=2. 2022-06-29 20:19:40 +08:00
Sorgelig
d0bb16f4ff video: more conservative default VRR max refresh rate. 2022-06-29 08:47:33 +08:00
Sorgelig
5de6c5e231 video: VRR support for core, some code formatting. 2022-06-29 08:44:30 +08:00
Martin Donlon
f8ee846400 Fix fb_size=2 (#651)
Initialize fb_scale from fb_size.
2022-06-27 20:04:48 +08:00
zakk4223
0a5488d48f video: send freesync/VRR enable frames if the display supports it
* Support enabling VRR on displays that advertise it

* Disable SPD and Spare packet registers when they aren't needed. Update ini

Co-authored-by: Zakk <zakk@rsdio.com>
2022-06-26 22:57:09 +08:00
Martin Donlon
db9b8676f9 video: Removed loop from vscale calculations, calculate max horizontal and (#636)
vertical scale and use the minimum.

vscale_mode has been changed to make it more reliable.

vscale_mode=4 - Generate modes that match the cores aspect ratio.
Generally better, will work with more cores and produce most optimal
resolutions, but will not be compatible with displays that always
stretch the image to fill.

vscale_mode=5 - Generate modes that match the original display aspect
ratio, if the core needs a wider aspect then the resolution is not
changed. Compatible with a wider range of displays.

Updated INI with a clearer description.

Removed mode 6 since it was not being used and adjusting display width
doesn't enable integer horizontal scaling.

uh undo
2022-06-08 16:40:06 +08:00
Martin Donlon
b8a4c3f5e9 Support for HDMI pixel repetition (#631)
Send pixel repetition as high bit of video width
Half linux framebuffer size when PR is in use
If a modes width is > 2048 then use pixel repetition
Add video_mode 14 2560x1440.
Fallback to mode 8 if core doesn't support PR
2022-06-05 23:59:48 +08:00