All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.nextbreakpoint.ffmpeg4java.AVCodecContext Maven / Gradle / Ivy

The newest version!
// Generated by jextract

package com.nextbreakpoint.ffmpeg4java;

import java.lang.invoke.*;
import java.lang.foreign.*;
import java.nio.ByteOrder;
import java.util.*;
import java.util.function.*;
import java.util.stream.*;

import static java.lang.foreign.ValueLayout.*;
import static java.lang.foreign.MemoryLayout.PathElement.*;

/**
 * {@snippet lang=c :
 * struct AVCodecContext {
 *     AVClass *av_class;
 *     int log_level_offset;
 *     enum AVMediaType codec_type;
 *     struct AVCodec *codec;
 *     enum AVCodecID codec_id;
 *     unsigned int codec_tag;
 *     void *priv_data;
 *     struct AVCodecInternal *internal;
 *     void *opaque;
 *     int64_t bit_rate;
 *     int flags;
 *     int flags2;
 *     uint8_t *extradata;
 *     int extradata_size;
 *     AVRational time_base;
 *     AVRational pkt_timebase;
 *     AVRational framerate;
 *     int ticks_per_frame;
 *     int delay;
 *     int width;
 *     int height;
 *     int coded_width;
 *     int coded_height;
 *     AVRational sample_aspect_ratio;
 *     enum AVPixelFormat pix_fmt;
 *     enum AVPixelFormat sw_pix_fmt;
 *     enum AVColorPrimaries color_primaries;
 *     enum AVColorTransferCharacteristic color_trc;
 *     enum AVColorSpace colorspace;
 *     enum AVColorRange color_range;
 *     enum AVChromaLocation chroma_sample_location;
 *     enum AVFieldOrder field_order;
 *     int refs;
 *     int has_b_frames;
 *     int slice_flags;
 *     void (*draw_horiz_band)(struct AVCodecContext *, AVFrame *, int *, int, int, int);
 *     enum AVPixelFormat (*get_format)(struct AVCodecContext *, enum AVPixelFormat *);
 *     int max_b_frames;
 *     float b_quant_factor;
 *     float b_quant_offset;
 *     float i_quant_factor;
 *     float i_quant_offset;
 *     float lumi_masking;
 *     float temporal_cplx_masking;
 *     float spatial_cplx_masking;
 *     float p_masking;
 *     float dark_masking;
 *     int nsse_weight;
 *     int me_cmp;
 *     int me_sub_cmp;
 *     int mb_cmp;
 *     int ildct_cmp;
 *     int dia_size;
 *     int last_predictor_count;
 *     int me_pre_cmp;
 *     int pre_dia_size;
 *     int me_subpel_quality;
 *     int me_range;
 *     int mb_decision;
 *     uint16_t *intra_matrix;
 *     uint16_t *inter_matrix;
 *     uint16_t *chroma_intra_matrix;
 *     int intra_dc_precision;
 *     int mb_lmin;
 *     int mb_lmax;
 *     int bidir_refine;
 *     int keyint_min;
 *     int gop_size;
 *     int mv0_threshold;
 *     int slices;
 *     int sample_rate;
 *     enum AVSampleFormat sample_fmt;
 *     AVChannelLayout ch_layout;
 *     int frame_size;
 *     int block_align;
 *     int cutoff;
 *     enum AVAudioServiceType audio_service_type;
 *     enum AVSampleFormat request_sample_fmt;
 *     int initial_padding;
 *     int trailing_padding;
 *     int seek_preroll;
 *     int (*get_buffer2)(struct AVCodecContext *, AVFrame *, int);
 *     int bit_rate_tolerance;
 *     int global_quality;
 *     int compression_level;
 *     float qcompress;
 *     float qblur;
 *     int qmin;
 *     int qmax;
 *     int max_qdiff;
 *     int rc_buffer_size;
 *     int rc_override_count;
 *     RcOverride *rc_override;
 *     int64_t rc_max_rate;
 *     int64_t rc_min_rate;
 *     float rc_max_available_vbv_use;
 *     float rc_min_vbv_overflow_use;
 *     int rc_initial_buffer_occupancy;
 *     int trellis;
 *     char *stats_out;
 *     char *stats_in;
 *     int workaround_bugs;
 *     int strict_std_compliance;
 *     int error_concealment;
 *     int debug;
 *     int err_recognition;
 *     struct AVHWAccel *hwaccel;
 *     void *hwaccel_context;
 *     AVBufferRef *hw_frames_ctx;
 *     AVBufferRef *hw_device_ctx;
 *     int hwaccel_flags;
 *     int extra_hw_frames;
 *     uint64_t error[8];
 *     int dct_algo;
 *     int idct_algo;
 *     int bits_per_coded_sample;
 *     int bits_per_raw_sample;
 *     int thread_count;
 *     int thread_type;
 *     int active_thread_type;
 *     int (*execute)(struct AVCodecContext *, int (*)(struct AVCodecContext *, void *), void *, int *, int, int);
 *     int (*execute2)(struct AVCodecContext *, int (*)(struct AVCodecContext *, void *, int, int), void *, int *, int);
 *     int profile;
 *     int level;
 *     unsigned int properties;
 *     enum AVDiscard skip_loop_filter;
 *     enum AVDiscard skip_idct;
 *     enum AVDiscard skip_frame;
 *     int skip_alpha;
 *     int skip_top;
 *     int skip_bottom;
 *     int lowres;
 *     struct AVCodecDescriptor *codec_descriptor;
 *     char *sub_charenc;
 *     int sub_charenc_mode;
 *     int subtitle_header_size;
 *     uint8_t *subtitle_header;
 *     uint8_t *dump_separator;
 *     char *codec_whitelist;
 *     AVPacketSideData *coded_side_data;
 *     int nb_coded_side_data;
 *     int export_side_data;
 *     int64_t max_pixels;
 *     int apply_cropping;
 *     int discard_damaged_percentage;
 *     int64_t max_samples;
 *     int (*get_encode_buffer)(struct AVCodecContext *, AVPacket *, int);
 *     int64_t frame_num;
 *     int *side_data_prefer_packet;
 *     unsigned int nb_side_data_prefer_packet;
 *     AVFrameSideData **decoded_side_data;
 *     int nb_decoded_side_data;
 * }
 * }
 */
public class AVCodecContext {

    AVCodecContext() {
        // Should not be called directly
    }

    private static final GroupLayout $LAYOUT = MemoryLayout.structLayout(
        Libffmpeg.C_POINTER.withName("av_class"),
        Libffmpeg.C_INT.withName("log_level_offset"),
        Libffmpeg.C_INT.withName("codec_type"),
        Libffmpeg.C_POINTER.withName("codec"),
        Libffmpeg.C_INT.withName("codec_id"),
        Libffmpeg.C_INT.withName("codec_tag"),
        Libffmpeg.C_POINTER.withName("priv_data"),
        Libffmpeg.C_POINTER.withName("internal"),
        Libffmpeg.C_POINTER.withName("opaque"),
        Libffmpeg.C_LONG_LONG.withName("bit_rate"),
        Libffmpeg.C_INT.withName("flags"),
        Libffmpeg.C_INT.withName("flags2"),
        Libffmpeg.C_POINTER.withName("extradata"),
        Libffmpeg.C_INT.withName("extradata_size"),
        AVRational.layout().withName("time_base"),
        AVRational.layout().withName("pkt_timebase"),
        AVRational.layout().withName("framerate"),
        Libffmpeg.C_INT.withName("ticks_per_frame"),
        Libffmpeg.C_INT.withName("delay"),
        Libffmpeg.C_INT.withName("width"),
        Libffmpeg.C_INT.withName("height"),
        Libffmpeg.C_INT.withName("coded_width"),
        Libffmpeg.C_INT.withName("coded_height"),
        AVRational.layout().withName("sample_aspect_ratio"),
        Libffmpeg.C_INT.withName("pix_fmt"),
        Libffmpeg.C_INT.withName("sw_pix_fmt"),
        Libffmpeg.C_INT.withName("color_primaries"),
        Libffmpeg.C_INT.withName("color_trc"),
        Libffmpeg.C_INT.withName("colorspace"),
        Libffmpeg.C_INT.withName("color_range"),
        Libffmpeg.C_INT.withName("chroma_sample_location"),
        Libffmpeg.C_INT.withName("field_order"),
        Libffmpeg.C_INT.withName("refs"),
        Libffmpeg.C_INT.withName("has_b_frames"),
        Libffmpeg.C_INT.withName("slice_flags"),
        Libffmpeg.C_POINTER.withName("draw_horiz_band"),
        Libffmpeg.C_POINTER.withName("get_format"),
        Libffmpeg.C_INT.withName("max_b_frames"),
        Libffmpeg.C_FLOAT.withName("b_quant_factor"),
        Libffmpeg.C_FLOAT.withName("b_quant_offset"),
        Libffmpeg.C_FLOAT.withName("i_quant_factor"),
        Libffmpeg.C_FLOAT.withName("i_quant_offset"),
        Libffmpeg.C_FLOAT.withName("lumi_masking"),
        Libffmpeg.C_FLOAT.withName("temporal_cplx_masking"),
        Libffmpeg.C_FLOAT.withName("spatial_cplx_masking"),
        Libffmpeg.C_FLOAT.withName("p_masking"),
        Libffmpeg.C_FLOAT.withName("dark_masking"),
        Libffmpeg.C_INT.withName("nsse_weight"),
        Libffmpeg.C_INT.withName("me_cmp"),
        Libffmpeg.C_INT.withName("me_sub_cmp"),
        Libffmpeg.C_INT.withName("mb_cmp"),
        Libffmpeg.C_INT.withName("ildct_cmp"),
        Libffmpeg.C_INT.withName("dia_size"),
        Libffmpeg.C_INT.withName("last_predictor_count"),
        Libffmpeg.C_INT.withName("me_pre_cmp"),
        Libffmpeg.C_INT.withName("pre_dia_size"),
        Libffmpeg.C_INT.withName("me_subpel_quality"),
        Libffmpeg.C_INT.withName("me_range"),
        Libffmpeg.C_INT.withName("mb_decision"),
        Libffmpeg.C_POINTER.withName("intra_matrix"),
        Libffmpeg.C_POINTER.withName("inter_matrix"),
        Libffmpeg.C_POINTER.withName("chroma_intra_matrix"),
        Libffmpeg.C_INT.withName("intra_dc_precision"),
        Libffmpeg.C_INT.withName("mb_lmin"),
        Libffmpeg.C_INT.withName("mb_lmax"),
        Libffmpeg.C_INT.withName("bidir_refine"),
        Libffmpeg.C_INT.withName("keyint_min"),
        Libffmpeg.C_INT.withName("gop_size"),
        Libffmpeg.C_INT.withName("mv0_threshold"),
        Libffmpeg.C_INT.withName("slices"),
        Libffmpeg.C_INT.withName("sample_rate"),
        Libffmpeg.C_INT.withName("sample_fmt"),
        AVChannelLayout.layout().withName("ch_layout"),
        Libffmpeg.C_INT.withName("frame_size"),
        Libffmpeg.C_INT.withName("block_align"),
        Libffmpeg.C_INT.withName("cutoff"),
        Libffmpeg.C_INT.withName("audio_service_type"),
        Libffmpeg.C_INT.withName("request_sample_fmt"),
        Libffmpeg.C_INT.withName("initial_padding"),
        Libffmpeg.C_INT.withName("trailing_padding"),
        Libffmpeg.C_INT.withName("seek_preroll"),
        Libffmpeg.C_POINTER.withName("get_buffer2"),
        Libffmpeg.C_INT.withName("bit_rate_tolerance"),
        Libffmpeg.C_INT.withName("global_quality"),
        Libffmpeg.C_INT.withName("compression_level"),
        Libffmpeg.C_FLOAT.withName("qcompress"),
        Libffmpeg.C_FLOAT.withName("qblur"),
        Libffmpeg.C_INT.withName("qmin"),
        Libffmpeg.C_INT.withName("qmax"),
        Libffmpeg.C_INT.withName("max_qdiff"),
        Libffmpeg.C_INT.withName("rc_buffer_size"),
        Libffmpeg.C_INT.withName("rc_override_count"),
        Libffmpeg.C_POINTER.withName("rc_override"),
        Libffmpeg.C_LONG_LONG.withName("rc_max_rate"),
        Libffmpeg.C_LONG_LONG.withName("rc_min_rate"),
        Libffmpeg.C_FLOAT.withName("rc_max_available_vbv_use"),
        Libffmpeg.C_FLOAT.withName("rc_min_vbv_overflow_use"),
        Libffmpeg.C_INT.withName("rc_initial_buffer_occupancy"),
        Libffmpeg.C_INT.withName("trellis"),
        Libffmpeg.C_POINTER.withName("stats_out"),
        Libffmpeg.C_POINTER.withName("stats_in"),
        Libffmpeg.C_INT.withName("workaround_bugs"),
        Libffmpeg.C_INT.withName("strict_std_compliance"),
        Libffmpeg.C_INT.withName("error_concealment"),
        Libffmpeg.C_INT.withName("debug"),
        Libffmpeg.C_INT.withName("err_recognition"),
        MemoryLayout.paddingLayout(4),
        Libffmpeg.C_POINTER.withName("hwaccel"),
        Libffmpeg.C_POINTER.withName("hwaccel_context"),
        Libffmpeg.C_POINTER.withName("hw_frames_ctx"),
        Libffmpeg.C_POINTER.withName("hw_device_ctx"),
        Libffmpeg.C_INT.withName("hwaccel_flags"),
        Libffmpeg.C_INT.withName("extra_hw_frames"),
        MemoryLayout.sequenceLayout(8, Libffmpeg.C_LONG_LONG).withName("error"),
        Libffmpeg.C_INT.withName("dct_algo"),
        Libffmpeg.C_INT.withName("idct_algo"),
        Libffmpeg.C_INT.withName("bits_per_coded_sample"),
        Libffmpeg.C_INT.withName("bits_per_raw_sample"),
        Libffmpeg.C_INT.withName("thread_count"),
        Libffmpeg.C_INT.withName("thread_type"),
        Libffmpeg.C_INT.withName("active_thread_type"),
        MemoryLayout.paddingLayout(4),
        Libffmpeg.C_POINTER.withName("execute"),
        Libffmpeg.C_POINTER.withName("execute2"),
        Libffmpeg.C_INT.withName("profile"),
        Libffmpeg.C_INT.withName("level"),
        Libffmpeg.C_INT.withName("properties"),
        Libffmpeg.C_INT.withName("skip_loop_filter"),
        Libffmpeg.C_INT.withName("skip_idct"),
        Libffmpeg.C_INT.withName("skip_frame"),
        Libffmpeg.C_INT.withName("skip_alpha"),
        Libffmpeg.C_INT.withName("skip_top"),
        Libffmpeg.C_INT.withName("skip_bottom"),
        Libffmpeg.C_INT.withName("lowres"),
        Libffmpeg.C_POINTER.withName("codec_descriptor"),
        Libffmpeg.C_POINTER.withName("sub_charenc"),
        Libffmpeg.C_INT.withName("sub_charenc_mode"),
        Libffmpeg.C_INT.withName("subtitle_header_size"),
        Libffmpeg.C_POINTER.withName("subtitle_header"),
        Libffmpeg.C_POINTER.withName("dump_separator"),
        Libffmpeg.C_POINTER.withName("codec_whitelist"),
        Libffmpeg.C_POINTER.withName("coded_side_data"),
        Libffmpeg.C_INT.withName("nb_coded_side_data"),
        Libffmpeg.C_INT.withName("export_side_data"),
        Libffmpeg.C_LONG_LONG.withName("max_pixels"),
        Libffmpeg.C_INT.withName("apply_cropping"),
        Libffmpeg.C_INT.withName("discard_damaged_percentage"),
        Libffmpeg.C_LONG_LONG.withName("max_samples"),
        Libffmpeg.C_POINTER.withName("get_encode_buffer"),
        Libffmpeg.C_LONG_LONG.withName("frame_num"),
        Libffmpeg.C_POINTER.withName("side_data_prefer_packet"),
        Libffmpeg.C_INT.withName("nb_side_data_prefer_packet"),
        MemoryLayout.paddingLayout(4),
        Libffmpeg.C_POINTER.withName("decoded_side_data"),
        Libffmpeg.C_INT.withName("nb_decoded_side_data"),
        MemoryLayout.paddingLayout(4)
    ).withName("AVCodecContext");

    /**
     * The layout of this struct
     */
    public static final GroupLayout layout() {
        return $LAYOUT;
    }

    private static final AddressLayout av_class$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("av_class"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * AVClass *av_class
     * }
     */
    public static final AddressLayout av_class$layout() {
        return av_class$LAYOUT;
    }

