Skip to content

Commit 7a312af

Browse files
authored
Merge pull request #39 from awxkee/dev
Decoding improvements
2 parents 182650d + 880b9d7 commit 7a312af

File tree

8 files changed

+16
-18
lines changed

8 files changed

+16
-18
lines changed

app/src/main/java/com/radzivon/bartoshyk/avif/MainActivity.kt

+1-1
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,7 @@ class MainActivity : AppCompatActivity() {
122122
// allFiles = allFiles.take(5).toMutableList()
123123
// allFiles = allFiles.filter { it.contains("hato-wide-gamut-8bit.avif") || it.contains("wide_gamut.avif") || it.contains("IMG_0199_rr.avif") || it.contains("bt_2020_pq.avif") }.toMutableList()
124124
// allFiles = allFiles.filter { it.contains("bbb_alpha_inverted.avif") }.toMutableList()
125-
allFiles = allFiles.filter { it.contains("head-empty-hdr.avif") }.toMutableList()
125+
// allFiles = allFiles.filter { it.contains("head-empty-hdr.avif") }.toMutableList()
126126
for (file in allFiles) {
127127
try {
128128
Log.d("AVIF", "start processing $file")
Binary file not shown.
Binary file not shown.
-1.39 KB
Binary file not shown.
Binary file not shown.

avifpixart/Cargo.lock

+5-7
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

avifpixart/Cargo.toml

+3-3
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,10 @@ edition = "2021"
55

66
[dependencies]
77
num-traits = "0.2"
8-
pic-scale = { version = "0.5.9", default-features = false, features = ["nightly_f16"] }
9-
yuv = { version = "0.8.3", features = ["nightly_f16"], default-features = false }
8+
pic-scale = { version = "0.6.1", default-features = false, features = ["nightly_f16"] }
9+
yuv = { path = "../../../RustroverProjects/yuvutils-rs", features = ["nightly_f16"], default-features = false }
1010
bytemuck = { version = "1.22", features = ["nightly_float"] }
11-
moxcms = "0.6.1"
11+
moxcms = "0.6.2"
1212
gainforge = "0.3.2"
1313

1414
[features]

avifpixart/src/tonemapper.rs

+7-7
Original file line numberDiff line numberDiff line change
@@ -243,8 +243,8 @@ pub unsafe extern "C" fn apply_tone_mapping_rgba16(
243243
new_profile.update_rgb_colorimetry_triplet(
244244
white_point,
245245
red_chromaticity.to_xyzd(),
246-
blue_chromaticity.to_xyzd(),
247246
green_chromaticity.to_xyzd(),
247+
blue_chromaticity.to_xyzd(),
248248
);
249249
new_profile.cicp = Some(CicpProfile {
250250
full_range: true,
@@ -279,11 +279,11 @@ pub unsafe extern "C" fn apply_tone_mapping_rgba16(
279279
&new_profile,
280280
&ColorProfile::new_srgb(),
281281
ToneMappingMethod::Rec2408(GainHdrMetadata {
282-
display_max_brightness: 203f32,
282+
display_max_brightness: 203.,
283283
content_max_brightness: brightness,
284284
}),
285285
MappingColorSpace::Rgb(RgbToneMapperParameters {
286-
gamut_clipping: GamutClipping::Clip,
286+
gamut_clipping: GamutClipping::NoClip,
287287
exposure: 1.0,
288288
}),
289289
)
@@ -292,11 +292,11 @@ pub unsafe extern "C" fn apply_tone_mapping_rgba16(
292292
&new_profile,
293293
&ColorProfile::new_srgb(),
294294
ToneMappingMethod::Rec2408(GainHdrMetadata {
295-
display_max_brightness: 203f32,
295+
display_max_brightness: 203.,
296296
content_max_brightness: brightness,
297297
}),
298298
MappingColorSpace::Rgb(RgbToneMapperParameters {
299-
gamut_clipping: GamutClipping::Clip,
299+
gamut_clipping: GamutClipping::NoClip,
300300
exposure: 1.0,
301301
}),
302302
)
@@ -305,11 +305,11 @@ pub unsafe extern "C" fn apply_tone_mapping_rgba16(
305305
&new_profile,
306306
&ColorProfile::new_srgb(),
307307
ToneMappingMethod::Rec2408(GainHdrMetadata {
308-
display_max_brightness: 203f32,
308+
display_max_brightness: 203.,
309309
content_max_brightness: brightness,
310310
}),
311311
MappingColorSpace::YRgb(CommonToneMapperParameters {
312-
gamut_clipping: GamutClipping::Clip,
312+
gamut_clipping: GamutClipping::NoClip,
313313
exposure: 1.0,
314314
}),
315315
)

0 commit comments

Comments
 (0)