mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:57:44 +00:00
LibGfx/JPEG: Print debug information on subsampling for each component
This commit is contained in:
parent
145672a8b4
commit
6c85f937ef
1 changed files with 2 additions and 5 deletions
|
@ -1197,11 +1197,6 @@ static inline bool validate_luma_and_modify_context(Component const& luma, JPEGL
|
|||
context.hsample_factor = luma.hsample_factor;
|
||||
context.vsample_factor = luma.vsample_factor;
|
||||
|
||||
if constexpr (JPEG_DEBUG) {
|
||||
dbgln("Horizontal Subsampling Factor: {}", luma.hsample_factor);
|
||||
dbgln("Vertical Subsampling Factor: {}", luma.vsample_factor);
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
|
@ -1273,6 +1268,8 @@ static ErrorOr<void> read_start_of_frame(JPEGStream& stream, JPEGLoadingContext&
|
|||
component.hsample_factor = subsample_factors >> 4;
|
||||
component.vsample_factor = subsample_factors & 0x0F;
|
||||
|
||||
dbgln_if(JPEG_DEBUG, "Component subsampling: {}, {}", component.hsample_factor, component.vsample_factor);
|
||||
|
||||
if (i == 0) {
|
||||
// By convention, downsampling is applied only on chroma components. So we should
|
||||
// hope to see the maximum sampling factor in the luma component.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue