mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
LibGfx/JBIG2: Make AdaptiveTemplatePixel toplevel
We're going to need it for symbol segment decoding too. No behavior change.
This commit is contained in:
parent
8e82c2b932
commit
c06110da87
Notes:
sideshowbarker
2024-07-16 22:11:09 +09:00
Author: https://github.com/nico Commit: https://github.com/SerenityOS/serenity/commit/c06110da87 Pull-request: https://github.com/SerenityOS/serenity/pull/23661 Reviewed-by: https://github.com/trflynn89
1 changed files with 6 additions and 5 deletions
|
@ -768,6 +768,11 @@ static ErrorOr<void> warn_about_multiple_pages(JBIG2LoadingContext& context)
|
|||
return {};
|
||||
}
|
||||
|
||||
struct AdaptiveTemplatePixel {
|
||||
i8 x { 0 };
|
||||
i8 y { 0 };
|
||||
};
|
||||
|
||||
// 6.2.2 Input parameters
|
||||
struct GenericRegionDecodingInputParameters {
|
||||
bool is_modified_modified_read { false }; // "MMR" in spec.
|
||||
|
@ -778,10 +783,6 @@ struct GenericRegionDecodingInputParameters {
|
|||
bool is_extended_reference_template_used { false }; // "EXTTEMPLATE" in spec.
|
||||
Optional<NonnullOwnPtr<BitBuffer>> skip_pattern; // "USESKIP", "SKIP" in spec.
|
||||
|
||||
struct AdaptiveTemplatePixel {
|
||||
i8 x { 0 };
|
||||
i8 y { 0 };
|
||||
};
|
||||
Array<AdaptiveTemplatePixel, 12> adaptive_template_pixels; // "GBATX" / "GBATY" in spec.
|
||||
// FIXME: GBCOLS, GBCOMBOP, COLEXTFLAG
|
||||
};
|
||||
|
@ -952,7 +953,7 @@ static ErrorOr<void> decode_immediate_generic_region(JBIG2LoadingContext& contex
|
|||
data = data.slice(sizeof(flags));
|
||||
|
||||
// 7.4.6.3 Generic region segment AT flags
|
||||
Array<GenericRegionDecodingInputParameters::AdaptiveTemplatePixel, 12> adaptive_template_pixels {};
|
||||
Array<AdaptiveTemplatePixel, 12> adaptive_template_pixels {};
|
||||
if (!uses_mmr) {
|
||||
dbgln_if(JBIG2_DEBUG, "Non-MMR generic region, GBTEMPLATE={} TPGDON={} EXTTEMPLATE={}", arithmetic_coding_template, typical_prediction_generic_decoding_on, uses_extended_reference_template);
|
||||
|
||||
|
|
Loading…
Reference in a new issue