Skip to content

Commit

Permalink
Fix PresetVideoFormat dependency loop
Browse files Browse the repository at this point in the history
  • Loading branch information
dnjulek committed Jul 21, 2024
1 parent 5c46988 commit 07f957a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

zig-cache/
.zig-cache/
zig-out/
example/zig-cache/
example/.zig-cache/
example/zig-out/
6 changes: 4 additions & 2 deletions src/vapoursynth4.zig
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,10 @@ pub const SampleType = enum(c_int) {
Float = 1,
};

pub inline fn makeVideoID(color_family: ColorFamily, sample_type: SampleType, bits_per_sample: c_int, sub_sampling_w: c_int, sub_sampling_h: c_int) PresetVideoFormat {
return ((color_family << 28) | (sample_type << 24) | (bits_per_sample << 16) | (sub_sampling_w << 8) | (sub_sampling_h << 0));
pub inline fn makeVideoID(color_family: ColorFamily, sample_type: SampleType, bits_per_sample: c_int, sub_sampling_w: c_int, sub_sampling_h: c_int) c_int {
const cf: c_int = @intFromEnum(color_family);
const st: c_int = @intFromEnum(sample_type);
return ((cf << 28) | (st << 24) | (bits_per_sample << 16) | (sub_sampling_w << 8) | (sub_sampling_h << 0));
}

/// The presets suffixed with H and S have floating point sample type. The H and S suffixes stand for half precision and single precision, respectively.
Expand Down

0 comments on commit 07f957a

Please sign in to comment.