FFmpeg
Loading...
Searching...
No Matches
spdifenc.c File Reference

IEC-61937 encapsulation of various formats, used by S/PDIF. More...

#include <inttypes.h>
#include "avformat.h"
#include "avio_internal.h"
#include "mux.h"
#include "spdif.h"
#include "libavcodec/ac3defs.h"
#include "libavcodec/adts_parser.h"
#include "libavcodec/dca.h"
#include "libavcodec/dca_syncwords.h"
#include "libavcodec/get_bits.h"
#include "libavutil/mem.h"
#include "libavutil/opt.h"

Go to the source code of this file.

Data Structures

struct  IEC61937Context
 
struct  TrueHDAccessUnitInfo
 

Macros

#define HD_BUF_COUNT   6
 
#define SPDIF_FLAG_BIGENDIAN   0x01
 
#define MAT_PKT_OFFSET   61440
 
#define MAT_FRAME_SIZE   61424
 
#define TRUEHD_NOMINAL_AU_SPACING   2560
 
#define MAT_CODE(position, data)
 

Functions

static int spdif_header_ac3 (AVFormatContext *s, AVPacket *pkt)
 
static int spdif_header_eac3 (AVFormatContext *s, AVPacket *pkt)
 
static int spdif_dts4_subtype (int period)
 
static int spdif_header_dts4 (AVFormatContext *s, AVPacket *pkt, int core_size, int sample_rate, int blocks)
 
static int spdif_header_dts (AVFormatContext *s, AVPacket *pkt)
 
static int spdif_header_mpeg (AVFormatContext *s, AVPacket *pkt)
 
static int spdif_header_aac (AVFormatContext *s, AVPacket *pkt)
 
static int truehd_next_mat_buffer (int idx)
 Get the next index in the MAT buffer ring.
 
static int truehd_enqueue_mat (AVFormatContext *s)
 Mark the current MAT buffer ready and advance to the next free buffer.
 
static int truehd_parse_access_unit (const uint8_t *au_data, int au_size, TrueHDAccessUnitInfo *au)
 
static int spdif_header_truehd (AVFormatContext *s, AVPacket *pkt)
 
static int spdif_write_header (AVFormatContext *s)
 
static void spdif_deinit (AVFormatContext *s)
 
static av_always_inline void spdif_put_16 (IEC61937Context *ctx, AVIOContext *pb, unsigned int val)
 
static int spdif_write_packet (struct AVFormatContext *s, AVPacket *pkt)
 

Variables

static const AVOption options []
 
static const AVClass spdif_class
 
static enum IEC61937DataType mpeg_data_type [2][3]
 
static const uint8_t mat_start_code [20]
 
static const uint8_t mat_middle_code [12]
 
static const uint8_t mat_end_code [16]
 
struct { 
 
   unsigned int   pos 
 
   unsigned int   len 
 
   const uint8_t *   code 
 
mat_codes [] 
 
const FFOutputFormat ff_spdif_muxer
 

Detailed Description

IEC-61937 encapsulation of various formats, used by S/PDIF.

Author
Bartlomiej Wolowiec
Anssi Hannula
Carl Eugen Hoyos

Definition in file spdifenc.c.

Macro Definition Documentation

◆ HD_BUF_COUNT

#define HD_BUF_COUNT   6

Definition at line 69 of file spdifenc.c.

Referenced by truehd_enqueue_mat(), and truehd_next_mat_buffer().

◆ SPDIF_FLAG_BIGENDIAN

#define SPDIF_FLAG_BIGENDIAN   0x01

Definition at line 105 of file spdifenc.c.

Referenced by spdif_put_16(), and spdif_write_packet().

◆ MAT_PKT_OFFSET

#define MAT_PKT_OFFSET   61440

Definition at line 413 of file spdifenc.c.

Referenced by spdif_header_truehd(), and spdif_write_packet().

◆ MAT_FRAME_SIZE

#define MAT_FRAME_SIZE   61424

Definition at line 414 of file spdifenc.c.

Referenced by spdif_header_truehd(), spdif_write_header(), and spdif_write_packet().

◆ TRUEHD_NOMINAL_AU_SPACING

#define TRUEHD_NOMINAL_AU_SPACING   2560

Definition at line 415 of file spdifenc.c.

Referenced by spdif_header_truehd().

◆ MAT_CODE

#define MAT_CODE ( position,
data )
Value:
{ .pos = position, .code = data, .len = sizeof(data) }
const char data[16]
Definition mxf.c:149

Definition at line 428 of file spdifenc.c.

Function Documentation

◆ spdif_header_ac3()