    private static final long av_class$OFFSET = 0;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * AVClass *av_class
     * }
     */
    public static final long av_class$offset() {
        return av_class$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * AVClass *av_class
     * }
     */
    public static MemorySegment av_class(MemorySegment struct) {
        return struct.get(av_class$LAYOUT, av_class$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * AVClass *av_class
     * }
     */
    public static void av_class(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(av_class$LAYOUT, av_class$OFFSET, fieldValue);
    }

    private static final OfInt log_level_offset$LAYOUT = (OfInt)$LAYOUT.select(groupElement("log_level_offset"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int log_level_offset
     * }
     */
    public static final OfInt log_level_offset$layout() {
        return log_level_offset$LAYOUT;
    }

    private static final long log_level_offset$OFFSET = 8;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int log_level_offset
     * }
     */
    public static final long log_level_offset$offset() {
        return log_level_offset$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int log_level_offset
     * }
     */
    public static int log_level_offset(MemorySegment struct) {
        return struct.get(log_level_offset$LAYOUT, log_level_offset$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int log_level_offset
     * }
     */
    public static void log_level_offset(MemorySegment struct, int fieldValue) {
        struct.set(log_level_offset$LAYOUT, log_level_offset$OFFSET, fieldValue);
    }

    private static final OfInt codec_type$LAYOUT = (OfInt)$LAYOUT.select(groupElement("codec_type"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * enum AVMediaType codec_type
     * }
     */
    public static final OfInt codec_type$layout() {
        return codec_type$LAYOUT;
    }

    private static final long codec_type$OFFSET = 12;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * enum AVMediaType codec_type
     * }
     */
    public static final long codec_type$offset() {
        return codec_type$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * enum AVMediaType codec_type
     * }
     */
    public static int codec_type(MemorySegment struct) {
        return struct.get(codec_type$LAYOUT, codec_type$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * enum AVMediaType codec_type
     * }
     */
    public static void codec_type(MemorySegment struct, int fieldValue) {
        struct.set(codec_type$LAYOUT, codec_type$OFFSET, fieldValue);
    }

    private static final AddressLayout codec$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("codec"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * struct AVCodec *codec
     * }
     */
    public static final AddressLayout codec$layout() {
        return codec$LAYOUT;
    }

    private static final long codec$OFFSET = 16;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * struct AVCodec *codec
     * }
     */
    public static final long codec$offset() {
        return codec$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * struct AVCodec *codec
     * }
     */
    public static MemorySegment codec(MemorySegment struct) {
        return struct.get(codec$LAYOUT, codec$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * struct AVCodec *codec
     * }
     */
    public static void codec(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(codec$LAYOUT, codec$OFFSET, fieldValue);
    }

    private static final OfInt codec_id$LAYOUT = (OfInt)$LAYOUT.select(groupElement("codec_id"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * enum AVCodecID codec_id
     * }
     */
    public static final OfInt codec_id$layout() {
        return codec_id$LAYOUT;
    }

    private static final long codec_id$OFFSET = 24;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * enum AVCodecID codec_id
     * }
     */
    public static final long codec_id$offset() {
        return codec_id$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * enum AVCodecID codec_id
     * }
     */
    public static int codec_id(MemorySegment struct) {
        return struct.get(codec_id$LAYOUT, codec_id$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * enum AVCodecID codec_id
     * }
     */
    public static void codec_id(MemorySegment struct, int fieldValue) {
        struct.set(codec_id$LAYOUT, codec_id$OFFSET, fieldValue);
    }

    private static final OfInt codec_tag$LAYOUT = (OfInt)$LAYOUT.select(groupElement("codec_tag"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * unsigned int codec_tag
     * }
     */
    public static final OfInt codec_tag$layout() {
        return codec_tag$LAYOUT;
    }

    private static final long codec_tag$OFFSET = 28;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * unsigned int codec_tag
     * }
     */
    public static final long codec_tag$offset() {
        return codec_tag$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * unsigned int codec_tag
     * }
     */
    public static int codec_tag(MemorySegment struct) {
        return struct.get(codec_tag$LAYOUT, codec_tag$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * unsigned int codec_tag
     * }
     */
    public static void codec_tag(MemorySegment struct, int fieldValue) {
        struct.set(codec_tag$LAYOUT, codec_tag$OFFSET, fieldValue);
    }

    private static final AddressLayout priv_data$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("priv_data"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * void *priv_data
     * }
     */
    public static final AddressLayout priv_data$layout() {
        return priv_data$LAYOUT;
    }

    private static final long priv_data$OFFSET = 32;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * void *priv_data
     * }
     */
    public static final long priv_data$offset() {
        return priv_data$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * void *priv_data
     * }
     */
    public static MemorySegment priv_data(MemorySegment struct) {
        return struct.get(priv_data$LAYOUT, priv_data$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * void *priv_data
     * }
     */
    public static void priv_data(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(priv_data$LAYOUT, priv_data$OFFSET, fieldValue);
    }

    private static final AddressLayout internal$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("internal"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * struct AVCodecInternal *internal
     * }
     */
    public static final AddressLayout internal$layout() {
        return internal$LAYOUT;
    }

    private static final long internal$OFFSET = 40;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * struct AVCodecInternal *internal
     * }
     */
    public static final long internal$offset() {
        return internal$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * struct AVCodecInternal *internal
     * }
     */
    public static MemorySegment internal(MemorySegment struct) {
        return struct.get(internal$LAYOUT, internal$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * struct AVCodecInternal *internal
     * }
     */
    public static void internal(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(internal$LAYOUT, internal$OFFSET, fieldValue);
    }

    private static final AddressLayout opaque$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("opaque"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * void *opaque
     * }
     */
    public static final AddressLayout opaque$layout() {
        return opaque$LAYOUT;
    }

    private static final long opaque$OFFSET = 48;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * void *opaque
     * }
     */
    public static final long opaque$offset() {
        return opaque$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * void *opaque
     * }
     */
    public static MemorySegment opaque(MemorySegment struct) {
        return struct.get(opaque$LAYOUT, opaque$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * void *opaque
     * }
     */
    public static void opaque(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(opaque$LAYOUT, opaque$OFFSET, fieldValue);
    }

    private static final OfLong bit_rate$LAYOUT = (OfLong)$LAYOUT.select(groupElement("bit_rate"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int64_t bit_rate
     * }
     */
    public static final OfLong bit_rate$layout() {
        return bit_rate$LAYOUT;
    }

    private static final long bit_rate$OFFSET = 56;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int64_t bit_rate
     * }
     */
    public static final long bit_rate$offset() {
        return bit_rate$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int64_t bit_rate
     * }
     */
    public static long bit_rate(MemorySegment struct) {
        return struct.get(bit_rate$LAYOUT, bit_rate$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int64_t bit_rate
     * }
     */
    public static void bit_rate(MemorySegment struct, long fieldValue) {
        struct.set(bit_rate$LAYOUT, bit_rate$OFFSET, fieldValue);
    }

    private static final OfInt flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("flags"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int flags
     * }
     */
    public static final OfInt flags$layout() {
        return flags$LAYOUT;
    }

    private static final long flags$OFFSET = 64;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int flags
     * }
     */
    public static final long flags$offset() {
        return flags$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int flags
     * }
     */
    public static int flags(MemorySegment struct) {
        return struct.get(flags$LAYOUT, flags$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int flags
     * }
     */
    public static void flags(MemorySegment struct, int fieldValue) {
        struct.set(flags$LAYOUT, flags$OFFSET, fieldValue);
    }

    private static final OfInt flags2$LAYOUT = (OfInt)$LAYOUT.select(groupElement("flags2"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int flags2
     * }
     */
    public static final OfInt flags2$layout() {
        return flags2$LAYOUT;
    }

    private static final long flags2$OFFSET = 68;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int flags2
     * }
     */
    public static final long flags2$offset() {
        return flags2$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int flags2
     * }
     */
    public static int flags2(MemorySegment struct) {
        return struct.get(flags2$LAYOUT, flags2$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int flags2
     * }
     */
    public static void flags2(MemorySegment struct, int fieldValue) {
        struct.set(flags2$LAYOUT, flags2$OFFSET, fieldValue);
    }

    private static final AddressLayout extradata$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("extradata"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * uint8_t *extradata
     * }
     */
    public static final AddressLayout extradata$layout() {
        return extradata$LAYOUT;
    }

    private static final long extradata$OFFSET = 72;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * uint8_t *extradata
     * }
     */
    public static final long extradata$offset() {
        return extradata$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * uint8_t *extradata
     * }
     */
    public static MemorySegment extradata(MemorySegment struct) {
        return struct.get(extradata$LAYOUT, extradata$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * uint8_t *extradata
     * }
     */
    public static void extradata(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(extradata$LAYOUT, extradata$OFFSET, fieldValue);
    }

    private static final OfInt extradata_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("extradata_size"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int extradata_size
     * }
     */
    public static final OfInt extradata_size$layout() {
        return extradata_size$LAYOUT;
    }

    private static final long extradata_size$OFFSET = 80;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int extradata_size
     * }
     */
    public static final long extradata_size$offset() {
        return extradata_size$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int extradata_size
     * }
     */
    public static int extradata_size(MemorySegment struct) {
        return struct.get(extradata_size$LAYOUT, extradata_size$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int extradata_size
     * }
     */
    public static void extradata_size(MemorySegment struct, int fieldValue) {
        struct.set(extradata_size$LAYOUT, extradata_size$OFFSET, fieldValue);
    }

    private static final GroupLayout time_base$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("time_base"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * AVRational time_base
     * }
     */
    public static final GroupLayout time_base$layout() {
        return time_base$LAYOUT;
    }

    private static final long time_base$OFFSET = 84;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * AVRational time_base
     * }
     */
    public static final long time_base$offset() {
        return time_base$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * AVRational time_base
     * }
     */
    public static MemorySegment time_base(MemorySegment struct) {
        return struct.asSlice(time_base$OFFSET, time_base$LAYOUT.byteSize());
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * AVRational time_base
     * }
     */
    public static void time_base(MemorySegment struct, MemorySegment fieldValue) {
        MemorySegment.copy(fieldValue, 0L, struct, time_base$OFFSET, time_base$LAYOUT.byteSize());
    }

    private static final GroupLayout pkt_timebase$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("pkt_timebase"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * AVRational pkt_timebase
     * }
     */
    public static final GroupLayout pkt_timebase$layout() {
        return pkt_timebase$LAYOUT;
    }

    private static final long pkt_timebase$OFFSET = 92;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * AVRational pkt_timebase
     * }
     */
    public static final long pkt_timebase$offset() {
        return pkt_timebase$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * AVRational pkt_timebase
     * }
     */
    public static MemorySegment pkt_timebase(MemorySegment struct) {
        return struct.asSlice(pkt_timebase$OFFSET, pkt_timebase$LAYOUT.byteSize());
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * AVRational pkt_timebase
     * }
     */
    public static void pkt_timebase(MemorySegment struct, MemorySegment fieldValue) {
        MemorySegment.copy(fieldValue, 0L, struct, pkt_timebase$OFFSET, pkt_timebase$LAYOUT.byteSize());
    }

    private static final GroupLayout framerate$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("framerate"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * AVRational framerate
     * }
     */
    public static final GroupLayout framerate$layout() {
        return framerate$LAYOUT;
    }

    private static final long framerate$OFFSET = 100;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * AVRational framerate
     * }
     */
    public static final long framerate$offset() {
        return framerate$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * AVRational framerate
     * }
     */
    public static MemorySegment framerate(MemorySegment struct) {
        return struct.asSlice(framerate$OFFSET, framerate$LAYOUT.byteSize());
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * AVRational framerate
     * }
     */
    public static void framerate(MemorySegment struct, MemorySegment fieldValue) {
        MemorySegment.copy(fieldValue, 0L, struct, framerate$OFFSET, framerate$LAYOUT.byteSize());
    }

    private static final OfInt ticks_per_frame$LAYOUT = (OfInt)$LAYOUT.select(groupElement("ticks_per_frame"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int ticks_per_frame
     * }
     */
    public static final OfInt ticks_per_frame$layout() {
        return ticks_per_frame$LAYOUT;
    }

    private static final long ticks_per_frame$OFFSET = 108;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int ticks_per_frame
     * }
     */
    public static final long ticks_per_frame$offset() {
        return ticks_per_frame$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int ticks_per_frame
     * }
     */
    public static int ticks_per_frame(MemorySegment struct) {
        return struct.get(ticks_per_frame$LAYOUT, ticks_per_frame$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int ticks_per_frame
     * }
     */
    public static void ticks_per_frame(MemorySegment struct, int fieldValue) {
        struct.set(ticks_per_frame$LAYOUT, ticks_per_frame$OFFSET, fieldValue);
    }

    private static final OfInt delay$LAYOUT = (OfInt)$LAYOUT.select(groupElement("delay"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int delay
     * }
     */
    public static final OfInt delay$layout() {
        return delay$LAYOUT;
    }

    private static final long delay$OFFSET = 112;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int delay
     * }
     */
    public static final long delay$offset() {
        return delay$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int delay
     * }
     */
    public static int delay(MemorySegment struct) {
        return struct.get(delay$LAYOUT, delay$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int delay
     * }
     */
    public static void delay(MemorySegment struct, int fieldValue) {
        struct.set(delay$LAYOUT, delay$OFFSET, fieldValue);
    }

    private static final OfInt width$LAYOUT = (OfInt)$LAYOUT.select(groupElement("width"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int width
     * }
     */
    public static final OfInt width$layout() {
        return width$LAYOUT;
    }

    private static final long width$OFFSET = 116;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int width
     * }
     */
    public static final long width$offset() {
        return width$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int width
     * }
     */
    public static int width(MemorySegment struct) {
        return struct.get(width$LAYOUT, width$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int width
     * }
     */
    public static void width(MemorySegment struct, int fieldValue) {
        struct.set(width$LAYOUT, width$OFFSET, fieldValue);
    }

    private static final OfInt height$LAYOUT = (OfInt)$LAYOUT.select(groupElement("height"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int height
     * }
     */
    public static final OfInt height$layout() {
        return height$LAYOUT;
    }

    private static final long height$OFFSET = 120;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int height
     * }
     */
    public static final long height$offset() {
        return height$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int height
     * }
     */
    public static int height(MemorySegment struct) {
        return struct.get(height$LAYOUT, height$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int height
     * }
     */
    public static void height(MemorySegment struct, int fieldValue) {
        struct.set(height$LAYOUT, height$OFFSET, fieldValue);
    }

    private static final OfInt coded_width$LAYOUT = (OfInt)$LAYOUT.select(groupElement("coded_width"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int coded_width
     * }
     */
    public static final OfInt coded_width$layout() {
        return coded_width$LAYOUT;
    }

    private static final long coded_width$OFFSET = 124;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int coded_width
     * }
     */
    public static final long coded_width$offset() {
        return coded_width$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int coded_width
     * }
     */
    public static int coded_width(MemorySegment struct) {
        return struct.get(coded_width$LAYOUT, coded_width$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int coded_width
     * }
     */
    public static void coded_width(MemorySegment struct, int fieldValue) {
        struct.set(coded_width$LAYOUT, coded_width$OFFSET, fieldValue);
    }

    private static final OfInt coded_height$LAYOUT = (OfInt)$LAYOUT.select(groupElement("coded_height"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int coded_height
     * }
     */
    public static final OfInt coded_height$layout() {
        return coded_height$LAYOUT;
    }

    private static final long coded_height$OFFSET = 128;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int coded_height
     * }
     */
    public static final long coded_height$offset() {
        return coded_height$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int coded_height
     * }
     */
    public static int coded_height(MemorySegment struct) {
        return struct.get(coded_height$LAYOUT, coded_height$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int coded_height
     * }
     */
    public static void coded_height(MemorySegment struct, int fieldValue) {
        struct.set(coded_height$LAYOUT, coded_height$OFFSET, fieldValue);
    }

    private static final GroupLayout sample_aspect_ratio$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("sample_aspect_ratio"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * AVRational sample_aspect_ratio
     * }
     */
    public static final GroupLayout sample_aspect_ratio$layout() {
        return sample_aspect_ratio$LAYOUT;
    }

    private static final long sample_aspect_ratio$OFFSET = 132;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * AVRational sample_aspect_ratio
     * }
     */
    public static final long sample_aspect_ratio$offset() {
        return sample_aspect_ratio$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * AVRational sample_aspect_ratio
     * }
     */
    public static MemorySegment sample_aspect_ratio(MemorySegment struct) {
        return struct.asSlice(sample_aspect_ratio$OFFSET, sample_aspect_ratio$LAYOUT.byteSize());
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * AVRational sample_aspect_ratio
     * }
     */
    public static void sample_aspect_ratio(MemorySegment struct, MemorySegment fieldValue) {
        MemorySegment.copy(fieldValue, 0L, struct, sample_aspect_ratio$OFFSET, sample_aspect_ratio$LAYOUT.byteSize());
    }

    private static final OfInt pix_fmt$LAYOUT = (OfInt)$LAYOUT.select(groupElement("pix_fmt"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * enum AVPixelFormat pix_fmt
     * }
     */
    public static final OfInt pix_fmt$layout() {
        return pix_fmt$LAYOUT;
    }

    private static final long pix_fmt$OFFSET = 140;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * enum AVPixelFormat pix_fmt
     * }
     */
    public static final long pix_fmt$offset() {
        return pix_fmt$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * enum AVPixelFormat pix_fmt
     * }
     */
    public static int pix_fmt(MemorySegment struct) {
        return struct.get(pix_fmt$LAYOUT, pix_fmt$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * enum AVPixelFormat pix_fmt
     * }
     */
    public static void pix_fmt(MemorySegment struct, int fieldValue) {
        struct.set(pix_fmt$LAYOUT, pix_fmt$OFFSET, fieldValue);
    }

    private static final OfInt sw_pix_fmt$LAYOUT = (OfInt)$LAYOUT.select(groupElement("sw_pix_fmt"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * enum AVPixelFormat sw_pix_fmt
     * }
     */
    public static final OfInt sw_pix_fmt$layout() {
        return sw_pix_fmt$LAYOUT;
    }

    private static final long sw_pix_fmt$OFFSET = 144;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * enum AVPixelFormat sw_pix_fmt
     * }
     */
    public static final long sw_pix_fmt$offset() {
        return sw_pix_fmt$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * enum AVPixelFormat sw_pix_fmt
     * }
     */
    public static int sw_pix_fmt(MemorySegment struct) {
        return struct.get(sw_pix_fmt$LAYOUT, sw_pix_fmt$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * enum AVPixelFormat sw_pix_fmt
     * }
     */
    public static void sw_pix_fmt(MemorySegment struct, int fieldValue) {
        struct.set(sw_pix_fmt$LAYOUT, sw_pix_fmt$OFFSET, fieldValue);
    }

    private static final OfInt color_primaries$LAYOUT = (OfInt)$LAYOUT.select(groupElement("color_primaries"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * enum AVColorPrimaries color_primaries
     * }
     */
    public static final OfInt color_primaries$layout() {
        return color_primaries$LAYOUT;
    }

    private static final long color_primaries$OFFSET = 148;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * enum AVColorPrimaries color_primaries
     * }
     */
    public static final long color_primaries$offset() {
        return color_primaries$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * enum AVColorPrimaries color_primaries
     * }
     */
    public static int color_primaries(MemorySegment struct) {
        return struct.get(color_primaries$LAYOUT, color_primaries$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * enum AVColorPrimaries color_primaries
     * }
     */
    public static void color_primaries(MemorySegment struct, int fieldValue) {
        struct.set(color_primaries$LAYOUT, color_primaries$OFFSET, fieldValue);
    }

    private static final OfInt color_trc$LAYOUT = (OfInt)$LAYOUT.select(groupElement("color_trc"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * enum AVColorTransferCharacteristic color_trc
     * }
     */
    public static final OfInt color_trc$layout() {
        return color_trc$LAYOUT;
    }

    private static final long color_trc$OFFSET = 152;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * enum AVColorTransferCharacteristic color_trc
     * }
     */
    public static final long color_trc$offset() {
        return color_trc$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * enum AVColorTransferCharacteristic color_trc
     * }
     */
    public static int color_trc(MemorySegment struct) {
        return struct.get(color_trc$LAYOUT, color_trc$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * enum AVColorTransferCharacteristic color_trc
     * }
     */
    public static void color_trc(MemorySegment struct, int fieldValue) {
        struct.set(color_trc$LAYOUT, color_trc$OFFSET, fieldValue);
    }

    private static final OfInt colorspace$LAYOUT = (OfInt)$LAYOUT.select(groupElement("colorspace"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * enum AVColorSpace colorspace
     * }
     */
    public static final OfInt colorspace$layout() {
        return colorspace$LAYOUT;
    }

    private static final long colorspace$OFFSET = 156;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * enum AVColorSpace colorspace
     * }
     */
    public static final long colorspace$offset() {
        return colorspace$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * enum AVColorSpace colorspace
     * }
     */
    public static int colorspace(MemorySegment struct) {
        return struct.get(colorspace$LAYOUT, colorspace$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * enum AVColorSpace colorspace
     * }
     */
    public static void colorspace(MemorySegment struct, int fieldValue) {
        struct.set(colorspace$LAYOUT, colorspace$OFFSET, fieldValue);
    }

    private static final OfInt color_range$LAYOUT = (OfInt)$LAYOUT.select(groupElement("color_range"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * enum AVColorRange color_range
     * }
     */
    public static final OfInt color_range$layout() {
        return color_range$LAYOUT;
    }

    private static final long color_range$OFFSET = 160;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * enum AVColorRange color_range
     * }
     */
    public static final long color_range$offset() {
        return color_range$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * enum AVColorRange color_range
     * }
     */
    public static int color_range(MemorySegment struct) {
        return struct.get(color_range$LAYOUT, color_range$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * enum AVColorRange color_range
     * }
     */
    public static void color_range(MemorySegment struct, int fieldValue) {
        struct.set(color_range$LAYOUT, color_range$OFFSET, fieldValue);
    }

    private static final OfInt chroma_sample_location$LAYOUT = (OfInt)$LAYOUT.select(groupElement("chroma_sample_location"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * enum AVChromaLocation chroma_sample_location
     * }
     */
    public static final OfInt chroma_sample_location$layout() {
        return chroma_sample_location$LAYOUT;
    }

    private static final long chroma_sample_location$OFFSET = 164;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * enum AVChromaLocation chroma_sample_location
     * }
     */
    public static final long chroma_sample_location$offset() {
        return chroma_sample_location$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * enum AVChromaLocation chroma_sample_location
     * }
     */
    public static int chroma_sample_location(MemorySegment struct) {
        return struct.get(chroma_sample_location$LAYOUT, chroma_sample_location$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * enum AVChromaLocation chroma_sample_location
     * }
     */
    public static void chroma_sample_location(MemorySegment struct, int fieldValue) {
        struct.set(chroma_sample_location$LAYOUT, chroma_sample_location$OFFSET, fieldValue);
    }

    private static final OfInt field_order$LAYOUT = (OfInt)$LAYOUT.select(groupElement("field_order"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * enum AVFieldOrder field_order
     * }
     */
    public static final OfInt field_order$layout() {
        return field_order$LAYOUT;
    }

    private static final long field_order$OFFSET = 168;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * enum AVFieldOrder field_order
     * }
     */
    public static final long field_order$offset() {
        return field_order$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * enum AVFieldOrder field_order
     * }
     */
    public static int field_order(MemorySegment struct) {
        return struct.get(field_order$LAYOUT, field_order$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * enum AVFieldOrder field_order
     * }
     */
    public static void field_order(MemorySegment struct, int fieldValue) {
        struct.set(field_order$LAYOUT, field_order$OFFSET, fieldValue);
    }

    private static final OfInt refs$LAYOUT = (OfInt)$LAYOUT.select(groupElement("refs"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int refs
     * }
     */
    public static final OfInt refs$layout() {
        return refs$LAYOUT;
    }

    private static final long refs$OFFSET = 172;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int refs
     * }
     */
    public static final long refs$offset() {
        return refs$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int refs
     * }
     */
    public static int refs(MemorySegment struct) {
        return struct.get(refs$LAYOUT, refs$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int refs
     * }
     */
    public static void refs(MemorySegment struct, int fieldValue) {
        struct.set(refs$LAYOUT, refs$OFFSET, fieldValue);
    }

    private static final OfInt has_b_frames$LAYOUT = (OfInt)$LAYOUT.select(groupElement("has_b_frames"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int has_b_frames
     * }
     */
    public static final OfInt has_b_frames$layout() {
        return has_b_frames$LAYOUT;
    }

    private static final long has_b_frames$OFFSET = 176;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int has_b_frames
     * }
     */
    public static final long has_b_frames$offset() {
        return has_b_frames$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int has_b_frames
     * }
     */
    public static int has_b_frames(MemorySegment struct) {
        return struct.get(has_b_frames$LAYOUT, has_b_frames$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int has_b_frames
     * }
     */
    public static void has_b_frames(MemorySegment struct, int fieldValue) {
        struct.set(has_b_frames$LAYOUT, has_b_frames$OFFSET, fieldValue);
    }

    private static final OfInt slice_flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("slice_flags"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int slice_flags
     * }
     */
    public static final OfInt slice_flags$layout() {
        return slice_flags$LAYOUT;
    }

    private static final long slice_flags$OFFSET = 180;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int slice_flags
     * }
     */
    public static final long slice_flags$offset() {
        return slice_flags$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int slice_flags
     * }
     */
    public static int slice_flags(MemorySegment struct) {
        return struct.get(slice_flags$LAYOUT, slice_flags$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int slice_flags
     * }
     */
    public static void slice_flags(MemorySegment struct, int fieldValue) {
        struct.set(slice_flags$LAYOUT, slice_flags$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * void (*draw_horiz_band)(struct AVCodecContext *, AVFrame *, int *, int, int, int)
     * }
     */
    public static class draw_horiz_band {

        draw_horiz_band() {
            // Should not be called directly
        }

        /**
         * The function pointer signature, expressed as a functional interface
         */
        public interface Function {
            void apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, int _x3, int _x4, int _x5);
        }

        private static final FunctionDescriptor $DESC = FunctionDescriptor.ofVoid(
            Libffmpeg.C_POINTER,
            Libffmpeg.C_POINTER,
            Libffmpeg.C_POINTER,
            Libffmpeg.C_INT,
            Libffmpeg.C_INT,
            Libffmpeg.C_INT
        );

        /**
         * The descriptor of this function pointer
         */
        public static FunctionDescriptor descriptor() {
            return $DESC;
        }

        private static final MethodHandle UP$MH = Libffmpeg.upcallHandle(draw_horiz_band.Function.class, "apply", $DESC);

        /**
         * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
         * The lifetime of the returned segment is managed by {@code arena}
         */
        public static MemorySegment allocate(draw_horiz_band.Function fi, Arena arena) {
            return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
        }

        private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);

        /**
         * Invoke the upcall stub {@code funcPtr}, with given parameters
         */
        public static void invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, int _x3, int _x4, int _x5) {
            try {
                 DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3, _x4, _x5);
            } catch (Throwable ex$) {
                throw new AssertionError("should not reach here", ex$);
            }
        }
    }

    private static final AddressLayout draw_horiz_band$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("draw_horiz_band"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * void (*draw_horiz_band)(struct AVCodecContext *, AVFrame *, int *, int, int, int)
     * }
     */
    public static final AddressLayout draw_horiz_band$layout() {
        return draw_horiz_band$LAYOUT;
    }

    private static final long draw_horiz_band$OFFSET = 184;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * void (*draw_horiz_band)(struct AVCodecContext *, AVFrame *, int *, int, int, int)
     * }
     */
    public static final long draw_horiz_band$offset() {
        return draw_horiz_band$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * void (*draw_horiz_band)(struct AVCodecContext *, AVFrame *, int *, int, int, int)
     * }
     */
    public static MemorySegment draw_horiz_band(MemorySegment struct) {
        return struct.get(draw_horiz_band$LAYOUT, draw_horiz_band$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * void (*draw_horiz_band)(struct AVCodecContext *, AVFrame *, int *, int, int, int)
     * }
     */
    public static void draw_horiz_band(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(draw_horiz_band$LAYOUT, draw_horiz_band$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * enum AVPixelFormat (*get_format)(struct AVCodecContext *, enum AVPixelFormat *)
     * }
     */
    public static class get_format {

        get_format() {
            // Should not be called directly
        }

        /**
         * The function pointer signature, expressed as a functional interface
         */
        public interface Function {
            int apply(MemorySegment _x0, MemorySegment _x1);
        }

        private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
            Libffmpeg.C_INT,
            Libffmpeg.C_POINTER,
            Libffmpeg.C_POINTER
        );

        /**
         * The descriptor of this function pointer
         */
        public static FunctionDescriptor descriptor() {
            return $DESC;
        }

        private static final MethodHandle UP$MH = Libffmpeg.upcallHandle(get_format.Function.class, "apply", $DESC);

        /**
         * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
         * The lifetime of the returned segment is managed by {@code arena}
         */
        public static MemorySegment allocate(get_format.Function fi, Arena arena) {
            return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
        }

        private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);

        /**
         * Invoke the upcall stub {@code funcPtr}, with given parameters
         */
        public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1) {
            try {
                return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1);
            } catch (Throwable ex$) {
                throw new AssertionError("should not reach here", ex$);
            }
        }
    }

    private static final AddressLayout get_format$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("get_format"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * enum AVPixelFormat (*get_format)(struct AVCodecContext *, enum AVPixelFormat *)
     * }
     */
    public static final AddressLayout get_format$layout() {
        return get_format$LAYOUT;
    }

    private static final long get_format$OFFSET = 192;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * enum AVPixelFormat (*get_format)(struct AVCodecContext *, enum AVPixelFormat *)
     * }
     */
    public static final long get_format$offset() {
        return get_format$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * enum AVPixelFormat (*get_format)(struct AVCodecContext *, enum AVPixelFormat *)
     * }
     */
    public static MemorySegment get_format(MemorySegment struct) {
        return struct.get(get_format$LAYOUT, get_format$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * enum AVPixelFormat (*get_format)(struct AVCodecContext *, enum AVPixelFormat *)
     * }
     */
    public static void get_format(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(get_format$LAYOUT, get_format$OFFSET, fieldValue);
    }

    private static final OfInt max_b_frames$LAYOUT = (OfInt)$LAYOUT.select(groupElement("max_b_frames"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int max_b_frames
     * }
     */
    public static final OfInt max_b_frames$layout() {
        return max_b_frames$LAYOUT;
    }

    private static final long max_b_frames$OFFSET = 200;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int max_b_frames
     * }
     */
    public static final long max_b_frames$offset() {
        return max_b_frames$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int max_b_frames
     * }
     */
    public static int max_b_frames(MemorySegment struct) {
        return struct.get(max_b_frames$LAYOUT, max_b_frames$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int max_b_frames
     * }
     */
    public static void max_b_frames(MemorySegment struct, int fieldValue) {
        struct.set(max_b_frames$LAYOUT, max_b_frames$OFFSET, fieldValue);
    }

    private static final OfFloat b_quant_factor$LAYOUT = (OfFloat)$LAYOUT.select(groupElement("b_quant_factor"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * float b_quant_factor
     * }
     */
    public static final OfFloat b_quant_factor$layout() {
        return b_quant_factor$LAYOUT;
    }

    private static final long b_quant_factor$OFFSET = 204;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * float b_quant_factor
     * }
     */
    public static final long b_quant_factor$offset() {
        return b_quant_factor$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * float b_quant_factor
     * }
     */
    public static float b_quant_factor(MemorySegment struct) {
        return struct.get(b_quant_factor$LAYOUT, b_quant_factor$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * float b_quant_factor
     * }
     */
    public static void b_quant_factor(MemorySegment struct, float fieldValue) {
        struct.set(b_quant_factor$LAYOUT, b_quant_factor$OFFSET, fieldValue);
    }

    private static final OfFloat b_quant_offset$LAYOUT = (OfFloat)$LAYOUT.select(groupElement("b_quant_offset"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * float b_quant_offset
     * }
     */
    public static final OfFloat b_quant_offset$layout() {
        return b_quant_offset$LAYOUT;
    }

    private static final long b_quant_offset$OFFSET = 208;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * float b_quant_offset
     * }
     */
    public static final long b_quant_offset$offset() {
        return b_quant_offset$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * float b_quant_offset
     * }
     */
    public static float b_quant_offset(MemorySegment struct) {
        return struct.get(b_quant_offset$LAYOUT, b_quant_offset$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * float b_quant_offset
     * }
     */
    public static void b_quant_offset(MemorySegment struct, float fieldValue) {
        struct.set(b_quant_offset$LAYOUT, b_quant_offset$OFFSET, fieldValue);
    }

    private static final OfFloat i_quant_factor$LAYOUT = (OfFloat)$LAYOUT.select(groupElement("i_quant_factor"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * float i_quant_factor
     * }
     */
    public static final OfFloat i_quant_factor$layout() {
        return i_quant_factor$LAYOUT;
    }

    private static final long i_quant_factor$OFFSET = 212;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * float i_quant_factor
     * }
     */
    public static final long i_quant_factor$offset() {
        return i_quant_factor$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * float i_quant_factor
     * }
     */
    public static float i_quant_factor(MemorySegment struct) {
        return struct.get(i_quant_factor$LAYOUT, i_quant_factor$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * float i_quant_factor
     * }
     */
    public static void i_quant_factor(MemorySegment struct, float fieldValue) {
        struct.set(i_quant_factor$LAYOUT, i_quant_factor$OFFSET, fieldValue);
    }

    private static final OfFloat i_quant_offset$LAYOUT = (OfFloat)$LAYOUT.select(groupElement("i_quant_offset"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * float i_quant_offset
     * }
     */
    public static final OfFloat i_quant_offset$layout() {
        return i_quant_offset$LAYOUT;
    }

    private static final long i_quant_offset$OFFSET = 216;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * float i_quant_offset
     * }
     */
    public static final long i_quant_offset$offset() {
        return i_quant_offset$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * float i_quant_offset
     * }
     */
    public static float i_quant_offset(MemorySegment struct) {
        return struct.get(i_quant_offset$LAYOUT, i_quant_offset$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * float i_quant_offset
     * }
     */
    public static void i_quant_offset(MemorySegment struct, float fieldValue) {
        struct.set(i_quant_offset$LAYOUT, i_quant_offset$OFFSET, fieldValue);
    }

    private static final OfFloat lumi_masking$LAYOUT = (OfFloat)$LAYOUT.select(groupElement("lumi_masking"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * float lumi_masking
     * }
     */
    public static final OfFloat lumi_masking$layout() {
        return lumi_masking$LAYOUT;
    }

    private static final long lumi_masking$OFFSET = 220;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * float lumi_masking
     * }
     */
    public static final long lumi_masking$offset() {
        return lumi_masking$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * float lumi_masking
     * }
     */
    public static float lumi_masking(MemorySegment struct) {
        return struct.get(lumi_masking$LAYOUT, lumi_masking$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * float lumi_masking
     * }
     */
    public static void lumi_masking(MemorySegment struct, float fieldValue) {
        struct.set(lumi_masking$LAYOUT, lumi_masking$OFFSET, fieldValue);
    }

    private static final OfFloat temporal_cplx_masking$LAYOUT = (OfFloat)$LAYOUT.select(groupElement("temporal_cplx_masking"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * float temporal_cplx_masking
     * }
     */
    public static final OfFloat temporal_cplx_masking$layout() {
        return temporal_cplx_masking$LAYOUT;
    }

    private static final long temporal_cplx_masking$OFFSET = 224;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * float temporal_cplx_masking
     * }
     */
    public static final long temporal_cplx_masking$offset() {
        return temporal_cplx_masking$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * float temporal_cplx_masking
     * }
     */
    public static float temporal_cplx_masking(MemorySegment struct) {
        return struct.get(temporal_cplx_masking$LAYOUT, temporal_cplx_masking$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * float temporal_cplx_masking
     * }
     */
    public static void temporal_cplx_masking(MemorySegment struct, float fieldValue) {
        struct.set(temporal_cplx_masking$LAYOUT, temporal_cplx_masking$OFFSET, fieldValue);
    }

    private static final OfFloat spatial_cplx_masking$LAYOUT = (OfFloat)$LAYOUT.select(groupElement("spatial_cplx_masking"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * float spatial_cplx_masking
     * }
     */
    public static final OfFloat spatial_cplx_masking$layout() {
        return spatial_cplx_masking$LAYOUT;
    }

    private static final long spatial_cplx_masking$OFFSET = 228;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * float spatial_cplx_masking
     * }
     */
    public static final long spatial_cplx_masking$offset() {
        return spatial_cplx_masking$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * float spatial_cplx_masking
     * }
     */
    public static float spatial_cplx_masking(MemorySegment struct) {
        return struct.get(spatial_cplx_masking$LAYOUT, spatial_cplx_masking$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * float spatial_cplx_masking
     * }
     */
    public static void spatial_cplx_masking(MemorySegment struct, float fieldValue) {
        struct.set(spatial_cplx_masking$LAYOUT, spatial_cplx_masking$OFFSET, fieldValue);
    }

    private static final OfFloat p_masking$LAYOUT = (OfFloat)$LAYOUT.select(groupElement("p_masking"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * float p_masking
     * }
     */
    public static final OfFloat p_masking$layout() {
        return p_masking$LAYOUT;
    }

    private static final long p_masking$OFFSET = 232;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * float p_masking
     * }
     */
    public static final long p_masking$offset() {
        return p_masking$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * float p_masking
     * }
     */
    public static float p_masking(MemorySegment struct) {
        return struct.get(p_masking$LAYOUT, p_masking$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * float p_masking
     * }
     */
    public static void p_masking(MemorySegment struct, float fieldValue) {
        struct.set(p_masking$LAYOUT, p_masking$OFFSET, fieldValue);
    }

    private static final OfFloat dark_masking$LAYOUT = (OfFloat)$LAYOUT.select(groupElement("dark_masking"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * float dark_masking
     * }
     */
    public static final OfFloat dark_masking$layout() {
        return dark_masking$LAYOUT;
    }

    private static final long dark_masking$OFFSET = 236;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * float dark_masking
     * }
     */
    public static final long dark_masking$offset() {
        return dark_masking$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * float dark_masking
     * }
     */
    public static float dark_masking(MemorySegment struct) {
        return struct.get(dark_masking$LAYOUT, dark_masking$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * float dark_masking
     * }
     */
    public static void dark_masking(MemorySegment struct, float fieldValue) {
        struct.set(dark_masking$LAYOUT, dark_masking$OFFSET, fieldValue);
    }

    private static final OfInt nsse_weight$LAYOUT = (OfInt)$LAYOUT.select(groupElement("nsse_weight"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int nsse_weight
     * }
     */
    public static final OfInt nsse_weight$layout() {
        return nsse_weight$LAYOUT;
    }

    private static final long nsse_weight$OFFSET = 240;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int nsse_weight
     * }
     */
    public static final long nsse_weight$offset() {
        return nsse_weight$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int nsse_weight
     * }
     */
    public static int nsse_weight(MemorySegment struct) {
        return struct.get(nsse_weight$LAYOUT, nsse_weight$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int nsse_weight
     * }
     */
    public static void nsse_weight(MemorySegment struct, int fieldValue) {
        struct.set(nsse_weight$LAYOUT, nsse_weight$OFFSET, fieldValue);
    }

    private static final OfInt me_cmp$LAYOUT = (OfInt)$LAYOUT.select(groupElement("me_cmp"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int me_cmp
     * }
     */
    public static final OfInt me_cmp$layout() {
        return me_cmp$LAYOUT;
    }

    private static final long me_cmp$OFFSET = 244;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int me_cmp
     * }
     */
    public static final long me_cmp$offset() {
        return me_cmp$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int me_cmp
     * }
     */
    public static int me_cmp(MemorySegment struct) {
        return struct.get(me_cmp$LAYOUT, me_cmp$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int me_cmp
     * }
     */
    public static void me_cmp(MemorySegment struct, int fieldValue) {
        struct.set(me_cmp$LAYOUT, me_cmp$OFFSET, fieldValue);
    }

    private static final OfInt me_sub_cmp$LAYOUT = (OfInt)$LAYOUT.select(groupElement("me_sub_cmp"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int me_sub_cmp
     * }
     */
    public static final OfInt me_sub_cmp$layout() {
        return me_sub_cmp$LAYOUT;
    }

    private static final long me_sub_cmp$OFFSET = 248;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int me_sub_cmp
     * }
     */
    public static final long me_sub_cmp$offset() {
        return me_sub_cmp$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int me_sub_cmp
     * }
     */
    public static int me_sub_cmp(MemorySegment struct) {
        return struct.get(me_sub_cmp$LAYOUT, me_sub_cmp$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int me_sub_cmp
     * }
     */
    public static void me_sub_cmp(MemorySegment struct, int fieldValue) {
        struct.set(me_sub_cmp$LAYOUT, me_sub_cmp$OFFSET, fieldValue);
    }

    private static final OfInt mb_cmp$LAYOUT = (OfInt)$LAYOUT.select(groupElement("mb_cmp"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int mb_cmp
     * }
     */
    public static final OfInt mb_cmp$layout() {
        return mb_cmp$LAYOUT;
    }

    private static final long mb_cmp$OFFSET = 252;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int mb_cmp
     * }
     */
    public static final long mb_cmp$offset() {
        return mb_cmp$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int mb_cmp
     * }
     */
    public static int mb_cmp(MemorySegment struct) {
        return struct.get(mb_cmp$LAYOUT, mb_cmp$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int mb_cmp
     * }
     */
    public static void mb_cmp(MemorySegment struct, int fieldValue) {
        struct.set(mb_cmp$LAYOUT, mb_cmp$OFFSET, fieldValue);
    }

    private static final OfInt ildct_cmp$LAYOUT = (OfInt)$LAYOUT.select(groupElement("ildct_cmp"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int ildct_cmp
     * }
     */
    public static final OfInt ildct_cmp$layout() {
        return ildct_cmp$LAYOUT;
    }

    private static final long ildct_cmp$OFFSET = 256;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int ildct_cmp
     * }
     */
    public static final long ildct_cmp$offset() {
        return ildct_cmp$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int ildct_cmp
     * }
     */
    public static int ildct_cmp(MemorySegment struct) {
        return struct.get(ildct_cmp$LAYOUT, ildct_cmp$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int ildct_cmp
     * }
     */
    public static void ildct_cmp(MemorySegment struct, int fieldValue) {
        struct.set(ildct_cmp$LAYOUT, ildct_cmp$OFFSET, fieldValue);
    }

    private static final OfInt dia_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("dia_size"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int dia_size
     * }
     */
    public static final OfInt dia_size$layout() {
        return dia_size$LAYOUT;
    }

    private static final long dia_size$OFFSET = 260;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int dia_size
     * }
     */
    public static final long dia_size$offset() {
        return dia_size$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int dia_size
     * }
     */
    public static int dia_size(MemorySegment struct) {
        return struct.get(dia_size$LAYOUT, dia_size$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int dia_size
     * }
     */
    public static void dia_size(MemorySegment struct, int fieldValue) {
        struct.set(dia_size$LAYOUT, dia_size$OFFSET, fieldValue);
    }

    private static final OfInt last_predictor_count$LAYOUT = (OfInt)$LAYOUT.select(groupElement("last_predictor_count"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int last_predictor_count
     * }
     */
    public static final OfInt last_predictor_count$layout() {
        return last_predictor_count$LAYOUT;
    }

    private static final long last_predictor_count$OFFSET = 264;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int last_predictor_count
     * }
     */
    public static final long last_predictor_count$offset() {
        return last_predictor_count$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int last_predictor_count
     * }
     */
    public static int last_predictor_count(MemorySegment struct) {
        return struct.get(last_predictor_count$LAYOUT, last_predictor_count$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int last_predictor_count
     * }
     */
    public static void last_predictor_count(MemorySegment struct, int fieldValue) {
        struct.set(last_predictor_count$LAYOUT, last_predictor_count$OFFSET, fieldValue);
    }

    private static final OfInt me_pre_cmp$LAYOUT = (OfInt)$LAYOUT.select(groupElement("me_pre_cmp"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int me_pre_cmp
     * }
     */
    public static final OfInt me_pre_cmp$layout() {
        return me_pre_cmp$LAYOUT;
    }

    private static final long me_pre_cmp$OFFSET = 268;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int me_pre_cmp
     * }
     */
    public static final long me_pre_cmp$offset() {
        return me_pre_cmp$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int me_pre_cmp
     * }
     */
    public static int me_pre_cmp(MemorySegment struct) {
        return struct.get(me_pre_cmp$LAYOUT, me_pre_cmp$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int me_pre_cmp
     * }
     */
    public static void me_pre_cmp(MemorySegment struct, int fieldValue) {
        struct.set(me_pre_cmp$LAYOUT, me_pre_cmp$OFFSET, fieldValue);
    }

    private static final OfInt pre_dia_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("pre_dia_size"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int pre_dia_size
     * }
     */
    public static final OfInt pre_dia_size$layout() {
        return pre_dia_size$LAYOUT;
    }

    private static final long pre_dia_size$OFFSET = 272;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int pre_dia_size
     * }
     */
    public static final long pre_dia_size$offset() {
        return pre_dia_size$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int pre_dia_size
     * }
     */
    public static int pre_dia_size(MemorySegment struct) {
        return struct.get(pre_dia_size$LAYOUT, pre_dia_size$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int pre_dia_size
     * }
     */
    public static void pre_dia_size(MemorySegment struct, int fieldValue) {
        struct.set(pre_dia_size$LAYOUT, pre_dia_size$OFFSET, fieldValue);
    }

    private static final OfInt me_subpel_quality$LAYOUT = (OfInt)$LAYOUT.select(groupElement("me_subpel_quality"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int me_subpel_quality
     * }
     */
    public static final OfInt me_subpel_quality$layout() {
        return me_subpel_quality$LAYOUT;
    }

    private static final long me_subpel_quality$OFFSET = 276;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int me_subpel_quality
     * }
     */
    public static final long me_subpel_quality$offset() {
        return me_subpel_quality$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int me_subpel_quality
     * }
     */
    public static int me_subpel_quality(MemorySegment struct) {
        return struct.get(me_subpel_quality$LAYOUT, me_subpel_quality$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int me_subpel_quality
     * }
     */
    public static void me_subpel_quality(MemorySegment struct, int fieldValue) {
        struct.set(me_subpel_quality$LAYOUT, me_subpel_quality$OFFSET, fieldValue);
    }

    private static final OfInt me_range$LAYOUT = (OfInt)$LAYOUT.select(groupElement("me_range"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int me_range
     * }
     */
    public static final OfInt me_range$layout() {
        return me_range$LAYOUT;
    }

    private static final long me_range$OFFSET = 280;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int me_range
     * }
     */
    public static final long me_range$offset() {
        return me_range$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int me_range
     * }
     */
    public static int me_range(MemorySegment struct) {
        return struct.get(me_range$LAYOUT, me_range$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int me_range
     * }
     */
    public static void me_range(MemorySegment struct, int fieldValue) {
        struct.set(me_range$LAYOUT, me_range$OFFSET, fieldValue);
    }

    private static final OfInt mb_decision$LAYOUT = (OfInt)$LAYOUT.select(groupElement("mb_decision"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int mb_decision
     * }
     */
    public static final OfInt mb_decision$layout() {
        return mb_decision$LAYOUT;
    }

    private static final long mb_decision$OFFSET = 284;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int mb_decision
     * }
     */
    public static final long mb_decision$offset() {
        return mb_decision$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int mb_decision
     * }
     */
    public static int mb_decision(MemorySegment struct) {
        return struct.get(mb_decision$LAYOUT, mb_decision$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int mb_decision
     * }
     */
    public static void mb_decision(MemorySegment struct, int fieldValue) {
        struct.set(mb_decision$LAYOUT, mb_decision$OFFSET, fieldValue);
    }

    private static final AddressLayout intra_matrix$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("intra_matrix"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * uint16_t *intra_matrix
     * }
     */
    public static final AddressLayout intra_matrix$layout() {
        return intra_matrix$LAYOUT;
    }

    private static final long intra_matrix$OFFSET = 288;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * uint16_t *intra_matrix
     * }
     */
    public static final long intra_matrix$offset() {
        return intra_matrix$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * uint16_t *intra_matrix
     * }
     */
    public static MemorySegment intra_matrix(MemorySegment struct) {
        return struct.get(intra_matrix$LAYOUT, intra_matrix$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * uint16_t *intra_matrix
     * }
     */
    public static void intra_matrix(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(intra_matrix$LAYOUT, intra_matrix$OFFSET, fieldValue);
    }

    private static final AddressLayout inter_matrix$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("inter_matrix"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * uint16_t *inter_matrix
     * }
     */
    public static final AddressLayout inter_matrix$layout() {
        return inter_matrix$LAYOUT;
    }

    private static final long inter_matrix$OFFSET = 296;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * uint16_t *inter_matrix
     * }
     */
    public static final long inter_matrix$offset() {
        return inter_matrix$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * uint16_t *inter_matrix
     * }
     */
    public static MemorySegment inter_matrix(MemorySegment struct) {
        return struct.get(inter_matrix$LAYOUT, inter_matrix$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * uint16_t *inter_matrix
     * }
     */
    public static void inter_matrix(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(inter_matrix$LAYOUT, inter_matrix$OFFSET, fieldValue);
    }

    private static final AddressLayout chroma_intra_matrix$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("chroma_intra_matrix"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * uint16_t *chroma_intra_matrix
     * }
     */
    public static final AddressLayout chroma_intra_matrix$layout() {
        return chroma_intra_matrix$LAYOUT;
    }

    private static final long chroma_intra_matrix$OFFSET = 304;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * uint16_t *chroma_intra_matrix
     * }
     */
    public static final long chroma_intra_matrix$offset() {
        return chroma_intra_matrix$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * uint16_t *chroma_intra_matrix
     * }
     */
    public static MemorySegment chroma_intra_matrix(MemorySegment struct) {
        return struct.get(chroma_intra_matrix$LAYOUT, chroma_intra_matrix$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * uint16_t *chroma_intra_matrix
     * }
     */
    public static void chroma_intra_matrix(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(chroma_intra_matrix$LAYOUT, chroma_intra_matrix$OFFSET, fieldValue);
    }

    private static final OfInt intra_dc_precision$LAYOUT = (OfInt)$LAYOUT.select(groupElement("intra_dc_precision"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int intra_dc_precision
     * }
     */
    public static final OfInt intra_dc_precision$layout() {
        return intra_dc_precision$LAYOUT;
    }

    private static final long intra_dc_precision$OFFSET = 312;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int intra_dc_precision
     * }
     */
    public static final long intra_dc_precision$offset() {
        return intra_dc_precision$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int intra_dc_precision
     * }
     */
    public static int intra_dc_precision(MemorySegment struct) {
        return struct.get(intra_dc_precision$LAYOUT, intra_dc_precision$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int intra_dc_precision
     * }
     */
    public static void intra_dc_precision(MemorySegment struct, int fieldValue) {
        struct.set(intra_dc_precision$LAYOUT, intra_dc_precision$OFFSET, fieldValue);
    }

    private static final OfInt mb_lmin$LAYOUT = (OfInt)$LAYOUT.select(groupElement("mb_lmin"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int mb_lmin
     * }
     */
    public static final OfInt mb_lmin$layout() {
        return mb_lmin$LAYOUT;
    }

    private static final long mb_lmin$OFFSET = 316;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int mb_lmin
     * }
     */
    public static final long mb_lmin$offset() {
        return mb_lmin$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int mb_lmin
     * }
     */
    public static int mb_lmin(MemorySegment struct) {
        return struct.get(mb_lmin$LAYOUT, mb_lmin$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int mb_lmin
     * }
     */
    public static void mb_lmin(MemorySegment struct, int fieldValue) {
        struct.set(mb_lmin$LAYOUT, mb_lmin$OFFSET, fieldValue);
    }

    private static final OfInt mb_lmax$LAYOUT = (OfInt)$LAYOUT.select(groupElement("mb_lmax"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int mb_lmax
     * }
     */
    public static final OfInt mb_lmax$layout() {
        return mb_lmax$LAYOUT;
    }

    private static final long mb_lmax$OFFSET = 320;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int mb_lmax
     * }
     */
    public static final long mb_lmax$offset() {
        return mb_lmax$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int mb_lmax
     * }
     */
    public static int mb_lmax(MemorySegment struct) {
        return struct.get(mb_lmax$LAYOUT, mb_lmax$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int mb_lmax
     * }
     */
    public static void mb_lmax(MemorySegment struct, int fieldValue) {
        struct.set(mb_lmax$LAYOUT, mb_lmax$OFFSET, fieldValue);
    }

    private static final OfInt bidir_refine$LAYOUT = (OfInt)$LAYOUT.select(groupElement("bidir_refine"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int bidir_refine
     * }
     */
    public static final OfInt bidir_refine$layout() {
        return bidir_refine$LAYOUT;
    }

    private static final long bidir_refine$OFFSET = 324;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int bidir_refine
     * }
     */
    public static final long bidir_refine$offset() {
        return bidir_refine$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int bidir_refine
     * }
     */
    public static int bidir_refine(MemorySegment struct) {
        return struct.get(bidir_refine$LAYOUT, bidir_refine$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int bidir_refine
     * }
     */
    public static void bidir_refine(MemorySegment struct, int fieldValue) {
        struct.set(bidir_refine$LAYOUT, bidir_refine$OFFSET, fieldValue);
    }

    private static final OfInt keyint_min$LAYOUT = (OfInt)$LAYOUT.select(groupElement("keyint_min"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int keyint_min
     * }
     */
    public static final OfInt keyint_min$layout() {
        return keyint_min$LAYOUT;
    }

    private static final long keyint_min$OFFSET = 328;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int keyint_min
     * }
     */
    public static final long keyint_min$offset() {
        return keyint_min$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int keyint_min
     * }
     */
    public static int keyint_min(MemorySegment struct) {
        return struct.get(keyint_min$LAYOUT, keyint_min$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int keyint_min
     * }
     */
    public static void keyint_min(MemorySegment struct, int fieldValue) {
        struct.set(keyint_min$LAYOUT, keyint_min$OFFSET, fieldValue);
    }

    private static final OfInt gop_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("gop_size"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int gop_size
     * }
     */
    public static final OfInt gop_size$layout() {
        return gop_size$LAYOUT;
    }

    private static final long gop_size$OFFSET = 332;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int gop_size
     * }
     */
    public static final long gop_size$offset() {
        return gop_size$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int gop_size
     * }
     */
    public static int gop_size(MemorySegment struct) {
        return struct.get(gop_size$LAYOUT, gop_size$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int gop_size
     * }
     */
    public static void gop_size(MemorySegment struct, int fieldValue) {
        struct.set(gop_size$LAYOUT, gop_size$OFFSET, fieldValue);
    }

    private static final OfInt mv0_threshold$LAYOUT = (OfInt)$LAYOUT.select(groupElement("mv0_threshold"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int mv0_threshold
     * }
     */
    public static final OfInt mv0_threshold$layout() {
        return mv0_threshold$LAYOUT;
    }

    private static final long mv0_threshold$OFFSET = 336;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int mv0_threshold
     * }
     */
    public static final long mv0_threshold$offset() {
        return mv0_threshold$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int mv0_threshold
     * }
     */
    public static int mv0_threshold(MemorySegment struct) {
        return struct.get(mv0_threshold$LAYOUT, mv0_threshold$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int mv0_threshold
     * }
     */
    public static void mv0_threshold(MemorySegment struct, int fieldValue) {
        struct.set(mv0_threshold$LAYOUT, mv0_threshold$OFFSET, fieldValue);
    }

    private static final OfInt slices$LAYOUT = (OfInt)$LAYOUT.select(groupElement("slices"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int slices
     * }
     */
    public static final OfInt slices$layout() {
        return slices$LAYOUT;
    }

    private static final long slices$OFFSET = 340;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int slices
     * }
     */
    public static final long slices$offset() {
        return slices$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int slices
     * }
     */
    public static int slices(MemorySegment struct) {
        return struct.get(slices$LAYOUT, slices$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int slices
     * }
     */
    public static void slices(MemorySegment struct, int fieldValue) {
        struct.set(slices$LAYOUT, slices$OFFSET, fieldValue);
    }

    private static final OfInt sample_rate$LAYOUT = (OfInt)$LAYOUT.select(groupElement("sample_rate"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int sample_rate
     * }
     */
    public static final OfInt sample_rate$layout() {
        return sample_rate$LAYOUT;
    }

    private static final long sample_rate$OFFSET = 344;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int sample_rate
     * }
     */
    public static final long sample_rate$offset() {
        return sample_rate$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int sample_rate
     * }
     */
    public static int sample_rate(MemorySegment struct) {
        return struct.get(sample_rate$LAYOUT, sample_rate$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int sample_rate
     * }
     */
    public static void sample_rate(MemorySegment struct, int fieldValue) {
        struct.set(sample_rate$LAYOUT, sample_rate$OFFSET, fieldValue);
    }

    private static final OfInt sample_fmt$LAYOUT = (OfInt)$LAYOUT.select(groupElement("sample_fmt"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * enum AVSampleFormat sample_fmt
     * }
     */
    public static final OfInt sample_fmt$layout() {
        return sample_fmt$LAYOUT;
    }

    private static final long sample_fmt$OFFSET = 348;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * enum AVSampleFormat sample_fmt
     * }
     */
    public static final long sample_fmt$offset() {
        return sample_fmt$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * enum AVSampleFormat sample_fmt
     * }
     */
    public static int sample_fmt(MemorySegment struct) {
        return struct.get(sample_fmt$LAYOUT, sample_fmt$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * enum AVSampleFormat sample_fmt
     * }
     */
    public static void sample_fmt(MemorySegment struct, int fieldValue) {
        struct.set(sample_fmt$LAYOUT, sample_fmt$OFFSET, fieldValue);
    }

    private static final GroupLayout ch_layout$LAYOUT = (GroupLayout)$LAYOUT.select(groupElement("ch_layout"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * AVChannelLayout ch_layout
     * }
     */
    public static final GroupLayout ch_layout$layout() {
        return ch_layout$LAYOUT;
    }

    private static final long ch_layout$OFFSET = 352;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * AVChannelLayout ch_layout
     * }
     */
    public static final long ch_layout$offset() {
        return ch_layout$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * AVChannelLayout ch_layout
     * }
     */
    public static MemorySegment ch_layout(MemorySegment struct) {
        return struct.asSlice(ch_layout$OFFSET, ch_layout$LAYOUT.byteSize());
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * AVChannelLayout ch_layout
     * }
     */
    public static void ch_layout(MemorySegment struct, MemorySegment fieldValue) {
        MemorySegment.copy(fieldValue, 0L, struct, ch_layout$OFFSET, ch_layout$LAYOUT.byteSize());
    }

    private static final OfInt frame_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("frame_size"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int frame_size
     * }
     */
    public static final OfInt frame_size$layout() {
        return frame_size$LAYOUT;
    }

    private static final long frame_size$OFFSET = 376;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int frame_size
     * }
     */
    public static final long frame_size$offset() {
        return frame_size$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int frame_size
     * }
     */
    public static int frame_size(MemorySegment struct) {
        return struct.get(frame_size$LAYOUT, frame_size$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int frame_size
     * }
     */
    public static void frame_size(MemorySegment struct, int fieldValue) {
        struct.set(frame_size$LAYOUT, frame_size$OFFSET, fieldValue);
    }

    private static final OfInt block_align$LAYOUT = (OfInt)$LAYOUT.select(groupElement("block_align"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int block_align
     * }
     */
    public static final OfInt block_align$layout() {
        return block_align$LAYOUT;
    }

    private static final long block_align$OFFSET = 380;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int block_align
     * }
     */
    public static final long block_align$offset() {
        return block_align$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int block_align
     * }
     */
    public static int block_align(MemorySegment struct) {
        return struct.get(block_align$LAYOUT, block_align$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int block_align
     * }
     */
    public static void block_align(MemorySegment struct, int fieldValue) {
        struct.set(block_align$LAYOUT, block_align$OFFSET, fieldValue);
    }

    private static final OfInt cutoff$LAYOUT = (OfInt)$LAYOUT.select(groupElement("cutoff"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int cutoff
     * }
     */
    public static final OfInt cutoff$layout() {
        return cutoff$LAYOUT;
    }

    private static final long cutoff$OFFSET = 384;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int cutoff
     * }
     */
    public static final long cutoff$offset() {
        return cutoff$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int cutoff
     * }
     */
    public static int cutoff(MemorySegment struct) {
        return struct.get(cutoff$LAYOUT, cutoff$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int cutoff
     * }
     */
    public static void cutoff(MemorySegment struct, int fieldValue) {
        struct.set(cutoff$LAYOUT, cutoff$OFFSET, fieldValue);
    }

    private static final OfInt audio_service_type$LAYOUT = (OfInt)$LAYOUT.select(groupElement("audio_service_type"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * enum AVAudioServiceType audio_service_type
     * }
     */
    public static final OfInt audio_service_type$layout() {
        return audio_service_type$LAYOUT;
    }

    private static final long audio_service_type$OFFSET = 388;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * enum AVAudioServiceType audio_service_type
     * }
     */
    public static final long audio_service_type$offset() {
        return audio_service_type$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * enum AVAudioServiceType audio_service_type
     * }
     */
    public static int audio_service_type(MemorySegment struct) {
        return struct.get(audio_service_type$LAYOUT, audio_service_type$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * enum AVAudioServiceType audio_service_type
     * }
     */
    public static void audio_service_type(MemorySegment struct, int fieldValue) {
        struct.set(audio_service_type$LAYOUT, audio_service_type$OFFSET, fieldValue);
    }

    private static final OfInt request_sample_fmt$LAYOUT = (OfInt)$LAYOUT.select(groupElement("request_sample_fmt"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * enum AVSampleFormat request_sample_fmt
     * }
     */
    public static final OfInt request_sample_fmt$layout() {
        return request_sample_fmt$LAYOUT;
    }

    private static final long request_sample_fmt$OFFSET = 392;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * enum AVSampleFormat request_sample_fmt
     * }
     */
    public static final long request_sample_fmt$offset() {
        return request_sample_fmt$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * enum AVSampleFormat request_sample_fmt
     * }
     */
    public static int request_sample_fmt(MemorySegment struct) {
        return struct.get(request_sample_fmt$LAYOUT, request_sample_fmt$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * enum AVSampleFormat request_sample_fmt
     * }
     */
    public static void request_sample_fmt(MemorySegment struct, int fieldValue) {
        struct.set(request_sample_fmt$LAYOUT, request_sample_fmt$OFFSET, fieldValue);
    }

    private static final OfInt initial_padding$LAYOUT = (OfInt)$LAYOUT.select(groupElement("initial_padding"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int initial_padding
     * }
     */
    public static final OfInt initial_padding$layout() {
        return initial_padding$LAYOUT;
    }

    private static final long initial_padding$OFFSET = 396;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int initial_padding
     * }
     */
    public static final long initial_padding$offset() {
        return initial_padding$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int initial_padding
     * }
     */
    public static int initial_padding(MemorySegment struct) {
        return struct.get(initial_padding$LAYOUT, initial_padding$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int initial_padding
     * }
     */
    public static void initial_padding(MemorySegment struct, int fieldValue) {
        struct.set(initial_padding$LAYOUT, initial_padding$OFFSET, fieldValue);
    }

    private static final OfInt trailing_padding$LAYOUT = (OfInt)$LAYOUT.select(groupElement("trailing_padding"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int trailing_padding
     * }
     */
    public static final OfInt trailing_padding$layout() {
        return trailing_padding$LAYOUT;
    }

    private static final long trailing_padding$OFFSET = 400;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int trailing_padding
     * }
     */
    public static final long trailing_padding$offset() {
        return trailing_padding$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int trailing_padding
     * }
     */
    public static int trailing_padding(MemorySegment struct) {
        return struct.get(trailing_padding$LAYOUT, trailing_padding$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int trailing_padding
     * }
     */
    public static void trailing_padding(MemorySegment struct, int fieldValue) {
        struct.set(trailing_padding$LAYOUT, trailing_padding$OFFSET, fieldValue);
    }

    private static final OfInt seek_preroll$LAYOUT = (OfInt)$LAYOUT.select(groupElement("seek_preroll"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int seek_preroll
     * }
     */
    public static final OfInt seek_preroll$layout() {
        return seek_preroll$LAYOUT;
    }

    private static final long seek_preroll$OFFSET = 404;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int seek_preroll
     * }
     */
    public static final long seek_preroll$offset() {
        return seek_preroll$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int seek_preroll
     * }
     */
    public static int seek_preroll(MemorySegment struct) {
        return struct.get(seek_preroll$LAYOUT, seek_preroll$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int seek_preroll
     * }
     */
    public static void seek_preroll(MemorySegment struct, int fieldValue) {
        struct.set(seek_preroll$LAYOUT, seek_preroll$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * int (*get_buffer2)(struct AVCodecContext *, AVFrame *, int)
     * }
     */
    public static class get_buffer2 {

        get_buffer2() {
            // Should not be called directly
        }

        /**
         * The function pointer signature, expressed as a functional interface
         */
        public interface Function {
            int apply(MemorySegment _x0, MemorySegment _x1, int _x2);
        }

        private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
            Libffmpeg.C_INT,
            Libffmpeg.C_POINTER,
            Libffmpeg.C_POINTER,
            Libffmpeg.C_INT
        );

        /**
         * The descriptor of this function pointer
         */
        public static FunctionDescriptor descriptor() {
            return $DESC;
        }

        private static final MethodHandle UP$MH = Libffmpeg.upcallHandle(get_buffer2.Function.class, "apply", $DESC);

        /**
         * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
         * The lifetime of the returned segment is managed by {@code arena}
         */
        public static MemorySegment allocate(get_buffer2.Function fi, Arena arena) {
            return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
        }

        private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);

        /**
         * Invoke the upcall stub {@code funcPtr}, with given parameters
         */
        public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, int _x2) {
            try {
                return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
            } catch (Throwable ex$) {
                throw new AssertionError("should not reach here", ex$);
            }
        }
    }

    private static final AddressLayout get_buffer2$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("get_buffer2"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int (*get_buffer2)(struct AVCodecContext *, AVFrame *, int)
     * }
     */
    public static final AddressLayout get_buffer2$layout() {
        return get_buffer2$LAYOUT;
    }

    private static final long get_buffer2$OFFSET = 408;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int (*get_buffer2)(struct AVCodecContext *, AVFrame *, int)
     * }
     */
    public static final long get_buffer2$offset() {
        return get_buffer2$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int (*get_buffer2)(struct AVCodecContext *, AVFrame *, int)
     * }
     */
    public static MemorySegment get_buffer2(MemorySegment struct) {
        return struct.get(get_buffer2$LAYOUT, get_buffer2$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int (*get_buffer2)(struct AVCodecContext *, AVFrame *, int)
     * }
     */
    public static void get_buffer2(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(get_buffer2$LAYOUT, get_buffer2$OFFSET, fieldValue);
    }

    private static final OfInt bit_rate_tolerance$LAYOUT = (OfInt)$LAYOUT.select(groupElement("bit_rate_tolerance"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int bit_rate_tolerance
     * }
     */
    public static final OfInt bit_rate_tolerance$layout() {
        return bit_rate_tolerance$LAYOUT;
    }

    private static final long bit_rate_tolerance$OFFSET = 416;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int bit_rate_tolerance
     * }
     */
    public static final long bit_rate_tolerance$offset() {
        return bit_rate_tolerance$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int bit_rate_tolerance
     * }
     */
    public static int bit_rate_tolerance(MemorySegment struct) {
        return struct.get(bit_rate_tolerance$LAYOUT, bit_rate_tolerance$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int bit_rate_tolerance
     * }
     */
    public static void bit_rate_tolerance(MemorySegment struct, int fieldValue) {
        struct.set(bit_rate_tolerance$LAYOUT, bit_rate_tolerance$OFFSET, fieldValue);
    }

    private static final OfInt global_quality$LAYOUT = (OfInt)$LAYOUT.select(groupElement("global_quality"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int global_quality
     * }
     */
    public static final OfInt global_quality$layout() {
        return global_quality$LAYOUT;
    }

    private static final long global_quality$OFFSET = 420;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int global_quality
     * }
     */
    public static final long global_quality$offset() {
        return global_quality$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int global_quality
     * }
     */
    public static int global_quality(MemorySegment struct) {
        return struct.get(global_quality$LAYOUT, global_quality$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int global_quality
     * }
     */
    public static void global_quality(MemorySegment struct, int fieldValue) {
        struct.set(global_quality$LAYOUT, global_quality$OFFSET, fieldValue);
    }

    private static final OfInt compression_level$LAYOUT = (OfInt)$LAYOUT.select(groupElement("compression_level"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int compression_level
     * }
     */
    public static final OfInt compression_level$layout() {
        return compression_level$LAYOUT;
    }

    private static final long compression_level$OFFSET = 424;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int compression_level
     * }
     */
    public static final long compression_level$offset() {
        return compression_level$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int compression_level
     * }
     */
    public static int compression_level(MemorySegment struct) {
        return struct.get(compression_level$LAYOUT, compression_level$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int compression_level
     * }
     */
    public static void compression_level(MemorySegment struct, int fieldValue) {
        struct.set(compression_level$LAYOUT, compression_level$OFFSET, fieldValue);
    }

    private static final OfFloat qcompress$LAYOUT = (OfFloat)$LAYOUT.select(groupElement("qcompress"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * float qcompress
     * }
     */
    public static final OfFloat qcompress$layout() {
        return qcompress$LAYOUT;
    }

    private static final long qcompress$OFFSET = 428;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * float qcompress
     * }
     */
    public static final long qcompress$offset() {
        return qcompress$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * float qcompress
     * }
     */
    public static float qcompress(MemorySegment struct) {
        return struct.get(qcompress$LAYOUT, qcompress$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * float qcompress
     * }
     */
    public static void qcompress(MemorySegment struct, float fieldValue) {
        struct.set(qcompress$LAYOUT, qcompress$OFFSET, fieldValue);
    }

    private static final OfFloat qblur$LAYOUT = (OfFloat)$LAYOUT.select(groupElement("qblur"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * float qblur
     * }
     */
    public static final OfFloat qblur$layout() {
        return qblur$LAYOUT;
    }

    private static final long qblur$OFFSET = 432;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * float qblur
     * }
     */
    public static final long qblur$offset() {
        return qblur$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * float qblur
     * }
     */
    public static float qblur(MemorySegment struct) {
        return struct.get(qblur$LAYOUT, qblur$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * float qblur
     * }
     */
    public static void qblur(MemorySegment struct, float fieldValue) {
        struct.set(qblur$LAYOUT, qblur$OFFSET, fieldValue);
    }

    private static final OfInt qmin$LAYOUT = (OfInt)$LAYOUT.select(groupElement("qmin"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int qmin
     * }
     */
    public static final OfInt qmin$layout() {
        return qmin$LAYOUT;
    }

    private static final long qmin$OFFSET = 436;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int qmin
     * }
     */
    public static final long qmin$offset() {
        return qmin$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int qmin
     * }
     */
    public static int qmin(MemorySegment struct) {
        return struct.get(qmin$LAYOUT, qmin$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int qmin
     * }
     */
    public static void qmin(MemorySegment struct, int fieldValue) {
        struct.set(qmin$LAYOUT, qmin$OFFSET, fieldValue);
    }

    private static final OfInt qmax$LAYOUT = (OfInt)$LAYOUT.select(groupElement("qmax"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int qmax
     * }
     */
    public static final OfInt qmax$layout() {
        return qmax$LAYOUT;
    }

    private static final long qmax$OFFSET = 440;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int qmax
     * }
     */
    public static final long qmax$offset() {
        return qmax$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int qmax
     * }
     */
    public static int qmax(MemorySegment struct) {
        return struct.get(qmax$LAYOUT, qmax$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int qmax
     * }
     */
    public static void qmax(MemorySegment struct, int fieldValue) {
        struct.set(qmax$LAYOUT, qmax$OFFSET, fieldValue);
    }

    private static final OfInt max_qdiff$LAYOUT = (OfInt)$LAYOUT.select(groupElement("max_qdiff"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int max_qdiff
     * }
     */
    public static final OfInt max_qdiff$layout() {
        return max_qdiff$LAYOUT;
    }

    private static final long max_qdiff$OFFSET = 444;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int max_qdiff
     * }
     */
    public static final long max_qdiff$offset() {
        return max_qdiff$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int max_qdiff
     * }
     */
    public static int max_qdiff(MemorySegment struct) {
        return struct.get(max_qdiff$LAYOUT, max_qdiff$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int max_qdiff
     * }
     */
    public static void max_qdiff(MemorySegment struct, int fieldValue) {
        struct.set(max_qdiff$LAYOUT, max_qdiff$OFFSET, fieldValue);
    }

    private static final OfInt rc_buffer_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("rc_buffer_size"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int rc_buffer_size
     * }
     */
    public static final OfInt rc_buffer_size$layout() {
        return rc_buffer_size$LAYOUT;
    }

    private static final long rc_buffer_size$OFFSET = 448;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int rc_buffer_size
     * }
     */
    public static final long rc_buffer_size$offset() {
        return rc_buffer_size$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int rc_buffer_size
     * }
     */
    public static int rc_buffer_size(MemorySegment struct) {
        return struct.get(rc_buffer_size$LAYOUT, rc_buffer_size$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int rc_buffer_size
     * }
     */
    public static void rc_buffer_size(MemorySegment struct, int fieldValue) {
        struct.set(rc_buffer_size$LAYOUT, rc_buffer_size$OFFSET, fieldValue);
    }

    private static final OfInt rc_override_count$LAYOUT = (OfInt)$LAYOUT.select(groupElement("rc_override_count"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int rc_override_count
     * }
     */
    public static final OfInt rc_override_count$layout() {
        return rc_override_count$LAYOUT;
    }

    private static final long rc_override_count$OFFSET = 452;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int rc_override_count
     * }
     */
    public static final long rc_override_count$offset() {
        return rc_override_count$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int rc_override_count
     * }
     */
    public static int rc_override_count(MemorySegment struct) {
        return struct.get(rc_override_count$LAYOUT, rc_override_count$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int rc_override_count
     * }
     */
    public static void rc_override_count(MemorySegment struct, int fieldValue) {
        struct.set(rc_override_count$LAYOUT, rc_override_count$OFFSET, fieldValue);
    }

    private static final AddressLayout rc_override$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("rc_override"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * RcOverride *rc_override
     * }
     */
    public static final AddressLayout rc_override$layout() {
        return rc_override$LAYOUT;
    }

    private static final long rc_override$OFFSET = 456;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * RcOverride *rc_override
     * }
     */
    public static final long rc_override$offset() {
        return rc_override$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * RcOverride *rc_override
     * }
     */
    public static MemorySegment rc_override(MemorySegment struct) {
        return struct.get(rc_override$LAYOUT, rc_override$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * RcOverride *rc_override
     * }
     */
    public static void rc_override(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(rc_override$LAYOUT, rc_override$OFFSET, fieldValue);
    }

    private static final OfLong rc_max_rate$LAYOUT = (OfLong)$LAYOUT.select(groupElement("rc_max_rate"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int64_t rc_max_rate
     * }
     */
    public static final OfLong rc_max_rate$layout() {
        return rc_max_rate$LAYOUT;
    }

    private static final long rc_max_rate$OFFSET = 464;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int64_t rc_max_rate
     * }
     */
    public static final long rc_max_rate$offset() {
        return rc_max_rate$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int64_t rc_max_rate
     * }
     */
    public static long rc_max_rate(MemorySegment struct) {
        return struct.get(rc_max_rate$LAYOUT, rc_max_rate$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int64_t rc_max_rate
     * }
     */
    public static void rc_max_rate(MemorySegment struct, long fieldValue) {
        struct.set(rc_max_rate$LAYOUT, rc_max_rate$OFFSET, fieldValue);
    }

    private static final OfLong rc_min_rate$LAYOUT = (OfLong)$LAYOUT.select(groupElement("rc_min_rate"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int64_t rc_min_rate
     * }
     */
    public static final OfLong rc_min_rate$layout() {
        return rc_min_rate$LAYOUT;
    }

    private static final long rc_min_rate$OFFSET = 472;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int64_t rc_min_rate
     * }
     */
    public static final long rc_min_rate$offset() {
        return rc_min_rate$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int64_t rc_min_rate
     * }
     */
    public static long rc_min_rate(MemorySegment struct) {
        return struct.get(rc_min_rate$LAYOUT, rc_min_rate$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int64_t rc_min_rate
     * }
     */
    public static void rc_min_rate(MemorySegment struct, long fieldValue) {
        struct.set(rc_min_rate$LAYOUT, rc_min_rate$OFFSET, fieldValue);
    }

    private static final OfFloat rc_max_available_vbv_use$LAYOUT = (OfFloat)$LAYOUT.select(groupElement("rc_max_available_vbv_use"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * float rc_max_available_vbv_use
     * }
     */
    public static final OfFloat rc_max_available_vbv_use$layout() {
        return rc_max_available_vbv_use$LAYOUT;
    }

    private static final long rc_max_available_vbv_use$OFFSET = 480;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * float rc_max_available_vbv_use
     * }
     */
    public static final long rc_max_available_vbv_use$offset() {
        return rc_max_available_vbv_use$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * float rc_max_available_vbv_use
     * }
     */
    public static float rc_max_available_vbv_use(MemorySegment struct) {
        return struct.get(rc_max_available_vbv_use$LAYOUT, rc_max_available_vbv_use$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * float rc_max_available_vbv_use
     * }
     */
    public static void rc_max_available_vbv_use(MemorySegment struct, float fieldValue) {
        struct.set(rc_max_available_vbv_use$LAYOUT, rc_max_available_vbv_use$OFFSET, fieldValue);
    }

    private static final OfFloat rc_min_vbv_overflow_use$LAYOUT = (OfFloat)$LAYOUT.select(groupElement("rc_min_vbv_overflow_use"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * float rc_min_vbv_overflow_use
     * }
     */
    public static final OfFloat rc_min_vbv_overflow_use$layout() {
        return rc_min_vbv_overflow_use$LAYOUT;
    }

    private static final long rc_min_vbv_overflow_use$OFFSET = 484;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * float rc_min_vbv_overflow_use
     * }
     */
    public static final long rc_min_vbv_overflow_use$offset() {
        return rc_min_vbv_overflow_use$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * float rc_min_vbv_overflow_use
     * }
     */
    public static float rc_min_vbv_overflow_use(MemorySegment struct) {
        return struct.get(rc_min_vbv_overflow_use$LAYOUT, rc_min_vbv_overflow_use$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * float rc_min_vbv_overflow_use
     * }
     */
    public static void rc_min_vbv_overflow_use(MemorySegment struct, float fieldValue) {
        struct.set(rc_min_vbv_overflow_use$LAYOUT, rc_min_vbv_overflow_use$OFFSET, fieldValue);
    }

    private static final OfInt rc_initial_buffer_occupancy$LAYOUT = (OfInt)$LAYOUT.select(groupElement("rc_initial_buffer_occupancy"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int rc_initial_buffer_occupancy
     * }
     */
    public static final OfInt rc_initial_buffer_occupancy$layout() {
        return rc_initial_buffer_occupancy$LAYOUT;
    }

    private static final long rc_initial_buffer_occupancy$OFFSET = 488;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int rc_initial_buffer_occupancy
     * }
     */
    public static final long rc_initial_buffer_occupancy$offset() {
        return rc_initial_buffer_occupancy$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int rc_initial_buffer_occupancy
     * }
     */
    public static int rc_initial_buffer_occupancy(MemorySegment struct) {
        return struct.get(rc_initial_buffer_occupancy$LAYOUT, rc_initial_buffer_occupancy$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int rc_initial_buffer_occupancy
     * }
     */
    public static void rc_initial_buffer_occupancy(MemorySegment struct, int fieldValue) {
        struct.set(rc_initial_buffer_occupancy$LAYOUT, rc_initial_buffer_occupancy$OFFSET, fieldValue);
    }

    private static final OfInt trellis$LAYOUT = (OfInt)$LAYOUT.select(groupElement("trellis"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int trellis
     * }
     */
    public static final OfInt trellis$layout() {
        return trellis$LAYOUT;
    }

    private static final long trellis$OFFSET = 492;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int trellis
     * }
     */
    public static final long trellis$offset() {
        return trellis$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int trellis
     * }
     */
    public static int trellis(MemorySegment struct) {
        return struct.get(trellis$LAYOUT, trellis$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int trellis
     * }
     */
    public static void trellis(MemorySegment struct, int fieldValue) {
        struct.set(trellis$LAYOUT, trellis$OFFSET, fieldValue);
    }

    private static final AddressLayout stats_out$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("stats_out"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * char *stats_out
     * }
     */
    public static final AddressLayout stats_out$layout() {
        return stats_out$LAYOUT;
    }

    private static final long stats_out$OFFSET = 496;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * char *stats_out
     * }
     */
    public static final long stats_out$offset() {
        return stats_out$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * char *stats_out
     * }
     */
    public static MemorySegment stats_out(MemorySegment struct) {
        return struct.get(stats_out$LAYOUT, stats_out$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * char *stats_out
     * }
     */
    public static void stats_out(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(stats_out$LAYOUT, stats_out$OFFSET, fieldValue);
    }

    private static final AddressLayout stats_in$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("stats_in"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * char *stats_in
     * }
     */
    public static final AddressLayout stats_in$layout() {
        return stats_in$LAYOUT;
    }

    private static final long stats_in$OFFSET = 504;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * char *stats_in
     * }
     */
    public static final long stats_in$offset() {
        return stats_in$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * char *stats_in
     * }
     */
    public static MemorySegment stats_in(MemorySegment struct) {
        return struct.get(stats_in$LAYOUT, stats_in$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * char *stats_in
     * }
     */
    public static void stats_in(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(stats_in$LAYOUT, stats_in$OFFSET, fieldValue);
    }

    private static final OfInt workaround_bugs$LAYOUT = (OfInt)$LAYOUT.select(groupElement("workaround_bugs"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int workaround_bugs
     * }
     */
    public static final OfInt workaround_bugs$layout() {
        return workaround_bugs$LAYOUT;
    }

    private static final long workaround_bugs$OFFSET = 512;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int workaround_bugs
     * }
     */
    public static final long workaround_bugs$offset() {
        return workaround_bugs$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int workaround_bugs
     * }
     */
    public static int workaround_bugs(MemorySegment struct) {
        return struct.get(workaround_bugs$LAYOUT, workaround_bugs$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int workaround_bugs
     * }
     */
    public static void workaround_bugs(MemorySegment struct, int fieldValue) {
        struct.set(workaround_bugs$LAYOUT, workaround_bugs$OFFSET, fieldValue);
    }

    private static final OfInt strict_std_compliance$LAYOUT = (OfInt)$LAYOUT.select(groupElement("strict_std_compliance"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int strict_std_compliance
     * }
     */
    public static final OfInt strict_std_compliance$layout() {
        return strict_std_compliance$LAYOUT;
    }

    private static final long strict_std_compliance$OFFSET = 516;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int strict_std_compliance
     * }
     */
    public static final long strict_std_compliance$offset() {
        return strict_std_compliance$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int strict_std_compliance
     * }
     */
    public static int strict_std_compliance(MemorySegment struct) {
        return struct.get(strict_std_compliance$LAYOUT, strict_std_compliance$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int strict_std_compliance
     * }
     */
    public static void strict_std_compliance(MemorySegment struct, int fieldValue) {
        struct.set(strict_std_compliance$LAYOUT, strict_std_compliance$OFFSET, fieldValue);
    }

    private static final OfInt error_concealment$LAYOUT = (OfInt)$LAYOUT.select(groupElement("error_concealment"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int error_concealment
     * }
     */
    public static final OfInt error_concealment$layout() {
        return error_concealment$LAYOUT;
    }

    private static final long error_concealment$OFFSET = 520;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int error_concealment
     * }
     */
    public static final long error_concealment$offset() {
        return error_concealment$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int error_concealment
     * }
     */
    public static int error_concealment(MemorySegment struct) {
        return struct.get(error_concealment$LAYOUT, error_concealment$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int error_concealment
     * }
     */
    public static void error_concealment(MemorySegment struct, int fieldValue) {
        struct.set(error_concealment$LAYOUT, error_concealment$OFFSET, fieldValue);
    }

    private static final OfInt debug$LAYOUT = (OfInt)$LAYOUT.select(groupElement("debug"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int debug
     * }
     */
    public static final OfInt debug$layout() {
        return debug$LAYOUT;
    }

    private static final long debug$OFFSET = 524;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int debug
     * }
     */
    public static final long debug$offset() {
        return debug$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int debug
     * }
     */
    public static int debug(MemorySegment struct) {
        return struct.get(debug$LAYOUT, debug$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int debug
     * }
     */
    public static void debug(MemorySegment struct, int fieldValue) {
        struct.set(debug$LAYOUT, debug$OFFSET, fieldValue);
    }

    private static final OfInt err_recognition$LAYOUT = (OfInt)$LAYOUT.select(groupElement("err_recognition"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int err_recognition
     * }
     */
    public static final OfInt err_recognition$layout() {
        return err_recognition$LAYOUT;
    }

    private static final long err_recognition$OFFSET = 528;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int err_recognition
     * }
     */
    public static final long err_recognition$offset() {
        return err_recognition$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int err_recognition
     * }
     */
    public static int err_recognition(MemorySegment struct) {
        return struct.get(err_recognition$LAYOUT, err_recognition$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int err_recognition
     * }
     */
    public static void err_recognition(MemorySegment struct, int fieldValue) {
        struct.set(err_recognition$LAYOUT, err_recognition$OFFSET, fieldValue);
    }

    private static final AddressLayout hwaccel$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("hwaccel"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * struct AVHWAccel *hwaccel
     * }
     */
    public static final AddressLayout hwaccel$layout() {
        return hwaccel$LAYOUT;
    }

    private static final long hwaccel$OFFSET = 536;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * struct AVHWAccel *hwaccel
     * }
     */
    public static final long hwaccel$offset() {
        return hwaccel$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * struct AVHWAccel *hwaccel
     * }
     */
    public static MemorySegment hwaccel(MemorySegment struct) {
        return struct.get(hwaccel$LAYOUT, hwaccel$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * struct AVHWAccel *hwaccel
     * }
     */
    public static void hwaccel(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(hwaccel$LAYOUT, hwaccel$OFFSET, fieldValue);
    }

    private static final AddressLayout hwaccel_context$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("hwaccel_context"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * void *hwaccel_context
     * }
     */
    public static final AddressLayout hwaccel_context$layout() {
        return hwaccel_context$LAYOUT;
    }

    private static final long hwaccel_context$OFFSET = 544;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * void *hwaccel_context
     * }
     */
    public static final long hwaccel_context$offset() {
        return hwaccel_context$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * void *hwaccel_context
     * }
     */
    public static MemorySegment hwaccel_context(MemorySegment struct) {
        return struct.get(hwaccel_context$LAYOUT, hwaccel_context$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * void *hwaccel_context
     * }
     */
    public static void hwaccel_context(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(hwaccel_context$LAYOUT, hwaccel_context$OFFSET, fieldValue);
    }

    private static final AddressLayout hw_frames_ctx$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("hw_frames_ctx"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * AVBufferRef *hw_frames_ctx
     * }
     */
    public static final AddressLayout hw_frames_ctx$layout() {
        return hw_frames_ctx$LAYOUT;
    }

    private static final long hw_frames_ctx$OFFSET = 552;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * AVBufferRef *hw_frames_ctx
     * }
     */
    public static final long hw_frames_ctx$offset() {
        return hw_frames_ctx$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * AVBufferRef *hw_frames_ctx
     * }
     */
    public static MemorySegment hw_frames_ctx(MemorySegment struct) {
        return struct.get(hw_frames_ctx$LAYOUT, hw_frames_ctx$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * AVBufferRef *hw_frames_ctx
     * }
     */
    public static void hw_frames_ctx(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(hw_frames_ctx$LAYOUT, hw_frames_ctx$OFFSET, fieldValue);
    }

    private static final AddressLayout hw_device_ctx$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("hw_device_ctx"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * AVBufferRef *hw_device_ctx
     * }
     */
    public static final AddressLayout hw_device_ctx$layout() {
        return hw_device_ctx$LAYOUT;
    }

    private static final long hw_device_ctx$OFFSET = 560;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * AVBufferRef *hw_device_ctx
     * }
     */
    public static final long hw_device_ctx$offset() {
        return hw_device_ctx$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * AVBufferRef *hw_device_ctx
     * }
     */
    public static MemorySegment hw_device_ctx(MemorySegment struct) {
        return struct.get(hw_device_ctx$LAYOUT, hw_device_ctx$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * AVBufferRef *hw_device_ctx
     * }
     */
    public static void hw_device_ctx(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(hw_device_ctx$LAYOUT, hw_device_ctx$OFFSET, fieldValue);
    }

    private static final OfInt hwaccel_flags$LAYOUT = (OfInt)$LAYOUT.select(groupElement("hwaccel_flags"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int hwaccel_flags
     * }
     */
    public static final OfInt hwaccel_flags$layout() {
        return hwaccel_flags$LAYOUT;
    }

    private static final long hwaccel_flags$OFFSET = 568;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int hwaccel_flags
     * }
     */
    public static final long hwaccel_flags$offset() {
        return hwaccel_flags$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int hwaccel_flags
     * }
     */
    public static int hwaccel_flags(MemorySegment struct) {
        return struct.get(hwaccel_flags$LAYOUT, hwaccel_flags$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int hwaccel_flags
     * }
     */
    public static void hwaccel_flags(MemorySegment struct, int fieldValue) {
        struct.set(hwaccel_flags$LAYOUT, hwaccel_flags$OFFSET, fieldValue);
    }

    private static final OfInt extra_hw_frames$LAYOUT = (OfInt)$LAYOUT.select(groupElement("extra_hw_frames"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int extra_hw_frames
     * }
     */
    public static final OfInt extra_hw_frames$layout() {
        return extra_hw_frames$LAYOUT;
    }

    private static final long extra_hw_frames$OFFSET = 572;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int extra_hw_frames
     * }
     */
    public static final long extra_hw_frames$offset() {
        return extra_hw_frames$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int extra_hw_frames
     * }
     */
    public static int extra_hw_frames(MemorySegment struct) {
        return struct.get(extra_hw_frames$LAYOUT, extra_hw_frames$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int extra_hw_frames
     * }
     */
    public static void extra_hw_frames(MemorySegment struct, int fieldValue) {
        struct.set(extra_hw_frames$LAYOUT, extra_hw_frames$OFFSET, fieldValue);
    }

    private static final SequenceLayout error$LAYOUT = (SequenceLayout)$LAYOUT.select(groupElement("error"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * uint64_t error[8]
     * }
     */
    public static final SequenceLayout error$layout() {
        return error$LAYOUT;
    }

    private static final long error$OFFSET = 576;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * uint64_t error[8]
     * }
     */
    public static final long error$offset() {
        return error$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * uint64_t error[8]
     * }
     */
    public static MemorySegment error(MemorySegment struct) {
        return struct.asSlice(error$OFFSET, error$LAYOUT.byteSize());
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * uint64_t error[8]
     * }
     */
    public static void error(MemorySegment struct, MemorySegment fieldValue) {
        MemorySegment.copy(fieldValue, 0L, struct, error$OFFSET, error$LAYOUT.byteSize());
    }

    private static long[] error$DIMS = { 8 };

    /**
     * Dimensions for array field:
     * {@snippet lang=c :
     * uint64_t error[8]
     * }
     */
    public static long[] error$dimensions() {
        return error$DIMS;
    }
    private static final VarHandle error$ELEM_HANDLE = error$LAYOUT.varHandle(sequenceElement());

    /**
     * Indexed getter for field:
     * {@snippet lang=c :
     * uint64_t error[8]
     * }
     */
    public static long error(MemorySegment struct, long index0) {
        return (long)error$ELEM_HANDLE.get(struct, 0L, index0);
    }

    /**
     * Indexed setter for field:
     * {@snippet lang=c :
     * uint64_t error[8]
     * }
     */
    public static void error(MemorySegment struct, long index0, long fieldValue) {
        error$ELEM_HANDLE.set(struct, 0L, index0, fieldValue);
    }

    private static final OfInt dct_algo$LAYOUT = (OfInt)$LAYOUT.select(groupElement("dct_algo"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int dct_algo
     * }
     */
    public static final OfInt dct_algo$layout() {
        return dct_algo$LAYOUT;
    }

    private static final long dct_algo$OFFSET = 640;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int dct_algo
     * }
     */
    public static final long dct_algo$offset() {
        return dct_algo$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int dct_algo
     * }
     */
    public static int dct_algo(MemorySegment struct) {
        return struct.get(dct_algo$LAYOUT, dct_algo$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int dct_algo
     * }
     */
    public static void dct_algo(MemorySegment struct, int fieldValue) {
        struct.set(dct_algo$LAYOUT, dct_algo$OFFSET, fieldValue);
    }

    private static final OfInt idct_algo$LAYOUT = (OfInt)$LAYOUT.select(groupElement("idct_algo"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int idct_algo
     * }
     */
    public static final OfInt idct_algo$layout() {
        return idct_algo$LAYOUT;
    }

    private static final long idct_algo$OFFSET = 644;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int idct_algo
     * }
     */
    public static final long idct_algo$offset() {
        return idct_algo$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int idct_algo
     * }
     */
    public static int idct_algo(MemorySegment struct) {
        return struct.get(idct_algo$LAYOUT, idct_algo$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int idct_algo
     * }
     */
    public static void idct_algo(MemorySegment struct, int fieldValue) {
        struct.set(idct_algo$LAYOUT, idct_algo$OFFSET, fieldValue);
    }

    private static final OfInt bits_per_coded_sample$LAYOUT = (OfInt)$LAYOUT.select(groupElement("bits_per_coded_sample"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int bits_per_coded_sample
     * }
     */
    public static final OfInt bits_per_coded_sample$layout() {
        return bits_per_coded_sample$LAYOUT;
    }

    private static final long bits_per_coded_sample$OFFSET = 648;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int bits_per_coded_sample
     * }
     */
    public static final long bits_per_coded_sample$offset() {
        return bits_per_coded_sample$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int bits_per_coded_sample
     * }
     */
    public static int bits_per_coded_sample(MemorySegment struct) {
        return struct.get(bits_per_coded_sample$LAYOUT, bits_per_coded_sample$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int bits_per_coded_sample
     * }
     */
    public static void bits_per_coded_sample(MemorySegment struct, int fieldValue) {
        struct.set(bits_per_coded_sample$LAYOUT, bits_per_coded_sample$OFFSET, fieldValue);
    }

    private static final OfInt bits_per_raw_sample$LAYOUT = (OfInt)$LAYOUT.select(groupElement("bits_per_raw_sample"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int bits_per_raw_sample
     * }
     */
    public static final OfInt bits_per_raw_sample$layout() {
        return bits_per_raw_sample$LAYOUT;
    }

    private static final long bits_per_raw_sample$OFFSET = 652;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int bits_per_raw_sample
     * }
     */
    public static final long bits_per_raw_sample$offset() {
        return bits_per_raw_sample$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int bits_per_raw_sample
     * }
     */
    public static int bits_per_raw_sample(MemorySegment struct) {
        return struct.get(bits_per_raw_sample$LAYOUT, bits_per_raw_sample$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int bits_per_raw_sample
     * }
     */
    public static void bits_per_raw_sample(MemorySegment struct, int fieldValue) {
        struct.set(bits_per_raw_sample$LAYOUT, bits_per_raw_sample$OFFSET, fieldValue);
    }

    private static final OfInt thread_count$LAYOUT = (OfInt)$LAYOUT.select(groupElement("thread_count"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int thread_count
     * }
     */
    public static final OfInt thread_count$layout() {
        return thread_count$LAYOUT;
    }

    private static final long thread_count$OFFSET = 656;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int thread_count
     * }
     */
    public static final long thread_count$offset() {
        return thread_count$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int thread_count
     * }
     */
    public static int thread_count(MemorySegment struct) {
        return struct.get(thread_count$LAYOUT, thread_count$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int thread_count
     * }
     */
    public static void thread_count(MemorySegment struct, int fieldValue) {
        struct.set(thread_count$LAYOUT, thread_count$OFFSET, fieldValue);
    }

    private static final OfInt thread_type$LAYOUT = (OfInt)$LAYOUT.select(groupElement("thread_type"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int thread_type
     * }
     */
    public static final OfInt thread_type$layout() {
        return thread_type$LAYOUT;
    }

    private static final long thread_type$OFFSET = 660;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int thread_type
     * }
     */
    public static final long thread_type$offset() {
        return thread_type$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int thread_type
     * }
     */
    public static int thread_type(MemorySegment struct) {
        return struct.get(thread_type$LAYOUT, thread_type$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int thread_type
     * }
     */
    public static void thread_type(MemorySegment struct, int fieldValue) {
        struct.set(thread_type$LAYOUT, thread_type$OFFSET, fieldValue);
    }

    private static final OfInt active_thread_type$LAYOUT = (OfInt)$LAYOUT.select(groupElement("active_thread_type"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int active_thread_type
     * }
     */
    public static final OfInt active_thread_type$layout() {
        return active_thread_type$LAYOUT;
    }

    private static final long active_thread_type$OFFSET = 664;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int active_thread_type
     * }
     */
    public static final long active_thread_type$offset() {
        return active_thread_type$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int active_thread_type
     * }
     */
    public static int active_thread_type(MemorySegment struct) {
        return struct.get(active_thread_type$LAYOUT, active_thread_type$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int active_thread_type
     * }
     */
    public static void active_thread_type(MemorySegment struct, int fieldValue) {
        struct.set(active_thread_type$LAYOUT, active_thread_type$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * int (*execute)(struct AVCodecContext *, int (*)(struct AVCodecContext *, void *), void *, int *, int, int)
     * }
     */
    public static class execute {

        execute() {
            // Should not be called directly
        }

        /**
         * The function pointer signature, expressed as a functional interface
         */
        public interface Function {
            int apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, MemorySegment _x3, int _x4, int _x5);
        }

        private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
            Libffmpeg.C_INT,
            Libffmpeg.C_POINTER,
            Libffmpeg.C_POINTER,
            Libffmpeg.C_POINTER,
            Libffmpeg.C_POINTER,
            Libffmpeg.C_INT,
            Libffmpeg.C_INT
        );

        /**
         * The descriptor of this function pointer
         */
        public static FunctionDescriptor descriptor() {
            return $DESC;
        }

        private static final MethodHandle UP$MH = Libffmpeg.upcallHandle(execute.Function.class, "apply", $DESC);

        /**
         * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
         * The lifetime of the returned segment is managed by {@code arena}
         */
        public static MemorySegment allocate(execute.Function fi, Arena arena) {
            return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
        }

        private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);

        /**
         * Invoke the upcall stub {@code funcPtr}, with given parameters
         */
        public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, MemorySegment _x3, int _x4, int _x5) {
            try {
                return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3, _x4, _x5);
            } catch (Throwable ex$) {
                throw new AssertionError("should not reach here", ex$);
            }
        }
    }

    private static final AddressLayout execute$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("execute"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int (*execute)(struct AVCodecContext *, int (*)(struct AVCodecContext *, void *), void *, int *, int, int)
     * }
     */
    public static final AddressLayout execute$layout() {
        return execute$LAYOUT;
    }

    private static final long execute$OFFSET = 672;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int (*execute)(struct AVCodecContext *, int (*)(struct AVCodecContext *, void *), void *, int *, int, int)
     * }
     */
    public static final long execute$offset() {
        return execute$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int (*execute)(struct AVCodecContext *, int (*)(struct AVCodecContext *, void *), void *, int *, int, int)
     * }
     */
    public static MemorySegment execute(MemorySegment struct) {
        return struct.get(execute$LAYOUT, execute$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int (*execute)(struct AVCodecContext *, int (*)(struct AVCodecContext *, void *), void *, int *, int, int)
     * }
     */
    public static void execute(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(execute$LAYOUT, execute$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * int (*execute2)(struct AVCodecContext *, int (*)(struct AVCodecContext *, void *, int, int), void *, int *, int)
     * }
     */
    public static class execute2 {

        execute2() {
            // Should not be called directly
        }

        /**
         * The function pointer signature, expressed as a functional interface
         */
        public interface Function {
            int apply(MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, MemorySegment _x3, int _x4);
        }

        private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
            Libffmpeg.C_INT,
            Libffmpeg.C_POINTER,
            Libffmpeg.C_POINTER,
            Libffmpeg.C_POINTER,
            Libffmpeg.C_POINTER,
            Libffmpeg.C_INT
        );

        /**
         * The descriptor of this function pointer
         */
        public static FunctionDescriptor descriptor() {
            return $DESC;
        }

        private static final MethodHandle UP$MH = Libffmpeg.upcallHandle(execute2.Function.class, "apply", $DESC);

        /**
         * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
         * The lifetime of the returned segment is managed by {@code arena}
         */
        public static MemorySegment allocate(execute2.Function fi, Arena arena) {
            return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
        }

        private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);

        /**
         * Invoke the upcall stub {@code funcPtr}, with given parameters
         */
        public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, MemorySegment _x2, MemorySegment _x3, int _x4) {
            try {
                return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2, _x3, _x4);
            } catch (Throwable ex$) {
                throw new AssertionError("should not reach here", ex$);
            }
        }
    }

    private static final AddressLayout execute2$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("execute2"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int (*execute2)(struct AVCodecContext *, int (*)(struct AVCodecContext *, void *, int, int), void *, int *, int)
     * }
     */
    public static final AddressLayout execute2$layout() {
        return execute2$LAYOUT;
    }

    private static final long execute2$OFFSET = 680;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int (*execute2)(struct AVCodecContext *, int (*)(struct AVCodecContext *, void *, int, int), void *, int *, int)
     * }
     */
    public static final long execute2$offset() {
        return execute2$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int (*execute2)(struct AVCodecContext *, int (*)(struct AVCodecContext *, void *, int, int), void *, int *, int)
     * }
     */
    public static MemorySegment execute2(MemorySegment struct) {
        return struct.get(execute2$LAYOUT, execute2$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int (*execute2)(struct AVCodecContext *, int (*)(struct AVCodecContext *, void *, int, int), void *, int *, int)
     * }
     */
    public static void execute2(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(execute2$LAYOUT, execute2$OFFSET, fieldValue);
    }

    private static final OfInt profile$LAYOUT = (OfInt)$LAYOUT.select(groupElement("profile"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int profile
     * }
     */
    public static final OfInt profile$layout() {
        return profile$LAYOUT;
    }

    private static final long profile$OFFSET = 688;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int profile
     * }
     */
    public static final long profile$offset() {
        return profile$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int profile
     * }
     */
    public static int profile(MemorySegment struct) {
        return struct.get(profile$LAYOUT, profile$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int profile
     * }
     */
    public static void profile(MemorySegment struct, int fieldValue) {
        struct.set(profile$LAYOUT, profile$OFFSET, fieldValue);
    }

    private static final OfInt level$LAYOUT = (OfInt)$LAYOUT.select(groupElement("level"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int level
     * }
     */
    public static final OfInt level$layout() {
        return level$LAYOUT;
    }

    private static final long level$OFFSET = 692;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int level
     * }
     */
    public static final long level$offset() {
        return level$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int level
     * }
     */
    public static int level(MemorySegment struct) {
        return struct.get(level$LAYOUT, level$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int level
     * }
     */
    public static void level(MemorySegment struct, int fieldValue) {
        struct.set(level$LAYOUT, level$OFFSET, fieldValue);
    }

    private static final OfInt properties$LAYOUT = (OfInt)$LAYOUT.select(groupElement("properties"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * unsigned int properties
     * }
     */
    public static final OfInt properties$layout() {
        return properties$LAYOUT;
    }

    private static final long properties$OFFSET = 696;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * unsigned int properties
     * }
     */
    public static final long properties$offset() {
        return properties$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * unsigned int properties
     * }
     */
    public static int properties(MemorySegment struct) {
        return struct.get(properties$LAYOUT, properties$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * unsigned int properties
     * }
     */
    public static void properties(MemorySegment struct, int fieldValue) {
        struct.set(properties$LAYOUT, properties$OFFSET, fieldValue);
    }

    private static final OfInt skip_loop_filter$LAYOUT = (OfInt)$LAYOUT.select(groupElement("skip_loop_filter"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * enum AVDiscard skip_loop_filter
     * }
     */
    public static final OfInt skip_loop_filter$layout() {
        return skip_loop_filter$LAYOUT;
    }

    private static final long skip_loop_filter$OFFSET = 700;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * enum AVDiscard skip_loop_filter
     * }
     */
    public static final long skip_loop_filter$offset() {
        return skip_loop_filter$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * enum AVDiscard skip_loop_filter
     * }
     */
    public static int skip_loop_filter(MemorySegment struct) {
        return struct.get(skip_loop_filter$LAYOUT, skip_loop_filter$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * enum AVDiscard skip_loop_filter
     * }
     */
    public static void skip_loop_filter(MemorySegment struct, int fieldValue) {
        struct.set(skip_loop_filter$LAYOUT, skip_loop_filter$OFFSET, fieldValue);
    }

    private static final OfInt skip_idct$LAYOUT = (OfInt)$LAYOUT.select(groupElement("skip_idct"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * enum AVDiscard skip_idct
     * }
     */
    public static final OfInt skip_idct$layout() {
        return skip_idct$LAYOUT;
    }

    private static final long skip_idct$OFFSET = 704;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * enum AVDiscard skip_idct
     * }
     */
    public static final long skip_idct$offset() {
        return skip_idct$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * enum AVDiscard skip_idct
     * }
     */
    public static int skip_idct(MemorySegment struct) {
        return struct.get(skip_idct$LAYOUT, skip_idct$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * enum AVDiscard skip_idct
     * }
     */
    public static void skip_idct(MemorySegment struct, int fieldValue) {
        struct.set(skip_idct$LAYOUT, skip_idct$OFFSET, fieldValue);
    }

    private static final OfInt skip_frame$LAYOUT = (OfInt)$LAYOUT.select(groupElement("skip_frame"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * enum AVDiscard skip_frame
     * }
     */
    public static final OfInt skip_frame$layout() {
        return skip_frame$LAYOUT;
    }

    private static final long skip_frame$OFFSET = 708;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * enum AVDiscard skip_frame
     * }
     */
    public static final long skip_frame$offset() {
        return skip_frame$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * enum AVDiscard skip_frame
     * }
     */
    public static int skip_frame(MemorySegment struct) {
        return struct.get(skip_frame$LAYOUT, skip_frame$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * enum AVDiscard skip_frame
     * }
     */
    public static void skip_frame(MemorySegment struct, int fieldValue) {
        struct.set(skip_frame$LAYOUT, skip_frame$OFFSET, fieldValue);
    }

    private static final OfInt skip_alpha$LAYOUT = (OfInt)$LAYOUT.select(groupElement("skip_alpha"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int skip_alpha
     * }
     */
    public static final OfInt skip_alpha$layout() {
        return skip_alpha$LAYOUT;
    }

    private static final long skip_alpha$OFFSET = 712;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int skip_alpha
     * }
     */
    public static final long skip_alpha$offset() {
        return skip_alpha$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int skip_alpha
     * }
     */
    public static int skip_alpha(MemorySegment struct) {
        return struct.get(skip_alpha$LAYOUT, skip_alpha$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int skip_alpha
     * }
     */
    public static void skip_alpha(MemorySegment struct, int fieldValue) {
        struct.set(skip_alpha$LAYOUT, skip_alpha$OFFSET, fieldValue);
    }

    private static final OfInt skip_top$LAYOUT = (OfInt)$LAYOUT.select(groupElement("skip_top"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int skip_top
     * }
     */
    public static final OfInt skip_top$layout() {
        return skip_top$LAYOUT;
    }

    private static final long skip_top$OFFSET = 716;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int skip_top
     * }
     */
    public static final long skip_top$offset() {
        return skip_top$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int skip_top
     * }
     */
    public static int skip_top(MemorySegment struct) {
        return struct.get(skip_top$LAYOUT, skip_top$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int skip_top
     * }
     */
    public static void skip_top(MemorySegment struct, int fieldValue) {
        struct.set(skip_top$LAYOUT, skip_top$OFFSET, fieldValue);
    }

    private static final OfInt skip_bottom$LAYOUT = (OfInt)$LAYOUT.select(groupElement("skip_bottom"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int skip_bottom
     * }
     */
    public static final OfInt skip_bottom$layout() {
        return skip_bottom$LAYOUT;
    }

    private static final long skip_bottom$OFFSET = 720;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int skip_bottom
     * }
     */
    public static final long skip_bottom$offset() {
        return skip_bottom$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int skip_bottom
     * }
     */
    public static int skip_bottom(MemorySegment struct) {
        return struct.get(skip_bottom$LAYOUT, skip_bottom$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int skip_bottom
     * }
     */
    public static void skip_bottom(MemorySegment struct, int fieldValue) {
        struct.set(skip_bottom$LAYOUT, skip_bottom$OFFSET, fieldValue);
    }

    private static final OfInt lowres$LAYOUT = (OfInt)$LAYOUT.select(groupElement("lowres"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int lowres
     * }
     */
    public static final OfInt lowres$layout() {
        return lowres$LAYOUT;
    }

    private static final long lowres$OFFSET = 724;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int lowres
     * }
     */
    public static final long lowres$offset() {
        return lowres$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int lowres
     * }
     */
    public static int lowres(MemorySegment struct) {
        return struct.get(lowres$LAYOUT, lowres$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int lowres
     * }
     */
    public static void lowres(MemorySegment struct, int fieldValue) {
        struct.set(lowres$LAYOUT, lowres$OFFSET, fieldValue);
    }

    private static final AddressLayout codec_descriptor$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("codec_descriptor"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * struct AVCodecDescriptor *codec_descriptor
     * }
     */
    public static final AddressLayout codec_descriptor$layout() {
        return codec_descriptor$LAYOUT;
    }

    private static final long codec_descriptor$OFFSET = 728;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * struct AVCodecDescriptor *codec_descriptor
     * }
     */
    public static final long codec_descriptor$offset() {
        return codec_descriptor$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * struct AVCodecDescriptor *codec_descriptor
     * }
     */
    public static MemorySegment codec_descriptor(MemorySegment struct) {
        return struct.get(codec_descriptor$LAYOUT, codec_descriptor$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * struct AVCodecDescriptor *codec_descriptor
     * }
     */
    public static void codec_descriptor(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(codec_descriptor$LAYOUT, codec_descriptor$OFFSET, fieldValue);
    }

    private static final AddressLayout sub_charenc$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("sub_charenc"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * char *sub_charenc
     * }
     */
    public static final AddressLayout sub_charenc$layout() {
        return sub_charenc$LAYOUT;
    }

    private static final long sub_charenc$OFFSET = 736;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * char *sub_charenc
     * }
     */
    public static final long sub_charenc$offset() {
        return sub_charenc$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * char *sub_charenc
     * }
     */
    public static MemorySegment sub_charenc(MemorySegment struct) {
        return struct.get(sub_charenc$LAYOUT, sub_charenc$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * char *sub_charenc
     * }
     */
    public static void sub_charenc(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(sub_charenc$LAYOUT, sub_charenc$OFFSET, fieldValue);
    }

    private static final OfInt sub_charenc_mode$LAYOUT = (OfInt)$LAYOUT.select(groupElement("sub_charenc_mode"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int sub_charenc_mode
     * }
     */
    public static final OfInt sub_charenc_mode$layout() {
        return sub_charenc_mode$LAYOUT;
    }

    private static final long sub_charenc_mode$OFFSET = 744;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int sub_charenc_mode
     * }
     */
    public static final long sub_charenc_mode$offset() {
        return sub_charenc_mode$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int sub_charenc_mode
     * }
     */
    public static int sub_charenc_mode(MemorySegment struct) {
        return struct.get(sub_charenc_mode$LAYOUT, sub_charenc_mode$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int sub_charenc_mode
     * }
     */
    public static void sub_charenc_mode(MemorySegment struct, int fieldValue) {
        struct.set(sub_charenc_mode$LAYOUT, sub_charenc_mode$OFFSET, fieldValue);
    }

    private static final OfInt subtitle_header_size$LAYOUT = (OfInt)$LAYOUT.select(groupElement("subtitle_header_size"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int subtitle_header_size
     * }
     */
    public static final OfInt subtitle_header_size$layout() {
        return subtitle_header_size$LAYOUT;
    }

    private static final long subtitle_header_size$OFFSET = 748;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int subtitle_header_size
     * }
     */
    public static final long subtitle_header_size$offset() {
        return subtitle_header_size$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int subtitle_header_size
     * }
     */
    public static int subtitle_header_size(MemorySegment struct) {
        return struct.get(subtitle_header_size$LAYOUT, subtitle_header_size$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int subtitle_header_size
     * }
     */
    public static void subtitle_header_size(MemorySegment struct, int fieldValue) {
        struct.set(subtitle_header_size$LAYOUT, subtitle_header_size$OFFSET, fieldValue);
    }

    private static final AddressLayout subtitle_header$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("subtitle_header"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * uint8_t *subtitle_header
     * }
     */
    public static final AddressLayout subtitle_header$layout() {
        return subtitle_header$LAYOUT;
    }

    private static final long subtitle_header$OFFSET = 752;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * uint8_t *subtitle_header
     * }
     */
    public static final long subtitle_header$offset() {
        return subtitle_header$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * uint8_t *subtitle_header
     * }
     */
    public static MemorySegment subtitle_header(MemorySegment struct) {
        return struct.get(subtitle_header$LAYOUT, subtitle_header$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * uint8_t *subtitle_header
     * }
     */
    public static void subtitle_header(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(subtitle_header$LAYOUT, subtitle_header$OFFSET, fieldValue);
    }

    private static final AddressLayout dump_separator$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("dump_separator"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * uint8_t *dump_separator
     * }
     */
    public static final AddressLayout dump_separator$layout() {
        return dump_separator$LAYOUT;
    }

    private static final long dump_separator$OFFSET = 760;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * uint8_t *dump_separator
     * }
     */
    public static final long dump_separator$offset() {
        return dump_separator$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * uint8_t *dump_separator
     * }
     */
    public static MemorySegment dump_separator(MemorySegment struct) {
        return struct.get(dump_separator$LAYOUT, dump_separator$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * uint8_t *dump_separator
     * }
     */
    public static void dump_separator(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(dump_separator$LAYOUT, dump_separator$OFFSET, fieldValue);
    }

    private static final AddressLayout codec_whitelist$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("codec_whitelist"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * char *codec_whitelist
     * }
     */
    public static final AddressLayout codec_whitelist$layout() {
        return codec_whitelist$LAYOUT;
    }

    private static final long codec_whitelist$OFFSET = 768;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * char *codec_whitelist
     * }
     */
    public static final long codec_whitelist$offset() {
        return codec_whitelist$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * char *codec_whitelist
     * }
     */
    public static MemorySegment codec_whitelist(MemorySegment struct) {
        return struct.get(codec_whitelist$LAYOUT, codec_whitelist$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * char *codec_whitelist
     * }
     */
    public static void codec_whitelist(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(codec_whitelist$LAYOUT, codec_whitelist$OFFSET, fieldValue);
    }

    private static final AddressLayout coded_side_data$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("coded_side_data"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * AVPacketSideData *coded_side_data
     * }
     */
    public static final AddressLayout coded_side_data$layout() {
        return coded_side_data$LAYOUT;
    }

    private static final long coded_side_data$OFFSET = 776;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * AVPacketSideData *coded_side_data
     * }
     */
    public static final long coded_side_data$offset() {
        return coded_side_data$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * AVPacketSideData *coded_side_data
     * }
     */
    public static MemorySegment coded_side_data(MemorySegment struct) {
        return struct.get(coded_side_data$LAYOUT, coded_side_data$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * AVPacketSideData *coded_side_data
     * }
     */
    public static void coded_side_data(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(coded_side_data$LAYOUT, coded_side_data$OFFSET, fieldValue);
    }

    private static final OfInt nb_coded_side_data$LAYOUT = (OfInt)$LAYOUT.select(groupElement("nb_coded_side_data"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int nb_coded_side_data
     * }
     */
    public static final OfInt nb_coded_side_data$layout() {
        return nb_coded_side_data$LAYOUT;
    }

    private static final long nb_coded_side_data$OFFSET = 784;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int nb_coded_side_data
     * }
     */
    public static final long nb_coded_side_data$offset() {
        return nb_coded_side_data$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int nb_coded_side_data
     * }
     */
    public static int nb_coded_side_data(MemorySegment struct) {
        return struct.get(nb_coded_side_data$LAYOUT, nb_coded_side_data$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int nb_coded_side_data
     * }
     */
    public static void nb_coded_side_data(MemorySegment struct, int fieldValue) {
        struct.set(nb_coded_side_data$LAYOUT, nb_coded_side_data$OFFSET, fieldValue);
    }

    private static final OfInt export_side_data$LAYOUT = (OfInt)$LAYOUT.select(groupElement("export_side_data"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int export_side_data
     * }
     */
    public static final OfInt export_side_data$layout() {
        return export_side_data$LAYOUT;
    }

    private static final long export_side_data$OFFSET = 788;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int export_side_data
     * }
     */
    public static final long export_side_data$offset() {
        return export_side_data$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int export_side_data
     * }
     */
    public static int export_side_data(MemorySegment struct) {
        return struct.get(export_side_data$LAYOUT, export_side_data$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int export_side_data
     * }
     */
    public static void export_side_data(MemorySegment struct, int fieldValue) {
        struct.set(export_side_data$LAYOUT, export_side_data$OFFSET, fieldValue);
    }

    private static final OfLong max_pixels$LAYOUT = (OfLong)$LAYOUT.select(groupElement("max_pixels"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int64_t max_pixels
     * }
     */
    public static final OfLong max_pixels$layout() {
        return max_pixels$LAYOUT;
    }

    private static final long max_pixels$OFFSET = 792;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int64_t max_pixels
     * }
     */
    public static final long max_pixels$offset() {
        return max_pixels$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int64_t max_pixels
     * }
     */
    public static long max_pixels(MemorySegment struct) {
        return struct.get(max_pixels$LAYOUT, max_pixels$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int64_t max_pixels
     * }
     */
    public static void max_pixels(MemorySegment struct, long fieldValue) {
        struct.set(max_pixels$LAYOUT, max_pixels$OFFSET, fieldValue);
    }

    private static final OfInt apply_cropping$LAYOUT = (OfInt)$LAYOUT.select(groupElement("apply_cropping"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int apply_cropping
     * }
     */
    public static final OfInt apply_cropping$layout() {
        return apply_cropping$LAYOUT;
    }

    private static final long apply_cropping$OFFSET = 800;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int apply_cropping
     * }
     */
    public static final long apply_cropping$offset() {
        return apply_cropping$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int apply_cropping
     * }
     */
    public static int apply_cropping(MemorySegment struct) {
        return struct.get(apply_cropping$LAYOUT, apply_cropping$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int apply_cropping
     * }
     */
    public static void apply_cropping(MemorySegment struct, int fieldValue) {
        struct.set(apply_cropping$LAYOUT, apply_cropping$OFFSET, fieldValue);
    }

    private static final OfInt discard_damaged_percentage$LAYOUT = (OfInt)$LAYOUT.select(groupElement("discard_damaged_percentage"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int discard_damaged_percentage
     * }
     */
    public static final OfInt discard_damaged_percentage$layout() {
        return discard_damaged_percentage$LAYOUT;
    }

    private static final long discard_damaged_percentage$OFFSET = 804;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int discard_damaged_percentage
     * }
     */
    public static final long discard_damaged_percentage$offset() {
        return discard_damaged_percentage$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int discard_damaged_percentage
     * }
     */
    public static int discard_damaged_percentage(MemorySegment struct) {
        return struct.get(discard_damaged_percentage$LAYOUT, discard_damaged_percentage$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int discard_damaged_percentage
     * }
     */
    public static void discard_damaged_percentage(MemorySegment struct, int fieldValue) {
        struct.set(discard_damaged_percentage$LAYOUT, discard_damaged_percentage$OFFSET, fieldValue);
    }

    private static final OfLong max_samples$LAYOUT = (OfLong)$LAYOUT.select(groupElement("max_samples"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int64_t max_samples
     * }
     */
    public static final OfLong max_samples$layout() {
        return max_samples$LAYOUT;
    }

    private static final long max_samples$OFFSET = 808;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int64_t max_samples
     * }
     */
    public static final long max_samples$offset() {
        return max_samples$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int64_t max_samples
     * }
     */
    public static long max_samples(MemorySegment struct) {
        return struct.get(max_samples$LAYOUT, max_samples$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int64_t max_samples
     * }
     */
    public static void max_samples(MemorySegment struct, long fieldValue) {
        struct.set(max_samples$LAYOUT, max_samples$OFFSET, fieldValue);
    }

    /**
     * {@snippet lang=c :
     * int (*get_encode_buffer)(struct AVCodecContext *, AVPacket *, int)
     * }
     */
    public static class get_encode_buffer {

        get_encode_buffer() {
            // Should not be called directly
        }

        /**
         * The function pointer signature, expressed as a functional interface
         */
        public interface Function {
            int apply(MemorySegment _x0, MemorySegment _x1, int _x2);
        }

        private static final FunctionDescriptor $DESC = FunctionDescriptor.of(
            Libffmpeg.C_INT,
            Libffmpeg.C_POINTER,
            Libffmpeg.C_POINTER,
            Libffmpeg.C_INT
        );

        /**
         * The descriptor of this function pointer
         */
        public static FunctionDescriptor descriptor() {
            return $DESC;
        }

        private static final MethodHandle UP$MH = Libffmpeg.upcallHandle(get_encode_buffer.Function.class, "apply", $DESC);

        /**
         * Allocates a new upcall stub, whose implementation is defined by {@code fi}.
         * The lifetime of the returned segment is managed by {@code arena}
         */
        public static MemorySegment allocate(get_encode_buffer.Function fi, Arena arena) {
            return Linker.nativeLinker().upcallStub(UP$MH.bindTo(fi), $DESC, arena);
        }

        private static final MethodHandle DOWN$MH = Linker.nativeLinker().downcallHandle($DESC);

        /**
         * Invoke the upcall stub {@code funcPtr}, with given parameters
         */
        public static int invoke(MemorySegment funcPtr,MemorySegment _x0, MemorySegment _x1, int _x2) {
            try {
                return (int) DOWN$MH.invokeExact(funcPtr, _x0, _x1, _x2);
            } catch (Throwable ex$) {
                throw new AssertionError("should not reach here", ex$);
            }
        }
    }

    private static final AddressLayout get_encode_buffer$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("get_encode_buffer"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int (*get_encode_buffer)(struct AVCodecContext *, AVPacket *, int)
     * }
     */
    public static final AddressLayout get_encode_buffer$layout() {
        return get_encode_buffer$LAYOUT;
    }

    private static final long get_encode_buffer$OFFSET = 816;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int (*get_encode_buffer)(struct AVCodecContext *, AVPacket *, int)
     * }
     */
    public static final long get_encode_buffer$offset() {
        return get_encode_buffer$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int (*get_encode_buffer)(struct AVCodecContext *, AVPacket *, int)
     * }
     */
    public static MemorySegment get_encode_buffer(MemorySegment struct) {
        return struct.get(get_encode_buffer$LAYOUT, get_encode_buffer$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int (*get_encode_buffer)(struct AVCodecContext *, AVPacket *, int)
     * }
     */
    public static void get_encode_buffer(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(get_encode_buffer$LAYOUT, get_encode_buffer$OFFSET, fieldValue);
    }

    private static final OfLong frame_num$LAYOUT = (OfLong)$LAYOUT.select(groupElement("frame_num"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int64_t frame_num
     * }
     */
    public static final OfLong frame_num$layout() {
        return frame_num$LAYOUT;
    }

    private static final long frame_num$OFFSET = 824;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int64_t frame_num
     * }
     */
    public static final long frame_num$offset() {
        return frame_num$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int64_t frame_num
     * }
     */
    public static long frame_num(MemorySegment struct) {
        return struct.get(frame_num$LAYOUT, frame_num$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int64_t frame_num
     * }
     */
    public static void frame_num(MemorySegment struct, long fieldValue) {
        struct.set(frame_num$LAYOUT, frame_num$OFFSET, fieldValue);
    }

    private static final AddressLayout side_data_prefer_packet$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("side_data_prefer_packet"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int *side_data_prefer_packet
     * }
     */
    public static final AddressLayout side_data_prefer_packet$layout() {
        return side_data_prefer_packet$LAYOUT;
    }

    private static final long side_data_prefer_packet$OFFSET = 832;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int *side_data_prefer_packet
     * }
     */
    public static final long side_data_prefer_packet$offset() {
        return side_data_prefer_packet$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int *side_data_prefer_packet
     * }
     */
    public static MemorySegment side_data_prefer_packet(MemorySegment struct) {
        return struct.get(side_data_prefer_packet$LAYOUT, side_data_prefer_packet$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int *side_data_prefer_packet
     * }
     */
    public static void side_data_prefer_packet(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(side_data_prefer_packet$LAYOUT, side_data_prefer_packet$OFFSET, fieldValue);
    }

    private static final OfInt nb_side_data_prefer_packet$LAYOUT = (OfInt)$LAYOUT.select(groupElement("nb_side_data_prefer_packet"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * unsigned int nb_side_data_prefer_packet
     * }
     */
    public static final OfInt nb_side_data_prefer_packet$layout() {
        return nb_side_data_prefer_packet$LAYOUT;
    }

    private static final long nb_side_data_prefer_packet$OFFSET = 840;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * unsigned int nb_side_data_prefer_packet
     * }
     */
    public static final long nb_side_data_prefer_packet$offset() {
        return nb_side_data_prefer_packet$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * unsigned int nb_side_data_prefer_packet
     * }
     */
    public static int nb_side_data_prefer_packet(MemorySegment struct) {
        return struct.get(nb_side_data_prefer_packet$LAYOUT, nb_side_data_prefer_packet$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * unsigned int nb_side_data_prefer_packet
     * }
     */
    public static void nb_side_data_prefer_packet(MemorySegment struct, int fieldValue) {
        struct.set(nb_side_data_prefer_packet$LAYOUT, nb_side_data_prefer_packet$OFFSET, fieldValue);
    }

    private static final AddressLayout decoded_side_data$LAYOUT = (AddressLayout)$LAYOUT.select(groupElement("decoded_side_data"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * AVFrameSideData **decoded_side_data
     * }
     */
    public static final AddressLayout decoded_side_data$layout() {
        return decoded_side_data$LAYOUT;
    }

    private static final long decoded_side_data$OFFSET = 848;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * AVFrameSideData **decoded_side_data
     * }
     */
    public static final long decoded_side_data$offset() {
        return decoded_side_data$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * AVFrameSideData **decoded_side_data
     * }
     */
    public static MemorySegment decoded_side_data(MemorySegment struct) {
        return struct.get(decoded_side_data$LAYOUT, decoded_side_data$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * AVFrameSideData **decoded_side_data
     * }
     */
    public static void decoded_side_data(MemorySegment struct, MemorySegment fieldValue) {
        struct.set(decoded_side_data$LAYOUT, decoded_side_data$OFFSET, fieldValue);
    }

    private static final OfInt nb_decoded_side_data$LAYOUT = (OfInt)$LAYOUT.select(groupElement("nb_decoded_side_data"));

    /**
     * Layout for field:
     * {@snippet lang=c :
     * int nb_decoded_side_data
     * }
     */
    public static final OfInt nb_decoded_side_data$layout() {
        return nb_decoded_side_data$LAYOUT;
    }

    private static final long nb_decoded_side_data$OFFSET = 856;

    /**
     * Offset for field:
     * {@snippet lang=c :
     * int nb_decoded_side_data
     * }
     */
    public static final long nb_decoded_side_data$offset() {
        return nb_decoded_side_data$OFFSET;
    }

    /**
     * Getter for field:
     * {@snippet lang=c :
     * int nb_decoded_side_data
     * }
     */
    public static int nb_decoded_side_data(MemorySegment struct) {
        return struct.get(nb_decoded_side_data$LAYOUT, nb_decoded_side_data$OFFSET);
    }

    /**
     * Setter for field:
     * {@snippet lang=c :
     * int nb_decoded_side_data
     * }
     */
    public static void nb_decoded_side_data(MemorySegment struct, int fieldValue) {
        struct.set(nb_decoded_side_data$LAYOUT, nb_decoded_side_data$OFFSET, fieldValue);
    }

    /**
     * Obtains a slice of {@code arrayParam} which selects the array element at {@code index}.
     * The returned segment has address {@code arrayParam.address() + index * layout().byteSize()}
     */
    public static MemorySegment asSlice(MemorySegment array, long index) {
        return array.asSlice(layout().byteSize() * index);
    }

    /**
     * The size (in bytes) of this struct
     */
    public static long sizeof() { return layout().byteSize(); }

    /**
     * Allocate a segment of size {@code layout().byteSize()} using {@code allocator}
     */
    public static MemorySegment allocate(SegmentAllocator allocator) {
        return allocator.allocate(layout());
    }

    /**
     * Allocate an array of size {@code elementCount} using {@code allocator}.
     * The returned segment has size {@code elementCount * layout().byteSize()}.
     */
    public static MemorySegment allocateArray(long elementCount, SegmentAllocator allocator) {
        return allocator.allocate(MemoryLayout.sequenceLayout(elementCount, layout()));
    }

    /**
     * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
     * The returned segment has size {@code layout().byteSize()}
     */
    public static MemorySegment reinterpret(MemorySegment addr, Arena arena, Consumer cleanup) {
        return reinterpret(addr, 1, arena, cleanup);
    }

    /**
     * Reinterprets {@code addr} using target {@code arena} and {@code cleanupAction} (if any).
     * The returned segment has size {@code elementCount * layout().byteSize()}
     */
    public static MemorySegment reinterpret(MemorySegment addr, long elementCount, Arena arena, Consumer cleanup) {
        return addr.reinterpret(layout().byteSize() * elementCount, arena, cleanup);
    }
}





© 2015 - 2024 Weber Informatics LLC | Privacy Policy