Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/videolan/dav1d.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRonald S. Bultje <rsbultje@gmail.com>2018-11-24 04:57:07 +0300
committerRonald S. Bultje <rsbultje@gmail.com>2018-11-25 21:38:31 +0300
commit3e95d8ed717082430db632d290309f4f7326e7fe (patch)
treea49b071b86a0bf1be5e77d3da24d6be8446a1181 /include
parent9c4bf181e0871d73cceb6e166447cfc3c6c7ca42 (diff)
Move Dav1dPictureParameters-related entries to top of Dav1dSeqHdr
Also remove redundant entries from Dav1dPictureParameters, and move documentation of these fields into Dav1dFrame/SequenceHeader instead.
Diffstat (limited to 'include')
-rw-r--r--include/dav1d/headers.h74
-rw-r--r--include/dav1d/picture.h21
2 files changed, 49 insertions, 46 deletions
diff --git a/include/dav1d/headers.h b/include/dav1d/headers.h
index a3d64be..cdde681 100644
--- a/include/dav1d/headers.h
+++ b/include/dav1d/headers.h
@@ -161,7 +161,43 @@ enum Dav1dChromaSamplePosition {
};
typedef struct Dav1dSequenceHeader {
+ /**
+ * Stream profile, 0 for 8-10 bits/component 4:2:0 or monochrome;
+ * 1 for 8-10 bits/component 4:4:4; 2 for 4:2:2 at any bits/component,
+ * or 12 bits/component at any chroma subsampling.
+ */
int profile;
+ /**
+ * Maximum dimensions for this stream. In non-scalable streams, these
+ * are often the actual dimensions of the stream, although that is not
+ * a normative requirement.
+ */
+ int max_width, max_height;
+ int bpc; ///< bits per pixel component (8 or 10)
+ enum Dav1dPixelLayout layout; ///< format of the picture
+ enum Dav1dColorPrimaries pri; ///< color primaries (av1)
+ enum Dav1dTransferCharacteristics trc; ///< transfer characteristics (av1)
+ enum Dav1dMatrixCoefficients mtrx; ///< matrix coefficients (av1)
+ enum Dav1dChromaSamplePosition chr; ///< chroma sample position (av1)
+ /**
+ * Pixel data uses JPEG pixel range ([0,255] for 8bits) instead of
+ * MPEG pixel range ([16,235] for 8bits luma, [16,240] for 8bits chroma).
+ */
+ int color_range;
+
+ int num_operating_points;
+ struct Dav1dSequenceHeaderOperatingPoint {
+ int major_level, minor_level;
+ int initial_display_delay;
+ int idc;
+ int tier;
+ int decoder_model_param_present;
+ int decoder_buffer_delay;
+ int encoder_buffer_delay;
+ int low_delay_mode;
+ int display_model_param_present;
+ } operating_points[DAV1D_MAX_OPERATING_POINTS];
+
int still_picture;
int reduced_still_picture_header;
int timing_info_present;
@@ -175,19 +211,7 @@ typedef struct Dav1dSequenceHeader {
int buffer_removal_delay_length;
int frame_presentation_delay_length;
int display_model_info_present;
- int num_operating_points;
- struct Dav1dSequenceHeaderOperatingPoint {
- int idc;
- int major_level, minor_level;
- int tier;
- int decoder_model_param_present;
- int decoder_buffer_delay;
- int encoder_buffer_delay;
- int low_delay_mode;
- int display_model_param_present;
- int initial_display_delay;
- } operating_points[DAV1D_MAX_OPERATING_POINTS];
- int max_width, max_height, width_n_bits, height_n_bits;
+ int width_n_bits, height_n_bits;
int frame_id_numbers_present;
int delta_frame_id_n_bits;
int frame_id_n_bits;
@@ -207,15 +231,8 @@ typedef struct Dav1dSequenceHeader {
int super_res;
int cdef;
int restoration;
- int bpc;
int hbd;
int color_description_present;
- enum Dav1dPixelLayout layout;
- enum Dav1dColorPrimaries pri;
- enum Dav1dTransferCharacteristics trc;
- enum Dav1dMatrixCoefficients mtrx;
- enum Dav1dChromaSamplePosition chr;
- int color_range;
int separate_uv_delta_q;
int film_grain_present;
} Dav1dSequenceHeader;
@@ -260,11 +277,19 @@ typedef struct Dav1dFilmGrainData {
} Dav1dFilmGrainData;
typedef struct Dav1dFrameHeader {
+ enum Dav1dFrameType frame_type; ///< type of the picture
+ int width[2 /* { coded_width, superresolution_upscaled_width } */], height;
+ int frame_offset; ///< frame number
+ struct {
+ int present, update;
+ Dav1dFilmGrainData data;
+ } film_grain; ///< film grain parameters
+ int temporal_id, spatial_id; ///< spatial and temporal id of the frame for SVC
+
int show_existing_frame;
int existing_frame_idx;
int frame_id;
int frame_presentation_delay;
- enum Dav1dFrameType frame_type;
int show_frame;
int showable_frame;
int error_resilient_mode;
@@ -277,9 +302,7 @@ typedef struct Dav1dFrameHeader {
struct Dav1dFrameHeaderOperatingPoint {
int buffer_removal_time;
} operating_points[DAV1D_MAX_OPERATING_POINTS];
- int frame_offset;
int refresh_frame_flags;
- int width[2 /* { coded_width, superresolution_upscaled_width } */], height;
int render_width, render_height;
struct {
int width_scale_denominator;
@@ -350,11 +373,6 @@ typedef struct Dav1dFrameHeader {
int warp_motion;
int reduced_txtp_set;
Dav1dWarpedMotionParams gmv[DAV1D_REFS_PER_FRAME];
- struct {
- int present, update;
- Dav1dFilmGrainData data;
- } film_grain;
- int temporal_id, spatial_id;
} Dav1dFrameHeader;
#endif /* __DAV1D_HEADERS_H__ */
diff --git a/include/dav1d/picture.h b/include/dav1d/picture.h
index 41775c2..bdb26d9 100644
--- a/include/dav1d/picture.h
+++ b/include/dav1d/picture.h
@@ -38,25 +38,13 @@ typedef struct Dav1dPictureParameters {
int w; ///< width (in pixels)
int h; ///< height (in pixels)
enum Dav1dPixelLayout layout; ///< format of the picture
- enum Dav1dFrameType type; ///< type of the picture
int bpc; ///< bits per pixel component (8 or 10)
-
- enum Dav1dColorPrimaries pri; ///< color primaries (av1)
- enum Dav1dTransferCharacteristics trc; ///< transfer characteristics (av1)
- enum Dav1dMatrixCoefficients mtrx; ///< matrix coefficients (av1)
- enum Dav1dChromaSamplePosition chr; ///< chroma sample position (av1)
- /**
- * Pixel data uses JPEG pixel range ([0,255] for 8bits) instead of
- * MPEG pixel range ([16,235] for 8bits luma, [16,240] for 8bits chroma).
- */
- int fullrange;
-
- Dav1dFilmGrainData film_grain; ///< film grain parameters
- int spatial_id; ///< spatial id of the frame for scalable AV1
} Dav1dPictureParameters;
typedef struct Dav1dPicture {
- int poc; ///< frame number
+ struct Dav1dRef *frame_hdr_ref, *seq_hdr_ref;
+ Dav1dSequenceHeader *seq_hdr;
+ Dav1dFrameHeader *frame_hdr;
/**
* Pointers to planar image data (Y is [0], U is [1], V is [2]). The data
@@ -67,9 +55,6 @@ typedef struct Dav1dPicture {
*/
void *data[3];
struct Dav1dRef *ref; ///< allocation origin
- struct Dav1dRef *frame_hdr_ref, *seq_hdr_ref;
- Dav1dSequenceHeader *seq_hdr;
- Dav1dFrameHeader *frame_hdr;
/**
* Number of bytes between 2 lines in data[] for luma [0] or chroma [1].