static int spdif_header_ac3 ( AVFormatContext * s,
AVPacket * pkt )
static

Definition at line 128 of file spdifenc.c.

Referenced by spdif_write_header().

◆ spdif_header_eac3()

static int spdif_header_eac3 ( AVFormatContext * s,
AVPacket * pkt )
static

Definition at line 138 of file spdifenc.c.

Referenced by spdif_write_header().

◆ spdif_dts4_subtype()

static int spdif_dts4_subtype ( int period)
static

Definition at line 179 of file spdifenc.c.

Referenced by spdif_header_dts4().

◆ spdif_header_dts4()

static int spdif_header_dts4 ( AVFormatContext * s,
AVPacket * pkt,
int core_size,
int sample_rate,
int blocks )
static

Definition at line 192 of file spdifenc.c.

Referenced by spdif_header_dts().

◆ spdif_header_dts()

static int spdif_header_dts ( AVFormatContext * s,
AVPacket * pkt )
static

Definition at line 269 of file spdifenc.c.

Referenced by spdif_write_header().

◆ spdif_header_mpeg()

static int spdif_header_mpeg ( AVFormatContext * s,
AVPacket * pkt )
static

Definition at line 352 of file spdifenc.c.

Referenced by spdif_write_header().

◆ spdif_header_aac()

static int spdif_header_aac ( AVFormatContext * s,
AVPacket * pkt )
static

Definition at line 375 of file spdifenc.c.

Referenced by spdif_write_header().

◆ truehd_next_mat_buffer()

static int truehd_next_mat_buffer ( int idx)
static

Get the next index in the MAT buffer ring.

Definition at line 443 of file spdifenc.c.

Referenced by spdif_write_packet(), and truehd_enqueue_mat().

◆ truehd_enqueue_mat()

static int truehd_enqueue_mat ( AVFormatContext * s)
static

Mark the current MAT buffer ready and advance to the next free buffer.

Definition at line 451 of file spdifenc.c.

Referenced by spdif_header_truehd().

◆ truehd_parse_access_unit()

static int truehd_parse_access_unit ( const uint8_t * au_data,
int au_size,
TrueHDAccessUnitInfo * au )
static

Definition at line 472 of file spdifenc.c.

Referenced by spdif_header_truehd().

◆ spdif_header_truehd()

static int spdif_header_truehd ( AVFormatContext * s,
AVPacket * pkt )
static

Definition at line 564 of file spdifenc.c.

Referenced by spdif_write_header(), and spdif_write_packet().

◆ spdif_write_header()

static int spdif_write_header ( AVFormatContext * s)
static

Definition at line 780 of file spdifenc.c.

◆ spdif_deinit()

static void spdif_deinit ( AVFormatContext * s)
static

Definition at line 819 of file spdifenc.c.

◆ spdif_put_16()

static av_always_inline void spdif_put_16 ( IEC61937Context * ctx,
AVIOContext * pb,
unsigned int val )
static

Definition at line 827 of file spdifenc.c.

Referenced by spdif_write_packet().

◆ spdif_write_packet()

static int spdif_write_packet ( struct AVFormatContext * s,
AVPacket * pkt )
static

Definition at line 836 of file spdifenc.c.

Variable Documentation

◆ options

const AVOption options[]
static
Initial value:
= {
{ "spdif_flags", "IEC 61937 encapsulation flags", 0x42 , AV_OPT_TYPE_FLAGS, {.i64 = 0}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, .unit = "spdif_flags" },
{ "be", "output in big-endian format (for use as s16be)", 0, AV_OPT_TYPE_CONST, {.i64 = SPDIF_FLAG_BIGENDIAN}, 0, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM, .unit = "spdif_flags" },
{ "dtshd_rate", "mux complete DTS frames in HD mode at the specified IEC958 rate (in Hz, default 0=disabled)", 0x42 , AV_OPT_TYPE_INT, {.i64 = 0}, 0, 768000, AV_OPT_FLAG_ENCODING_PARAM },
{ "dtshd_fallback_time", "min secs to strip HD for after an overflow (-1: till the end, default 60)", 0x42 , AV_OPT_TYPE_INT, {.i64 = 60}, -1, INT_MAX, AV_OPT_FLAG_ENCODING_PARAM },
{ NULL },
}
#define NULL
Definition coverity.c:32
#define AV_OPT_FLAG_ENCODING_PARAM
A generic parameter which can be set by the user for muxing or encoding.
Definition opt.h:351
@ AV_OPT_TYPE_CONST
Special option type for declaring named constants.
Definition opt.h:298
@ AV_OPT_TYPE_FLAGS
Underlying C type is unsigned int.
Definition opt.h:254
@ AV_OPT_TYPE_INT
Underlying C type is int.
Definition opt.h:258
#define SPDIF_FLAG_BIGENDIAN
Definition spdifenc.c:105

