Skip to content

Commit

Permalink
Fix wrong compute of max slice count with DPX having group of pixels
Browse files Browse the repository at this point in the history
  • Loading branch information
JeromeMartinez committed Apr 11, 2024
1 parent fce3a36 commit bd5a347
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
1 change: 1 addition & 0 deletions Project/GNU/CLI/test/test1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,7 @@ Formats/DPX/Flavors/RGB_12_Packed_BE/086449_modified_14x4_orientation0.dpx pass
Formats/DPX/Flavors/RGB_12_Packed_BE/086449_modified_15x4.dpx pass
Formats/DPX/Flavors/RGB_12_Packed_BE/086449_modified_15x4_orientation0.dpx pass
Formats/DPX/Flavors/RGB_12_Packed_BE/086449_modified_4300x64_orientation0.dpx pass
Formats/DPX/Flavors/RGB_12_Packed_BE/Width_2488.dpx pass
Formats/DPX/Flavors/RGB_16F_Packed_BE/RGB_half_float_16_bit.dpx fail
Formats/DPX/Flavors/RGB_16_FilledA_BE/checkerboard_1080p_nuke_bigendian_16bit_noalpha.dpx pass
Formats/DPX/Flavors/RGB_16_FilledA_LE/checkerboard_1080p_nuke_littleendian_16bit_noalpha.dpx pass
Expand Down
12 changes: 3 additions & 9 deletions Source/Lib/Uncompressed/DPX/DPX.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -433,8 +433,8 @@ void dpx::ParseBuffer()

// Computing which slice count is suitable
size_t Slice_Multiplier = PixelsPerBlock((flavor)Flavor);
auto slice_x_Sav = slice_x;
if (Slice_Multiplier > 1)

if (Slice_Multiplier > 1 && !(DPX_Tested[Flavor].Info.Flags & BlockSpan))
{
// Temporary limitation because the decoder does not support yet the merge of data from 2 slices in one DPX block
for (; slice_x; slice_x--)
Expand All @@ -444,13 +444,7 @@ void dpx::ParseBuffer()
}
if (slice_x == 0)
{
if ((DPX_Tested[Flavor].Info.Flags & BlockSpan))
{
Flavor |= (uint64_t)1 << (int)feature::BlockSpan;
slice_x = slice_x_Sav;
}
else
Unsupported(unsupported::PixelBoundaries);
Unsupported(unsupported::PixelBoundaries);
}
}
slice_y = slice_x;
Expand Down

0 comments on commit bd5a347

Please sign in to comment.