Skip to content

Commit

Permalink
Fix modular channels section assignment.
Browse files Browse the repository at this point in the history
Channels after the first "large" one are not in LF global; the existing
code assumed decisions were made per channel.
  • Loading branch information
veluca93 committed Dec 24, 2024
1 parent c138847 commit d160829
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions jxl/src/frame/modular.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ impl FullModularImage {
.iter()
.enumerate()
.filter(|x| x.1.is_coded)
.filter(|x| x.1.info.is_meta_or_small(frame_header.group_dim()))
.take_while(|x| x.1.info.is_meta_or_small(frame_header.group_dim()))
.map(|x| x.0)
.collect(),
);
Expand All @@ -148,7 +148,7 @@ impl FullModularImage {
.iter()
.enumerate()
.filter(|x| x.1.is_coded)
.filter(|x| !x.1.info.is_meta_or_small(frame_header.group_dim()))
.skip_while(|x| x.1.info.is_meta_or_small(frame_header.group_dim()))
.filter(|x| x.1.info.is_shift_in_range(3, usize::MAX))
.map(|x| x.0)
.collect(),
Expand Down

0 comments on commit d160829

Please # to comment.