Definition at line 113 of file spdifenc.c.

◆ spdif_class

const AVClass spdif_class
static
Initial value:
= {
.class_name = "spdif",
.item_name = av_default_item_name,
.option = options,
}
const char * av_default_item_name(void *ptr)
Return the context name.
Definition log.c:241
#define LIBAVUTIL_VERSION_INT
Definition version.h:85

Definition at line 121 of file spdifenc.c.

◆ mpeg_data_type

enum IEC61937DataType mpeg_data_type[2][3]
static
Initial value:
= {
}
@ IEC61937_MPEG1_LAYER1
MPEG-1 layer 1.
Definition spdif.h:34
@ IEC61937_MPEG1_LAYER23
MPEG-1 layer 2 or 3 data or MPEG-2 without extension.
Definition spdif.h:35
@ IEC61937_MPEG2_LAYER2_LSF
MPEG-2, layer-2 low sampling frequency.
Definition spdif.h:39
@ IEC61937_MPEG2_LAYER1_LSF
MPEG-2, layer-1 low sampling frequency.
Definition spdif.h:38
@ IEC61937_MPEG2_LAYER3_LSF
MPEG-2, layer-3 low sampling frequency.
Definition spdif.h:40

Definition at line 346 of file spdifenc.c.

Referenced by spdif_header_mpeg().

◆ mat_start_code

const uint8_t mat_start_code[20]
static
Initial value:
= {
0x07, 0x9E, 0x00, 0x03, 0x84, 0x01, 0x01, 0x01, 0x80, 0x00, 0x56, 0xA5, 0x3B, 0xF4, 0x81, 0x83,
0x49, 0x80, 0x77, 0xE0,
}

Definition at line 417 of file spdifenc.c.

◆ mat_middle_code

const uint8_t mat_middle_code[12]
static
Initial value:
= {
0xC3, 0xC1, 0x42, 0x49, 0x3B, 0xFA, 0x82, 0x83, 0x49, 0x80, 0x77, 0xE0,
}

Definition at line 421 of file spdifenc.c.

◆ mat_end_code

const uint8_t mat_end_code[16]
static
Initial value:
= {
0xC3, 0xC2, 0xC0, 0xC4, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x97, 0x11,
}

Definition at line 424 of file spdifenc.c.

◆ pos

unsigned int pos

Definition at line 431 of file spdifenc.c.

