Thanks for using Compiler Explorer
Sponsors
Jakt
C++
Ada
Algol68
Analysis
Android Java
Android Kotlin
Assembly
C
C3
Carbon
C with Coccinelle
C++ with Coccinelle
C++ (Circle)
CIRCT
Clean
CMake
CMakeScript
COBOL
C++ for OpenCL
MLIR
Cppx
Cppx-Blue
Cppx-Gold
Cpp2-cppfront
Crystal
C#
CUDA C++
D
Dart
Elixir
Erlang
Fortran
F#
GLSL
Go
Haskell
HLSL
Hook
Hylo
IL
ispc
Java
Julia
Kotlin
LLVM IR
LLVM MIR
Modula-2
Mojo
Nim
Numba
Nix
Objective-C
Objective-C++
OCaml
Odin
OpenCL C
Pascal
Pony
PTX
Python
Racket
Raku
Ruby
Rust
Sail
Snowball
Scala
Slang
Solidity
Spice
SPIR-V
Swift
LLVM TableGen
Toit
Triton
TypeScript Native
V
Vala
Visual Basic
Vyper
WASM
Zig
Javascript
GIMPLE
Ygen
sway
rust source #2
Output
Compile to binary object
Link to binary
Execute the code
Intel asm syntax
Demangle identifiers
Verbose demangling
Filters
Unused labels
Library functions
Directives
Comments
Horizontal whitespace
Debug intrinsics
Compiler
mrustc (master)
rustc 1.0.0
rustc 1.1.0
rustc 1.10.0
rustc 1.11.0
rustc 1.12.0
rustc 1.13.0
rustc 1.14.0
rustc 1.15.1
rustc 1.16.0
rustc 1.17.0
rustc 1.18.0
rustc 1.19.0
rustc 1.2.0
rustc 1.20.0
rustc 1.21.0
rustc 1.22.0
rustc 1.23.0
rustc 1.24.0
rustc 1.25.0
rustc 1.26.0
rustc 1.27.0
rustc 1.27.1
rustc 1.28.0
rustc 1.29.0
rustc 1.3.0
rustc 1.30.0
rustc 1.31.0
rustc 1.32.0
rustc 1.33.0
rustc 1.34.0
rustc 1.35.0
rustc 1.36.0
rustc 1.37.0
rustc 1.38.0
rustc 1.39.0
rustc 1.4.0
rustc 1.40.0
rustc 1.41.0
rustc 1.42.0
rustc 1.43.0
rustc 1.44.0
rustc 1.45.0
rustc 1.45.2
rustc 1.46.0
rustc 1.47.0
rustc 1.48.0
rustc 1.49.0
rustc 1.5.0
rustc 1.50.0
rustc 1.51.0
rustc 1.52.0
rustc 1.53.0
rustc 1.54.0
rustc 1.55.0
rustc 1.56.0
rustc 1.57.0
rustc 1.58.0
rustc 1.59.0
rustc 1.6.0
rustc 1.60.0
rustc 1.61.0
rustc 1.62.0
rustc 1.63.0
rustc 1.64.0
rustc 1.65.0
rustc 1.66.0
rustc 1.67.0
rustc 1.68.0
rustc 1.69.0
rustc 1.7.0
rustc 1.70.0
rustc 1.71.0
rustc 1.72.0
rustc 1.73.0
rustc 1.74.0
rustc 1.75.0
rustc 1.76.0
rustc 1.77.0
rustc 1.78.0
rustc 1.79.0
rustc 1.8.0
rustc 1.80.0
rustc 1.81.0
rustc 1.82.0
rustc 1.83.0
rustc 1.84.0
rustc 1.85.0
rustc 1.86.0
rustc 1.87.0
rustc 1.88.0
rustc 1.89.0
rustc 1.9.0
rustc beta
rustc nightly
rustc-cg-gcc (master)
x86-64 GCCRS (GCC master)
x86-64 GCCRS (GCCRS master)
x86-64 GCCRS 14.1 (GCC assertions)
x86-64 GCCRS 14.1 (GCC)
x86-64 GCCRS 14.2 (GCC assertions)
x86-64 GCCRS 14.2 (GCC)
x86-64 GCCRS 14.3 (GCC assertions)
x86-64 GCCRS 14.3 (GCC)
x86-64 GCCRS 15.1 (GCC assertions)
x86-64 GCCRS 15.1 (GCC)
x86-64 GCCRS 15.2 (GCC assertions)
x86-64 GCCRS 15.2 (GCC)
Options
Source code
#[derive(Clone, Copy, PartialEq, Eq, Default)] #[repr(C)] pub struct mv { pub y: i16, pub x: i16, } #[derive(Clone, Copy, PartialEq, Eq, Default)] #[repr(transparent)] pub struct MaskedInterIntraPredMode(u8); #[derive(Clone, Copy, Default)] #[repr(C)] pub struct Av1BlockInter1d { pub mv: [mv; 2], pub wedge_idx: u8, /// Stored as a [`u8`] since [`bool`] is not [`FromBytes`]. pub mask_sign: u8, pub interintra_mode: MaskedInterIntraPredMode, /// For `impl `[`AsBytes`]. pub _padding: u8, } #[derive(Copy, Clone)] #[repr(C)] pub struct Av1BlockInterNd { /// Make [`Av1BlockInter1d`] the field instead of [`Av1BlockInter2d`] /// simply because it is used much more often, so it's more convenient. /// /// `[`[`u8`]`; 12]` is not used because it has a lower alignment. /// [`Av1BlockInter1d`] and [`Av1BlockInter2d`] both have the same size and alignment. pub one_d: Av1BlockInter1d, } #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] pub enum CompInterType { WeightedAvg = 1, Avg = 2, Seg = 3, Wedge = 4, } #[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] pub enum MotionMode { #[default] Translation = 0, Obmc = 1, Warp = 2, } #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Default)] pub enum DrlProximity { #[default] Nearest, Nearer, Near, Nearish, } #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Default, Debug)] pub enum TxfmSize { // Square #[default] S4x4 = 0, S8x8 = 1, S16x16 = 2, S32x32 = 3, S64x64 = 4, // Rectangular R4x8 = 5, R8x4 = 6, R8x16 = 7, R16x8 = 8, R16x32 = 9, R32x16 = 10, R32x64 = 11, R64x32 = 12, R4x16 = 13, R16x4 = 14, R8x32 = 15, R32x8 = 16, R16x64 = 17, R64x16 = 18, } #[derive(Clone, Copy, PartialEq, Eq, Default)] pub enum Filter2d { #[default] Regular8Tap = 0, RegularSmooth8Tap = 1, RegularSharp8Tap = 2, SharpRegular8Tap = 3, SharpSmooth8Tap = 4, Sharp8Tap = 5, SmoothRegular8Tap = 6, Smooth8Tap = 7, SmoothSharp8Tap = 8, Bilinear = 9, } #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum InterIntraType { Blend, Wedge, } #[derive(Copy, Clone)] #[repr(C)] pub struct Av1BlockInter { pub nd: Av1BlockInterNd, pub comp_type: Option<CompInterType>, pub inter_mode: u8, pub motion_mode: MotionMode, pub drl_idx: DrlProximity, pub r#ref: [i8; 2], pub max_ytx: TxfmSize, pub filter2d: Filter2d, pub interintra_type: Option<InterIntraType>, pub tx_split0: u8, pub tx_split1: u16, } #[derive(Clone, Copy, Default)] #[repr(C)] pub struct Av1BlockIntra { pub y_mode: u8, pub uv_mode: u8, pub tx: TxfmSize, pub pal_sz: [u8; 2], pub y_angle: i8, pub uv_angle: i8, pub cfl_alpha: [i8; 2], } #[repr(C)] pub enum Av1BlockIntraInter { Intra(Av1BlockIntra), Inter(Av1BlockInter), } #[no_mangle] pub fn intra_copy(intra: &Av1BlockIntra) -> Av1BlockIntraInter { Av1BlockIntraInter::Intra(intra.clone()) } #[no_mangle] pub fn inter_copy(inter: &Av1BlockInter) -> Av1BlockIntraInter { Av1BlockIntraInter::Inter(inter.clone()) } use std::ffi::{c_int, c_uint}; pub type Dav1dPixelLayout = c_uint; pub type Dav1dColorPrimaries = c_uint; pub type Dav1dTransferCharacteristics = c_uint; pub type Dav1dMatrixCoefficients = c_uint; pub type Dav1dChromaSamplePosition = c_uint; pub type Dav1dAdaptiveBoolean = c_uint; #[derive(Clone, Copy)] #[repr(C)] pub struct Dav1dSequenceHeaderOperatingPoint { pub major_level: u8, pub minor_level: u8, pub initial_display_delay: u8, pub idc: u16, pub tier: u8, pub decoder_model_param_present: u8, pub display_model_param_present: u8, } #[derive(Clone, Copy)] #[repr(C)] pub struct Dav1dSequenceHeaderOperatingParameterInfo { pub decoder_buffer_delay: u32, pub encoder_buffer_delay: u32, pub low_delay_mode: u8, } pub const DAV1D_MAX_OPERATING_POINTS: usize = 32; #[derive(Clone, Copy)] #[repr(C)] pub struct Dav1dSequenceHeader { pub profile: u8, pub max_width: c_int, pub max_height: c_int, pub layout: Dav1dPixelLayout, pub pri: Dav1dColorPrimaries, pub trc: Dav1dTransferCharacteristics, pub mtrx: Dav1dMatrixCoefficients, pub chr: Dav1dChromaSamplePosition, pub hbd: u8, pub color_range: u8, pub num_operating_points: u8, pub operating_points: [Dav1dSequenceHeaderOperatingPoint; DAV1D_MAX_OPERATING_POINTS], pub still_picture: u8, pub reduced_still_picture_header: u8, pub timing_info_present: u8, /// > 0 if defined, 0 otherwise pub num_units_in_tick: u32, /// > 0 if defined, 0 otherwise pub time_scale: u32, pub equal_picture_interval: u8, pub num_ticks_per_picture: u32, pub decoder_model_info_present: u8, pub encoder_decoder_buffer_delay_length: u8, /// > 0 if defined, 0 otherwise pub num_units_in_decoding_tick: u32, pub buffer_removal_delay_length: u8, pub frame_presentation_delay_length: u8, pub display_model_info_present: u8, pub width_n_bits: u8, pub height_n_bits: u8, pub frame_id_numbers_present: u8, pub delta_frame_id_n_bits: u8, pub frame_id_n_bits: u8, pub sb128: u8, pub filter_intra: u8, pub intra_edge_filter: u8, pub inter_intra: u8, pub masked_compound: u8, pub warped_motion: u8, pub dual_filter: u8, pub order_hint: u8, pub jnt_comp: u8, pub ref_frame_mvs: u8, pub screen_content_tools: Dav1dAdaptiveBoolean, pub force_integer_mv: Dav1dAdaptiveBoolean, pub order_hint_n_bits: u8, pub super_res: u8, pub cdef: u8, pub restoration: u8, pub ss_hor: u8, pub ss_ver: u8, pub monochrome: u8, pub color_description_present: u8, pub separate_uv_delta_q: u8, pub film_grain_present: u8, pub operating_parameter_info: [Dav1dSequenceHeaderOperatingParameterInfo; DAV1D_MAX_OPERATING_POINTS], } #[no_mangle] pub fn Dav1dSequenceHeader_copy(v: &Dav1dSequenceHeader) -> Dav1dSequenceHeader { v.clone() }
rust source #1
Output
Compile to binary object
Link to binary
Execute the code
Intel asm syntax
Demangle identifiers
Verbose demangling
Filters
Unused labels
Library functions
Directives
Comments
Horizontal whitespace
Debug intrinsics
Compiler
mrustc (master)
rustc 1.0.0
rustc 1.1.0
rustc 1.10.0
rustc 1.11.0
rustc 1.12.0
rustc 1.13.0
rustc 1.14.0
rustc 1.15.1
rustc 1.16.0
rustc 1.17.0
rustc 1.18.0
rustc 1.19.0
rustc 1.2.0
rustc 1.20.0
rustc 1.21.0
rustc 1.22.0
rustc 1.23.0
rustc 1.24.0
rustc 1.25.0
rustc 1.26.0
rustc 1.27.0
rustc 1.27.1
rustc 1.28.0
rustc 1.29.0
rustc 1.3.0
rustc 1.30.0
rustc 1.31.0
rustc 1.32.0
rustc 1.33.0
rustc 1.34.0
rustc 1.35.0
rustc 1.36.0
rustc 1.37.0
rustc 1.38.0
rustc 1.39.0
rustc 1.4.0
rustc 1.40.0
rustc 1.41.0
rustc 1.42.0
rustc 1.43.0
rustc 1.44.0
rustc 1.45.0
rustc 1.45.2
rustc 1.46.0
rustc 1.47.0
rustc 1.48.0
rustc 1.49.0
rustc 1.5.0
rustc 1.50.0
rustc 1.51.0
rustc 1.52.0
rustc 1.53.0
rustc 1.54.0
rustc 1.55.0
rustc 1.56.0
rustc 1.57.0
rustc 1.58.0
rustc 1.59.0
rustc 1.6.0
rustc 1.60.0
rustc 1.61.0
rustc 1.62.0
rustc 1.63.0
rustc 1.64.0
rustc 1.65.0
rustc 1.66.0
rustc 1.67.0
rustc 1.68.0
rustc 1.69.0
rustc 1.7.0
rustc 1.70.0
rustc 1.71.0
rustc 1.72.0
rustc 1.73.0
rustc 1.74.0
rustc 1.75.0
rustc 1.76.0
rustc 1.77.0
rustc 1.78.0
rustc 1.79.0
rustc 1.8.0
rustc 1.80.0
rustc 1.81.0
rustc 1.82.0
rustc 1.83.0
rustc 1.84.0
rustc 1.85.0
rustc 1.86.0
rustc 1.87.0
rustc 1.88.0
rustc 1.89.0
rustc 1.9.0
rustc beta
rustc nightly
rustc-cg-gcc (master)
x86-64 GCCRS (GCC master)
x86-64 GCCRS (GCCRS master)
x86-64 GCCRS 14.1 (GCC assertions)
x86-64 GCCRS 14.1 (GCC)
x86-64 GCCRS 14.2 (GCC assertions)
x86-64 GCCRS 14.2 (GCC)
x86-64 GCCRS 14.3 (GCC assertions)
x86-64 GCCRS 14.3 (GCC)
x86-64 GCCRS 15.1 (GCC assertions)
x86-64 GCCRS 15.1 (GCC)
x86-64 GCCRS 15.2 (GCC assertions)
x86-64 GCCRS 15.2 (GCC)
Options
Source code
#[derive(Clone, Copy, PartialEq, Eq, Default)] #[repr(C)] pub struct mv { pub y: i16, pub x: i16, } #[derive(Clone, Copy, PartialEq, Eq, Default)] #[repr(transparent)] pub struct MaskedInterIntraPredMode(u8); #[derive(Clone, Default)] #[repr(C)] pub struct Av1BlockInter1d { pub mv: [mv; 2], pub wedge_idx: u8, /// Stored as a [`u8`] since [`bool`] is not [`FromBytes`]. pub mask_sign: u8, pub interintra_mode: MaskedInterIntraPredMode, /// For `impl `[`AsBytes`]. pub _padding: u8, } #[derive(Clone)] #[repr(C)] pub struct Av1BlockInterNd { /// Make [`Av1BlockInter1d`] the field instead of [`Av1BlockInter2d`] /// simply because it is used much more often, so it's more convenient. /// /// `[`[`u8`]`; 12]` is not used because it has a lower alignment. /// [`Av1BlockInter1d`] and [`Av1BlockInter2d`] both have the same size and alignment. pub one_d: Av1BlockInter1d, } #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord)] pub enum CompInterType { WeightedAvg = 1, Avg = 2, Seg = 3, Wedge = 4, } #[derive(Debug, Clone, Copy, PartialEq, Eq, Default)] pub enum MotionMode { #[default] Translation = 0, Obmc = 1, Warp = 2, } #[derive(Debug, Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Default)] pub enum DrlProximity { #[default] Nearest, Nearer, Near, Nearish, } #[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Default, Debug)] pub enum TxfmSize { // Square #[default] S4x4 = 0, S8x8 = 1, S16x16 = 2, S32x32 = 3, S64x64 = 4, // Rectangular R4x8 = 5, R8x4 = 6, R8x16 = 7, R16x8 = 8, R16x32 = 9, R32x16 = 10, R32x64 = 11, R64x32 = 12, R4x16 = 13, R16x4 = 14, R8x32 = 15, R32x8 = 16, R16x64 = 17, R64x16 = 18, } #[derive(Clone, Copy, PartialEq, Eq, Default)] pub enum Filter2d { #[default] Regular8Tap = 0, RegularSmooth8Tap = 1, RegularSharp8Tap = 2, SharpRegular8Tap = 3, SharpSmooth8Tap = 4, Sharp8Tap = 5, SmoothRegular8Tap = 6, Smooth8Tap = 7, SmoothSharp8Tap = 8, Bilinear = 9, } #[derive(Debug, Clone, Copy, PartialEq, Eq)] pub enum InterIntraType { Blend, Wedge, } #[derive(Clone)] #[repr(C)] pub struct Av1BlockInter { pub nd: Av1BlockInterNd, pub comp_type: Option<CompInterType>, pub inter_mode: u8, pub motion_mode: MotionMode, pub drl_idx: DrlProximity, pub r#ref: [i8; 2], pub max_ytx: TxfmSize, pub filter2d: Filter2d, pub interintra_type: Option<InterIntraType>, pub tx_split0: u8, pub tx_split1: u16, } #[derive(Clone, Default)] #[repr(C)] pub struct Av1BlockIntra { pub y_mode: u8, pub uv_mode: u8, pub tx: TxfmSize, pub pal_sz: [u8; 2], pub y_angle: i8, pub uv_angle: i8, pub cfl_alpha: [i8; 2], } #[repr(C)] pub enum Av1BlockIntraInter { Intra(Av1BlockIntra), Inter(Av1BlockInter), } #[no_mangle] pub fn intra_clone(intra: &Av1BlockIntra) -> Av1BlockIntraInter { Av1BlockIntraInter::Intra(intra.clone()) } #[no_mangle] pub fn inter_clone(inter: &Av1BlockInter) -> Av1BlockIntraInter { Av1BlockIntraInter::Inter(inter.clone()) } use std::ffi::{c_int, c_uint}; pub type Dav1dPixelLayout = c_uint; pub type Dav1dColorPrimaries = c_uint; pub type Dav1dTransferCharacteristics = c_uint; pub type Dav1dMatrixCoefficients = c_uint; pub type Dav1dChromaSamplePosition = c_uint; pub type Dav1dAdaptiveBoolean = c_uint; #[derive(Clone, Copy)] #[repr(C)] pub struct Dav1dSequenceHeaderOperatingPoint { pub major_level: u8, pub minor_level: u8, pub initial_display_delay: u8, pub idc: u16, pub tier: u8, pub decoder_model_param_present: u8, pub display_model_param_present: u8, } #[derive(Clone, Copy)] #[repr(C)] pub struct Dav1dSequenceHeaderOperatingParameterInfo { pub decoder_buffer_delay: u32, pub encoder_buffer_delay: u32, pub low_delay_mode: u8, } pub const DAV1D_MAX_OPERATING_POINTS: usize = 32; #[derive(Clone)] #[repr(C)] pub struct Dav1dSequenceHeader { pub profile: u8, pub max_width: c_int, pub max_height: c_int, pub layout: Dav1dPixelLayout, pub pri: Dav1dColorPrimaries, pub trc: Dav1dTransferCharacteristics, pub mtrx: Dav1dMatrixCoefficients, pub chr: Dav1dChromaSamplePosition, pub hbd: u8, pub color_range: u8, pub num_operating_points: u8, pub operating_points: [Dav1dSequenceHeaderOperatingPoint; DAV1D_MAX_OPERATING_POINTS], pub still_picture: u8, pub reduced_still_picture_header: u8, pub timing_info_present: u8, /// > 0 if defined, 0 otherwise pub num_units_in_tick: u32, /// > 0 if defined, 0 otherwise pub time_scale: u32, pub equal_picture_interval: u8, pub num_ticks_per_picture: u32, pub decoder_model_info_present: u8, pub encoder_decoder_buffer_delay_length: u8, /// > 0 if defined, 0 otherwise pub num_units_in_decoding_tick: u32, pub buffer_removal_delay_length: u8, pub frame_presentation_delay_length: u8, pub display_model_info_present: u8, pub width_n_bits: u8, pub height_n_bits: u8, pub frame_id_numbers_present: u8, pub delta_frame_id_n_bits: u8, pub frame_id_n_bits: u8, pub sb128: u8, pub filter_intra: u8, pub intra_edge_filter: u8, pub inter_intra: u8, pub masked_compound: u8, pub warped_motion: u8, pub dual_filter: u8, pub order_hint: u8, pub jnt_comp: u8, pub ref_frame_mvs: u8, pub screen_content_tools: Dav1dAdaptiveBoolean, pub force_integer_mv: Dav1dAdaptiveBoolean, pub order_hint_n_bits: u8, pub super_res: u8, pub cdef: u8, pub restoration: u8, pub ss_hor: u8, pub ss_ver: u8, pub monochrome: u8, pub color_description_present: u8, pub separate_uv_delta_q: u8, pub film_grain_present: u8, pub operating_parameter_info: [Dav1dSequenceHeaderOperatingParameterInfo; DAV1D_MAX_OPERATING_POINTS], } #[no_mangle] pub fn Dav1dSequenceHeader_copy(v: &Dav1dSequenceHeader) -> Dav1dSequenceHeader { v.clone() }
Become a Patron
Sponsor on GitHub
Donate via PayPal
Compiler Explorer Shop
Source on GitHub
Mailing list
Installed libraries
Wiki
Report an issue
How it works
Contact the author
CE on Mastodon
CE on Bluesky
Statistics
Changelog
Version tree