Describe the bug
As the author who originally introduced the RAW file support feature to YUView, I wanted to fix a minor logical fallback discrepancy regarding .raw files.
In YUView, .raw extension files (defined in RAW_BAYER_EXTENSIONS) are treated as raw Bayer/CFA sensor data. Since YUView uses YUV_400 (luma-only / single Y plane) internally to represent single-channel raw files, these files should default to the YUV_400 format.
However, if a .raw file is opened without resolution indicators in the filename, the format guesser is bypassed, and the video handler defaults to YUV_420 (the constructor fallback). This forces users to manually switch the format dropdown to YUV 4:0:0 in the properties panel every time they open a clean .raw file.
Additionally, in checkSpecificFileExtensions inside PixelFormatYUVGuess.cpp, there is a potential crash hazard where guessedFrameFormat.frameSize is dereferenced without checking if it has a value.
To Reproduce
Steps to reproduce the behavior:
- Open a raw video file named
1.raw (which does not contain resolution indicators like _1920x1080_ in its filename).
- Look at the properties panel.
- See that the pixel format defaults to YUV 4:2:0.
Expected behavior
The .raw file should default to YUV 4:0:0 (YUV_400 luma-only) format upon loading, allowing the user to only manually input the width/height in the properties GUI.
Screenshots
N/A
Version
- OS: Windows / macOS / Linux
- Version: develop branch, commit a72eb34 or later
- If you compiled YUView yourself then which Qt version did you use? Qt 6.x
Describe the bug
As the author who originally introduced the RAW file support feature to YUView, I wanted to fix a minor logical fallback discrepancy regarding
.rawfiles.In YUView,
.rawextension files (defined inRAW_BAYER_EXTENSIONS) are treated as raw Bayer/CFA sensor data. Since YUView usesYUV_400(luma-only / single Y plane) internally to represent single-channel raw files, these files should default to theYUV_400format.However, if a
.rawfile is opened without resolution indicators in the filename, the format guesser is bypassed, and the video handler defaults toYUV_420(the constructor fallback). This forces users to manually switch the format dropdown to YUV 4:0:0 in the properties panel every time they open a clean.rawfile.Additionally, in
checkSpecificFileExtensionsinsidePixelFormatYUVGuess.cpp, there is a potential crash hazard whereguessedFrameFormat.frameSizeis dereferenced without checking if it has a value.To Reproduce
Steps to reproduce the behavior:
1.raw(which does not contain resolution indicators like_1920x1080_in its filename).Expected behavior
The
.rawfile should default to YUV 4:0:0 (YUV_400 luma-only) format upon loading, allowing the user to only manually input the width/height in the properties GUI.Screenshots
N/A
Version