Referenced by aa_read_packet(), aal_read_packet(), ac4_read_packet(), add_coefficients(), add_entry(), add_index_entry(), add_tonal_components(), add_wave(), add_wave0(), aix_read_packet(), alf_filter_cc(), alf_get_subblock(), alsa_chmap_pos_to_av_chan(), amv_end_tag(), apac_read_header(), ape_read_seek(), aptx_decode_frame(), aptx_encode_frame(), aqt_read_header(), asf_build_simple_index(), asf_deinterleave(), asf_read_pts(), asf_read_seek(), asf_read_timestamp(), ass_read_header(), assign_channels(), assign_pair(), ast_read_packet(), async_seek(), at1_imdct_block(), at1_unpack_dequant(), audio_frame_obu(), av_add_index_entry(), av_chroma_location_enum_to_pos(), av_chroma_location_pos_to_enum(), av_codec_get_tag2(), av_parser_parse2(), avi_load_index(), avi_read_header(), avi_read_idx1(), avi_read_seek(), avi_sync(), avi_write_ix(), avio_seek(), avio_seek_time(), avpriv_dv_produce_packet(), batch_assign(), binka_read_packet(), block_contrast(), block_matching_multi(), bluray_seek(), build_huff_tree(), build_vlc(), build_vlc(), cache_seek(), cbs_apv_assemble_fragment(), cbs_av1_assemble_fragment(), cbs_av1_split_fragment(), cbs_h2645_replace_ps(), cbs_h2645_replace_ps(), cbs_h266_read_nal_unit(), cbs_jpeg_read_unit(), cbs_mpeg2_read_unit(), cbs_mpeg2_write_slice(), cbs_vp8_read_unit(), cbs_vp9_assemble_fragment(), cbs_vp9_read_unit(), cbs_vp9_split_fragment(), cclm_get_select_pos(), cclm_select_chroma(), cclm_select_luma(), cclm_select_luma_444(), cclm_select_samples(), cfhd_encode_frame(), check(), check_stream_max_drift(), cine_read_header(), cipher_init56(), clamp_size(), clean_index(), clear_index_entries(), close_file(), codec37_mv(), color_inc(), compute_quant_matrix(), compute_row(), concat_seek(), copy_scaling_list(), count_channels(), count_paired_channels(), crypto_seek(), curl_dispatch(), dat_read_packet(), deband_16_c(), deband_16_coupling_c(), deband_8_c(), deband_8_coupling_c(), deblock_get_left_strength(), deblock_get_top_strength(), deblock_is_boundary(), deblock_set_left_strength(), deblock_set_strength(), deblock_set_top_strength(), decode_1p_track(), decode_3_pulses_10bits(), decode_ac_coeffs(), decode_anim(), decode_band(), decode_block(), decode_channel_wordlen(), decode_dct(), decode_dlta(), decode_dvd_subtitles(), decode_fixed_vector(), decode_frame(), decode_kfrm(), decode_mad1(), decode_mad1_24(), decode_mb_i(), decode_mous(), decode_move(), decode_mpos(), decode_qu_spectra(), decode_rle(), decode_rle(), decode_rle16(), decode_rle_bpp2(), decode_rle_bpp4(), decode_runlen(), decode_scaling_list(), decode_short_horizontal_delta(), decode_slice(), decode_slices(), decode_type1(), decode_type2(), decode_vol_header(), decompress(), dequant(), dequant(), describe_payload(), do_block_matching_multi(), do_block_ssd(), do_block_ssd16(), do_search_boundary(), dsf_read_packet(), dss_723_1_read_packet(), dss_sp_read_packet(), dts_probe(), dv_decode_ac(), dvdsub_parse_extradata(), dxv_compress_dxt1(), dxv_decompress_dxt1(), dxv_decompress_dxt5(), dxv_decompress_opcodes(), dyn_buf_write(), ebml_read_master(), ebml_read_num(), encode_packet(), end_ebml_master(), end_header(), envelope_instant(), envelope_instant16(), envelope_peak(), envelope_peak16(), epic_decode_run_length(), epic_predict_from_NW_NE(), event_loop(), evolve(), evolve(), fade(), fastaudio_decode(), ff_add_index_entry(), ff_apv_entropy_build_decode_lut(), ff_atrac_gain_compensation(), ff_attributes_dump(), ff_cbs_h2645_write_slice_data(), ff_dca_downmix_to_stereo_fixed(), ff_dca_downmix_to_stereo_float(), ff_dsd2pcm_translate(), ff_dshow_enummediatypes_Clone(), ff_dshow_enummediatypes_Reset(), ff_dshow_enumpins_Clone(), ff_dshow_enumpins_Reset(), ff_dxva2_hevc_fill_scaling_lists(), ff_els_decode_unsigned(), ff_end_tag(), ff_find_last_ts(), ff_format_shift_data(), ff_gen_search(), ff_h263_resync(), ff_h264_handle_frag_packet(), ff_hevc_hls_residual_coding(), ff_hevc_sao_edge_filter_16x16_8_simd128(), ff_hevc_sao_edge_filter_8x8_8_simd128(), ff_hevc_sao_edge_filter_neon_8_wrapper(), ff_hls_write_file_entry(), ff_hls_write_init_file(), ff_jpegxl_collect_codestream_header(), ff_mkdir_p(), ff_mms_read_header(), ff_mov_cenc_write_sinf_tag(), ff_nut_add_sp(), ff_opencl_filter_load_program_from_file(), ff_opus_rc_enc_laplace(), ff_pcm_read_seek(), ff_rle_count_pixels(), ff_rtp_send_h263_rfc2190(), ff_seek_frame_binary(), ff_snappy_peek_uncompressed_length(), ff_vfscanf(), ff_vorbis_floor1_render_list(), ff_wma_init(), ffio_limit(), ffurl_seek(), ffurl_seek2(), ffurl_size(), file_seek(), fill_map(), fill_pixels(), fill_scaling_lists(), film_read_seek(), filter_frame(), filter_frame(), find_any_startcode(), find_index_range(), find_motion(), find_next_slice(), find_sample_match(), find_sidx(), find_startcode(), find_timestamp_in_playlist(), fits_read_packet(), fixup_color_mask(), flac_read_header(), flac_seek(), flv_append_keyframe_info(), flv_read_packet(), flv_write_codec_header(), frame_merge_filter(), fsb_read_packet(), fsize(), ftp_restart(), ftp_seek(), g722_encode_trellis(), gainc_loc_mode0(), generate_noise(), get_attachment(), get_duration(), get_line(), get_local_pos(), get_pts(), get_tree_codes(), get_tree_codes(), get_tree_codes(), get_virtual_boundary(), get_window_exe_name(), gif_read_header(), graticule16_column(), graticule16_row(), graticule_column(), graticule_row(), guess_ni_flag(), gxf_read_timestamp(), gxf_seek(), gxf_write_eos_packet(), gxf_write_flt_packet(), gxf_write_map_packet(), gxf_write_material_data_section(), gxf_write_packet(), gxf_write_track_description(), gxf_write_track_description_section(), gxf_write_umf_media_description(), gxf_write_umf_packet(), gxf_write_umf_track_description(), handle_packet(), hevc_parse_sdp_line(), hls_append_segment(), hls_slice_header(), hq_decode_block(), http_read_stream_all(), huffman_decode(), hxvs_build_index(), hxvs_read_header(), hxvs_read_packet(), iamf_write_trailer(), id3v2_parse(), iff_read_packet(), imc_decode_level_coefficients_raw(), interp_point(), intlist_read(), ipfs_seek(), is_virtual_boundary(), ivi_create_huff_from_desc(), ivi_decode_coded_blocks(), ivr_read_header(), ivr_read_packet(), jacosub_read_header(), jpeg2000_decode_ctx_vlc(), jpeg2000_decode_ht_cleanup_segment(), jpeg2000_decode_sig_emb(), jpeg2000_import_bit(), jpg_decode_block(), klv_read_packet(), laf_read_packet(), LCEVC_BLOCK_FUNC(), lerp16(), lerp8(), libcurl_seek(), libsmbc_seek(), libssh_seek(), lrc_read_header(), lsf_dequantization(), lsp_interpolate(), lvf_read_packet(), lz4_decompress(), main(), main(), map_prm_ch_to_spkr(), mark_all_blocks(), mcc_read_header(), microdvd_read_header(), mmsh_open_internal(), mmsh_seek(), mods_read_header(), mods_read_packet(), mov_cenc_write_saio_tag(), mov_cenc_write_saiz_tag(), mov_cenc_write_schi_tag(), mov_cenc_write_senc_tag(), mov_find_next_sample(), mov_flush_fragment(), mov_parse_exif_item(), mov_read_packet(), mov_read_trun(), mov_write_3gp_udta_tag(), mov_write_apvc_tag(), mov_write_audio_tag(), mov_write_aux_tag(), mov_write_av1c_tag(), mov_write_av3c_tag(), mov_write_avcc_tag(), mov_write_btrt_tag(), mov_write_ccst_tag(), mov_write_chan_tag(), mov_write_chnl_tag(), mov_write_chpl_tag(), mov_write_colr_tag(), mov_write_covr(), mov_write_dfla_tag(), mov_write_dinf_tag(), mov_write_dmlp_tag(), mov_write_dops_tag(), mov_write_emsg_tag(), mov_write_esds_tag(), mov_write_evcc_tag(), mov_write_eyes_tag(), mov_write_ftyp_tag(), mov_write_gmhd_tag(), mov_write_gpmd_tag(), mov_write_hdlr_tag(), mov_write_hvcc_tag(), mov_write_iloc_tag(), mov_write_ilst_tag(), mov_write_iods_tag(), mov_write_ipco_tag(), mov_write_ipma_tag(), mov_write_iprp_tag(), mov_write_isml_manifest(), mov_write_ispe_tag(), mov_write_lhvc_tag(), mov_write_loci_tag(), mov_write_lvcc_tag(), mov_write_mdia_tag(), mov_write_mdta_ilst_tag(), mov_write_mdta_keys_tag(), mov_write_meta_tag(), mov_write_minf_tag(), mov_write_moof_tag_internal(), mov_write_moov_tag(), mov_write_ms_tag(), mov_write_mvex_tag(), mov_write_pcmc_tag(), mov_write_pitm_tag(), mov_write_pixi_tag(), mov_write_prft_tag(), mov_write_pssh_tag(), mov_write_rtp_tag(), mov_write_SA3D_tag(), mov_write_sdtp_tag(), mov_write_sidx_tag(), mov_write_source_reference_tag(), mov_write_srat_tag(), mov_write_stbl_tag(), mov_write_stco_tag(), mov_write_string_tag(), mov_write_stsc_tag(), mov_write_stsd_tag(), mov_write_stss_tag(), mov_write_stsz_tag(), mov_write_subtitle_tag(), mov_write_tapt_tag(), mov_write_tcmi_tag(), mov_write_tfdt_tag(), mov_write_tfhd_tag(), mov_write_tfra_tag(), mov_write_tfrf_tags(), mov_write_tfxd_tag(), mov_write_tmcd_tag(), mov_write_track_kind(), mov_write_track_metadata(), mov_write_traf_tag(), mov_write_trak_tag(), mov_write_tref_tag(), mov_write_trun_tag(), mov_write_uuidusmt_tag(), mov_write_vexu_tag(), mov_write_video_tag(), mov_write_vpcc_tag(), mov_write_vvcc_tag(), mov_write_wave_tag(), mov_write_wfex_tag(), mp3_parse_info_tag(), mp3_read_packet(), mp3_sync(), mpc8_get_chunk_header(), mpc8_handle_chunk(), mpc8_parse_seektable(), mpc8_read_header(), mpc8_read_packet(), mpc_read_header(), mpc_read_packet(), mpegps_read_dts(), mpegts_get_dts(), mpegts_get_pcr(), mpegts_push_data(), mpegts_raw_read_packet(), mpegts_read_header(), mpegts_resync(), mpjpeg_read_header(), mpl2_read_header(), mpsub_read_header(), msrle_decode_8_16_24_32(), mss4_decode_dct(), multiview_setup(), mv_read_header(), mv_read_packet(), mxf_read_packet(), mxf_update_klv_size(), mxf_write_aes3_desc(), mxf_write_avc_subdesc(), mxf_write_cdci_desc(), mxf_write_ffv1_subdesc(), mxf_write_generic_desc(), mxf_write_generic_picture_desc(), mxf_write_generic_sound_common(), mxf_write_generic_sound_desc(), mxf_write_index_table_segment(), mxf_write_jpeg2000_subdesc(), mxf_write_partition(), mxf_write_random_index_pack(), mxf_write_s436m_anc_desc(), mxf_write_wav_common(), mxf_write_wav_desc(), ni_prepare_read(), nprobe(), nsp_read_header(), nut_read_header(), nut_read_packet(), nut_read_timestamp(), nuv_packet(), nuv_read_dts(), packet_decode(), paint_mouse_pointer(), parse_atoms(), parse_file(), pcm_dvda_parse_header(), pdv_read_header(), pdv_read_packet(), pdv_read_seek(), pjs_read_header(), plot_channel_log(), pmp_header(), pred_angular_h(), pred_angular_v(), print_track_chunks(), process_sample(), psy_lame_detect(), pulse_read_packet(), put_header(), put_id3v2_tags(), put_swf_end_tag(), pva_read_timestamp(), qoa_read_packet(), qt_rtp_parse_packet(), queue_picture(), queue_sample(), queue_sample(), r3d_read_reda(), r3d_read_redv(), radix_sort_pass(), rdt_parse_packet(), read_ans_symbol(), read_bits(), read_dialogue(), read_header(), read_header(), read_header(), read_huff_channels(), read_image_grid(), read_image_iovl(), read_index(), read_index(), read_line(), read_moof_duration(), read_odml_index(), read_packet(), read_packet(), read_packet_openmpt(), read_pakt_chunk(), read_seek(), read_seek(), read_tfra(), read_tfra(), read_trun_duration(), realtext_read_header(), recover_mag_sgn(), refine_full(), refine_residual(), resync(), rka_read_seek(), rl2_read_packet(), rle_uncompress(), rm_assemble_video_frame(), rm_read_dts(), rm_read_index(), rm_read_packet(), rm_sync(), rprobe(), rsd_read_packet(), rtp_history_find(), rtp_history_store(), rv40_loop_filter(), s337m_probe(), sami_read_header(), sao_copy_hor(), sao_edge_filter(), sao_filter_CTB(), sap_read_header(), sap_write_header(), scaling_list_data(), scan_buffer(), scc_read_header(), sdr2_read_packet(), sds_read_packet(), seek(), seek_back(), seek_chapter(), seek_frame_byte(), seq_decode_op3(), ser_read_packet(), set_bit(), set_param(), set_spdif(), shared_seek(), simbiosis_imx_read_packet(), skip_reserved(), skip_tag(), sls_flags_filename_process(), smacker_read_header(), smacker_read_packet(), smacker_read_seek(), smjpeg_read_packet(), spdif_header_truehd(), srt_read_header(), stl_read_header(), stream_seek(), subfile_seek(), subviewer1_read_header(), subviewer_read_header(), sup_read_packet(), swf_read_packet(), switch_buffer(), swri_noise_shaping_TMPL(), test_apv_entropy_decode_block(), threedostr_read_packet(), tiff_decode_tag(), tile(), tm2_read_stream(), tmv_read_seek(), tscc2_decode_frame(), tta_read_header(), tta_read_seek(), twiddle(), unpack_10bit(), update_co64_offsets(), update_odml_entry(), update_packet_size(), update_size(), update_size(), update_size(), update_size(), update_size_and_version(), update_stco_offsets(), upgrade_stco_atom(), usm_read_packet(), vc_generate(), vc_splat(), vdpau_hevc_start_frame(), vectorscope16(), vectorscope8(), vlc_decode_block(), vp56_get_vectors_predictors(), vp6_coeff_order_table_init(), vp6_parse_coeff_models(), vpk_read_packet(), vplayer_read_header(), vqf_read_seek(), vvc_deblock_bs_chroma(), vvc_deblock_bs_luma(), waves_synth(), wavesynth_seek(), webvtt_read_header(), wma_decode_superframe(), wmavoice_decode_packet(), write_index(), write_table_redirector_legacy_attrib(), wv_read_packet(), wv_unpack_mono(), wv_unpack_stereo(), wv_write_trailer(), x8_decode_intra_mb(), xcorr_coeff(), xmlescape(), and yuv4_read_seek().

