Y/C and mono decoding for ld-analyse + QOL improvements.#922
Y/C and mono decoding for ld-analyse + QOL improvements.#922happycube merged 14 commits intohappycube:mainfrom
Conversation
Add the mono decoder to ld-analyse and add an yNR usable with the mono decoder (ld-analyse only)
add the luma nr for the mono decoder in the ld-chroma-decoder
Reworks of the sizing off the window and automatic resize based on format and aspect ratio made 4:3 default
small fix on config loading for the mono decoder add an "enable luma nr" checkbox on loading off a source adjust decoder depending if its CVBS or Y/C
set enableYNR to true by default
add a working Y/C preview add a combine checkbox for combining
Fix for UI and Y/C related code
fix resizing happening while in fullscreen mode set the ntsc phase compensation to always be false at the begining.
fix issue with the checkbox state
|
Y/C mode works really well. A few things that I noticed that need to be fixed.
|
|
Maybe an alternative to changing the global defaults would be to write a feature that allows users to save defaults for the ui layout to their machine. |
|
Practically everyone changes the 1:1 to 4:3 so it makes sense to keep it as 4:3 default because that's what the majority of users and even myself use. It definitely would be nice to have a config file system for preferences. I think one major thing since the ability to change the active area preview window, is having multiple colour options for the blanking, as we currently don't have any sort of full-frame readout, If we did it would be easy to make a framing border around the active area with a contrasting colour such as yellow or red. |
Well I don't, but agree it should ideally save preferences so everyone can keep their prefereces |
For the zoom i efectively tought it was not practical to resize to those size as it seem way to big for even an 1440p screen. but efectively i could lock resize over a ceetain size or take time to compute the good resize for the different zoom but that would be tedious. for the phase compensation its effectively did an update cause i found it was non consistent between cvbs and y/c and the phase compensation seem to give color that was more wrong so i decided it was probably better to set it to false by default everywhere to avoid user say the color look different or wrong. but i never dealed with NTSC vhs. maybe there is something in the metadata i could use to know if its a tape and not just a high quality Y/C source ? |
|
the setting saving could be a good idea but would have to be on another update. and i feel the default should already fit the most typical case. |
| void MainWindow::resize_on_aspect() | ||
| { | ||
| if(!this->isFullScreen() && !this->isMaximized()) | ||
| { | ||
| if (tbcSource.getSystem() == PAL){ | ||
| if (displayAspectRatio && !tbcSource.getIsWidescreen())// 4:3 | ||
| { | ||
| this->resize(959, 765); | ||
| } | ||
| else if (displayAspectRatio && tbcSource.getIsWidescreen())// 16:9 | ||
| { | ||
| this->resize(1258, 765); | ||
| } | ||
| else// 1:1 | ||
| { | ||
| this->resize(1155, 765); | ||
| } | ||
|
|
||
| } else { | ||
| if (displayAspectRatio && !tbcSource.getIsWidescreen())// 4:3 | ||
| { | ||
| this->resize(780, 665); | ||
| } | ||
| else if (displayAspectRatio && tbcSource.getIsWidescreen())// 16:9 | ||
| { | ||
| this->resize(1052, 665); | ||
| } | ||
| else// 1:1 | ||
| { | ||
| this->resize(930, 665); | ||
| } | ||
| } | ||
| } |
There was a problem hiding this comment.
This seems to be what is running that unexpectedly resizes the window when I open ld-analyse. This is pretty jarring, and I need to resize the window back to where I had it each time. I would suggest we fix this, or remove it and add it in later when it's working. It'd be nice to see the chroma decoder changes go in, so I would think the latter option is preferred.
Also, where do these pixel values come from? However they are derived, the window size should be calculated relative to size of the video. The only constant here is the actual size of the video. The UI elements around the window can be different sizes depending on themes, OS, zoom values, etc.
There was a problem hiding this comment.
This seems to be what is running that unexpectedly resizes the window when I open ld-analyse. This is pretty jarring, and I need to resize the window back to where I had it each time. I would suggest we fix this, or remove it and add it in later when it's working. It'd be nice to see the chroma decoder changes go in, so I would think the latter option is preferred.
Also, where do these pixel values come from? However they are derived, the window size should be calculated relative to size of the video. The only constant here is the actual size of the video. The UI elements around the window can be different sizes depending on themes, OS, zoom values, etc.
Yes i wrote that code. and you issue because i never dealed with zoom. the size should be the same on all OS as its handled by qt. the only things that might potentialy change is the design off the button but that shouldnt impact any sizing. for finding the size i just did trial and error until it fit perfectly. i could look into finding the perfect size for the x2 zoom. and for x3 maybe i would see 🤔. but for non integer size its wouldnt be possible.
There was a problem hiding this comment.
If there's a way to get the pixel size height and width of the inner video image, that could be used to resize the window. Basically instead of hardcoding the pixel values here, they would be derived from the size of the video image and the border between the view area and the main window.
Pseudo code would be something like this:
Get the height and width of the scaled video image
Get the height and width of the video view area
Get the height and width of the main window
// account for the size of the ui elements
Outer height and width = size of the main window - size of the view area
// calculate window size relative to video image and window ui elements
New size = video image size + outer size
Resize the window to the new size
There was a problem hiding this comment.
i thinks they both scale differently but im going to do few tests and see
There was a problem hiding this comment.
i fixed it it was a lot easier than i thought the margin is always the same. now it resize perfectly for all zoom size.
There was a problem hiding this comment.
Confirmed, works much better now with zoom.
the window now adapt automaticaly to all size including zoom.
add tapeFormat to the metadata. show tape format in ld-analyse enable ntsc phase compensation for NTSC VHS
Toggle buton for disabling auto resize



This update reworks diferent par off ld-analyse :