Go to the documentation of this file.
47 #define HEXDUMP_PRINT(...) \
50 av_log(avcl, level, __VA_ARGS__); \
52 fprintf(f, __VA_ARGS__); \
56 const uint8_t *buf,
int size)
60 for (
i = 0;
i <
size;
i += 16) {
65 for (j = 0; j < 16; j++) {
72 for (j = 0; j <
len; j++) {
74 if (c < ' ' || c >
'~')
128 static void print_fps(
double d,
const char *postfix,
int log_level)
130 uint64_t v =
lrintf(d * 100);
132 av_log(
NULL, log_level,
"%1.4f %s", d, postfix);
134 av_log(
NULL, log_level,
"%3.2f %s", d, postfix);
135 else if (v % (100 * 1000))
136 av_log(
NULL, log_level,
"%1.0f %s", d, postfix);
138 av_log(
NULL, log_level,
"%1.0fk %s", d / 1000, postfix);
142 const char *
name,
const char *indent,
152 if (strcmp(
"language",
tag->key)) {
153 const char *p =
tag->value;
155 "%s %-16s: ", indent,
tag->key);
157 size_t len = strcspn(p,
"\x8\xa\xb\xc\xd");
160 if (*p == 0xd)
av_log(
ctx, log_level,
" ");
161 if (*p == 0xa)
av_log(
ctx, log_level,
"\n%s %-16s: ", indent,
"");
195 av_log(
ctx, log_level,
"sample_rate %"PRIu32
", ", sample_rate);
218 if (gain == INT32_MIN)
221 av_log(
ctx, log_level,
"%f", gain / 100000.0
f);
225 static void print_peak(
void *
ctx,
const char *str, uint32_t peak,
int log_level)
231 av_log(
ctx, log_level,
"%f", (
float) peak / UINT32_MAX);
239 if (sd->
size <
sizeof(*rg)) {
255 if (sd->
size <
sizeof(*stereo)) {
262 av_log(
ctx, log_level,
"%s, view: %s, primary eye: %s",
268 av_log(
ctx, log_level,
", horizontal_disparity_adjustment: %0.4f",
281 if (sd->
size <
sizeof(*ast)) {
294 av_log(
ctx, log_level,
"visually impaired");
297 av_log(
ctx, log_level,
"hearing impaired");
324 if (sd->
size <
sizeof(*cpb)) {
330 "bitrate max/min/avg: %"PRId64
"/%"PRId64
"/%"PRId64
" buffer size: %"PRId64
" ",
334 av_log(
ctx, log_level,
"vbv_delay: N/A");
344 av_log(
ctx, log_level,
"Mastering Display Metadata, "
345 "has_primaries:%d has_luminance:%d "
346 "r(%5.4f,%5.4f) g(%5.4f,%5.4f) b(%5.4f %5.4f) wp(%5.4f, %5.4f) "
347 "min_luminance=%f, max_luminance=%f",
364 av_log(
ctx, log_level,
"Content Light Level Metadata, "
365 "MaxCLL=%d, MaxFALL=%d",
374 "ambient_illuminance=%f, ambient_light_x=%f, ambient_light_y=%f",
384 double yaw, pitch, roll;
386 if (sd->
size <
sizeof(*spherical)) {
393 if (spherical->
yaw || spherical->
pitch || spherical->
roll) {
394 yaw = ((
double)spherical->
yaw) / (1 << 16);
397 av_log(
ctx, log_level,
"(%f/%f/%f) ", yaw, pitch, roll);
418 av_log(
ctx, log_level,
"version: %d.%d, profile: %d, level: %d, "
419 "rpu flag: %d, el flag: %d, bl flag: %d, compatibility id: %d, "
433 const uint32_t *tc = (
const uint32_t *)sd->
data;
435 if ((sd->
size !=
sizeof(uint32_t) * 4) || (tc[0] > 3)) {
440 for (
int j = 1; j <= tc[0]; j++) {
443 av_log(
ctx, log_level,
"timecode - %s%s", tcbuf, j != tc[0] ?
", " :
"");
449 uint32_t top, bottom,
left, right;
451 if (sd->
size <
sizeof(uint32_t) * 4) {
466 const char *indent,
int log_level)
471 av_log(
ctx, log_level,
"%sSide data:\n", indent);
473 for (
i = 0;
i < nb_side_data;
i++) {
489 av_log(
ctx, log_level,
"H.263 macroblock info");
496 av_log(
ctx, log_level,
"displaymatrix: rotation of %.2f degrees",
504 av_log(
ctx, log_level,
"audio service type: ");
508 av_log(
ctx, log_level,
"quality factor: %"PRId32
", pict_type: %c",
529 av_log(
ctx, log_level,
"DOVI configuration record: ");
533 av_log(
ctx, log_level,
"SMPTE ST 12-1:2014: ");
544 av_log(
ctx, log_level,
"unknown side data type %d "
570 av_log(
NULL, log_level,
" (hearing impaired)");
572 av_log(
NULL, log_level,
" (visual impaired)");
578 av_log(
NULL, log_level,
" (timed thumbnails)");
597 int group_index,
int index,
int is_output,
606 const char *group_indent = group_index >= 0 ?
" " :
"";
607 const char *extra_indent = group_index >= 0 ?
" " :
" ";
632 av_opt_set(avctx,
"dump_separator", separator, 0);
656 av_log(
NULL, log_level,
", SAR %d:%d DAR %d:%d",
658 display_aspect_ratio.
num, display_aspect_ratio.
den);
666 if (fps || tbr || tbn)
684 extra_indent, log_level);
688 int i,
int index,
int is_output)
707 for (
int j = 0; j < audio_element->
nb_layers; j++) {
715 for (
int k = 0; channel_count > 0 && k < stg->
nb_streams; k++) {
718 printed[st->
index] = 1;
731 for (
int j = 0; j < mix_presentation->
nb_submixes; j++) {
752 for (
int k = 0; k < sub_mix->
nb_layouts; k++) {
769 const char *ptr =
NULL;
794 printed[st->
index] = 1;
798 if (!printed[st->
index]) {
800 printed[st->
index] = 1;
808 const char *ptr =
NULL;
828 printed[st->
index] = 1;
838 const char *url,
int is_output)
846 is_output ?
"Output" :
"Input",
849 is_output ?
"to" :
"from", url);
908 for (k = 0; k <
program->nb_stream_indexes; k++) {
911 printed[
program->stream_index[k]] = 1;
913 total +=
program->nb_stream_indexes;
@ AV_PKT_DATA_DISPLAYMATRIX
This side data contains a 3x3 transformation matrix describing an affine transformation that needs to...
void av_pkt_dump2(FILE *f, const AVPacket *pkt, int dump_payload, const AVStream *st)
Send a nice dump of a packet to the specified file stream.
union AVStreamGroup::@365 params
Group type-specific parameters.
AVIAMFSubmixElement ** elements
Array of submix elements.
#define AV_LOG_WARNING
Something somehow does not look correct.
unsigned int nb_layers
Number of layers, or channel groups, in the Audio Element.
#define AV_TIMECODE_STR_SIZE
AVStreamGroup ** stream_groups
A list of all stream groups in the file.
it s the only field you need to keep assuming you have a context There is some magic you don t need to care about around this just let it vf default minimum maximum flags name is the option name
static void dump_dovi_conf(void *ctx, const AVPacketSideData *sd, int log_level)
int64_t id
Group type-specific group ID.
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C program
AVIAMFSubmixLayout ** layouts
Array of submix layouts.
@ AV_PKT_DATA_AMBIENT_VIEWING_ENVIRONMENT
Ambient viewing environment metadata, as defined by H.274.
enum AVMediaType codec_type
General type of the encoded data.
struct AVStreamGroupTileGrid * tile_grid
enum AVSphericalProjection projection
Projection type.
@ AV_PKT_DATA_QUALITY_STATS
This side data contains quality related information from the encoder.
@ AV_PKT_DATA_FRAME_CROPPING
The number of pixels to discard from the top/bottom/left/right border of the decoded frame to obtain ...
unsigned int nb_chapters
Number of chapters in AVChapter array.
Ambient viewing environment metadata as defined by H.274.
char * av_stristr(const char *s1, const char *s2)
Locate the first case-independent occurrence in the string haystack of the string needle.
@ AV_PKT_DATA_NEW_EXTRADATA
The AV_PKT_DATA_NEW_EXTRADATA is used to notify the codec or the format that the extradata buffer was...
int av_dict_count(const AVDictionary *m)
Get number of entries in dictionary.
@ AV_PKT_DATA_MASTERING_DISPLAY_METADATA
Mastering display metadata (based on SMPTE-2086:2014).
static void dump_stereo3d(void *ctx, const AVPacketSideData *sd, int log_level)
void avcodec_string(char *buf, int buf_size, AVCodecContext *enc, int encode)
static void hex_dump_internal(void *avcl, FILE *f, int level, const uint8_t *buf, int size)
unsigned int nb_submixes
Number of submixes in the presentation.
int disposition
Stream group disposition - a combination of AV_DISPOSITION_* flags.
unsigned MaxCLL
Max content light level (cd/m^2).
AVStream ** streams
A list of all streams in the file.
This structure stores auxiliary information for decoding, presenting, or otherwise processing the cod...
void av_spherical_tile_bounds(const AVSphericalMapping *map, size_t width, size_t height, size_t *left, size_t *top, size_t *right, size_t *bottom)
Convert the bounding fields from an AVSphericalVideo from 0.32 fixed point to pixels.
AVRational ambient_light_x
Normalized x chromaticity coordinate of the environmental ambient light in the nominal viewing enviro...
int32_t album_gain
Same as track_gain, but for the whole album.
AVRational avg_frame_rate
Average framerate.
@ AV_AUDIO_SERVICE_TYPE_VOICE_OVER
@ AV_PKT_DATA_S12M_TIMECODE
Timecode which conforms to SMPTE ST 12-1:2014.
static void dump_disposition(int disposition, int log_level)
enum AVIAMFSubmixLayoutType layout_type
@ AV_SIDE_DATA_PARAM_CHANGE_SAMPLE_RATE
#define AV_LOG_VERBOSE
Detailed information.
int64_t duration
Duration of this packet in AVStream->time_base units, 0 if unknown.
@ AV_SPHERICAL_EQUIRECTANGULAR_TILE
Video represents a portion of a sphere mapped on a flat surface using equirectangular projection.
uint32_t baseline
The distance between the centres of the lenses of the camera system, in micrometers.
int qmax
maximum quantizer
int nb_channels
Number of channels in this layout.
#define AV_PKT_FLAG_KEY
The packet contains a keyframe.
static void print_fps(double d, const char *postfix, int log_level)
Content light level needed by to transmit HDR over HDMI (CTA-861.3).
@ AV_PKT_DATA_DOVI_CONF
DOVI configuration ref: dolby-vision-bitstreams-within-the-iso-base-media-file-format-v2....
AVRational horizontal_field_of_view
Horizontal field of view, in degrees.
static void dump_cropping(void *ctx, const AVPacketSideData *sd)
static void print_gain(void *ctx, const char *str, int32_t gain, int log_level)
@ AV_PKT_DATA_REPLAYGAIN
This side data should be associated with an audio stream and contains ReplayGain information in form ...
static void dump_mastering_display_metadata(void *ctx, const AVPacketSideData *sd, int log_level)
const struct AVCodec * codec
@ AV_PKT_DATA_PALETTE
An AV_PKT_DATA_PALETTE side data packet contains exactly AVPALETTE_SIZE bytes worth of palette.
AVStreamGroupTileGrid holds information on how to combine several independent images on a single canv...
Submix layout as defined in section 3.7.6 of IAMF.
uint8_t dv_md_compression
int coded_width
Width of the canvas.
struct AVCodecContext * avctx
The codec context used by avformat_find_stream_info, the parser, etc.
static void dump_cpb(void *ctx, const AVPacketSideData *sd, int log_level)
static void dump_content_light_metadata(void *ctx, const AVPacketSideData *sd, int log_level)
uint8_t * dump_separator
dump format separator.
int coded_height
Width of the canvas.
AVStreamGroupLCEVC is meant to define the relation between video streams and a data stream containing...
#define us(width, name, range_min, range_max, subs,...)
int av_opt_set(void *obj, const char *name, const char *val, int search_flags)
AVRational ambient_illuminance
Environmental illuminance of the ambient viewing environment in lux.
int av_reduce(int *dst_num, int *dst_den, int64_t num, int64_t den, int64_t max)
Reduce a fraction.
const char * av_stereo3d_view_name(unsigned int view)
Provide a human-readable name of a given stereo3d view.
int64_t bit_rate
Total stream bitrate in bit/s, 0 if not available.
AVDictionary * annotations
A dictionary of strings describing the submix in different languages.
static void dump_ambient_viewing_environment_metadata(void *ctx, const AVPacketSideData *sd)
@ AV_PKT_DATA_PARAM_CHANGE
An AV_PKT_DATA_PARAM_CHANGE side data packet is laid out as follows:
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
AVDictionary * metadata
Metadata that applies to the whole file.
void av_dump_format(AVFormatContext *ic, int index, const char *url, int is_output)
Print detailed information about the input or output format, such as duration, bitrate,...
AVDictionaryEntry * av_dict_get(const AVDictionary *m, const char *key, const AVDictionaryEntry *prev, int flags)
Get a dictionary entry with matching key.
int av_channel_layout_describe(const AVChannelLayout *channel_layout, char *buf, size_t buf_size)
Get a human-readable string describing the channel layout properties.
static void dump_audioservicetype(void *ctx, const AVPacketSideData *sd, int log_level)
@ AV_SIDE_DATA_PARAM_CHANGE_DIMENSIONS
AVCodecContext * avcodec_alloc_context3(const AVCodec *codec)
Allocate an AVCodecContext and set its fields to default values.
int64_t end
chapter start/end time in time_base units
AVRational sample_aspect_ratio
Video only.
const struct AVInputFormat * iformat
The input container format.
static void dump_replaygain(void *ctx, const AVPacketSideData *sd, int log_level)
static double av_q2d(AVRational a)
Convert an AVRational to a double.
unsigned int index
Group index in AVFormatContext.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
static void dump_metadata(void *ctx, const AVDictionary *m, const char *indent, int log_level)
int codec_info_nb_frames
Number of frames that have been demuxed during avformat_find_stream_info()
AVChannelLayout ch_layout
@ AV_PKT_DATA_STEREO3D
This side data should be associated with a video stream and contains Stereoscopic 3D information in f...
@ AV_AUDIO_SERVICE_TYPE_HEARING_IMPAIRED
int nb_coded_side_data
Amount of entries in coded_side_data.
uint32_t track_peak
Peak track amplitude, with 100000 representing full scale (but values may overflow).
This structure describes the bitrate properties of an encoded bitstream.
static void dump_paramchange(void *ctx, const AVPacketSideData *sd, int log_level)
int flags
Additional information about the frame packing.
int height
Height of the final image for presentation.
AVCodecParameters * codecpar
Codec parameters associated with this stream.
int avcodec_parameters_to_context(AVCodecContext *codec, const struct AVCodecParameters *par)
Fill the codec context based on the values from the supplied codec parameters.
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented.
uint8_t dv_bl_signal_compatibility_id
AVPacketSideData * coded_side_data
Additional data associated with the grid.
void avcodec_free_context(AVCodecContext **avctx)
Free the codec context and everything associated with it and write NULL to the provided pointer.
Rational number (pair of numerator and denominator).
enum AVPacketSideDataType type
AVRational horizontal_disparity_adjustment
Relative shift of the left and right images, which changes the zero parallax plane.
A layer defining a Channel Layout in the Audio Element.
static void dump_sidedata(void *ctx, const AVPacketSideData *side_data, int nb_side_data, int w, int h, AVRational avg_frame_rate, const char *indent, int log_level)
@ AV_AUDIO_SERVICE_TYPE_EMERGENCY
AVChannelLayout ch_layout
Audio only.
static void dump_dictionary(void *ctx, const AVDictionary *m, const char *name, const char *indent, int log_level)
@ AV_PKT_DATA_CONTENT_LIGHT_LEVEL
Content light level (based on CTA-861.3).
Undefined Behavior In the C some operations are like signed integer dereferencing freed accessing outside allocated Undefined Behavior must not occur in a C it is not safe even if the output of undefined operations is unused The unsafety may seem nit picking but Optimizing compilers have in fact optimized code on the assumption that no undefined Behavior occurs Optimizing code based on wrong assumptions can and has in some cases lead to effects beyond the output of computations The signed integer overflow problem in speed critical code Code which is highly optimized and works with signed integers sometimes has the problem that often the output of the computation does not c
unsigned int audio_element_id
The id of the Audio Element this submix element references.
@ AV_PKT_DATA_SPHERICAL
This side data should be associated with a video stream and corresponds to the AVSphericalMapping str...
Submix layout as defined in section 3.7 of IAMF.
unsigned int nb_streams
Number of elements in AVFormatContext.streams.
enum AVStereo3DPrimaryEye primary_eye
Which eye is the primary eye when rendering in 2D.
const char * av_spherical_projection_name(enum AVSphericalProjection projection)
Provide a human-readable name of a given AVSphericalProjection.
static void dump_s12m_timecode(void *ctx, AVRational avg_frame_rate, const AVPacketSideData *sd, int log_level)
@ AV_SPHERICAL_CUBEMAP
Video frame is split into 6 faces of a cube, and arranged on a 3x2 layout.
const char * av_stereo3d_primary_eye_name(unsigned int eye)
Provide a human-readable name of a given stereo3d primary eye.
#define AV_NOPTS_VALUE
Undefined timestamp value.
struct AVIAMFAudioElement * iamf_audio_element
int32_t track_gain
Track replay gain in microbels (divide by 100000 to get the value in dB).
int64_t min_bitrate
Minimum bitrate of the stream, in bits per second.
AVRational sample_aspect_ratio
sample aspect ratio (0 if unknown)
int64_t dts
Decompression timestamp in AVStream->time_base units; the time at which the packet is decompressed.
uint32_t padding
Number of pixels to pad from the edge of each cube face.
Information on how to combine one or more audio streams, as defined in section 3.6 of IAMF.
unsigned int nb_tiles
Amount of tiles in the grid.
struct AVStreamGroupLCEVC * lcevc
int flags
A combination of AV_PKT_FLAG values.
int64_t avg_bitrate
Average bitrate of the stream, in bits per second.
#define AV_STEREO3D_FLAG_INVERT
Inverted views, Right/Bottom represents the left view.
AVStream ** streams
A list of streams in the group.
static void dump_stream_format(const AVFormatContext *ic, int i, int group_index, int index, int is_output, int log_level)
struct AVIAMFMixPresentation * iamf_mix_presentation
#define AV_LOG_INFO
Standard information.
char av_get_picture_type_char(enum AVPictureType pict_type)
Return a single letter to describe the given picture type pict_type.
uint64_t vbv_delay
The delay between the time the packet this structure is associated with is received and the time when...
int nb_coded_side_data
Amount of entries in coded_side_data.
#define HEXDUMP_PRINT(...)
@ AV_PKT_DATA_CPB_PROPERTIES
This side data corresponds to the AVCPBProperties struct.
int width
Width of the final image for presentation.
int32_t roll
Rotation around the forward vector [-180, 180].
@ AV_PKT_DATA_H263_MB_INFO
An AV_PKT_DATA_H263_MB_INFO side data packet contains a number of structures with info about macroblo...
#define i(width, name, range_min, range_max)
int64_t pts
Presentation timestamp in AVStream->time_base units; the time at which the decompressed packet will b...
char * av_timecode_make_smpte_tc_string2(char *buf, AVRational rate, uint32_t tcsmpte, int prevent_df, int skip_field)
Get the timecode string from the SMPTE timecode format.
unsigned properties
Properties of the stream that gets decoded.
#define AV_TIME_BASE
Internal time base represented as integer.
@ AV_PKT_DATA_ICC_PROFILE
ICC profile data consisting of an opaque octet buffer following the format described by ISO 15076-1.
Information on how to render and mix one or more AVIAMFAudioElement to generate the final audio outpu...
int64_t max_bitrate
Maximum bitrate of the stream, in bits per second.
@ AV_AUDIO_SERVICE_TYPE_VISUALLY_IMPAIRED
void * av_mallocz(size_t size)
Allocate a memory block with alignment suitable for all memory accesses (including vectors if availab...
New fields can be added to the end with minor version bumps.
int64_t av_rescale(int64_t a, int64_t b, int64_t c)
Rescale a 64-bit integer with rounding to nearest.
AVPacketSideData * coded_side_data
Additional data associated with the entire stream.
struct AVStreamGroupTileGrid::@364 * offsets
An nb_tiles sized array of offsets in pixels from the topleft edge of the canvas, indicating where ea...
static int av_cmp_q(AVRational a, AVRational b)
Compare two rationals.
unsigned int nb_layouts
Number of layouts in the submix.
int disposition
Stream disposition - a combination of AV_DISPOSITION_* flags.
int id
Format-specific stream ID.
void av_hex_dump_log(void *avcl, int level, const uint8_t *buf, int size)
Send a nice hexadecimal dump of a buffer to the log.
const struct AVOutputFormat * oformat
The output container format.
int64_t buffer_size
The size of the buffer to which the ratecontrol is applied, in bits.
int32_t pitch
Rotation around the right vector [-90, 90].
AVDictionary * metadata
Metadata that applies to the whole group.
enum AVStereo3DType type
How views are packed within the video.
@ AV_AUDIO_SERVICE_TYPE_KARAOKE
Tag MUST be and< 10hcoeff half pel interpolation filter coefficients, hcoeff[0] are the 2 middle coefficients[1] are the next outer ones and so on, resulting in a filter like:...eff[2], hcoeff[1], hcoeff[0], hcoeff[0], hcoeff[1], hcoeff[2] ... the sign of the coefficients is not explicitly stored but alternates after each coeff and coeff[0] is positive, so ...,+,-,+,-,+,+,-,+,-,+,... hcoeff[0] is not explicitly stored but found by subtracting the sum of all stored coefficients with signs from 32 hcoeff[0]=32 - hcoeff[1] - hcoeff[2] - ... a good choice for hcoeff and htaps is htaps=6 hcoeff={40,-10, 2} an alternative which requires more computations at both encoder and decoder side and may or may not be better is htaps=8 hcoeff={42,-14, 6,-2}ref_frames minimum of the number of available reference frames and max_ref_frames for example the first frame after a key frame always has ref_frames=1spatial_decomposition_type wavelet type 0 is a 9/7 symmetric compact integer wavelet 1 is a 5/3 symmetric compact integer wavelet others are reserved stored as delta from last, last is reset to 0 if always_reset||keyframeqlog quality(logarithmic quantizer scale) stored as delta from last, last is reset to 0 if always_reset||keyframemv_scale stored as delta from last, last is reset to 0 if always_reset||keyframe FIXME check that everything works fine if this changes between framesqbias dequantization bias stored as delta from last, last is reset to 0 if always_reset||keyframeblock_max_depth maximum depth of the block tree stored as delta from last, last is reset to 0 if always_reset||keyframequant_table quantization tableHighlevel bitstream structure:==============================--------------------------------------------|Header|--------------------------------------------|------------------------------------|||Block0||||split?||||yes no||||......... intra?||||:Block01 :yes no||||:Block02 :....... ..........||||:Block03 ::y DC ::ref index:||||:Block04 ::cb DC ::motion x :||||......... :cr DC ::motion y :||||....... ..........|||------------------------------------||------------------------------------|||Block1|||...|--------------------------------------------|------------ ------------ ------------|||Y subbands||Cb subbands||Cr subbands||||--- ---||--- ---||--- ---|||||LL0||HL0||||LL0||HL0||||LL0||HL0|||||--- ---||--- ---||--- ---||||--- ---||--- ---||--- ---|||||LH0||HH0||||LH0||HH0||||LH0||HH0|||||--- ---||--- ---||--- ---||||--- ---||--- ---||--- ---|||||HL1||LH1||||HL1||LH1||||HL1||LH1|||||--- ---||--- ---||--- ---||||--- ---||--- ---||--- ---|||||HH1||HL2||||HH1||HL2||||HH1||HL2|||||...||...||...|||------------ ------------ ------------|--------------------------------------------Decoding process:=================------------|||Subbands|------------||||------------|Intra DC||||LL0 subband prediction ------------|\ Dequantization ------------------- \||Reference frames|\ IDWT|------- -------|Motion \|||Frame 0||Frame 1||Compensation . OBMC v -------|------- -------|--------------. \------> Frame n output Frame Frame<----------------------------------/|...|------------------- Range Coder:============Binary Range Coder:------------------- The implemented range coder is an adapted version based upon "Range encoding: an algorithm for removing redundancy from a digitised message." by G. N. N. Martin. The symbols encoded by the Snow range coder are bits(0|1). The associated probabilities are not fix but change depending on the symbol mix seen so far. bit seen|new state ---------+----------------------------------------------- 0|256 - state_transition_table[256 - old_state];1|state_transition_table[old_state];state_transition_table={ 0, 0, 0, 0, 0, 0, 0, 0, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, 70, 71, 72, 73, 74, 75, 75, 76, 77, 78, 79, 80, 81, 82, 83, 84, 85, 86, 87, 88, 89, 90, 91, 92, 93, 94, 94, 95, 96, 97, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 114, 115, 116, 117, 118, 119, 120, 121, 122, 123, 124, 125, 126, 127, 128, 129, 130, 131, 132, 133, 133, 134, 135, 136, 137, 138, 139, 140, 141, 142, 143, 144, 145, 146, 147, 148, 149, 150, 151, 152, 152, 153, 154, 155, 156, 157, 158, 159, 160, 161, 162, 163, 164, 165, 166, 167, 168, 169, 170, 171, 171, 172, 173, 174, 175, 176, 177, 178, 179, 180, 181, 182, 183, 184, 185, 186, 187, 188, 189, 190, 190, 191, 192, 194, 194, 195, 196, 197, 198, 199, 200, 201, 202, 202, 204, 205, 206, 207, 208, 209, 209, 210, 211, 212, 213, 215, 215, 216, 217, 218, 219, 220, 220, 222, 223, 224, 225, 226, 227, 227, 229, 229, 230, 231, 232, 234, 234, 235, 236, 237, 238, 239, 240, 241, 242, 243, 244, 245, 246, 247, 248, 248, 0, 0, 0, 0, 0, 0, 0};FIXME Range Coding of integers:------------------------- FIXME Neighboring Blocks:===================left and top are set to the respective blocks unless they are outside of the image in which case they are set to the Null block top-left is set to the top left block unless it is outside of the image in which case it is set to the left block if this block has no larger parent block or it is at the left side of its parent block and the top right block is not outside of the image then the top right block is used for top-right else the top-left block is used Null block y, cb, cr are 128 level, ref, mx and my are 0 Motion Vector Prediction:=========================1. the motion vectors of all the neighboring blocks are scaled to compensate for the difference of reference frames scaled_mv=(mv *(256 *(current_reference+1)/(mv.reference+1))+128)> the median of the scaled left
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_RL32
main external API structure.
int index
stream index in AVFormatContext
unsigned int nb_streams
Number of elements in AVStreamGroup.streams.
int qmin
minimum quantizer
@ AV_AUDIO_SERVICE_TYPE_COMMENTARY
AVChannelLayout sound_system
Channel layout matching one of Sound Systems A to J of ITU-2051-3, plus 7.1.2ch and 3....
uint32_t album_peak
Same as track_peak, but for the whole album,.
AVRational r_frame_rate
Real base framerate of the stream.
int width
Width of the final stream for presentation.
int64_t duration
Duration of the stream, in AV_TIME_BASE fractional seconds.
static void dump_spherical(void *ctx, int w, int h, const AVPacketSideData *sd, int log_level)
static void pkt_dump_internal(void *avcl, FILE *f, int level, const AVPacket *pkt, int dump_payload, AVRational time_base)
ReplayGain information (see http://wiki.hydrogenaudio.org/index.php?title=ReplayGain_1....
unsigned int nb_elements
Number of elements in the submix.
int coded_width
Bitstream width / height, may be different from width/height e.g.
@ AV_PKT_DATA_AUDIO_SERVICE_TYPE
This side data should be associated with an audio stream and corresponds to enum AVAudioServiceType.
enum AVStreamGroupParamsType type
Group type.
static void print_peak(void *ctx, const char *str, uint32_t peak, int log_level)
AVDictionary * annotations
A dictionary of strings describing the mix in different languages.
unsigned int nb_stream_groups
Number of elements in AVFormatContext.stream_groups.
int height
Height of the final image for presentation.
enum AVStereo3DView view
Determines which views are packed.
@ AV_AUDIO_SERVICE_TYPE_EFFECTS
unsigned MaxFALL
Max average light level per frame (cd/m^2).
This structure stores compressed data.
int width
picture width / height.
Submix element as defined in section 3.7 of IAMF.
#define flags(name, subs,...)
int64_t start_time
Position of the first frame of the component, in AV_TIME_BASE fractional seconds.
const char * av_stereo3d_type_name(unsigned int type)
Provide a human-readable name of a given stereo3d type.
void av_pkt_dump_log2(void *avcl, int level, const AVPacket *pkt, int dump_payload, const AVStream *st)
Send a nice dump of a packet to the log.
@ AV_AUDIO_SERVICE_TYPE_DIALOGUE
Stereo 3D type: this structure describes how two videos are packed within a single video surface,...
AVRational ambient_light_y
Normalized y chromaticity coordinate of the environmental ambient light in the nominal viewing enviro...
unsigned int idx
Index of the stream in the group this tile references.
AVRational time_base
time base in which the start/end timestamps are specified
AVIAMFSubmix ** submixes
Array of submixes.
static void dump_stream_group(const AVFormatContext *ic, uint8_t *printed, int i, int index, int is_output)
@ AV_AUDIO_SERVICE_TYPE_MAIN
This structure describes how to handle spherical videos, outlining information about projection,...
const AVDictionaryEntry * av_dict_iterate(const AVDictionary *m, const AVDictionaryEntry *prev)
Iterate over a dictionary.
int32_t yaw
Rotation around the up vector [-180, 180].
double av_display_rotation_get(const int32_t matrix[9])
Extract the rotation component of the transformation matrix.
void av_hex_dump(FILE *f, const uint8_t *buf, int size)
Send a nice hexadecimal dump of a buffer to the specified file stream.