◆ len

unsigned int len

Definition at line 432 of file spdifenc.c.

◆ code

const uint8_t* code

Definition at line 433 of file spdifenc.c.

Referenced by add_level(), adpcm_circus_expand_nibble(), asv1_get_level(), asv1_put_level(), asv2_get_level(), asv2_get_vlc2(), asv2_put_level(), av_utf8_decode(), avs2_probe(), avs3video_probe(), avtext_context_open(), bethsoftvid_decode_frame(), bfi_decode_frame(), bitplane_decoding(), bmv_aud_decode_frame(), build_table(), calculate_codes(), cavsvideo_probe(), cfhd_init_vlc(), check_lengths(), cin_decode_lzss(), cin_decode_rle(), codec47_block(), compute_scale_factors(), create_enc_table(), curlcode_to_averror(), decode3(), decode_0(), decode_10bit_pulse(), decode_13(), decode_1p_track(), decode_2p_track(), decode_3p_track(), decode_4p_track(), decode_5p_track(), decode_6p_track(), decode_adaptive6(), decode_bgr_1(), decode_block(), decode_block_progressive(), decode_block_refinement(), decode_cell(), decode_cell_data(), decode_dc(), decode_dc_coeffs(), decode_dc_le(), decode_exp_vlc(), decode_ext_header(), decode_frame(), decode_i_block(), decode_mad1_24(), decode_p_block(), decode_plane_bitstream(), decode_rle(), decode_rle16(), decode_rle_bpp2(), decode_rle_bpp4(), decode_runlen(), decode_runlen_rgb(), decode_scale_factors(), decode_segment(), decode_spectrum_and_dequant(), decode_unit3(), decompress_p3(), dpcm_decode_init(), dshow_check_event_queue(), dv_init_static(), dv_vlc_map_tableinit(), dxt1_block_internal(), dxt3_block_internal(), dxt5_block_internal(), encode_block(), encode_block(), encode_block(), encode_dcs(), encode_dcs(), encode_exp_vlc(), encode_ext_header(), encode_plane_slice(), encode_str8(), estimate_dcs(), ff_apv_entropy_build_decode_lut(), ff_h263_decode_motion(), ff_h263_encode_motion(), ff_lzw_decode(), ff_lzw_encode(), ff_mjpeg_build_huffman_codes(), ff_mov_iso639_to_lang(), ff_mov_lang_to_iso639(), ff_mpeg12_find_best_frame_rate(), ff_mpeg1_init_uni_ac_vlc(), ff_msmpeg4_encode_block(), ff_msmpeg4_encode_motion(), ff_rv_decode_dc(), ff_vlc_init_from_lengths(), ff_vlc_init_multi_from_lengths(), ff_vorbis_len2vlc(), ff_wma_run_level_decode(), filter_frame(), find_startcode(), generate_joint_tables(), get_code(), get_size_of_code(), get_vlc2(), gif_parse_next_image(), h261_encode_init_static(), h261_probe(), h263_probe(), h263p_decode_umotion(), h264_probe(), hevc_probe(), huffman_decode(), init_mv_penalty(), init_mv_table(), init_uni_ac_vlc(), init_uni_mpeg4_rl_tab(), is_recoverable(), jpeg_put_marker(), main(), mcc_bytes_to_hex(), measure_text(), mjpeg_decode_dc(), mjpeg_encode_code(), mjpeg_encode_coef(), mmf_rate(), mov_dts_channel_layout_to_mask(), mpc8_dec_base(), mpc8_dec_enum(), mpeg2_metadata_update_fragment(), mpeg4_decode_dc(), mpeg4_decode_studio_block(), mpeg_decode_motion(), mpeg_decode_slice(), mpegps_probe(), mpegvideo_probe(), msmpeg4_decode_picture_header(), msmpeg4_encode_dc(), msmpeg4v12_decode_mb(), msmpeg4v2_decode_motion(), msmpeg4v2_encode_motion(), msmpeg4v34_decode_mb(), mxf_read_pixel_layout(), old_codec1(), old_codec31(), old_codec37(), on_done(), paf_video_decode(), parse_aux_data(), parse_bintree(), parse_ch(), parse_coding_header(), parse_dmix_coeffs(), parse_lfe_16(), parse_lfe_24(), parse_opus_packet_duration(), periods(), priv_set_idx(), put_marker(), put_marker_byteu(), put_vlc_symbol(), qpeg_decode_inter(), qpeg_decode_intra(), read_argb_line(), read_frame(), read_hufftable(), read_quant_spectral_coeffs(), read_rgb24_component_line(), read_vlc(), read_vlc_multi(), read_yuv_component_line(), rtsp_send_reply(), rv30_decode_intra_types(), rv30_decode_mb_info(), rv34_decode_cbp(), spdif_get_pkt_size_bits(), spdif_header_truehd(), speedhq_init_static_data(), spi_op_1src(), spi_op_2src(), spi_op_2src_list(), spi_op_3src_list(), spi_op_res_1src(), spi_op_res_1src_list(), spi_op_res_2src(), spi_op_res_2src_list(), spi_op_untypedres_1src(), spi_op_untypedres_2src(), spi_op_untypedres_list(), symmetric_dequant(), tiff_unpack_strip(), tm2_build_huff_table(), tm2_free_codes(), tm2_get_token(), ulti_decode_frame(), vaapi_encode_mpeg2_init_sequence_params(), validate_string(), vc1_probe(), vorbis_parse_audio_packet(), vqa_decode_frame_hicolor(), vvc_probe(), wavpack_encode_block(), wavpack_encode_sample(), wmv2_decode_mb(), wmv2_decode_picture_header(), write_huff_codes(), ws_snd_decode_frame(), wv_unpack_dsd_fast(), and xavs2_init().

