diff --git a/.gitignore b/.gitignore index f337e06..cb41fc3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,5 +1,5 @@ -zig-cache/ +.zig-cache/ zig-out/ -example/zig-cache/ +example/.zig-cache/ example/zig-out/ diff --git a/src/vapoursynth4.zig b/src/vapoursynth4.zig index 4ced8df..782b9c3 100644 --- a/src/vapoursynth4.zig +++ b/src/vapoursynth4.zig @@ -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.