Issue #1948 - Update nestegg library.

I separated out the AVC and AAC support code into a patch file so that
 the upstream code can be updated freely without having to re-add AVC
 and AAC support again. At least if the upstream changes are not too
 extensive...
This should effectively backport Mozilla bug 1539686, which allows the
 browser to parse the color information from WebM videos that uses HDR.
This commit is contained in:
Job Bautista 2022-06-30 10:31:31 +08:00 committed by roytam1
commit b7a771fce6
6 changed files with 245 additions and 22 deletions

View file

@ -72,8 +72,8 @@ extern "C" {
#define NESTEGG_CODEC_VP9 2 /**< Track uses Google On2 VP9 codec. */
#define NESTEGG_CODEC_OPUS 3 /**< Track uses Xiph Opus codec. */
#define NESTEGG_CODEC_AV1 4 /**< Track uses AOMedia AV1 codec. */
#define NESTEGG_CODEC_AVC1 5 /**< Track uses AVC1 'h264' */
#define NESTEGG_CODEC_AAC 6 /**< Track uses AAC 'mp4a' */
#define NESTEGG_CODEC_AVC1 5 /**< Track uses AVC1 'h264' codec. */
#define NESTEGG_CODEC_AAC 6 /**< Track uses AAC 'mp4a' codec. */
#define NESTEGG_CODEC_UNKNOWN INT_MAX /**< Track uses unknown codec. */
#define NESTEGG_VIDEO_MONO 0 /**< Track is mono video. */
@ -152,6 +152,30 @@ typedef struct {
unsigned int crop_left; /**< Pixels to crop from the left of the frame. */
unsigned int crop_right; /**< Pixels to crop from the right of the frame. */
unsigned int alpha_mode; /**< 1 if an additional opacity stream is available, otherwise 0. */
unsigned int matrix_coefficients; /**< See Table 4 of ISO/IEC 23001-8:2016. */
unsigned int range; /**< Clipping of color ranges. */
unsigned int transfer_characteristics; /**< See Table 3 of ISO/IEC 23091-4. */
unsigned int primaries; /**< See Table 2 of ISO/IEC 23091-4. */
double primary_r_chromacity_x; /**< Red X chromaticity coordinate per CIE 1931.
NaN means element not present. */
double primary_r_chromacity_y; /**< Red Y chromaticity coordinate per CIE 1931.
NaN means element not present. */
double primary_g_chromacity_x; /**< Green X chromaticity coordinate per CIE 1931.
NaN means element not present. */
double primary_g_chromacity_y; /**< Green Y chromaticity coordinate per CIE 1931.
NaN means element not present. */
double primary_b_chromacity_x; /**< Blue X chromaticity coordinate per CIE 1931.
NaN means element not present. */
double primary_b_chromacity_y; /**< Blue Y chromaticity coordinate per CIE 1931.
NaN means element not present. */
double white_point_chromaticity_x; /**< White X chromaticity coordinate per CIE 1931.
NaN means element not present. */
double white_point_chromaticity_y; /**< White Y chromaticity coordinate per CIE 1931.
NaN means element not present. */
double luminance_max; /**< Maximum luminance in cd/m2.
NaN means element not present. */
double luminance_min; /**< Minimum luminance in cd/m2.
NaN means element not present. */
} nestegg_video_params;
/** Parameters specific to an audio track. */