◆ [struct]

const struct { ... } mat_codes[]
Initial value:
= {
}
static const uint8_t mat_start_code[20]
Definition spdifenc.c:417
#define MAT_FRAME_SIZE
Definition spdifenc.c:414
#define MAT_CODE(position, data)
Definition spdifenc.c:428
static const uint8_t mat_end_code[16]
Definition spdifenc.c:424
static const uint8_t mat_middle_code[12]
Definition spdifenc.c:421

Referenced by spdif_header_truehd().

◆ ff_spdif_muxer

const FFOutputFormat ff_spdif_muxer
Initial value:
= {
.p.name = "spdif",
.p.long_name = NULL_IF_CONFIG_SMALL("IEC 61937 (used on S/PDIF - IEC958)"),
.p.extensions = "spdif",
.priv_data_size = sizeof(IEC61937Context),
.p.audio_codec = AV_CODEC_ID_AC3,
.p.video_codec = AV_CODEC_ID_NONE,
.p.subtitle_codec = AV_CODEC_ID_NONE,
.write_header = spdif_write_header,
.write_packet = spdif_write_packet,
.deinit = spdif_deinit,
.p.flags = AVFMT_NOTIMESTAMPS,
.p.priv_class = &spdif_class,
.flags_internal = FF_OFMT_FLAG_MAX_ONE_OF_EACH,
}
#define AVFMT_NOTIMESTAMPS
Format does not need / have any timestamps.
Definition avformat.h:498
@ AV_CODEC_ID_NONE
Definition codec_id.h:48
@ AV_CODEC_ID_AC3
Definition codec_id.h:456
#define NULL_IF_CONFIG_SMALL(x)
Return NULL if CONFIG_SMALL is true, otherwise the argument without modification.
Definition internal.h:88
#define FF_OFMT_FLAG_MAX_ONE_OF_EACH
If this flag is set, it indicates that for each codec type whose corresponding default codec (i....
Definition mux.h:50
static int spdif_write_packet(struct AVFormatContext *s, AVPacket *pkt)
Definition spdifenc.c:836
static const AVClass spdif_class
Definition spdifenc.c:121
static int spdif_write_header(AVFormatContext *s)
Definition spdifenc.c:780
static void spdif_deinit(AVFormatContext *s)
Definition spdifenc.c:819

Definition at line 909 of file spdifenc.c.