-+
-+#include "attributes.h"
-+#include "error.h"
-+#include "macros.h"
-+#include "version.h"
-+
-+#ifdef HAVE_AV_CONFIG_H
-+# include "config.h"
-+# include "intmath.h"
-+# include "internal.h"
-+#else
-+# include "mem.h"
-+#endif /* HAVE_AV_CONFIG_H */
-+
-+//rounded division & shift
-+#define RSHIFT(a,b) ((a) > 0 ? ((a) + ((1<<(b))>>1))>>(b) : ((a) + ((1<<(b))>>1)-1)>>(b))
-+/* assume b>0 */
-+#define ROUNDED_DIV(a,b) (((a)>=0 ? (a) + ((b)>>1) : (a) - ((b)>>1))/(b))
-+/* Fast a/(1<=0 and b>=0 */
-+#define AV_CEIL_RSHIFT(a,b) (!av_builtin_constant_p(b) ? -((-(a)) >> (b)) \
-+ : ((a) + (1<<(b)) - 1) >> (b))
-+/* Backwards compat. */
-+#define FF_CEIL_RSHIFT AV_CEIL_RSHIFT
-+
-+#define FFUDIV(a,b) (((a)>0 ?(a):(a)-(b)+1) / (b))
-+#define FFUMOD(a,b) ((a)-(b)*FFUDIV(a,b))
-+
-+/**
-+ * Absolute value, Note, INT_MIN / INT64_MIN result in undefined behavior as they
-+ * are not representable as absolute values of their type. This is the same
-+ * as with *abs()
-+ * @see FFNABS()
-+ */
-+#define FFABS(a) ((a) >= 0 ? (a) : (-(a)))
-+#define FFSIGN(a) ((a) > 0 ? 1 : -1)
-+
-+/**
-+ * Negative Absolute value.
-+ * this works for all integers of all types.
-+ * As with many macros, this evaluates its argument twice, it thus must not have
-+ * a sideeffect, that is FFNABS(x++) has undefined behavior.
-+ */
-+#define FFNABS(a) ((a) <= 0 ? (a) : (-(a)))
-+
-+/**
-+ * Unsigned Absolute value.
-+ * This takes the absolute value of a signed int and returns it as a unsigned.
-+ * This also works with INT_MIN which would otherwise not be representable
-+ * As with many macros, this evaluates its argument twice.
-+ */
-+#define FFABSU(a) ((a) <= 0 ? -(unsigned)(a) : (unsigned)(a))
-+#define FFABS64U(a) ((a) <= 0 ? -(uint64_t)(a) : (uint64_t)(a))
-+
-+/* misc math functions */
-+
-+#ifndef av_ceil_log2
-+# define av_ceil_log2 av_ceil_log2_c
-+#endif
-+#ifndef av_clip
-+# define av_clip av_clip_c
-+#endif
-+#ifndef av_clip64
-+# define av_clip64 av_clip64_c
-+#endif
-+#ifndef av_clip_uint8
-+# define av_clip_uint8 av_clip_uint8_c
-+#endif
-+#ifndef av_clip_int8
-+# define av_clip_int8 av_clip_int8_c
-+#endif
-+#ifndef av_clip_uint16
-+# define av_clip_uint16 av_clip_uint16_c
-+#endif
-+#ifndef av_clip_int16
-+# define av_clip_int16 av_clip_int16_c
-+#endif
-+#ifndef av_clipl_int32
-+# define av_clipl_int32 av_clipl_int32_c
-+#endif
-+#ifndef av_clip_intp2
-+# define av_clip_intp2 av_clip_intp2_c
-+#endif
-+#ifndef av_clip_uintp2
-+# define av_clip_uintp2 av_clip_uintp2_c
-+#endif
-+#ifndef av_sat_add32
-+# define av_sat_add32 av_sat_add32_c
-+#endif
-+#ifndef av_sat_dadd32
-+# define av_sat_dadd32 av_sat_dadd32_c
-+#endif
-+#ifndef av_sat_sub32
-+# define av_sat_sub32 av_sat_sub32_c
-+#endif
-+#ifndef av_sat_dsub32
-+# define av_sat_dsub32 av_sat_dsub32_c
-+#endif
-+#ifndef av_sat_add64
-+# define av_sat_add64 av_sat_add64_c
-+#endif
-+#ifndef av_sat_sub64
-+# define av_sat_sub64 av_sat_sub64_c
-+#endif
-+#ifndef av_clipf
-+# define av_clipf av_clipf_c
-+#endif
-+#ifndef av_clipd
-+# define av_clipd av_clipd_c
-+#endif
-+#ifndef av_zero_extend
-+# define av_zero_extend av_zero_extend_c
-+#endif
-+#ifndef av_popcount
-+# define av_popcount av_popcount_c
-+#endif
-+#ifndef av_popcount64
-+# define av_popcount64 av_popcount64_c
-+#endif
-+#ifndef av_parity
-+# define av_parity av_parity_c
-+#endif
-+
-+#ifndef av_log2
-+av_const int av_log2(unsigned v);
-+#endif
-+
-+#ifndef av_log2_16bit
-+av_const int av_log2_16bit(unsigned v);
-+#endif
-+
-+/**
-+ * Clip a signed integer value into the amin-amax range.
-+ * @param a value to clip
-+ * @param amin minimum value of the clip range
-+ * @param amax maximum value of the clip range
-+ * @return clipped value
-+ */
-+static av_always_inline av_const int av_clip_c(int a, int amin, int amax)
-+{
-+#if defined(HAVE_AV_CONFIG_H) && defined(ASSERT_LEVEL) && ASSERT_LEVEL >= 2
-+ if (amin > amax) abort();
-+#endif
-+ if (a < amin) return amin;
-+ else if (a > amax) return amax;
-+ else return a;
-+}
-+
-+/**
-+ * Clip a signed 64bit integer value into the amin-amax range.
-+ * @param a value to clip
-+ * @param amin minimum value of the clip range
-+ * @param amax maximum value of the clip range
-+ * @return clipped value
-+ */
-+static av_always_inline av_const int64_t av_clip64_c(int64_t a, int64_t amin, int64_t amax)
-+{
-+#if defined(HAVE_AV_CONFIG_H) && defined(ASSERT_LEVEL) && ASSERT_LEVEL >= 2
-+ if (amin > amax) abort();
-+#endif
-+ if (a < amin) return amin;
-+ else if (a > amax) return amax;
-+ else return a;
-+}
-+
-+/**
-+ * Clip a signed integer value into the 0-255 range.
-+ * @param a value to clip
-+ * @return clipped value
-+ */
-+static av_always_inline av_const uint8_t av_clip_uint8_c(int a)
-+{
-+ if (a&(~0xFF)) return (~a)>>31;
-+ else return a;
-+}
-+
-+/**
-+ * Clip a signed integer value into the -128,127 range.
-+ * @param a value to clip
-+ * @return clipped value
-+ */
-+static av_always_inline av_const int8_t av_clip_int8_c(int a)
-+{
-+ if ((a+0x80U) & ~0xFF) return (a>>31) ^ 0x7F;
-+ else return a;
-+}
-+
-+/**
-+ * Clip a signed integer value into the 0-65535 range.
-+ * @param a value to clip
-+ * @return clipped value
-+ */
-+static av_always_inline av_const uint16_t av_clip_uint16_c(int a)
-+{
-+ if (a&(~0xFFFF)) return (~a)>>31;
-+ else return a;
-+}
-+
-+/**
-+ * Clip a signed integer value into the -32768,32767 range.
-+ * @param a value to clip
-+ * @return clipped value
-+ */
-+static av_always_inline av_const int16_t av_clip_int16_c(int a)
-+{
-+ if ((a+0x8000U) & ~0xFFFF) return (a>>31) ^ 0x7FFF;
-+ else return a;
-+}
-+
-+/**
-+ * Clip a signed 64-bit integer value into the -2147483648,2147483647 range.
-+ * @param a value to clip
-+ * @return clipped value
-+ */
-+static av_always_inline av_const int32_t av_clipl_int32_c(int64_t a)
-+{
-+ if ((a+UINT64_C(0x80000000)) & ~UINT64_C(0xFFFFFFFF)) return (int32_t)((a>>63) ^ 0x7FFFFFFF);
-+ else return (int32_t)a;
-+}
-+
-+/**
-+ * Clip a signed integer into the -(2^p),(2^p-1) range.
-+ * @param a value to clip
-+ * @param p bit position to clip at
-+ * @return clipped value
-+ */
-+static av_always_inline av_const int av_clip_intp2_c(int a, int p)
-+{
-+ if (((unsigned)a + (1U << p)) & ~((2U << p) - 1))
-+ return (a >> 31) ^ ((1 << p) - 1);
-+ else
-+ return a;
-+}
-+
-+/**
-+ * Clip a signed integer to an unsigned power of two range.
-+ * @param a value to clip
-+ * @param p bit position to clip at
-+ * @return clipped value
-+ */
-+static av_always_inline av_const unsigned av_clip_uintp2_c(int a, int p)
-+{
-+ if (a & ~((1U<> 31 & ((1U<
= 2
-+ if (p > 31) abort();
-+#endif
-+ return a & ((1U << p) - 1);
-+}
-+
-+/**
-+ * Add two signed 32-bit values with saturation.
-+ *
-+ * @param a one value
-+ * @param b another value
-+ * @return sum with signed saturation
-+ */
-+static av_always_inline int av_sat_add32_c(int a, int b)
-+{
-+ return av_clipl_int32((int64_t)a + b);
-+}
-+
-+/**
-+ * Add a doubled value to another value with saturation at both stages.
-+ *
-+ * @param a first value
-+ * @param b value doubled and added to a
-+ * @return sum sat(a + sat(2*b)) with signed saturation
-+ */
-+static av_always_inline int av_sat_dadd32_c(int a, int b)
-+{
-+ return av_sat_add32(a, av_sat_add32(b, b));
-+}
-+
-+/**
-+ * Subtract two signed 32-bit values with saturation.
-+ *
-+ * @param a one value
-+ * @param b another value
-+ * @return difference with signed saturation
-+ */
-+static av_always_inline int av_sat_sub32_c(int a, int b)
-+{
-+ return av_clipl_int32((int64_t)a - b);
-+}
-+
-+/**
-+ * Subtract a doubled value from another value with saturation at both stages.
-+ *
-+ * @param a first value
-+ * @param b value doubled and subtracted from a
-+ * @return difference sat(a - sat(2*b)) with signed saturation
-+ */
-+static av_always_inline int av_sat_dsub32_c(int a, int b)
-+{
-+ return av_sat_sub32(a, av_sat_add32(b, b));
-+}
-+
-+/**
-+ * Add two signed 64-bit values with saturation.
-+ *
-+ * @param a one value
-+ * @param b another value
-+ * @return sum with signed saturation
-+ */
-+static av_always_inline int64_t av_sat_add64_c(int64_t a, int64_t b) {
-+#if (!defined(__INTEL_COMPILER) && AV_GCC_VERSION_AT_LEAST(5,1)) || AV_HAS_BUILTIN(__builtin_add_overflow)
-+ int64_t tmp;
-+ return !__builtin_add_overflow(a, b, &tmp) ? tmp : (tmp < 0 ? INT64_MAX : INT64_MIN);
-+#else
-+ int64_t s = a+(uint64_t)b;
-+ if ((int64_t)(a^b | ~s^b) >= 0)
-+ return INT64_MAX ^ (b >> 63);
-+ return s;
-+#endif
-+}
-+
-+/**
-+ * Subtract two signed 64-bit values with saturation.
-+ *
-+ * @param a one value
-+ * @param b another value
-+ * @return difference with signed saturation
-+ */
-+static av_always_inline int64_t av_sat_sub64_c(int64_t a, int64_t b) {
-+#if (!defined(__INTEL_COMPILER) && AV_GCC_VERSION_AT_LEAST(5,1)) || AV_HAS_BUILTIN(__builtin_sub_overflow)
-+ int64_t tmp;
-+ return !__builtin_sub_overflow(a, b, &tmp) ? tmp : (tmp < 0 ? INT64_MAX : INT64_MIN);
-+#else
-+ if (b <= 0 && a >= INT64_MAX + b)
-+ return INT64_MAX;
-+ if (b >= 0 && a <= INT64_MIN + b)
-+ return INT64_MIN;
-+ return a - b;
-+#endif
-+}
-+
-+/**
-+ * Clip a float value into the amin-amax range.
-+ * If a is nan or -inf amin will be returned.
-+ * If a is +inf amax will be returned.
-+ * @param a value to clip
-+ * @param amin minimum value of the clip range
-+ * @param amax maximum value of the clip range
-+ * @return clipped value
-+ */
-+static av_always_inline av_const float av_clipf_c(float a, float amin, float amax)
-+{
-+#if defined(HAVE_AV_CONFIG_H) && defined(ASSERT_LEVEL) && ASSERT_LEVEL >= 2
-+ if (amin > amax) abort();
-+#endif
-+ return FFMIN(FFMAX(a, amin), amax);
-+}
-+
-+/**
-+ * Clip a double value into the amin-amax range.
-+ * If a is nan or -inf amin will be returned.
-+ * If a is +inf amax will be returned.
-+ * @param a value to clip
-+ * @param amin minimum value of the clip range
-+ * @param amax maximum value of the clip range
-+ * @return clipped value
-+ */
-+static av_always_inline av_const double av_clipd_c(double a, double amin, double amax)
-+{
-+#if defined(HAVE_AV_CONFIG_H) && defined(ASSERT_LEVEL) && ASSERT_LEVEL >= 2
-+ if (amin > amax) abort();
-+#endif
-+ return FFMIN(FFMAX(a, amin), amax);
-+}
-+
-+/** Compute ceil(log2(x)).
-+ * @param x value used to compute ceil(log2(x))
-+ * @return computed ceiling of log2(x)
-+ */
-+static av_always_inline av_const int av_ceil_log2_c(int x)
-+{
-+ return av_log2((x - 1U) << 1);
-+}
-+
-+/**
-+ * Count number of bits set to one in x
-+ * @param x value to count bits of
-+ * @return the number of bits set to one in x
-+ */
-+static av_always_inline av_const int av_popcount_c(uint32_t x)
-+{
-+ x -= (x >> 1) & 0x55555555;
-+ x = (x & 0x33333333) + ((x >> 2) & 0x33333333);
-+ x = (x + (x >> 4)) & 0x0F0F0F0F;
-+ x += x >> 8;
-+ return (x + (x >> 16)) & 0x3F;
-+}
-+
-+/**
-+ * Count number of bits set to one in x
-+ * @param x value to count bits of
-+ * @return the number of bits set to one in x
-+ */
-+static av_always_inline av_const int av_popcount64_c(uint64_t x)
-+{
-+ return av_popcount((uint32_t)x) + av_popcount((uint32_t)(x >> 32));
-+}
-+
-+static av_always_inline av_const int av_parity_c(uint32_t v)
-+{
-+ return av_popcount(v) & 1;
-+}
-+
-+/**
-+ * Convert a UTF-8 character (up to 4 bytes) to its 32-bit UCS-4 encoded form.
-+ *
-+ * @param val Output value, must be an lvalue of type uint32_t.
-+ * @param GET_BYTE Expression reading one byte from the input.
-+ * Evaluated up to 7 times (4 for the currently
-+ * assigned Unicode range). With a memory buffer
-+ * input, this could be *ptr++, or if you want to make sure
-+ * that *ptr stops at the end of a NULL terminated string then
-+ * *ptr ? *ptr++ : 0
-+ * @param ERROR Expression to be evaluated on invalid input,
-+ * typically a goto statement.
-+ *
-+ * @warning ERROR should not contain a loop control statement which
-+ * could interact with the internal while loop, and should force an
-+ * exit from the macro code (e.g. through a goto or a return) in order
-+ * to prevent undefined results.
-+ */
-+#define GET_UTF8(val, GET_BYTE, ERROR)\
-+ val= (uint8_t)(GET_BYTE);\
-+ {\
-+ uint32_t top = (val & 128) >> 1;\
-+ if ((val & 0xc0) == 0x80 || val >= 0xFE)\
-+ {ERROR}\
-+ while (val & top) {\
-+ unsigned int tmp = (uint8_t)(GET_BYTE) - 128;\
-+ if(tmp>>6)\
-+ {ERROR}\
-+ val= (val<<6) + tmp;\
-+ top <<= 5;\
-+ }\
-+ val &= (top << 1) - 1;\
-+ }
-+
-+/**
-+ * Convert a UTF-16 character (2 or 4 bytes) to its 32-bit UCS-4 encoded form.
-+ *
-+ * @param val Output value, must be an lvalue of type uint32_t.
-+ * @param GET_16BIT Expression returning two bytes of UTF-16 data converted
-+ * to native byte order. Evaluated one or two times.
-+ * @param ERROR Expression to be evaluated on invalid input,
-+ * typically a goto statement.
-+ */
-+#define GET_UTF16(val, GET_16BIT, ERROR)\
-+ val = (uint16_t)(GET_16BIT);\
-+ {\
-+ unsigned int hi = val - 0xD800;\
-+ if (hi < 0x800) {\
-+ val = (uint16_t)(GET_16BIT) - 0xDC00;\
-+ if (val > 0x3FFU || hi > 0x3FFU)\
-+ {ERROR}\
-+ val += (hi<<10) + 0x10000;\
-+ }\
-+ }\
-+
-+/**
-+ * @def PUT_UTF8(val, tmp, PUT_BYTE)
-+ * Convert a 32-bit Unicode character to its UTF-8 encoded form (up to 4 bytes long).
-+ * @param val is an input-only argument and should be of type uint32_t. It holds
-+ * a UCS-4 encoded Unicode character that is to be converted to UTF-8. If
-+ * val is given as a function it is executed only once.
-+ * @param tmp is a temporary variable and should be of type uint8_t. It
-+ * represents an intermediate value during conversion that is to be
-+ * output by PUT_BYTE.
-+ * @param PUT_BYTE writes the converted UTF-8 bytes to any proper destination.
-+ * It could be a function or a statement, and uses tmp as the input byte.
-+ * For example, PUT_BYTE could be "*output++ = tmp;" PUT_BYTE will be
-+ * executed up to 4 times for values in the valid UTF-8 range and up to
-+ * 7 times in the general case, depending on the length of the converted
-+ * Unicode character.
-+ */
-+#define PUT_UTF8(val, tmp, PUT_BYTE)\
-+ {\
-+ int bytes, shift;\
-+ uint32_t in = val;\
-+ if (in < 0x80) {\
-+ tmp = in;\
-+ PUT_BYTE\
-+ } else {\
-+ bytes = (av_log2(in) + 4) / 5;\
-+ shift = (bytes - 1) * 6;\
-+ tmp = (256 - (256 >> bytes)) | (in >> shift);\
-+ PUT_BYTE\
-+ while (shift >= 6) {\
-+ shift -= 6;\
-+ tmp = 0x80 | ((in >> shift) & 0x3f);\
-+ PUT_BYTE\
-+ }\
-+ }\
-+ }
-+
-+/**
-+ * @def PUT_UTF16(val, tmp, PUT_16BIT)
-+ * Convert a 32-bit Unicode character to its UTF-16 encoded form (2 or 4 bytes).
-+ * @param val is an input-only argument and should be of type uint32_t. It holds
-+ * a UCS-4 encoded Unicode character that is to be converted to UTF-16. If
-+ * val is given as a function it is executed only once.
-+ * @param tmp is a temporary variable and should be of type uint16_t. It
-+ * represents an intermediate value during conversion that is to be
-+ * output by PUT_16BIT.
-+ * @param PUT_16BIT writes the converted UTF-16 data to any proper destination
-+ * in desired endianness. It could be a function or a statement, and uses tmp
-+ * as the input byte. For example, PUT_BYTE could be "*output++ = tmp;"
-+ * PUT_BYTE will be executed 1 or 2 times depending on input character.
-+ */
-+#define PUT_UTF16(val, tmp, PUT_16BIT)\
-+ {\
-+ uint32_t in = val;\
-+ if (in < 0x10000) {\
-+ tmp = in;\
-+ PUT_16BIT\
-+ } else {\
-+ tmp = 0xD800 | ((in - 0x10000) >> 10);\
-+ PUT_16BIT\
-+ tmp = 0xDC00 | ((in - 0x10000) & 0x3FF);\
-+ PUT_16BIT\
-+ }\
-+ }\
-+
-+#endif /* AVUTIL_COMMON_H */
-diff --git a/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/cpu.h b/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/cpu.h
-new file mode 100644
-index 000000000000..c41686344f00
---- /dev/null
-+++ b/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/cpu.h
-@@ -0,0 +1,152 @@
-+/*
-+ * Copyright (c) 2000, 2001, 2002 Fabrice Bellard
-+ *
-+ * This file is part of FFmpeg.
-+ *
-+ * FFmpeg is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2.1 of the License, or (at your option) any later version.
-+ *
-+ * FFmpeg is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with FFmpeg; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ */
-+
-+#ifndef AVUTIL_CPU_H
-+#define AVUTIL_CPU_H
-+
-+#include
-+#include "version.h"
-+
-+#if FF_API_CPU_FLAG_FORCE
-+#define AV_CPU_FLAG_FORCE 0x80000000 /* @deprecated, should not be used */
-+#endif
-+
-+ /* lower 16 bits - CPU features */
-+#define AV_CPU_FLAG_MMX 0x0001 ///< standard MMX
-+#define AV_CPU_FLAG_MMXEXT 0x0002 ///< SSE integer functions or AMD MMX ext
-+#define AV_CPU_FLAG_MMX2 0x0002 ///< SSE integer functions or AMD MMX ext
-+#define AV_CPU_FLAG_3DNOW 0x0004 ///< AMD 3DNOW
-+#define AV_CPU_FLAG_SSE 0x0008 ///< SSE functions
-+#define AV_CPU_FLAG_SSE2 0x0010 ///< PIV SSE2 functions
-+#define AV_CPU_FLAG_SSE2SLOW 0x40000000 ///< SSE2 supported, but usually not faster
-+ ///< than regular MMX/SSE (e.g. Core1)
-+#define AV_CPU_FLAG_3DNOWEXT 0x0020 ///< AMD 3DNowExt
-+#define AV_CPU_FLAG_SSE3 0x0040 ///< Prescott SSE3 functions
-+#define AV_CPU_FLAG_SSE3SLOW 0x20000000 ///< SSE3 supported, but usually not faster
-+ ///< than regular MMX/SSE (e.g. Core1)
-+#define AV_CPU_FLAG_SSSE3 0x0080 ///< Conroe SSSE3 functions
-+#define AV_CPU_FLAG_SSSE3SLOW 0x4000000 ///< SSSE3 supported, but usually not faster
-+#define AV_CPU_FLAG_ATOM 0x10000000 ///< Atom processor, some SSSE3 instructions are slower
-+#define AV_CPU_FLAG_SSE4 0x0100 ///< Penryn SSE4.1 functions
-+#define AV_CPU_FLAG_SSE42 0x0200 ///< Nehalem SSE4.2 functions
-+#define AV_CPU_FLAG_AESNI 0x80000 ///< Advanced Encryption Standard functions
-+#define AV_CPU_FLAG_CLMUL 0x400000 ///< Carry-less Multiplication instruction
-+#define AV_CPU_FLAG_AVX 0x4000 ///< AVX functions: requires OS support even if YMM registers aren't used
-+#define AV_CPU_FLAG_AVXSLOW 0x8000000 ///< AVX supported, but slow when using YMM registers (e.g. Bulldozer)
-+#define AV_CPU_FLAG_XOP 0x0400 ///< Bulldozer XOP functions
-+#define AV_CPU_FLAG_FMA4 0x0800 ///< Bulldozer FMA4 functions
-+#define AV_CPU_FLAG_CMOV 0x1000 ///< supports cmov instruction
-+#define AV_CPU_FLAG_AVX2 0x8000 ///< AVX2 functions: requires OS support even if YMM registers aren't used
-+#define AV_CPU_FLAG_FMA3 0x10000 ///< Haswell FMA3 functions
-+#define AV_CPU_FLAG_BMI1 0x20000 ///< Bit Manipulation Instruction Set 1
-+#define AV_CPU_FLAG_BMI2 0x40000 ///< Bit Manipulation Instruction Set 2
-+#define AV_CPU_FLAG_AVX512 0x100000 ///< AVX-512 functions: requires OS support even if YMM/ZMM registers aren't used
-+#define AV_CPU_FLAG_AVX512ICL 0x200000 ///< F/CD/BW/DQ/VL/VNNI/IFMA/VBMI/VBMI2/VPOPCNTDQ/BITALG/GFNI/VAES/VPCLMULQDQ
-+#define AV_CPU_FLAG_SLOW_GATHER 0x2000000 ///< CPU has slow gathers.
-+
-+#define AV_CPU_FLAG_ALTIVEC 0x0001 ///< standard
-+#define AV_CPU_FLAG_VSX 0x0002 ///< ISA 2.06
-+#define AV_CPU_FLAG_POWER8 0x0004 ///< ISA 2.07
-+
-+#define AV_CPU_FLAG_ARMV5TE (1 << 0)
-+#define AV_CPU_FLAG_ARMV6 (1 << 1)
-+#define AV_CPU_FLAG_ARMV6T2 (1 << 2)
-+#define AV_CPU_FLAG_VFP (1 << 3)
-+#define AV_CPU_FLAG_VFPV3 (1 << 4)
-+#define AV_CPU_FLAG_NEON (1 << 5)
-+#define AV_CPU_FLAG_ARMV8 (1 << 6)
-+#define AV_CPU_FLAG_VFP_VM (1 << 7) ///< VFPv2 vector mode, deprecated in ARMv7-A and unavailable in various CPUs implementations
-+#define AV_CPU_FLAG_DOTPROD (1 << 8)
-+#define AV_CPU_FLAG_I8MM (1 << 9)
-+#define AV_CPU_FLAG_SVE (1 <<10)
-+#define AV_CPU_FLAG_SVE2 (1 <<11)
-+#define AV_CPU_FLAG_SME (1 <<12)
-+#define AV_CPU_FLAG_ARM_CRC (1 <<13)
-+#define AV_CPU_FLAG_SME2 (1 <<14)
-+#define AV_CPU_FLAG_SME_I16I64 (1 <<15)
-+#define AV_CPU_FLAG_SETEND (1 <<16)
-+#define AV_CPU_FLAG_PMULL (1 <<17)
-+#define AV_CPU_FLAG_EOR3 (1 <<18)
-+
-+#define AV_CPU_FLAG_MMI (1 << 0)
-+#define AV_CPU_FLAG_MSA (1 << 1)
-+
-+//Loongarch SIMD extension.
-+#define AV_CPU_FLAG_LSX (1 << 0)
-+#define AV_CPU_FLAG_LASX (1 << 1)
-+
-+// RISC-V extensions
-+#define AV_CPU_FLAG_RVI (1 << 0) ///< I (full GPR bank)
-+#define AV_CPU_FLAG_RVV_I32 (1 << 3) ///< Vectors of 8/16/32-bit int's */
-+#define AV_CPU_FLAG_RVV_F32 (1 << 4) ///< Vectors of float's */
-+#define AV_CPU_FLAG_RVV_I64 (1 << 5) ///< Vectors of 64-bit int's */
-+#define AV_CPU_FLAG_RVV_F64 (1 << 6) ///< Vectors of double's
-+#define AV_CPU_FLAG_RVB_BASIC (1 << 7) ///< Basic bit-manipulations
-+#define AV_CPU_FLAG_RV_ZVBB (1 << 9) ///< Vector basic bit-manipulations
-+#define AV_CPU_FLAG_RV_MISALIGNED (1 <<10) ///< Fast misaligned accesses
-+#define AV_CPU_FLAG_RVB (1 <<11) ///< B (bit manipulations)
-+
-+// WASM extensions
-+#define AV_CPU_FLAG_SIMD128 (1 << 0)
-+
-+/**
-+ * Return the flags which specify extensions supported by the CPU.
-+ * The returned value is affected by av_force_cpu_flags() if that was used
-+ * before. So av_get_cpu_flags() can easily be used in an application to
-+ * detect the enabled cpu flags.
-+ */
-+int av_get_cpu_flags(void);
-+
-+/**
-+ * Disables cpu detection and forces the specified flags.
-+ * -1 is a special case that disables forcing of specific flags.
-+ */
-+void av_force_cpu_flags(int flags);
-+
-+/**
-+ * Parse CPU caps from a string and update the given AV_CPU_* flags based on that.
-+ *
-+ * @return negative on error.
-+ */
-+int av_parse_cpu_caps(unsigned *flags, const char *s);
-+
-+/**
-+ * @return the number of logical CPU cores present.
-+ */
-+int av_cpu_count(void);
-+
-+/**
-+ * Overrides cpu count detection and forces the specified count.
-+ * Count < 1 disables forcing of specific count.
-+ */
-+void av_cpu_force_count(int count);
-+
-+/**
-+ * Get the maximum data alignment that may be required by FFmpeg.
-+ *
-+ * Note that this is affected by the build configuration and the CPU flags mask,
-+ * so e.g. if the CPU supports AVX, but libavutil has been built with
-+ * --disable-avx or the AV_CPU_FLAG_AVX flag has been disabled through
-+ * av_set_cpu_flags_mask(), then this function will behave as if AVX is not
-+ * present.
-+ */
-+size_t av_cpu_max_align(void);
-+
-+#endif /* AVUTIL_CPU_H */
-diff --git a/dom/media/platforms/ffmpeg/ffmpeg62/include/libavutil/dict.h b/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/dict.h
-similarity index 100%
-copy from dom/media/platforms/ffmpeg/ffmpeg62/include/libavutil/dict.h
-copy to dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/dict.h
-diff --git a/dom/media/platforms/ffmpeg/ffmpeg62/include/libavutil/error.h b/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/error.h
-similarity index 100%
-copy from dom/media/platforms/ffmpeg/ffmpeg62/include/libavutil/error.h
-copy to dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/error.h
-diff --git a/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/frame.h b/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/frame.h
-new file mode 100644
-index 000000000000..e8cc765e5dbe
---- /dev/null
-+++ b/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/frame.h
-@@ -0,0 +1,1221 @@
-+/*
-+ * This file is part of FFmpeg.
-+ *
-+ * FFmpeg is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2.1 of the License, or (at your option) any later version.
-+ *
-+ * FFmpeg is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with FFmpeg; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ */
-+
-+/**
-+ * @file
-+ * @ingroup lavu_frame
-+ * reference-counted frame API
-+ */
-+
-+#ifndef AVUTIL_FRAME_H
-+#define AVUTIL_FRAME_H
-+
-+#include
-+#include
-+
-+#include "avutil.h"
-+#include "buffer.h"
-+#include "channel_layout.h"
-+#include "dict.h"
-+#include "rational.h"
-+#include "samplefmt.h"
-+#include "pixfmt.h"
-+#include "version.h"
-+
-+
-+/**
-+ * @defgroup lavu_frame AVFrame
-+ * @ingroup lavu_data
-+ *
-+ * @{
-+ * AVFrame is an abstraction for reference-counted raw multimedia data.
-+ */
-+
-+enum AVFrameSideDataType {
-+ /**
-+ * The data is the AVPanScan struct defined in libavcodec.
-+ */
-+ AV_FRAME_DATA_PANSCAN,
-+ /**
-+ * ATSC A53 Part 4 Closed Captions.
-+ * A53 CC bitstream is stored as uint8_t in AVFrameSideData.data.
-+ * The number of bytes of CC data is AVFrameSideData.size.
-+ */
-+ AV_FRAME_DATA_A53_CC,
-+ /**
-+ * Stereoscopic 3d metadata.
-+ * The data is the AVStereo3D struct defined in libavutil/stereo3d.h.
-+ */
-+ AV_FRAME_DATA_STEREO3D,
-+ /**
-+ * The data is the AVMatrixEncoding enum defined in libavutil/channel_layout.h.
-+ */
-+ AV_FRAME_DATA_MATRIXENCODING,
-+ /**
-+ * Metadata relevant to a downmix procedure.
-+ * The data is the AVDownmixInfo struct defined in libavutil/downmix_info.h.
-+ */
-+ AV_FRAME_DATA_DOWNMIX_INFO,
-+ /**
-+ * ReplayGain information in the form of the AVReplayGain struct.
-+ */
-+ AV_FRAME_DATA_REPLAYGAIN,
-+ /**
-+ * This side data contains a 3x3 transformation matrix describing an affine
-+ * transformation that needs to be applied to the frame for correct
-+ * presentation.
-+ *
-+ * See libavutil/display.h for a detailed description of the data.
-+ */
-+ AV_FRAME_DATA_DISPLAYMATRIX,
-+ /**
-+ * Active Format Description data consisting of a single byte as specified
-+ * in ETSI TS 101 154 using AVActiveFormatDescription enum.
-+ */
-+ AV_FRAME_DATA_AFD,
-+ /**
-+ * Motion vectors exported by some codecs (on demand through the export_mvs
-+ * flag set in the libavcodec AVCodecContext flags2 option).
-+ * The data is the AVMotionVector struct defined in
-+ * libavutil/motion_vector.h.
-+ */
-+ AV_FRAME_DATA_MOTION_VECTORS,
-+ /**
-+ * Recommends skipping the specified number of samples. This is exported
-+ * only if the "skip_manual" AVOption is set in libavcodec.
-+ * This has the same format as AV_PKT_DATA_SKIP_SAMPLES.
-+ * @code
-+ * u32le number of samples to skip from start of this packet
-+ * u32le number of samples to skip from end of this packet
-+ * u8 reason for start skip
-+ * u8 reason for end skip (0=padding silence, 1=convergence)
-+ * @endcode
-+ */
-+ AV_FRAME_DATA_SKIP_SAMPLES,
-+ /**
-+ * This side data must be associated with an audio frame and corresponds to
-+ * enum AVAudioServiceType defined in avcodec.h.
-+ */
-+ AV_FRAME_DATA_AUDIO_SERVICE_TYPE,
-+ /**
-+ * Mastering display metadata associated with a video frame. The payload is
-+ * an AVMasteringDisplayMetadata type and contains information about the
-+ * mastering display color volume.
-+ */
-+ AV_FRAME_DATA_MASTERING_DISPLAY_METADATA,
-+ /**
-+ * The GOP timecode in 25 bit timecode format. Data format is 64-bit integer.
-+ * This is set on the first frame of a GOP that has a temporal reference of 0.
-+ */
-+ AV_FRAME_DATA_GOP_TIMECODE,
-+
-+ /**
-+ * The data represents the AVSphericalMapping structure defined in
-+ * libavutil/spherical.h.
-+ */
-+ AV_FRAME_DATA_SPHERICAL,
-+
-+ /**
-+ * Content light level (based on CTA-861.3). This payload contains data in
-+ * the form of the AVContentLightMetadata struct.
-+ */
-+ AV_FRAME_DATA_CONTENT_LIGHT_LEVEL,
-+
-+ /**
-+ * The data contains an ICC profile as an opaque octet buffer following the
-+ * format described by ISO 15076-1 with an optional name defined in the
-+ * metadata key entry "name".
-+ */
-+ AV_FRAME_DATA_ICC_PROFILE,
-+
-+ /**
-+ * Timecode which conforms to SMPTE ST 12-1. The data is an array of 4 uint32_t
-+ * where the first uint32_t describes how many (1-3) of the other timecodes are used.
-+ * The timecode format is described in the documentation of av_timecode_get_smpte_from_framenum()
-+ * function in libavutil/timecode.h.
-+ */
-+ AV_FRAME_DATA_S12M_TIMECODE,
-+
-+ /**
-+ * HDR dynamic metadata associated with a video frame. The payload is
-+ * an AVDynamicHDRPlus type and contains information for color
-+ * volume transform - application 4 of SMPTE 2094-40:2016 standard.
-+ */
-+ AV_FRAME_DATA_DYNAMIC_HDR_PLUS,
-+
-+ /**
-+ * Regions Of Interest, the data is an array of AVRegionOfInterest type, the number of
-+ * array element is implied by AVFrameSideData.size / AVRegionOfInterest.self_size.
-+ */
-+ AV_FRAME_DATA_REGIONS_OF_INTEREST,
-+
-+ /**
-+ * Encoding parameters for a video frame, as described by AVVideoEncParams.
-+ */
-+ AV_FRAME_DATA_VIDEO_ENC_PARAMS,
-+
-+ /**
-+ * User data unregistered metadata associated with a video frame.
-+ * This is the H.26[45] UDU SEI message, and shouldn't be used for any other purpose
-+ * The data is stored as uint8_t in AVFrameSideData.data which is 16 bytes of
-+ * uuid_iso_iec_11578 followed by AVFrameSideData.size - 16 bytes of user_data_payload_byte.
-+ */
-+ AV_FRAME_DATA_SEI_UNREGISTERED,
-+
-+ /**
-+ * Film grain parameters for a frame, described by AVFilmGrainParams.
-+ * Must be present for every frame which should have film grain applied.
-+ *
-+ * May be present multiple times, for example when there are multiple
-+ * alternative parameter sets for different video signal characteristics.
-+ * The user should select the most appropriate set for the application.
-+ */
-+ AV_FRAME_DATA_FILM_GRAIN_PARAMS,
-+
-+ /**
-+ * Bounding boxes for object detection and classification,
-+ * as described by AVDetectionBBoxHeader.
-+ */
-+ AV_FRAME_DATA_DETECTION_BBOXES,
-+
-+ /**
-+ * Dolby Vision RPU raw data, suitable for passing to x265
-+ * or other libraries. Array of uint8_t, with NAL emulation
-+ * bytes intact.
-+ */
-+ AV_FRAME_DATA_DOVI_RPU_BUFFER,
-+
-+ /**
-+ * Parsed Dolby Vision metadata, suitable for passing to a software
-+ * implementation. The payload is the AVDOVIMetadata struct defined in
-+ * libavutil/dovi_meta.h.
-+ */
-+ AV_FRAME_DATA_DOVI_METADATA,
-+
-+ /**
-+ * HDR Vivid dynamic metadata associated with a video frame. The payload is
-+ * an AVDynamicHDRVivid type and contains information for color
-+ * volume transform - CUVA 005.1-2021.
-+ */
-+ AV_FRAME_DATA_DYNAMIC_HDR_VIVID,
-+
-+ /**
-+ * Ambient viewing environment metadata, as defined by H.274.
-+ */
-+ AV_FRAME_DATA_AMBIENT_VIEWING_ENVIRONMENT,
-+
-+ /**
-+ * Provide encoder-specific hinting information about changed/unchanged
-+ * portions of a frame. It can be used to pass information about which
-+ * macroblocks can be skipped because they didn't change from the
-+ * corresponding ones in the previous frame. This could be useful for
-+ * applications which know this information in advance to speed up
-+ * encoding.
-+ */
-+ AV_FRAME_DATA_VIDEO_HINT,
-+
-+ /**
-+ * Raw LCEVC payload data, as a uint8_t array, with NAL emulation
-+ * bytes intact.
-+ */
-+ AV_FRAME_DATA_LCEVC,
-+
-+ /**
-+ * This side data must be associated with a video frame.
-+ * The presence of this side data indicates that the video stream is
-+ * composed of multiple views (e.g. stereoscopic 3D content,
-+ * cf. H.264 Annex H or H.265 Annex G).
-+ * The data is an int storing the view ID.
-+ */
-+ AV_FRAME_DATA_VIEW_ID,
-+
-+ /**
-+ * This side data contains information about the reference display width(s)
-+ * and reference viewing distance(s) as well as information about the
-+ * corresponding reference stereo pair(s), i.e., the pair(s) of views to be
-+ * displayed for the viewer's left and right eyes on the reference display
-+ * at the reference viewing distance.
-+ * The payload is the AV3DReferenceDisplaysInfo struct defined in
-+ * libavutil/tdrdi.h.
-+ */
-+ AV_FRAME_DATA_3D_REFERENCE_DISPLAYS,
-+
-+ /**
-+ * Exchangeable image file format metadata. The payload is a buffer containing
-+ * EXIF metadata, starting with either 49 49 2a 00, or 4d 4d 00 2a. These four
-+ * bytes signify the endianness, and occur as the first part of the TIFF header.
-+ */
-+ AV_FRAME_DATA_EXIF,
-+
-+ /**
-+ * HDR dynamic metadata associated with a video frame. The payload is
-+ * an AVDynamicHDRSmpte2094App5 type and contains information for color
-+ * volume transform as specified in the SMPTE 2094-50 standard.
-+ */
-+ AV_FRAME_DATA_DYNAMIC_HDR_SMPTE_2094_APP5,
-+
-+ /**
-+ * IAMF Mix Gain Parameter Data associated with the audio frame. This metadata
-+ * is in the form of the AVIAMFParamDefinition struct and contains information
-+ * defined in sections 3.6.1 and 3.8.1 of the Immersive Audio Model and
-+ * Formats standard.
-+ */
-+ AV_FRAME_DATA_IAMF_MIX_GAIN_PARAM,
-+
-+ /**
-+ * IAMF Demixing Info Parameter Data associated with the audio frame. This
-+ * metadata is in the form of the AVIAMFParamDefinition struct and contains
-+ * information defined in sections 3.6.1 and 3.8.2 of the Immersive Audio Model
-+ * and Formats standard.
-+ */
-+ AV_FRAME_DATA_IAMF_DEMIXING_INFO_PARAM,
-+
-+ /**
-+ * IAMF Recon Gain Info Parameter Data associated with the audio frame. This
-+ * metadata is in the form of the AVIAMFParamDefinition struct and contains
-+ * information defined in sections 3.6.1 and 3.8.3 of the Immersive Audio Model
-+ * and Formats standard.
-+ */
-+ AV_FRAME_DATA_IAMF_RECON_GAIN_INFO_PARAM,
-+
-+ /**
-+ * Color information from a RAW camera codecs, needed to correctly process
-+ * the video data. The payload is an AVRawColorParams struct defined in
-+ * libavutil/raw_color_params.h.
-+ */
-+ AV_FRAME_DATA_RAW_COLOR_PARAMS,
-+
-+ /**
-+ * Metadata relevant to a downmix procedure in the form of a remixig matrix.
-+ * The data is the AVDownmixMatrix struct defined in libavutil/downmix_info.h.
-+ */
-+ AV_FRAME_DATA_DOWNMIX_MATRIX,
-+};
-+
-+enum AVActiveFormatDescription {
-+ AV_AFD_SAME = 8,
-+ AV_AFD_4_3 = 9,
-+ AV_AFD_16_9 = 10,
-+ AV_AFD_14_9 = 11,
-+ AV_AFD_4_3_SP_14_9 = 13,
-+ AV_AFD_16_9_SP_14_9 = 14,
-+ AV_AFD_SP_4_3 = 15,
-+};
-+
-+
-+/**
-+ * Structure to hold side data for an AVFrame.
-+ *
-+ * sizeof(AVFrameSideData) is not a part of the public ABI, so new fields may be added
-+ * to the end with a minor bump.
-+ */
-+typedef struct AVFrameSideData {
-+ enum AVFrameSideDataType type;
-+ uint8_t *data;
-+ size_t size;
-+ AVDictionary *metadata;
-+ AVBufferRef *buf;
-+} AVFrameSideData;
-+
-+enum AVSideDataProps {
-+ /**
-+ * The side data type can be used in stream-global structures.
-+ * Side data types without this property are only meaningful on per-frame
-+ * basis.
-+ */
-+ AV_SIDE_DATA_PROP_GLOBAL = (1 << 0),
-+
-+ /**
-+ * Multiple instances of this side data type can be meaningfully present in
-+ * a single side data array.
-+ */
-+ AV_SIDE_DATA_PROP_MULTI = (1 << 1),
-+
-+ /**
-+ * Side data depends on the video dimensions. Side data with this property
-+ * loses its meaning when rescaling or cropping the image, unless
-+ * either recomputed or adjusted to the new resolution.
-+ */
-+ AV_SIDE_DATA_PROP_SIZE_DEPENDENT = (1 << 2),
-+
-+ /**
-+ * Side data depends on the video color space. Side data with this property
-+ * loses its meaning when changing the video color encoding, e.g. by
-+ * adapting to a different set of primaries or transfer characteristics.
-+ */
-+ AV_SIDE_DATA_PROP_COLOR_DEPENDENT = (1 << 3),
-+
-+ /**
-+ * Side data depends on the channel layout. Side data with this property
-+ * loses its meaning when downmixing or upmixing, unless either recomputed
-+ * or adjusted to the new layout.
-+ */
-+ AV_SIDE_DATA_PROP_CHANNEL_DEPENDENT = (1 << 4),
-+};
-+
-+/**
-+ * This struct describes the properties of a side data type. Its instance
-+ * corresponding to a given type can be obtained from av_frame_side_data_desc().
-+ */
-+typedef struct AVSideDataDescriptor {
-+ /**
-+ * Human-readable side data description.
-+ */
-+ const char *name;
-+
-+ /**
-+ * Side data property flags, a combination of AVSideDataProps values.
-+ */
-+ unsigned props;
-+} AVSideDataDescriptor;
-+
-+/**
-+ * Structure describing a single Region Of Interest.
-+ *
-+ * When multiple regions are defined in a single side-data block, they
-+ * should be ordered from most to least important - some encoders are only
-+ * capable of supporting a limited number of distinct regions, so will have
-+ * to truncate the list.
-+ *
-+ * When overlapping regions are defined, the first region containing a given
-+ * area of the frame applies.
-+ */
-+typedef struct AVRegionOfInterest {
-+ /**
-+ * Must be set to the size of this data structure (that is,
-+ * sizeof(AVRegionOfInterest)).
-+ */
-+ uint32_t self_size;
-+ /**
-+ * Distance in pixels from the top edge of the frame to the top and
-+ * bottom edges and from the left edge of the frame to the left and
-+ * right edges of the rectangle defining this region of interest.
-+ *
-+ * The constraints on a region are encoder dependent, so the region
-+ * actually affected may be slightly larger for alignment or other
-+ * reasons.
-+ */
-+ int top;
-+ int bottom;
-+ int left;
-+ int right;
-+ /**
-+ * Quantisation offset.
-+ *
-+ * Must be in the range -1 to +1. A value of zero indicates no quality
-+ * change. A negative value asks for better quality (less quantisation),
-+ * while a positive value asks for worse quality (greater quantisation).
-+ *
-+ * The range is calibrated so that the extreme values indicate the
-+ * largest possible offset - if the rest of the frame is encoded with the
-+ * worst possible quality, an offset of -1 indicates that this region
-+ * should be encoded with the best possible quality anyway. Intermediate
-+ * values are then interpolated in some codec-dependent way.
-+ *
-+ * For example, in 10-bit H.264 the quantisation parameter varies between
-+ * -12 and 51. A typical qoffset value of -1/10 therefore indicates that
-+ * this region should be encoded with a QP around one-tenth of the full
-+ * range better than the rest of the frame. So, if most of the frame
-+ * were to be encoded with a QP of around 30, this region would get a QP
-+ * of around 24 (an offset of approximately -1/10 * (51 - -12) = -6.3).
-+ * An extreme value of -1 would indicate that this region should be
-+ * encoded with the best possible quality regardless of the treatment of
-+ * the rest of the frame - that is, should be encoded at a QP of -12.
-+ */
-+ AVRational qoffset;
-+} AVRegionOfInterest;
-+
-+/**
-+ * This structure describes decoded (raw) audio or video data.
-+ *
-+ * AVFrame must be allocated using av_frame_alloc(). Note that this only
-+ * allocates the AVFrame itself, the buffers for the data must be managed
-+ * through other means (see below).
-+ * AVFrame must be freed with av_frame_free().
-+ *
-+ * AVFrame is typically allocated once and then reused multiple times to hold
-+ * different data (e.g. a single AVFrame to hold frames received from a
-+ * decoder). In such a case, av_frame_unref() will free any references held by
-+ * the frame and reset it to its original clean state before it
-+ * is reused again.
-+ *
-+ * The data described by an AVFrame is usually reference counted through the
-+ * AVBuffer API. The underlying buffer references are stored in AVFrame.buf /
-+ * AVFrame.extended_buf. An AVFrame is considered to be reference counted if at
-+ * least one reference is set, i.e. if AVFrame.buf[0] != NULL. In such a case,
-+ * every single data plane must be contained in one of the buffers in
-+ * AVFrame.buf or AVFrame.extended_buf.
-+ * There may be a single buffer for all the data, or one separate buffer for
-+ * each plane, or anything in between.
-+ *
-+ * sizeof(AVFrame) is not a part of the public ABI, so new fields may be added
-+ * to the end with a minor bump.
-+ *
-+ * Fields can be accessed through AVOptions, the name string used, matches the
-+ * C structure field name for fields accessible through AVOptions.
-+ */
-+typedef struct AVFrame {
-+#define AV_NUM_DATA_POINTERS 8
-+ /**
-+ * pointer to the picture/channel planes.
-+ * This might be different from the first allocated byte. For video,
-+ * it could even point to the end of the image data.
-+ *
-+ * All pointers in data and extended_data must point into one of the
-+ * AVBufferRef in buf or extended_buf.
-+ *
-+ * Some decoders access areas outside 0,0 - width,height, please
-+ * see avcodec_align_dimensions2(). Some filters and swscale can read
-+ * up to 16 bytes beyond the planes, if these filters are to be used,
-+ * then 16 extra bytes must be allocated.
-+ *
-+ * NOTE: Pointers not needed by the format MUST be set to NULL.
-+ *
-+ * @attention In case of video, the data[] pointers can point to the
-+ * end of image data in order to reverse line order, when used in
-+ * combination with negative values in the linesize[] array.
-+ */
-+ uint8_t *data[AV_NUM_DATA_POINTERS];
-+
-+ /**
-+ * For video, a positive or negative value, which is typically indicating
-+ * the size in bytes of each picture line, but it can also be:
-+ * - the negative byte size of lines for vertical flipping
-+ * (with data[n] pointing to the end of the data
-+ * - a positive or negative multiple of the byte size as for accessing
-+ * even and odd fields of a frame (possibly flipped)
-+ *
-+ * For audio, only linesize[0] may be set. For planar audio, each channel
-+ * plane must be the same size.
-+ *
-+ * For video the linesizes should be multiples of the CPUs alignment
-+ * preference, this is 16 or 32 for modern desktop CPUs.
-+ * Some code requires such alignment other code can be slower without
-+ * correct alignment, for yet other it makes no difference.
-+ *
-+ * @note The linesize may be larger than the size of usable data -- there
-+ * may be extra padding present for performance reasons.
-+ *
-+ * @attention In case of video, line size values can be negative to achieve
-+ * a vertically inverted iteration over image lines.
-+ */
-+ int linesize[AV_NUM_DATA_POINTERS];
-+
-+ /**
-+ * pointers to the data planes/channels.
-+ *
-+ * For video, this should simply point to data[].
-+ *
-+ * For planar audio, each channel has a separate data pointer, and
-+ * linesize[0] contains the size of each channel buffer.
-+ * For packed audio, there is just one data pointer, and linesize[0]
-+ * contains the total size of the buffer for all channels.
-+ *
-+ * Note: Both data and extended_data should always be set in a valid frame,
-+ * but for planar audio with more channels that can fit in data,
-+ * extended_data must be used in order to access all channels.
-+ */
-+ uint8_t **extended_data;
-+
-+ /**
-+ * @name Video dimensions
-+ * Video frames only. The coded dimensions (in pixels) of the video frame,
-+ * i.e. the size of the rectangle that contains some well-defined values.
-+ *
-+ * @note The part of the frame intended for display/presentation is further
-+ * restricted by the @ref cropping "Cropping rectangle".
-+ * @{
-+ */
-+ int width, height;
-+ /**
-+ * @}
-+ */
-+
-+ /**
-+ * number of audio samples (per channel) described by this frame
-+ */
-+ int nb_samples;
-+
-+ /**
-+ * format of the frame, -1 if unknown or unset
-+ * Values correspond to enum AVPixelFormat for video frames,
-+ * enum AVSampleFormat for audio)
-+ */
-+ int format;
-+
-+ /**
-+ * Picture type of the frame.
-+ */
-+ enum AVPictureType pict_type;
-+
-+ /**
-+ * Sample aspect ratio for the video frame, 0/1 if unknown/unspecified.
-+ */
-+ AVRational sample_aspect_ratio;
-+
-+ /**
-+ * Presentation timestamp in time_base units (time when frame should be shown to user).
-+ */
-+ int64_t pts;
-+
-+ /**
-+ * DTS copied from the AVPacket that triggered returning this frame. (if frame threading isn't used)
-+ * This is also the Presentation time of this AVFrame calculated from
-+ * only AVPacket.dts values without pts values.
-+ */
-+ int64_t pkt_dts;
-+
-+ /**
-+ * Time base for the timestamps in this frame.
-+ * In the future, this field may be set on frames output by decoders or
-+ * filters, but its value will be by default ignored on input to encoders
-+ * or filters.
-+ */
-+ AVRational time_base;
-+
-+ /**
-+ * quality (between 1 (good) and FF_LAMBDA_MAX (bad))
-+ */
-+ int quality;
-+
-+ /**
-+ * Frame owner's private data.
-+ *
-+ * This field may be set by the code that allocates/owns the frame data.
-+ * It is then not touched by any library functions, except:
-+ * - it is copied to other references by av_frame_copy_props() (and hence by
-+ * av_frame_ref());
-+ * - it is set to NULL when the frame is cleared by av_frame_unref()
-+ * - on the caller's explicit request. E.g. libavcodec encoders/decoders
-+ * will copy this field to/from @ref AVPacket "AVPackets" if the caller sets
-+ * @ref AV_CODEC_FLAG_COPY_OPAQUE.
-+ *
-+ * @see opaque_ref the reference-counted analogue
-+ */
-+ void *opaque;
-+
-+ /**
-+ * Number of fields in this frame which should be repeated, i.e. the total
-+ * duration of this frame should be repeat_pict + 2 normal field durations.
-+ *
-+ * For interlaced frames this field may be set to 1, which signals that this
-+ * frame should be presented as 3 fields: beginning with the first field (as
-+ * determined by AV_FRAME_FLAG_TOP_FIELD_FIRST being set or not), followed
-+ * by the second field, and then the first field again.
-+ *
-+ * For progressive frames this field may be set to a multiple of 2, which
-+ * signals that this frame's duration should be (repeat_pict + 2) / 2
-+ * normal frame durations.
-+ *
-+ * @note This field is computed from MPEG2 repeat_first_field flag and its
-+ * associated flags, H.264 pic_struct from picture timing SEI, and
-+ * their analogues in other codecs. Typically it should only be used when
-+ * higher-layer timing information is not available.
-+ */
-+ int repeat_pict;
-+
-+ /**
-+ * Sample rate of the audio data.
-+ */
-+ int sample_rate;
-+
-+ /**
-+ * AVBuffer references backing the data for this frame. All the pointers in
-+ * data and extended_data must point inside one of the buffers in buf or
-+ * extended_buf. This array must be filled contiguously -- if buf[i] is
-+ * non-NULL then buf[j] must also be non-NULL for all j < i.
-+ *
-+ * There may be at most one AVBuffer per data plane, so for video this array
-+ * always contains all the references. For planar audio with more than
-+ * AV_NUM_DATA_POINTERS channels, there may be more buffers than can fit in
-+ * this array. Then the extra AVBufferRef pointers are stored in the
-+ * extended_buf array.
-+ */
-+ AVBufferRef *buf[AV_NUM_DATA_POINTERS];
-+
-+ /**
-+ * For planar audio which requires more than AV_NUM_DATA_POINTERS
-+ * AVBufferRef pointers, this array will hold all the references which
-+ * cannot fit into AVFrame.buf.
-+ *
-+ * Note that this is different from AVFrame.extended_data, which always
-+ * contains all the pointers. This array only contains the extra pointers,
-+ * which cannot fit into AVFrame.buf.
-+ *
-+ * This array is always allocated using av_malloc() by whoever constructs
-+ * the frame. It is freed in av_frame_unref().
-+ */
-+ AVBufferRef **extended_buf;
-+ /**
-+ * Number of elements in extended_buf.
-+ */
-+ int nb_extended_buf;
-+
-+ AVFrameSideData **side_data;
-+ int nb_side_data;
-+
-+/**
-+ * @defgroup lavu_frame_flags AV_FRAME_FLAGS
-+ * @ingroup lavu_frame
-+ * Flags describing additional frame properties.
-+ *
-+ * @{
-+ */
-+
-+/**
-+ * The frame data may be corrupted, e.g. due to decoding errors.
-+ */
-+#define AV_FRAME_FLAG_CORRUPT (1 << 0)
-+/**
-+ * A flag to mark frames that are keyframes.
-+ */
-+#define AV_FRAME_FLAG_KEY (1 << 1)
-+/**
-+ * A flag to mark the frames which need to be decoded, but shouldn't be output.
-+ */
-+#define AV_FRAME_FLAG_DISCARD (1 << 2)
-+/**
-+ * A flag to mark frames whose content is interlaced.
-+ */
-+#define AV_FRAME_FLAG_INTERLACED (1 << 3)
-+/**
-+ * A flag to mark frames where the top field is displayed first if the content
-+ * is interlaced.
-+ */
-+#define AV_FRAME_FLAG_TOP_FIELD_FIRST (1 << 4)
-+/**
-+ * A decoder can use this flag to mark frames which were originally encoded losslessly.
-+ *
-+ * For coding bitstream formats which support both lossless and lossy
-+ * encoding, it is sometimes possible for a decoder to determine which method
-+ * was used when the bitstream was encoded.
-+ */
-+#define AV_FRAME_FLAG_LOSSLESS (1 << 5)
-+/**
-+ * @}
-+ */
-+
-+ /**
-+ * Frame flags, a combination of @ref lavu_frame_flags
-+ */
-+ int flags;
-+
-+ /**
-+ * MPEG vs JPEG YUV range.
-+ * - encoding: Set by user
-+ * - decoding: Set by libavcodec
-+ */
-+ enum AVColorRange color_range;
-+
-+ enum AVColorPrimaries color_primaries;
-+
-+ enum AVColorTransferCharacteristic color_trc;
-+
-+ /**
-+ * YUV colorspace type.
-+ * - encoding: Set by user
-+ * - decoding: Set by libavcodec
-+ */
-+ enum AVColorSpace colorspace;
-+
-+ enum AVChromaLocation chroma_location;
-+
-+ /**
-+ * frame timestamp estimated using various heuristics, in stream time base
-+ * - encoding: unused
-+ * - decoding: set by libavcodec, read by user.
-+ */
-+ int64_t best_effort_timestamp;
-+
-+ /**
-+ * metadata.
-+ * - encoding: Set by user.
-+ * - decoding: Set by libavcodec.
-+ */
-+ AVDictionary *metadata;
-+
-+ /**
-+ * decode error flags of the frame, set to a combination of
-+ * FF_DECODE_ERROR_xxx flags if the decoder produced a frame, but there
-+ * were errors during the decoding.
-+ * - encoding: unused
-+ * - decoding: set by libavcodec, read by user.
-+ */
-+ int decode_error_flags;
-+#define FF_DECODE_ERROR_INVALID_BITSTREAM 1
-+#define FF_DECODE_ERROR_MISSING_REFERENCE 2
-+#define FF_DECODE_ERROR_CONCEALMENT_ACTIVE 4
-+#define FF_DECODE_ERROR_DECODE_SLICES 8
-+
-+ /**
-+ * For hwaccel-format frames, this should be a reference to the
-+ * AVHWFramesContext describing the frame.
-+ */
-+ AVBufferRef *hw_frames_ctx;
-+
-+ /**
-+ * Frame owner's private data.
-+ *
-+ * This field may be set by the code that allocates/owns the frame data.
-+ * It is then not touched by any library functions, except:
-+ * - a new reference to the underlying buffer is propagated by
-+ * av_frame_copy_props() (and hence by av_frame_ref());
-+ * - it is unreferenced in av_frame_unref();
-+ * - on the caller's explicit request. E.g. libavcodec encoders/decoders
-+ * will propagate a new reference to/from @ref AVPacket "AVPackets" if the
-+ * caller sets @ref AV_CODEC_FLAG_COPY_OPAQUE.
-+ *
-+ * @see opaque the plain pointer analogue
-+ */
-+ AVBufferRef *opaque_ref;
-+
-+ /**
-+ * @anchor cropping
-+ * @name Cropping
-+ * Video frames only. The number of pixels to discard from the
-+ * top/bottom/left/right border of the frame to obtain the sub-rectangle of
-+ * the frame intended for presentation.
-+ * @{
-+ */
-+ size_t crop_top;
-+ size_t crop_bottom;
-+ size_t crop_left;
-+ size_t crop_right;
-+ /**
-+ * @}
-+ */
-+
-+ /**
-+ * RefStruct reference for internal use by a single libav* library.
-+ * Must not be used to transfer data between libraries.
-+ * Has to be NULL when ownership of the frame leaves the respective library.
-+ *
-+ * Code outside the FFmpeg libs must never check or change private_ref.
-+ */
-+ void *private_ref;
-+
-+ /**
-+ * Channel layout of the audio data.
-+ */
-+ AVChannelLayout ch_layout;
-+
-+ /**
-+ * Duration of the frame, in the same units as pts. 0 if unknown.
-+ */
-+ int64_t duration;
-+
-+ /**
-+ * Indicates how the alpha channel of the video is to be handled.
-+ * - encoding: Set by user
-+ * - decoding: Set by libavcodec
-+ */
-+ enum AVAlphaMode alpha_mode;
-+} AVFrame;
-+
-+
-+/**
-+ * Allocate an AVFrame and set its fields to default values. The resulting
-+ * struct must be freed using av_frame_free().
-+ *
-+ * @return An AVFrame filled with default values or NULL on failure.
-+ *
-+ * @note this only allocates the AVFrame itself, not the data buffers. Those
-+ * must be allocated through other means, e.g. with av_frame_get_buffer() or
-+ * manually.
-+ */
-+AVFrame *av_frame_alloc(void);
-+
-+/**
-+ * Free the frame and any dynamically allocated objects in it,
-+ * e.g. extended_data. If the frame is reference counted, it will be
-+ * unreferenced first.
-+ *
-+ * @param frame frame to be freed. The pointer will be set to NULL.
-+ */
-+void av_frame_free(AVFrame **frame);
-+
-+/**
-+ * Set up a new reference to the data described by the source frame.
-+ *
-+ * Copy frame properties from src to dst and create a new reference for each
-+ * AVBufferRef from src.
-+ *
-+ * If src is not reference counted, new buffers are allocated and the data is
-+ * copied.
-+ *
-+ * @warning: dst MUST have been either unreferenced with av_frame_unref(dst),
-+ * or newly allocated with av_frame_alloc() before calling this
-+ * function, or undefined behavior will occur.
-+ *
-+ * @return 0 on success, a negative AVERROR on error
-+ */
-+int av_frame_ref(AVFrame *dst, const AVFrame *src);
-+
-+/**
-+ * Ensure the destination frame refers to the same data described by the source
-+ * frame, either by creating a new reference for each AVBufferRef from src if
-+ * they differ from those in dst, by allocating new buffers and copying data if
-+ * src is not reference counted, or by unreferencing it if src is empty.
-+ *
-+ * Frame properties on dst will be replaced by those from src.
-+ *
-+ * @return 0 on success, a negative AVERROR on error. On error, dst is
-+ * unreferenced.
-+ */
-+int av_frame_replace(AVFrame *dst, const AVFrame *src);
-+
-+/**
-+ * Create a new frame that references the same data as src.
-+ *
-+ * This is a shortcut for av_frame_alloc()+av_frame_ref().
-+ *
-+ * @return newly created AVFrame on success, NULL on error.
-+ */
-+AVFrame *av_frame_clone(const AVFrame *src);
-+
-+/**
-+ * Unreference all the buffers referenced by frame and reset the frame fields.
-+ */
-+void av_frame_unref(AVFrame *frame);
-+
-+/**
-+ * Move everything contained in src to dst and reset src.
-+ *
-+ * @warning: dst is not unreferenced, but directly overwritten without reading
-+ * or deallocating its contents. Call av_frame_unref(dst) manually
-+ * before calling this function to ensure that no memory is leaked.
-+ */
-+void av_frame_move_ref(AVFrame *dst, AVFrame *src);
-+
-+/**
-+ * Allocate new buffer(s) for audio or video data.
-+ *
-+ * The following fields must be set on frame before calling this function:
-+ * - format (pixel format for video, sample format for audio)
-+ * - width and height for video
-+ * - nb_samples and ch_layout for audio
-+ *
-+ * This function will fill AVFrame.data and AVFrame.buf arrays and, if
-+ * necessary, allocate and fill AVFrame.extended_data and AVFrame.extended_buf.
-+ * For planar formats, one buffer will be allocated for each plane.
-+ *
-+ * @warning: if frame already has been allocated, calling this function will
-+ * leak memory. In addition, undefined behavior can occur in certain
-+ * cases.
-+ *
-+ * @param frame frame in which to store the new buffers.
-+ * @param align Required buffer size and data pointer alignment. If equal to 0,
-+ * alignment will be chosen automatically for the current CPU.
-+ * It is highly recommended to pass 0 here unless you know what
-+ * you are doing.
-+ *
-+ * @return 0 on success, a negative AVERROR on error.
-+ */
-+int av_frame_get_buffer(AVFrame *frame, int align);
-+
-+/**
-+ * Check if the frame data is writable.
-+ *
-+ * @return A positive value if the frame data is writable (which is true if and
-+ * only if each of the underlying buffers has only one reference, namely the one
-+ * stored in this frame). Return 0 otherwise.
-+ *
-+ * If 1 is returned the answer is valid until av_buffer_ref() is called on any
-+ * of the underlying AVBufferRefs (e.g. through av_frame_ref() or directly).
-+ *
-+ * @see av_frame_make_writable(), av_buffer_is_writable()
-+ */
-+int av_frame_is_writable(AVFrame *frame);
-+
-+/**
-+ * Ensure that the frame data is writable, avoiding data copy if possible.
-+ *
-+ * Do nothing if the frame is writable, allocate new buffers and copy the data
-+ * if it is not. Non-refcounted frames behave as non-writable, i.e. a copy
-+ * is always made.
-+ *
-+ * @return 0 on success, a negative AVERROR on error.
-+ *
-+ * @see av_frame_is_writable(), av_buffer_is_writable(),
-+ * av_buffer_make_writable()
-+ */
-+int av_frame_make_writable(AVFrame *frame);
-+
-+/**
-+ * Copy the frame data from src to dst.
-+ *
-+ * This function does not allocate anything, dst must be already initialized and
-+ * allocated with the same parameters as src.
-+ *
-+ * This function only copies the frame data (i.e. the contents of the data /
-+ * extended data arrays), not any other properties.
-+ *
-+ * @return >= 0 on success, a negative AVERROR on error.
-+ */
-+int av_frame_copy(AVFrame *dst, const AVFrame *src);
-+
-+/**
-+ * Copy only "metadata" fields from src to dst.
-+ *
-+ * Metadata for the purpose of this function are those fields that do not affect
-+ * the data layout in the buffers. E.g. pts, sample rate (for audio) or sample
-+ * aspect ratio (for video), but not width/height or channel layout.
-+ * Side data is also copied.
-+ */
-+int av_frame_copy_props(AVFrame *dst, const AVFrame *src);
-+
-+/**
-+ * Get the buffer reference a given data plane is stored in.
-+ *
-+ * @param frame the frame to get the plane's buffer from
-+ * @param plane index of the data plane of interest in frame->extended_data.
-+ *
-+ * @return the buffer reference that contains the plane or NULL if the input
-+ * frame is not valid.
-+ */
-+AVBufferRef *av_frame_get_plane_buffer(const AVFrame *frame, int plane);
-+
-+/**
-+ * Add a new side data to a frame.
-+ *
-+ * @param frame a frame to which the side data should be added
-+ * @param type type of the added side data
-+ * @param size size of the side data
-+ *
-+ * @return newly added side data on success, NULL on error
-+ */
-+AVFrameSideData *av_frame_new_side_data(AVFrame *frame,
-+ enum AVFrameSideDataType type,
-+ size_t size);
-+
-+/**
-+ * Add a new side data to a frame from an existing AVBufferRef
-+ *
-+ * @param frame a frame to which the side data should be added
-+ * @param type the type of the added side data
-+ * @param buf an AVBufferRef to add as side data. The ownership of
-+ * the reference is transferred to the frame.
-+ *
-+ * @return newly added side data on success, NULL on error. On failure
-+ * the frame is unchanged and the AVBufferRef remains owned by
-+ * the caller.
-+ */
-+AVFrameSideData *av_frame_new_side_data_from_buf(AVFrame *frame,
-+ enum AVFrameSideDataType type,
-+ AVBufferRef *buf);
-+
-+/**
-+ * @return a pointer to the side data of a given type on success, NULL if there
-+ * is no side data with such type in this frame.
-+ */
-+AVFrameSideData *av_frame_get_side_data(const AVFrame *frame,
-+ enum AVFrameSideDataType type);
-+
-+/**
-+ * Remove and free all side data instances of the given type.
-+ */
-+void av_frame_remove_side_data(AVFrame *frame, enum AVFrameSideDataType type);
-+
-+
-+/**
-+ * Flags for frame cropping.
-+ */
-+enum {
-+ /**
-+ * Apply the maximum possible cropping, even if it requires setting the
-+ * AVFrame.data[] entries to unaligned pointers. Passing unaligned data
-+ * to FFmpeg API is generally not allowed, and causes undefined behavior
-+ * (such as crashes). You can pass unaligned data only to FFmpeg APIs that
-+ * are explicitly documented to accept it. Use this flag only if you
-+ * absolutely know what you are doing.
-+ */
-+ AV_FRAME_CROP_UNALIGNED = 1 << 0,
-+};
-+
-+/**
-+ * Crop the given video AVFrame according to its crop_left/crop_top/crop_right/
-+ * crop_bottom fields. If cropping is successful, the function will adjust the
-+ * data pointers and the width/height fields, and set the crop fields to 0.
-+ *
-+ * In all cases, the cropping boundaries will be rounded to the inherent
-+ * alignment of the pixel format. In some cases, such as for opaque hwaccel
-+ * formats, the left/top cropping is ignored. The crop fields are set to 0 even
-+ * if the cropping was rounded or ignored.
-+ *
-+ * @param frame the frame which should be cropped
-+ * @param flags Some combination of AV_FRAME_CROP_* flags, or 0.
-+ *
-+ * @return >= 0 on success, a negative AVERROR on error. If the cropping fields
-+ * were invalid, AVERROR(ERANGE) is returned, and nothing is changed.
-+ */
-+int av_frame_apply_cropping(AVFrame *frame, int flags);
-+
-+/**
-+ * @return a string identifying the side data type
-+ */
-+const char *av_frame_side_data_name(enum AVFrameSideDataType type);
-+
-+/**
-+ * @return side data descriptor corresponding to a given side data type, NULL
-+ * when not available.
-+ */
-+const AVSideDataDescriptor *av_frame_side_data_desc(enum AVFrameSideDataType type);
-+
-+/**
-+ * Free all side data entries and their contents, then zeroes out the
-+ * values which the pointers are pointing to.
-+ *
-+ * @param sd pointer to array of side data to free. Will be set to NULL
-+ * upon return.
-+ * @param nb_sd pointer to an integer containing the number of entries in
-+ * the array. Will be set to 0 upon return.
-+ */
-+void av_frame_side_data_free(AVFrameSideData ***sd, int *nb_sd);
-+
-+/**
-+ * Remove existing entries before adding new ones.
-+ */
-+#define AV_FRAME_SIDE_DATA_FLAG_UNIQUE (1 << 0)
-+/**
-+ * Don't add a new entry if another of the same type exists.
-+ * Applies only for side data types without the AV_SIDE_DATA_PROP_MULTI prop.
-+ */
-+#define AV_FRAME_SIDE_DATA_FLAG_REPLACE (1 << 1)
-+/**
-+ * Create a new reference to the passed in buffer instead of taking ownership
-+ * of it.
-+ */
-+#define AV_FRAME_SIDE_DATA_FLAG_NEW_REF (1 << 2)
-+
-+/**
-+ * Add new side data entry to an array.
-+ *
-+ * @param sd pointer to array of side data to which to add another entry,
-+ * or to NULL in order to start a new array.
-+ * @param nb_sd pointer to an integer containing the number of entries in
-+ * the array.
-+ * @param type type of the added side data
-+ * @param size size of the side data
-+ * @param flags Some combination of AV_FRAME_SIDE_DATA_FLAG_* flags, or 0.
-+ *
-+ * @return newly added side data on success, NULL on error.
-+ * @note In case of AV_FRAME_SIDE_DATA_FLAG_UNIQUE being set, entries of
-+ * matching AVFrameSideDataType will be removed before the addition
-+ * is attempted.
-+ * @note In case of AV_FRAME_SIDE_DATA_FLAG_REPLACE being set, if an
-+ * entry of the same type already exists, it will be replaced instead.
-+ */
-+AVFrameSideData *av_frame_side_data_new(AVFrameSideData ***sd, int *nb_sd,
-+ enum AVFrameSideDataType type,
-+ size_t size, unsigned int flags);
-+
-+/**
-+ * Add a new side data entry to an array from an existing AVBufferRef.
-+ *
-+ * @param sd pointer to array of side data to which to add another entry,
-+ * or to NULL in order to start a new array.
-+ * @param nb_sd pointer to an integer containing the number of entries in
-+ * the array.
-+ * @param type type of the added side data
-+ * @param buf Pointer to AVBufferRef to add to the array. On success,
-+ * the function takes ownership of the AVBufferRef and *buf is
-+ * set to NULL, unless AV_FRAME_SIDE_DATA_FLAG_NEW_REF is set
-+ * in which case the ownership will remain with the caller.
-+ * @param flags Some combination of AV_FRAME_SIDE_DATA_FLAG_* flags, or 0.
-+ *
-+ * @return newly added side data on success, NULL on error.
-+ * @note In case of AV_FRAME_SIDE_DATA_FLAG_UNIQUE being set, entries of
-+ * matching AVFrameSideDataType will be removed before the addition
-+ * is attempted.
-+ * @note In case of AV_FRAME_SIDE_DATA_FLAG_REPLACE being set, if an
-+ * entry of the same type already exists, it will be replaced instead.
-+ *
-+ */
-+AVFrameSideData *av_frame_side_data_add(AVFrameSideData ***sd, int *nb_sd,
-+ enum AVFrameSideDataType type,
-+ AVBufferRef **buf, unsigned int flags);
-+
-+/**
-+ * Add a new side data entry to an array based on existing side data, taking
-+ * a reference towards the contained AVBufferRef.
-+ *
-+ * @param sd pointer to array of side data to which to add another entry,
-+ * or to NULL in order to start a new array.
-+ * @param nb_sd pointer to an integer containing the number of entries in
-+ * the array.
-+ * @param src side data to be cloned, with a new reference utilized
-+ * for the buffer.
-+ * @param flags Some combination of AV_FRAME_SIDE_DATA_FLAG_* flags, or 0.
-+ *
-+ * @return negative error code on failure, >=0 on success.
-+ * @note In case of AV_FRAME_SIDE_DATA_FLAG_UNIQUE being set, entries of
-+ * matching AVFrameSideDataType will be removed before the addition
-+ * is attempted.
-+ * @note In case of AV_FRAME_SIDE_DATA_FLAG_REPLACE being set, if an
-+ * entry of the same type already exists, it will be replaced instead.
-+ */
-+int av_frame_side_data_clone(AVFrameSideData ***sd, int *nb_sd,
-+ const AVFrameSideData *src, unsigned int flags);
-+
-+/**
-+ * Get a side data entry of a specific type from an array.
-+ *
-+ * @param sd array of side data.
-+ * @param nb_sd integer containing the number of entries in the array.
-+ * @param type type of side data to be queried
-+ *
-+ * @return a pointer to the side data of a given type on success, NULL if there
-+ * is no side data with such type in this set.
-+ */
-+const AVFrameSideData *av_frame_side_data_get_c(const AVFrameSideData * const *sd,
-+ const int nb_sd,
-+ enum AVFrameSideDataType type);
-+
-+/**
-+ * Wrapper around av_frame_side_data_get_c() to workaround the limitation
-+ * that for any type T the conversion from T * const * to const T * const *
-+ * is not performed automatically in C.
-+ * @see av_frame_side_data_get_c()
-+ */
-+static inline
-+const AVFrameSideData *av_frame_side_data_get(AVFrameSideData * const *sd,
-+ const int nb_sd,
-+ enum AVFrameSideDataType type)
-+{
-+ return av_frame_side_data_get_c((const AVFrameSideData * const *)sd,
-+ nb_sd, type);
-+}
-+
-+/**
-+ * Remove and free all side data instances of the given type from an array.
-+ */
-+void av_frame_side_data_remove(AVFrameSideData ***sd, int *nb_sd,
-+ enum AVFrameSideDataType type);
-+
-+/**
-+ * Remove and free all side data instances that match any of the given
-+ * side data properties. (See enum AVSideDataProps)
-+ */
-+void av_frame_side_data_remove_by_props(AVFrameSideData ***sd, int *nb_sd,
-+ int props);
-+
-+/**
-+ * @}
-+ */
-+
-+#endif /* AVUTIL_FRAME_H */
-diff --git a/dom/media/platforms/ffmpeg/ffmpeg62/include/libavutil/hwcontext.h b/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/hwcontext.h
-similarity index 100%
-copy from dom/media/platforms/ffmpeg/ffmpeg62/include/libavutil/hwcontext.h
-copy to dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/hwcontext.h
-diff --git a/dom/media/platforms/ffmpeg/ffmpeg58/include/libavutil/hwcontext_drm.h b/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/hwcontext_drm.h
-similarity index 100%
-copy from dom/media/platforms/ffmpeg/ffmpeg58/include/libavutil/hwcontext_drm.h
-copy to dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/hwcontext_drm.h
-diff --git a/dom/media/platforms/ffmpeg/ffmpeg62/include/libavutil/hwcontext_vaapi.h b/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/hwcontext_vaapi.h
-similarity index 100%
-copy from dom/media/platforms/ffmpeg/ffmpeg62/include/libavutil/hwcontext_vaapi.h
-copy to dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/hwcontext_vaapi.h
-diff --git a/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/hwcontext_vulkan.h b/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/hwcontext_vulkan.h
-new file mode 100644
-index 000000000000..87c2a2d28deb
---- /dev/null
-+++ b/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/hwcontext_vulkan.h
-@@ -0,0 +1,355 @@
-+/*
-+ * This file is part of FFmpeg.
-+ *
-+ * FFmpeg is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2.1 of the License, or (at your option) any later version.
-+ *
-+ * FFmpeg is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with FFmpeg; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ */
-+
-+#ifndef AVUTIL_HWCONTEXT_VULKAN_H
-+#define AVUTIL_HWCONTEXT_VULKAN_H
-+
-+#if defined(_WIN32) && !defined(VK_USE_PLATFORM_WIN32_KHR)
-+#define VK_USE_PLATFORM_WIN32_KHR
-+#endif
-+#include
-+
-+#include "pixfmt.h"
-+#include "frame.h"
-+#include "hwcontext.h"
-+
-+typedef struct AVVkFrame AVVkFrame;
-+
-+typedef struct AVVulkanDeviceQueueFamily {
-+ /* Queue family index */
-+ int idx;
-+ /* Number of queues in the queue family in use */
-+ int num;
-+ /* Queue family capabilities. Must be non-zero.
-+ * Flags may be removed to indicate the queue family may not be used
-+ * for a given purpose. */
-+ VkQueueFlagBits flags;
-+ /* Vulkan implementations are allowed to list multiple video queues
-+ * which differ in what they can encode or decode. */
-+ VkVideoCodecOperationFlagBitsKHR video_caps;
-+} AVVulkanDeviceQueueFamily;
-+
-+/**
-+ * @file
-+ * API-specific header for AV_HWDEVICE_TYPE_VULKAN.
-+ *
-+ * For user-allocated pools, AVHWFramesContext.pool must return AVBufferRefs
-+ * with the data pointer set to an AVVkFrame.
-+ */
-+
-+/**
-+ * Main Vulkan context, allocated as AVHWDeviceContext.hwctx.
-+ * All of these can be set before init to change what the context uses
-+ */
-+typedef struct AVVulkanDeviceContext {
-+ /**
-+ * Custom memory allocator, else NULL
-+ */
-+ const VkAllocationCallbacks *alloc;
-+
-+ /**
-+ * Pointer to a vkGetInstanceProcAddr loading function.
-+ * If unset, will dynamically load and use libvulkan.
-+ */
-+ PFN_vkGetInstanceProcAddr get_proc_addr;
-+
-+ /**
-+ * Vulkan instance. Must be at least version 1.3.
-+ */
-+ VkInstance inst;
-+
-+ /**
-+ * Physical device
-+ */
-+ VkPhysicalDevice phys_dev;
-+
-+ /**
-+ * Active device
-+ */
-+ VkDevice act_dev;
-+
-+ /**
-+ * This structure should be set to the set of features that present and enabled
-+ * during device creation. When a device is created by FFmpeg, it will default to
-+ * enabling all that are present of the shaderImageGatherExtended,
-+ * fragmentStoresAndAtomics, shaderInt64 and vertexPipelineStoresAndAtomics features.
-+ */
-+ VkPhysicalDeviceFeatures2 device_features;
-+
-+ /**
-+ * Enabled instance extensions.
-+ * If supplying your own device context, set this to an array of strings, with
-+ * each entry containing the specified Vulkan extension string to enable.
-+ * Duplicates are possible and accepted.
-+ * If no extensions are enabled, set these fields to NULL, and 0 respectively.
-+ * av_vk_get_optional_instance_extensions() can be used to enumerate extensions
-+ * that FFmpeg may use if enabled.
-+ */
-+ const char * const *enabled_inst_extensions;
-+ int nb_enabled_inst_extensions;
-+
-+ /**
-+ * Enabled device extensions. By default, VK_KHR_external_memory_fd,
-+ * VK_EXT_external_memory_dma_buf, VK_EXT_image_drm_format_modifier,
-+ * VK_KHR_external_semaphore_fd and VK_EXT_external_memory_host are enabled if found.
-+ * If supplying your own device context, these fields takes the same format as
-+ * the above fields, with the same conditions that duplicates are possible
-+ * and accepted, and that NULL and 0 respectively means no extensions are enabled.
-+ * av_vk_get_optional_device_extensions() can be used to enumerate extensions
-+ * that FFmpeg may use if enabled.
-+ */
-+ const char * const *enabled_dev_extensions;
-+ int nb_enabled_dev_extensions;
-+
-+#if FF_API_VULKAN_SYNC_QUEUES
-+ /**
-+ * Locks a queue, preventing other threads from submitting any command
-+ * buffers to this queue.
-+ * If set to NULL, will be set to lavu-internal functions that utilize a
-+ * mutex.
-+ *
-+ * Deprecated: use VK_KHR_internally_synchronized_queues.
-+ */
-+ attribute_deprecated
-+ void (*lock_queue)(struct AVHWDeviceContext *ctx, uint32_t queue_family, uint32_t index);
-+
-+ /**
-+ * Similar to lock_queue(), unlocks a queue. Must only be called after locking.
-+ *
-+ * Deprecated: use VK_KHR_internally_synchronized_queues.
-+ */
-+ attribute_deprecated
-+ void (*unlock_queue)(struct AVHWDeviceContext *ctx, uint32_t queue_family, uint32_t index);
-+#endif
-+
-+ /**
-+ * Queue families used. Must be preferentially ordered. List may contain
-+ * duplicates.
-+ *
-+ * For compatibility reasons, all the enabled queue families listed above
-+ * (queue_family_(tx/comp/encode/decode)_index) must also be included in
-+ * this list until they're removed after deprecation.
-+ */
-+ AVVulkanDeviceQueueFamily qf[64];
-+ int nb_qf;
-+
-+ /* Queue creation flags, for vkGetDeviceQueue2. */
-+ VkDeviceQueueCreateFlags queue_flags;
-+} AVVulkanDeviceContext;
-+
-+/**
-+ * Defines the behaviour of frame allocation.
-+ */
-+typedef enum AVVkFrameFlags {
-+ /* Unless this flag is set, autodetected flags will be OR'd based on the
-+ * device and tiling during av_hwframe_ctx_init(). */
-+ AV_VK_FRAME_FLAG_NONE = (1ULL << 0),
-+
-+ /* Disables multiplane images.
-+ * This is required to export/import images from CUDA. */
-+ AV_VK_FRAME_FLAG_DISABLE_MULTIPLANE = (1ULL << 2),
-+} AVVkFrameFlags;
-+
-+/**
-+ * Allocated as AVHWFramesContext.hwctx, used to set pool-specific options
-+ */
-+typedef struct AVVulkanFramesContext {
-+ /**
-+ * Controls the tiling of allocated frames.
-+ * If left as VK_IMAGE_TILING_OPTIMAL (0), will use optimal tiling.
-+ * Can be set to VK_IMAGE_TILING_LINEAR to force linear images,
-+ * or VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT to force DMABUF-backed
-+ * images.
-+ * @note Imported frames from other APIs ignore this.
-+ */
-+ VkImageTiling tiling;
-+
-+ /**
-+ * Defines extra usage of output frames. If non-zero, all flags MUST be
-+ * supported by the VkFormat. Regardless, frames will always have the
-+ * following usage flags enabled, if supported by the format:
-+ * - VK_IMAGE_USAGE_SAMPLED_BIT
-+ * - VK_IMAGE_USAGE_STORAGE_BIT
-+ * - VK_IMAGE_USAGE_TRANSFER_SRC_BIT
-+ * - VK_IMAGE_USAGE_TRANSFER_DST_BIT
-+ */
-+ VkImageUsageFlagBits usage;
-+
-+ /**
-+ * Extension data for image creation.
-+ * If DRM tiling is used, a VkImageDrmFormatModifierListCreateInfoEXT structure
-+ * can be added to specify the exact modifier to use.
-+ *
-+ * Additional structures may be added at av_hwframe_ctx_init() time,
-+ * which will be freed automatically on uninit(), so users must only free
-+ * any structures they've allocated themselves.
-+ */
-+ void *create_pnext;
-+
-+ /**
-+ * Extension data for memory allocation. Must have as many entries as
-+ * the number of planes of the sw_format.
-+ * This will be chained to VkExportMemoryAllocateInfo, which is used
-+ * to make all pool images exportable to other APIs if the necessary
-+ * extensions are present in enabled_dev_extensions.
-+ */
-+ void *alloc_pnext[AV_NUM_DATA_POINTERS];
-+
-+ /**
-+ * A combination of AVVkFrameFlags. Unless AV_VK_FRAME_FLAG_NONE is set,
-+ * autodetected flags will be OR'd based on the device and tiling during
-+ * av_hwframe_ctx_init().
-+ */
-+ AVVkFrameFlags flags;
-+
-+ /**
-+ * Flags to set during image creation. If unset, defaults to
-+ * VK_IMAGE_CREATE_ALIAS_BIT.
-+ */
-+ VkImageCreateFlags img_flags;
-+
-+ /**
-+ * Vulkan format for each image. MUST be compatible with the pixel format.
-+ * If unset, will be automatically set.
-+ * There are at most two compatible formats for a frame - a multiplane
-+ * format, and a single-plane multi-image format.
-+ */
-+ VkFormat format[AV_NUM_DATA_POINTERS];
-+
-+ /**
-+ * Number of layers each image will have.
-+ */
-+ int nb_layers;
-+
-+ /**
-+ * Locks a frame, preventing other threads from changing frame properties.
-+ * Users SHOULD only ever lock just before command submission in order
-+ * to get accurate frame properties, and unlock immediately after command
-+ * submission without waiting for it to finish.
-+ *
-+ * If unset, will be set to lavu-internal functions that utilize a mutex.
-+ */
-+ void (*lock_frame)(struct AVHWFramesContext *fc, AVVkFrame *vkf);
-+
-+ /**
-+ * Similar to lock_frame(), unlocks a frame. Must only be called after locking.
-+ */
-+ void (*unlock_frame)(struct AVHWFramesContext *fc, AVVkFrame *vkf);
-+} AVVulkanFramesContext;
-+
-+/*
-+ * Frame structure.
-+ *
-+ * @note the size of this structure is not part of the ABI, to allocate
-+ * you must use @av_vk_frame_alloc().
-+ */
-+struct AVVkFrame {
-+ /**
-+ * Vulkan images to which the memory is bound to.
-+ * May be one for multiplane formats, or multiple.
-+ */
-+ VkImage img[AV_NUM_DATA_POINTERS];
-+
-+ /**
-+ * Tiling for the frame.
-+ */
-+ VkImageTiling tiling;
-+
-+ /**
-+ * Memory backing the images. Either one, or as many as there are planes
-+ * in the sw_format.
-+ * In case of having multiple VkImages, but one memory, the offset field
-+ * will indicate the bound offset for each image.
-+ */
-+ VkDeviceMemory mem[AV_NUM_DATA_POINTERS];
-+ size_t size[AV_NUM_DATA_POINTERS];
-+
-+ /**
-+ * OR'd flags for all memory allocated
-+ */
-+ VkMemoryPropertyFlagBits flags;
-+
-+ /**
-+ * Updated after every barrier. One per VkImage.
-+ */
-+ VkAccessFlagBits2 access[AV_NUM_DATA_POINTERS];
-+ VkImageLayout layout[AV_NUM_DATA_POINTERS];
-+
-+ /**
-+ * Synchronization timeline semaphores, one for each VkImage.
-+ * Must not be freed manually. Must be waited on at every submission using
-+ * the value in sem_value, and must be signalled at every submission,
-+ * using an incremented value.
-+ */
-+ VkSemaphore sem[AV_NUM_DATA_POINTERS];
-+
-+ /**
-+ * Up to date semaphore value at which each image becomes accessible.
-+ * One per VkImage.
-+ * Clients must wait on this value when submitting a command queue,
-+ * and increment it when signalling.
-+ */
-+ uint64_t sem_value[AV_NUM_DATA_POINTERS];
-+
-+ /**
-+ * Describes the binding offset of each image to the VkDeviceMemory.
-+ * One per VkImage.
-+ */
-+ ptrdiff_t offset[AV_NUM_DATA_POINTERS];
-+
-+ /**
-+ * Queue family of the images. Must be VK_QUEUE_FAMILY_IGNORED if
-+ * the image was allocated with the CONCURRENT concurrency option.
-+ * One per VkImage.
-+ */
-+ uint32_t queue_family[AV_NUM_DATA_POINTERS];
-+
-+ /**
-+ * Internal data. Not to be accessed by users in any way.
-+ */
-+ struct AVVkFrameInternal *internal;
-+};
-+
-+/**
-+ * Allocates a single AVVkFrame and initializes everything as 0.
-+ * @note Must be freed via av_free()
-+ */
-+AVVkFrame *av_vk_frame_alloc(void);
-+
-+/**
-+ * Returns the optimal per-plane Vulkan format for a given sw_format,
-+ * one for each plane.
-+ * Returns NULL on unsupported formats.
-+ */
-+const VkFormat *av_vkfmt_from_pixfmt(enum AVPixelFormat p);
-+
-+/**
-+ * Returns an array of optional Vulkan instance extensions that FFmpeg
-+ * may use if enabled.
-+ * @note Must be freed via av_free()
-+ */
-+const char **av_vk_get_optional_instance_extensions(int *count);
-+
-+/**
-+ * Returns an array of optional Vulkan device extensions that FFmpeg
-+ * may use if enabled.
-+ * @note Must be freed via av_free()
-+ */
-+const char **av_vk_get_optional_device_extensions(int *count);
-+
-+#endif /* AVUTIL_HWCONTEXT_VULKAN_H */
-diff --git a/dom/media/platforms/ffmpeg/ffmpeg57/include/libavutil/intfloat.h b/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/intfloat.h
-similarity index 100%
-copy from dom/media/platforms/ffmpeg/ffmpeg57/include/libavutil/intfloat.h
-copy to dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/intfloat.h
-diff --git a/dom/media/platforms/ffmpeg/ffmpeg62/include/libavutil/log.h b/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/log.h
-similarity index 100%
-copy from dom/media/platforms/ffmpeg/ffmpeg62/include/libavutil/log.h
-copy to dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/log.h
-diff --git a/dom/media/platforms/ffmpeg/ffmpeg62/include/libavutil/macros.h b/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/macros.h
-similarity index 100%
-copy from dom/media/platforms/ffmpeg/ffmpeg62/include/libavutil/macros.h
-copy to dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/macros.h
-diff --git a/dom/media/platforms/ffmpeg/ffmpeg62/include/libavutil/mathematics.h b/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/mathematics.h
-similarity index 100%
-copy from dom/media/platforms/ffmpeg/ffmpeg62/include/libavutil/mathematics.h
-copy to dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/mathematics.h
-diff --git a/dom/media/platforms/ffmpeg/ffmpeg62/include/libavutil/mem.h b/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/mem.h
-similarity index 100%
-copy from dom/media/platforms/ffmpeg/ffmpeg62/include/libavutil/mem.h
-copy to dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/mem.h
-diff --git a/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/pixfmt.h b/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/pixfmt.h
-new file mode 100644
-index 000000000000..b08881cc1f8d
---- /dev/null
-+++ b/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/pixfmt.h
-@@ -0,0 +1,823 @@
-+/*
-+ * copyright (c) 2006 Michael Niedermayer
-+ *
-+ * This file is part of FFmpeg.
-+ *
-+ * FFmpeg is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2.1 of the License, or (at your option) any later version.
-+ *
-+ * FFmpeg is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with FFmpeg; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ */
-+
-+#ifndef AVUTIL_PIXFMT_H
-+#define AVUTIL_PIXFMT_H
-+
-+/**
-+ * @file
-+ * pixel format definitions
-+ */
-+
-+#include "libavutil/avconfig.h"
-+#include "version.h"
-+
-+#define AVPALETTE_SIZE 1024
-+#define AVPALETTE_COUNT 256
-+
-+/**
-+ * Maximum number of planes in any pixel format.
-+ * This should be used when a maximum is needed, but code should not
-+ * be written to require a maximum for no good reason.
-+ */
-+#define AV_VIDEO_MAX_PLANES 4
-+
-+/**
-+ * Pixel format.
-+ *
-+ * @note
-+ * AV_PIX_FMT_RGB32 is handled in an endian-specific manner. An RGBA
-+ * color is put together as:
-+ * (A << 24) | (R << 16) | (G << 8) | B
-+ * This is stored as BGRA on little-endian CPU architectures and ARGB on
-+ * big-endian CPUs.
-+ *
-+ * @note
-+ * If the resolution is not a multiple of the chroma subsampling factor
-+ * then the chroma plane resolution must be rounded up.
-+ *
-+ * @par
-+ * When the pixel format is palettized RGB32 (AV_PIX_FMT_PAL8), the palettized
-+ * image data is stored in AVFrame.data[0]. The palette is transported in
-+ * AVFrame.data[1], is 1024 bytes long (256 4-byte entries) and is
-+ * formatted the same as in AV_PIX_FMT_RGB32 described above (i.e., it is
-+ * also endian-specific). Note also that the individual RGB32 palette
-+ * components stored in AVFrame.data[1] should be in the range 0..255.
-+ * This is important as many custom PAL8 video codecs that were designed
-+ * to run on the IBM VGA graphics adapter use 6-bit palette components.
-+ *
-+ * @par
-+ * For all the 8 bits per pixel formats, an RGB32 palette is in data[1] like
-+ * for pal8. This palette is filled in automatically by the function
-+ * allocating the picture.
-+ */
-+enum AVPixelFormat {
-+ AV_PIX_FMT_NONE = -1,
-+ AV_PIX_FMT_YUV420P, ///< planar YUV 4:2:0, 12bpp, (1 Cr & Cb sample per 2x2 Y samples)
-+ AV_PIX_FMT_YUYV422, ///< packed YUV 4:2:2, 16bpp, Y0 Cb Y1 Cr
-+ AV_PIX_FMT_RGB24, ///< packed RGB 8:8:8, 24bpp, RGBRGB...
-+ AV_PIX_FMT_BGR24, ///< packed RGB 8:8:8, 24bpp, BGRBGR...
-+ AV_PIX_FMT_YUV422P, ///< planar YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
-+ AV_PIX_FMT_YUV444P, ///< planar YUV 4:4:4, 24bpp, (1 Cr & Cb sample per 1x1 Y samples)
-+ AV_PIX_FMT_YUV410P, ///< planar YUV 4:1:0, 9bpp, (1 Cr & Cb sample per 4x4 Y samples)
-+ AV_PIX_FMT_YUV411P, ///< planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples)
-+ AV_PIX_FMT_GRAY8, ///< Y , 8bpp
-+ AV_PIX_FMT_MONOWHITE, ///< Y , 1bpp, 0 is white, 1 is black, in each byte pixels are ordered from the msb to the lsb
-+ AV_PIX_FMT_MONOBLACK, ///< Y , 1bpp, 0 is black, 1 is white, in each byte pixels are ordered from the msb to the lsb
-+ AV_PIX_FMT_PAL8, ///< 8 bits with AV_PIX_FMT_RGB32 palette
-+ AV_PIX_FMT_YUVJ420P, ///< planar YUV 4:2:0, 12bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV420P and setting color_range
-+ AV_PIX_FMT_YUVJ422P, ///< planar YUV 4:2:2, 16bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV422P and setting color_range
-+ AV_PIX_FMT_YUVJ444P, ///< planar YUV 4:4:4, 24bpp, full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV444P and setting color_range
-+ AV_PIX_FMT_UYVY422, ///< packed YUV 4:2:2, 16bpp, Cb Y0 Cr Y1
-+ AV_PIX_FMT_UYYVYY411, ///< packed YUV 4:1:1, 12bpp, Cb Y0 Y1 Cr Y2 Y3
-+ AV_PIX_FMT_BGR8, ///< packed RGB 3:3:2, 8bpp, (msb)2B 3G 3R(lsb)
-+ AV_PIX_FMT_BGR4, ///< packed RGB 1:2:1 bitstream, 4bpp, (msb)1B 2G 1R(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits
-+ AV_PIX_FMT_BGR4_BYTE, ///< packed RGB 1:2:1, 8bpp, (msb)1B 2G 1R(lsb)
-+ AV_PIX_FMT_RGB8, ///< packed RGB 3:3:2, 8bpp, (msb)3R 3G 2B(lsb)
-+ AV_PIX_FMT_RGB4, ///< packed RGB 1:2:1 bitstream, 4bpp, (msb)1R 2G 1B(lsb), a byte contains two pixels, the first pixel in the byte is the one composed by the 4 msb bits
-+ AV_PIX_FMT_RGB4_BYTE, ///< packed RGB 1:2:1, 8bpp, (msb)1R 2G 1B(lsb)
-+ AV_PIX_FMT_NV12, ///< planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (first byte U and the following byte V)
-+ AV_PIX_FMT_NV21, ///< as above, but U and V bytes are swapped
-+
-+ AV_PIX_FMT_ARGB, ///< packed ARGB 8:8:8:8, 32bpp, ARGBARGB...
-+ AV_PIX_FMT_RGBA, ///< packed RGBA 8:8:8:8, 32bpp, RGBARGBA...
-+ AV_PIX_FMT_ABGR, ///< packed ABGR 8:8:8:8, 32bpp, ABGRABGR...
-+ AV_PIX_FMT_BGRA, ///< packed BGRA 8:8:8:8, 32bpp, BGRABGRA...
-+
-+ AV_PIX_FMT_GRAY16BE, ///< Y , 16bpp, big-endian
-+ AV_PIX_FMT_GRAY16LE, ///< Y , 16bpp, little-endian
-+ AV_PIX_FMT_YUV440P, ///< planar YUV 4:4:0 (1 Cr & Cb sample per 1x2 Y samples)
-+ AV_PIX_FMT_YUVJ440P, ///< planar YUV 4:4:0 full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV440P and setting color_range
-+ AV_PIX_FMT_YUVA420P, ///< planar YUV 4:2:0, 20bpp, (1 Cr & Cb sample per 2x2 Y & A samples)
-+ AV_PIX_FMT_RGB48BE, ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as big-endian
-+ AV_PIX_FMT_RGB48LE, ///< packed RGB 16:16:16, 48bpp, 16R, 16G, 16B, the 2-byte value for each R/G/B component is stored as little-endian
-+
-+ AV_PIX_FMT_RGB565BE, ///< packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), big-endian
-+ AV_PIX_FMT_RGB565LE, ///< packed RGB 5:6:5, 16bpp, (msb) 5R 6G 5B(lsb), little-endian
-+ AV_PIX_FMT_RGB555BE, ///< packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), big-endian , X=unused/undefined
-+ AV_PIX_FMT_RGB555LE, ///< packed RGB 5:5:5, 16bpp, (msb)1X 5R 5G 5B(lsb), little-endian, X=unused/undefined
-+
-+ AV_PIX_FMT_BGR565BE, ///< packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), big-endian
-+ AV_PIX_FMT_BGR565LE, ///< packed BGR 5:6:5, 16bpp, (msb) 5B 6G 5R(lsb), little-endian
-+ AV_PIX_FMT_BGR555BE, ///< packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), big-endian , X=unused/undefined
-+ AV_PIX_FMT_BGR555LE, ///< packed BGR 5:5:5, 16bpp, (msb)1X 5B 5G 5R(lsb), little-endian, X=unused/undefined
-+
-+ /**
-+ * Hardware acceleration through VA-API, data[3] contains a
-+ * VASurfaceID.
-+ */
-+ AV_PIX_FMT_VAAPI,
-+
-+ AV_PIX_FMT_YUV420P16LE, ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
-+ AV_PIX_FMT_YUV420P16BE, ///< planar YUV 4:2:0, 24bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
-+ AV_PIX_FMT_YUV422P16LE, ///< planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
-+ AV_PIX_FMT_YUV422P16BE, ///< planar YUV 4:2:2, 32bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
-+ AV_PIX_FMT_YUV444P16LE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
-+ AV_PIX_FMT_YUV444P16BE, ///< planar YUV 4:4:4, 48bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
-+ AV_PIX_FMT_DXVA2_VLD, ///< HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer
-+
-+ AV_PIX_FMT_RGB444LE, ///< packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), little-endian, X=unused/undefined
-+ AV_PIX_FMT_RGB444BE, ///< packed RGB 4:4:4, 16bpp, (msb)4X 4R 4G 4B(lsb), big-endian, X=unused/undefined
-+ AV_PIX_FMT_BGR444LE, ///< packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), little-endian, X=unused/undefined
-+ AV_PIX_FMT_BGR444BE, ///< packed BGR 4:4:4, 16bpp, (msb)4X 4B 4G 4R(lsb), big-endian, X=unused/undefined
-+ AV_PIX_FMT_YA8, ///< 8 bits gray, 8 bits alpha
-+
-+ AV_PIX_FMT_Y400A = AV_PIX_FMT_YA8, ///< alias for AV_PIX_FMT_YA8
-+ AV_PIX_FMT_GRAY8A= AV_PIX_FMT_YA8, ///< alias for AV_PIX_FMT_YA8
-+
-+ AV_PIX_FMT_BGR48BE, ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as big-endian
-+ AV_PIX_FMT_BGR48LE, ///< packed RGB 16:16:16, 48bpp, 16B, 16G, 16R, the 2-byte value for each R/G/B component is stored as little-endian
-+
-+ /**
-+ * The following 12 formats have the disadvantage of needing 1 format for each bit depth.
-+ * Notice that each 9/10 bits sample is stored in 16 bits with extra padding.
-+ * If you want to support multiple bit depths, then using AV_PIX_FMT_YUV420P16* with the bpp stored separately is better.
-+ */
-+ AV_PIX_FMT_YUV420P9BE, ///< planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
-+ AV_PIX_FMT_YUV420P9LE, ///< planar YUV 4:2:0, 13.5bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
-+ AV_PIX_FMT_YUV420P10BE,///< planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
-+ AV_PIX_FMT_YUV420P10LE,///< planar YUV 4:2:0, 15bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
-+ AV_PIX_FMT_YUV422P10BE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
-+ AV_PIX_FMT_YUV422P10LE,///< planar YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
-+ AV_PIX_FMT_YUV444P9BE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
-+ AV_PIX_FMT_YUV444P9LE, ///< planar YUV 4:4:4, 27bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
-+ AV_PIX_FMT_YUV444P10BE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
-+ AV_PIX_FMT_YUV444P10LE,///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
-+ AV_PIX_FMT_YUV422P9BE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
-+ AV_PIX_FMT_YUV422P9LE, ///< planar YUV 4:2:2, 18bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
-+ AV_PIX_FMT_GBRP, ///< planar GBR 4:4:4 24bpp
-+ AV_PIX_FMT_GBR24P = AV_PIX_FMT_GBRP, // alias for #AV_PIX_FMT_GBRP
-+ AV_PIX_FMT_GBRP9BE, ///< planar GBR 4:4:4 27bpp, big-endian
-+ AV_PIX_FMT_GBRP9LE, ///< planar GBR 4:4:4 27bpp, little-endian
-+ AV_PIX_FMT_GBRP10BE, ///< planar GBR 4:4:4 30bpp, big-endian
-+ AV_PIX_FMT_GBRP10LE, ///< planar GBR 4:4:4 30bpp, little-endian
-+ AV_PIX_FMT_GBRP16BE, ///< planar GBR 4:4:4 48bpp, big-endian
-+ AV_PIX_FMT_GBRP16LE, ///< planar GBR 4:4:4 48bpp, little-endian
-+ AV_PIX_FMT_YUVA422P, ///< planar YUV 4:2:2 24bpp, (1 Cr & Cb sample per 2x1 Y & A samples)
-+ AV_PIX_FMT_YUVA444P, ///< planar YUV 4:4:4 32bpp, (1 Cr & Cb sample per 1x1 Y & A samples)
-+ AV_PIX_FMT_YUVA420P9BE, ///< planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), big-endian
-+ AV_PIX_FMT_YUVA420P9LE, ///< planar YUV 4:2:0 22.5bpp, (1 Cr & Cb sample per 2x2 Y & A samples), little-endian
-+ AV_PIX_FMT_YUVA422P9BE, ///< planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), big-endian
-+ AV_PIX_FMT_YUVA422P9LE, ///< planar YUV 4:2:2 27bpp, (1 Cr & Cb sample per 2x1 Y & A samples), little-endian
-+ AV_PIX_FMT_YUVA444P9BE, ///< planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), big-endian
-+ AV_PIX_FMT_YUVA444P9LE, ///< planar YUV 4:4:4 36bpp, (1 Cr & Cb sample per 1x1 Y & A samples), little-endian
-+ AV_PIX_FMT_YUVA420P10BE, ///< planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)
-+ AV_PIX_FMT_YUVA420P10LE, ///< planar YUV 4:2:0 25bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
-+ AV_PIX_FMT_YUVA422P10BE, ///< planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)
-+ AV_PIX_FMT_YUVA422P10LE, ///< planar YUV 4:2:2 30bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
-+ AV_PIX_FMT_YUVA444P10BE, ///< planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)
-+ AV_PIX_FMT_YUVA444P10LE, ///< planar YUV 4:4:4 40bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
-+ AV_PIX_FMT_YUVA420P16BE, ///< planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, big-endian)
-+ AV_PIX_FMT_YUVA420P16LE, ///< planar YUV 4:2:0 40bpp, (1 Cr & Cb sample per 2x2 Y & A samples, little-endian)
-+ AV_PIX_FMT_YUVA422P16BE, ///< planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, big-endian)
-+ AV_PIX_FMT_YUVA422P16LE, ///< planar YUV 4:2:2 48bpp, (1 Cr & Cb sample per 2x1 Y & A samples, little-endian)
-+ AV_PIX_FMT_YUVA444P16BE, ///< planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, big-endian)
-+ AV_PIX_FMT_YUVA444P16LE, ///< planar YUV 4:4:4 64bpp, (1 Cr & Cb sample per 1x1 Y & A samples, little-endian)
-+
-+ AV_PIX_FMT_VDPAU, ///< HW acceleration through VDPAU, Picture.data[3] contains a VdpVideoSurface
-+
-+ AV_PIX_FMT_XYZ12LE, ///< packed XYZ 4:4:4, 36 bpp, (msb) 12X, 12Y, 12Z (lsb), the 2-byte value for each X/Y/Z is stored as little-endian, the 4 lower bits are set to 0
-+ AV_PIX_FMT_XYZ12BE, ///< packed XYZ 4:4:4, 36 bpp, (msb) 12X, 12Y, 12Z (lsb), the 2-byte value for each X/Y/Z is stored as big-endian, the 4 lower bits are set to 0
-+ AV_PIX_FMT_NV16, ///< interleaved chroma YUV 4:2:2, 16bpp, (1 Cr & Cb sample per 2x1 Y samples)
-+ AV_PIX_FMT_NV20LE, ///< interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
-+ AV_PIX_FMT_NV20BE, ///< interleaved chroma YUV 4:2:2, 20bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
-+
-+ AV_PIX_FMT_RGBA64BE, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian
-+ AV_PIX_FMT_RGBA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16R, 16G, 16B, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian
-+ AV_PIX_FMT_BGRA64BE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as big-endian
-+ AV_PIX_FMT_BGRA64LE, ///< packed RGBA 16:16:16:16, 64bpp, 16B, 16G, 16R, 16A, the 2-byte value for each R/G/B/A component is stored as little-endian
-+
-+ AV_PIX_FMT_YVYU422, ///< packed YUV 4:2:2, 16bpp, Y0 Cr Y1 Cb
-+
-+ AV_PIX_FMT_YA16BE, ///< 16 bits gray, 16 bits alpha (big-endian)
-+ AV_PIX_FMT_YA16LE, ///< 16 bits gray, 16 bits alpha (little-endian)
-+
-+ AV_PIX_FMT_GBRAP, ///< planar GBRA 4:4:4:4 32bpp
-+ AV_PIX_FMT_GBRAP16BE, ///< planar GBRA 4:4:4:4 64bpp, big-endian
-+ AV_PIX_FMT_GBRAP16LE, ///< planar GBRA 4:4:4:4 64bpp, little-endian
-+ /**
-+ * HW acceleration through QSV, data[3] contains a pointer to the
-+ * mfxFrameSurface1 structure.
-+ *
-+ * Before FFmpeg 5.0:
-+ * mfxFrameSurface1.Data.MemId contains a pointer when importing
-+ * the following frames as QSV frames:
-+ *
-+ * VAAPI:
-+ * mfxFrameSurface1.Data.MemId contains a pointer to VASurfaceID
-+ *
-+ * DXVA2:
-+ * mfxFrameSurface1.Data.MemId contains a pointer to IDirect3DSurface9
-+ *
-+ * FFmpeg 5.0 and above:
-+ * mfxFrameSurface1.Data.MemId contains a pointer to the mfxHDLPair
-+ * structure when importing the following frames as QSV frames:
-+ *
-+ * VAAPI:
-+ * mfxHDLPair.first contains a VASurfaceID pointer.
-+ * mfxHDLPair.second is always MFX_INFINITE.
-+ *
-+ * DXVA2:
-+ * mfxHDLPair.first contains IDirect3DSurface9 pointer.
-+ * mfxHDLPair.second is always MFX_INFINITE.
-+ *
-+ * D3D11:
-+ * mfxHDLPair.first contains a ID3D11Texture2D pointer.
-+ * mfxHDLPair.second contains the texture array index of the frame if the
-+ * ID3D11Texture2D is an array texture, or always MFX_INFINITE if it is a
-+ * normal texture.
-+ */
-+ AV_PIX_FMT_QSV,
-+ /**
-+ * HW acceleration though MMAL, data[3] contains a pointer to the
-+ * MMAL_BUFFER_HEADER_T structure.
-+ */
-+ AV_PIX_FMT_MMAL,
-+
-+ AV_PIX_FMT_D3D11VA_VLD, ///< HW decoding through Direct3D11 via old API, Picture.data[3] contains a ID3D11VideoDecoderOutputView pointer
-+
-+ /**
-+ * HW acceleration through CUDA. data[i] contain CUdeviceptr pointers
-+ * exactly as for system memory frames.
-+ */
-+ AV_PIX_FMT_CUDA,
-+
-+ AV_PIX_FMT_0RGB, ///< packed RGB 8:8:8, 32bpp, XRGBXRGB... X=unused/undefined
-+ AV_PIX_FMT_RGB0, ///< packed RGB 8:8:8, 32bpp, RGBXRGBX... X=unused/undefined
-+ AV_PIX_FMT_0BGR, ///< packed BGR 8:8:8, 32bpp, XBGRXBGR... X=unused/undefined
-+ AV_PIX_FMT_BGR0, ///< packed BGR 8:8:8, 32bpp, BGRXBGRX... X=unused/undefined
-+
-+ AV_PIX_FMT_YUV420P12BE, ///< planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
-+ AV_PIX_FMT_YUV420P12LE, ///< planar YUV 4:2:0,18bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
-+ AV_PIX_FMT_YUV420P14BE, ///< planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), big-endian
-+ AV_PIX_FMT_YUV420P14LE, ///< planar YUV 4:2:0,21bpp, (1 Cr & Cb sample per 2x2 Y samples), little-endian
-+ AV_PIX_FMT_YUV422P12BE, ///< planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
-+ AV_PIX_FMT_YUV422P12LE, ///< planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
-+ AV_PIX_FMT_YUV422P14BE, ///< planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), big-endian
-+ AV_PIX_FMT_YUV422P14LE, ///< planar YUV 4:2:2,28bpp, (1 Cr & Cb sample per 2x1 Y samples), little-endian
-+ AV_PIX_FMT_YUV444P12BE, ///< planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
-+ AV_PIX_FMT_YUV444P12LE, ///< planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
-+ AV_PIX_FMT_YUV444P14BE, ///< planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), big-endian
-+ AV_PIX_FMT_YUV444P14LE, ///< planar YUV 4:4:4,42bpp, (1 Cr & Cb sample per 1x1 Y samples), little-endian
-+ AV_PIX_FMT_GBRP12BE, ///< planar GBR 4:4:4 36bpp, big-endian
-+ AV_PIX_FMT_GBRP12LE, ///< planar GBR 4:4:4 36bpp, little-endian
-+ AV_PIX_FMT_GBRP14BE, ///< planar GBR 4:4:4 42bpp, big-endian
-+ AV_PIX_FMT_GBRP14LE, ///< planar GBR 4:4:4 42bpp, little-endian
-+ AV_PIX_FMT_YUVJ411P, ///< planar YUV 4:1:1, 12bpp, (1 Cr & Cb sample per 4x1 Y samples) full scale (JPEG), deprecated in favor of AV_PIX_FMT_YUV411P and setting color_range
-+
-+ AV_PIX_FMT_BAYER_BGGR8, ///< bayer, BGBG..(odd line), GRGR..(even line), 8-bit samples
-+ AV_PIX_FMT_BAYER_RGGB8, ///< bayer, RGRG..(odd line), GBGB..(even line), 8-bit samples
-+ AV_PIX_FMT_BAYER_GBRG8, ///< bayer, GBGB..(odd line), RGRG..(even line), 8-bit samples
-+ AV_PIX_FMT_BAYER_GRBG8, ///< bayer, GRGR..(odd line), BGBG..(even line), 8-bit samples
-+ AV_PIX_FMT_BAYER_BGGR16LE, ///< bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, little-endian
-+ AV_PIX_FMT_BAYER_BGGR16BE, ///< bayer, BGBG..(odd line), GRGR..(even line), 16-bit samples, big-endian
-+ AV_PIX_FMT_BAYER_RGGB16LE, ///< bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, little-endian
-+ AV_PIX_FMT_BAYER_RGGB16BE, ///< bayer, RGRG..(odd line), GBGB..(even line), 16-bit samples, big-endian
-+ AV_PIX_FMT_BAYER_GBRG16LE, ///< bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, little-endian
-+ AV_PIX_FMT_BAYER_GBRG16BE, ///< bayer, GBGB..(odd line), RGRG..(even line), 16-bit samples, big-endian
-+ AV_PIX_FMT_BAYER_GRBG16LE, ///< bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, little-endian
-+ AV_PIX_FMT_BAYER_GRBG16BE, ///< bayer, GRGR..(odd line), BGBG..(even line), 16-bit samples, big-endian
-+
-+ AV_PIX_FMT_YUV440P10LE, ///< planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
-+ AV_PIX_FMT_YUV440P10BE, ///< planar YUV 4:4:0,20bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian
-+ AV_PIX_FMT_YUV440P12LE, ///< planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), little-endian
-+ AV_PIX_FMT_YUV440P12BE, ///< planar YUV 4:4:0,24bpp, (1 Cr & Cb sample per 1x2 Y samples), big-endian
-+ AV_PIX_FMT_AYUV64LE, ///< packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), little-endian
-+ AV_PIX_FMT_AYUV64BE, ///< packed AYUV 4:4:4,64bpp (1 Cr & Cb sample per 1x1 Y & A samples), big-endian
-+
-+ AV_PIX_FMT_VIDEOTOOLBOX, ///< hardware decoding through Videotoolbox
-+
-+ AV_PIX_FMT_P010LE, ///< like NV12, with 10bpp per component, data in the high bits, zeros in the low bits, little-endian
-+ AV_PIX_FMT_P010BE, ///< like NV12, with 10bpp per component, data in the high bits, zeros in the low bits, big-endian
-+
-+ AV_PIX_FMT_GBRAP12BE, ///< planar GBR 4:4:4:4 48bpp, big-endian
-+ AV_PIX_FMT_GBRAP12LE, ///< planar GBR 4:4:4:4 48bpp, little-endian
-+
-+ AV_PIX_FMT_GBRAP10BE, ///< planar GBR 4:4:4:4 40bpp, big-endian
-+ AV_PIX_FMT_GBRAP10LE, ///< planar GBR 4:4:4:4 40bpp, little-endian
-+
-+ AV_PIX_FMT_MEDIACODEC, ///< hardware decoding through MediaCodec
-+
-+ AV_PIX_FMT_GRAY12BE, ///< Y , 12bpp, big-endian
-+ AV_PIX_FMT_GRAY12LE, ///< Y , 12bpp, little-endian
-+ AV_PIX_FMT_GRAY10BE, ///< Y , 10bpp, big-endian
-+ AV_PIX_FMT_GRAY10LE, ///< Y , 10bpp, little-endian
-+
-+ AV_PIX_FMT_P016LE, ///< like NV12, with 16bpp per component, little-endian
-+ AV_PIX_FMT_P016BE, ///< like NV12, with 16bpp per component, big-endian
-+
-+ /**
-+ * Hardware surfaces for Direct3D11.
-+ *
-+ * This is preferred over the legacy AV_PIX_FMT_D3D11VA_VLD. The new D3D11
-+ * hwaccel API and filtering support AV_PIX_FMT_D3D11 only.
-+ *
-+ * data[0] contains a ID3D11Texture2D pointer, and data[1] contains the
-+ * texture array index of the frame as intptr_t if the ID3D11Texture2D is
-+ * an array texture (or always 0 if it's a normal texture).
-+ */
-+ AV_PIX_FMT_D3D11,
-+
-+ AV_PIX_FMT_GRAY9BE, ///< Y , 9bpp, big-endian
-+ AV_PIX_FMT_GRAY9LE, ///< Y , 9bpp, little-endian
-+
-+ AV_PIX_FMT_GBRPF32BE, ///< IEEE-754 single precision planar GBR 4:4:4, 96bpp, big-endian
-+ AV_PIX_FMT_GBRPF32LE, ///< IEEE-754 single precision planar GBR 4:4:4, 96bpp, little-endian
-+ AV_PIX_FMT_GBRAPF32BE, ///< IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, big-endian
-+ AV_PIX_FMT_GBRAPF32LE, ///< IEEE-754 single precision planar GBRA 4:4:4:4, 128bpp, little-endian
-+
-+ /**
-+ * DRM-managed buffers exposed through PRIME buffer sharing.
-+ *
-+ * data[0] points to an AVDRMFrameDescriptor.
-+ */
-+ AV_PIX_FMT_DRM_PRIME,
-+ /**
-+ * Hardware surfaces for OpenCL.
-+ *
-+ * data[i] contain 2D image objects (typed in C as cl_mem, used
-+ * in OpenCL as image2d_t) for each plane of the surface.
-+ */
-+ AV_PIX_FMT_OPENCL,
-+
-+ AV_PIX_FMT_GRAY14BE, ///< Y , 14bpp, big-endian
-+ AV_PIX_FMT_GRAY14LE, ///< Y , 14bpp, little-endian
-+
-+ AV_PIX_FMT_GRAYF32BE, ///< IEEE-754 single precision Y, 32bpp, big-endian
-+ AV_PIX_FMT_GRAYF32LE, ///< IEEE-754 single precision Y, 32bpp, little-endian
-+
-+ AV_PIX_FMT_YUVA422P12BE, ///< planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), 12b alpha, big-endian
-+ AV_PIX_FMT_YUVA422P12LE, ///< planar YUV 4:2:2,24bpp, (1 Cr & Cb sample per 2x1 Y samples), 12b alpha, little-endian
-+ AV_PIX_FMT_YUVA444P12BE, ///< planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), 12b alpha, big-endian
-+ AV_PIX_FMT_YUVA444P12LE, ///< planar YUV 4:4:4,36bpp, (1 Cr & Cb sample per 1x1 Y samples), 12b alpha, little-endian
-+
-+ AV_PIX_FMT_NV24, ///< planar YUV 4:4:4, 24bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (first byte U and the following byte V)
-+ AV_PIX_FMT_NV42, ///< as above, but U and V bytes are swapped
-+
-+ /**
-+ * Vulkan hardware images.
-+ *
-+ * data[0] points to an AVVkFrame
-+ */
-+ AV_PIX_FMT_VULKAN,
-+
-+ AV_PIX_FMT_Y210BE, ///< packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, big-endian
-+ AV_PIX_FMT_Y210LE, ///< packed YUV 4:2:2 like YUYV422, 20bpp, data in the high bits, little-endian
-+
-+ AV_PIX_FMT_X2RGB10LE, ///< packed RGB 10:10:10, 30bpp, (msb)2X 10R 10G 10B(lsb), little-endian, X=unused/undefined
-+ AV_PIX_FMT_X2RGB10BE, ///< packed RGB 10:10:10, 30bpp, (msb)2X 10R 10G 10B(lsb), big-endian, X=unused/undefined
-+ AV_PIX_FMT_X2BGR10LE, ///< packed BGR 10:10:10, 30bpp, (msb)2X 10B 10G 10R(lsb), little-endian, X=unused/undefined
-+ AV_PIX_FMT_X2BGR10BE, ///< packed BGR 10:10:10, 30bpp, (msb)2X 10B 10G 10R(lsb), big-endian, X=unused/undefined
-+
-+ AV_PIX_FMT_P210BE, ///< interleaved chroma YUV 4:2:2, 20bpp, data in the high bits, big-endian
-+ AV_PIX_FMT_P210LE, ///< interleaved chroma YUV 4:2:2, 20bpp, data in the high bits, little-endian
-+
-+ AV_PIX_FMT_P410BE, ///< interleaved chroma YUV 4:4:4, 30bpp, data in the high bits, big-endian
-+ AV_PIX_FMT_P410LE, ///< interleaved chroma YUV 4:4:4, 30bpp, data in the high bits, little-endian
-+
-+ AV_PIX_FMT_P216BE, ///< interleaved chroma YUV 4:2:2, 32bpp, big-endian
-+ AV_PIX_FMT_P216LE, ///< interleaved chroma YUV 4:2:2, 32bpp, little-endian
-+
-+ AV_PIX_FMT_P416BE, ///< interleaved chroma YUV 4:4:4, 48bpp, big-endian
-+ AV_PIX_FMT_P416LE, ///< interleaved chroma YUV 4:4:4, 48bpp, little-endian
-+
-+ AV_PIX_FMT_VUYA, ///< packed VUYA 4:4:4:4, 32bpp (1 Cr & Cb sample per 1x1 Y & A samples), VUYAVUYA...
-+
-+ AV_PIX_FMT_RGBAF16BE, ///< IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., big-endian
-+ AV_PIX_FMT_RGBAF16LE, ///< IEEE-754 half precision packed RGBA 16:16:16:16, 64bpp, RGBARGBA..., little-endian
-+
-+ AV_PIX_FMT_VUYX, ///< packed VUYX 4:4:4:4, 32bpp, Variant of VUYA where alpha channel is left undefined
-+
-+ AV_PIX_FMT_P012LE, ///< like NV12, with 12bpp per component, data in the high bits, zeros in the low bits, little-endian
-+ AV_PIX_FMT_P012BE, ///< like NV12, with 12bpp per component, data in the high bits, zeros in the low bits, big-endian
-+
-+ AV_PIX_FMT_Y212BE, ///< packed YUV 4:2:2 like YUYV422, 24bpp, data in the high bits, zeros in the low bits, big-endian
-+ AV_PIX_FMT_Y212LE, ///< packed YUV 4:2:2 like YUYV422, 24bpp, data in the high bits, zeros in the low bits, little-endian
-+
-+ AV_PIX_FMT_XV30BE, ///< packed XVYU 4:4:4, 32bpp, (msb)2X 10V 10Y 10U(lsb), big-endian, variant of Y410 where alpha channel is left undefined
-+ AV_PIX_FMT_XV30LE, ///< packed XVYU 4:4:4, 32bpp, (msb)2X 10V 10Y 10U(lsb), little-endian, variant of Y410 where alpha channel is left undefined
-+
-+ AV_PIX_FMT_XV36BE, ///< packed XVYU 4:4:4, 48bpp, data in the high bits, zeros in the low bits, big-endian, variant of Y412 where alpha channel is left undefined
-+ AV_PIX_FMT_XV36LE, ///< packed XVYU 4:4:4, 48bpp, data in the high bits, zeros in the low bits, little-endian, variant of Y412 where alpha channel is left undefined
-+
-+ AV_PIX_FMT_RGBF32BE, ///< IEEE-754 single precision packed RGB 32:32:32, 96bpp, RGBRGB..., big-endian
-+ AV_PIX_FMT_RGBF32LE, ///< IEEE-754 single precision packed RGB 32:32:32, 96bpp, RGBRGB..., little-endian
-+
-+ AV_PIX_FMT_RGBAF32BE, ///< IEEE-754 single precision packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., big-endian
-+ AV_PIX_FMT_RGBAF32LE, ///< IEEE-754 single precision packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., little-endian
-+
-+ AV_PIX_FMT_P212BE, ///< interleaved chroma YUV 4:2:2, 24bpp, data in the high bits, big-endian
-+ AV_PIX_FMT_P212LE, ///< interleaved chroma YUV 4:2:2, 24bpp, data in the high bits, little-endian
-+
-+ AV_PIX_FMT_P412BE, ///< interleaved chroma YUV 4:4:4, 36bpp, data in the high bits, big-endian
-+ AV_PIX_FMT_P412LE, ///< interleaved chroma YUV 4:4:4, 36bpp, data in the high bits, little-endian
-+
-+ AV_PIX_FMT_GBRAP14BE, ///< planar GBR 4:4:4:4 56bpp, big-endian
-+ AV_PIX_FMT_GBRAP14LE, ///< planar GBR 4:4:4:4 56bpp, little-endian
-+
-+ /**
-+ * Hardware surfaces for Direct3D 12.
-+ *
-+ * data[0] points to an AVD3D12VAFrame
-+ */
-+ AV_PIX_FMT_D3D12,
-+
-+ AV_PIX_FMT_AYUV, ///< packed AYUV 4:4:4:4, 32bpp (1 Cr & Cb sample per 1x1 Y & A samples), AYUVAYUV...
-+
-+ AV_PIX_FMT_UYVA, ///< packed UYVA 4:4:4:4, 32bpp (1 Cr & Cb sample per 1x1 Y & A samples), UYVAUYVA...
-+
-+ AV_PIX_FMT_VYU444, ///< packed VYU 4:4:4, 24bpp (1 Cr & Cb sample per 1x1 Y), VYUVYU...
-+
-+ AV_PIX_FMT_V30XBE, ///< packed VYUX 4:4:4 like XV30, 32bpp, (msb)10V 10Y 10U 2X(lsb), big-endian
-+ AV_PIX_FMT_V30XLE, ///< packed VYUX 4:4:4 like XV30, 32bpp, (msb)10V 10Y 10U 2X(lsb), little-endian
-+
-+ AV_PIX_FMT_RGBF16BE, ///< IEEE-754 half precision packed RGB 16:16:16, 48bpp, RGBRGB..., big-endian
-+ AV_PIX_FMT_RGBF16LE, ///< IEEE-754 half precision packed RGB 16:16:16, 48bpp, RGBRGB..., little-endian
-+
-+ AV_PIX_FMT_RGBA128BE, ///< packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., big-endian
-+ AV_PIX_FMT_RGBA128LE, ///< packed RGBA 32:32:32:32, 128bpp, RGBARGBA..., little-endian
-+
-+ AV_PIX_FMT_RGB96BE, ///< packed RGBA 32:32:32, 96bpp, RGBRGB..., big-endian
-+ AV_PIX_FMT_RGB96LE, ///< packed RGBA 32:32:32, 96bpp, RGBRGB..., little-endian
-+
-+ AV_PIX_FMT_Y216BE, ///< packed YUV 4:2:2 like YUYV422, 32bpp, big-endian
-+ AV_PIX_FMT_Y216LE, ///< packed YUV 4:2:2 like YUYV422, 32bpp, little-endian
-+
-+ AV_PIX_FMT_XV48BE, ///< packed XVYU 4:4:4, 64bpp, big-endian, variant of Y416 where alpha channel is left undefined
-+ AV_PIX_FMT_XV48LE, ///< packed XVYU 4:4:4, 64bpp, little-endian, variant of Y416 where alpha channel is left undefined
-+
-+ AV_PIX_FMT_GBRPF16BE, ///< IEEE-754 half precision planer GBR 4:4:4, 48bpp, big-endian
-+ AV_PIX_FMT_GBRPF16LE, ///< IEEE-754 half precision planer GBR 4:4:4, 48bpp, little-endian
-+ AV_PIX_FMT_GBRAPF16BE, ///< IEEE-754 half precision planar GBRA 4:4:4:4, 64bpp, big-endian
-+ AV_PIX_FMT_GBRAPF16LE, ///< IEEE-754 half precision planar GBRA 4:4:4:4, 64bpp, little-endian
-+
-+ AV_PIX_FMT_GRAYF16BE, ///< IEEE-754 half precision Y, 16bpp, big-endian
-+ AV_PIX_FMT_GRAYF16LE, ///< IEEE-754 half precision Y, 16bpp, little-endian
-+
-+ /**
-+ * HW acceleration through AMF. data[0] contain AMFSurface pointer
-+ */
-+ AV_PIX_FMT_AMF_SURFACE,
-+
-+ AV_PIX_FMT_GRAY32BE, ///< Y , 32bpp, big-endian
-+ AV_PIX_FMT_GRAY32LE, ///< Y , 32bpp, little-endian
-+
-+ AV_PIX_FMT_YAF32BE, ///< IEEE-754 single precision packed YA, 32 bits gray, 32 bits alpha, 64bpp, big-endian
-+ AV_PIX_FMT_YAF32LE, ///< IEEE-754 single precision packed YA, 32 bits gray, 32 bits alpha, 64bpp, little-endian
-+
-+ AV_PIX_FMT_YAF16BE, ///< IEEE-754 half precision packed YA, 16 bits gray, 16 bits alpha, 32bpp, big-endian
-+ AV_PIX_FMT_YAF16LE, ///< IEEE-754 half precision packed YA, 16 bits gray, 16 bits alpha, 32bpp, little-endian
-+
-+ AV_PIX_FMT_GBRAP32BE, ///< planar GBRA 4:4:4:4 128bpp, big-endian
-+ AV_PIX_FMT_GBRAP32LE, ///< planar GBRA 4:4:4:4 128bpp, little-endian
-+
-+ AV_PIX_FMT_YUV444P10MSBBE, ///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), lowest bits zero, big-endian
-+ AV_PIX_FMT_YUV444P10MSBLE, ///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), lowest bits zero, little-endian
-+ AV_PIX_FMT_YUV444P12MSBBE, ///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), lowest bits zero, big-endian
-+ AV_PIX_FMT_YUV444P12MSBLE, ///< planar YUV 4:4:4, 30bpp, (1 Cr & Cb sample per 1x1 Y samples), lowest bits zero, little-endian
-+ AV_PIX_FMT_GBRP10MSBBE, ///< planar GBR 4:4:4 30bpp, lowest bits zero, big-endian
-+ AV_PIX_FMT_GBRP10MSBLE, ///< planar GBR 4:4:4 30bpp, lowest bits zero, little-endian
-+ AV_PIX_FMT_GBRP12MSBBE, ///< planar GBR 4:4:4 36bpp, lowest bits zero, big-endian
-+ AV_PIX_FMT_GBRP12MSBLE, ///< planar GBR 4:4:4 36bpp, lowest bits zero, little-endian
-+
-+ AV_PIX_FMT_OHCODEC, /// hardware decoding through openharmony
-+
-+ /**
-+ * CUDA block-linear (opaque). data[0] is a CUarray in block-linear layout,
-+ * e.g. from NVDEC opaque decode. Use for zero-copy to NVENC (CUDA array input).
-+ */
-+ AV_PIX_FMT_CUARRAY,
-+
-+ AV_PIX_FMT_NB ///< number of pixel formats, DO NOT USE THIS if you want to link with shared libav* because the number of formats might differ between versions
-+};
-+
-+#if AV_HAVE_BIGENDIAN
-+# define AV_PIX_FMT_NE(be, le) AV_PIX_FMT_##be
-+#else
-+# define AV_PIX_FMT_NE(be, le) AV_PIX_FMT_##le
-+#endif
-+
-+#define AV_PIX_FMT_RGB32 AV_PIX_FMT_NE(ARGB, BGRA)
-+#define AV_PIX_FMT_RGB32_1 AV_PIX_FMT_NE(RGBA, ABGR)
-+#define AV_PIX_FMT_BGR32 AV_PIX_FMT_NE(ABGR, RGBA)
-+#define AV_PIX_FMT_BGR32_1 AV_PIX_FMT_NE(BGRA, ARGB)
-+#define AV_PIX_FMT_0RGB32 AV_PIX_FMT_NE(0RGB, BGR0)
-+#define AV_PIX_FMT_0BGR32 AV_PIX_FMT_NE(0BGR, RGB0)
-+
-+#define AV_PIX_FMT_GRAY9 AV_PIX_FMT_NE(GRAY9BE, GRAY9LE)
-+#define AV_PIX_FMT_GRAY10 AV_PIX_FMT_NE(GRAY10BE, GRAY10LE)
-+#define AV_PIX_FMT_GRAY12 AV_PIX_FMT_NE(GRAY12BE, GRAY12LE)
-+#define AV_PIX_FMT_GRAY14 AV_PIX_FMT_NE(GRAY14BE, GRAY14LE)
-+#define AV_PIX_FMT_GRAY16 AV_PIX_FMT_NE(GRAY16BE, GRAY16LE)
-+#define AV_PIX_FMT_GRAY32 AV_PIX_FMT_NE(GRAY32BE, GRAY32LE)
-+#define AV_PIX_FMT_YA16 AV_PIX_FMT_NE(YA16BE, YA16LE)
-+#define AV_PIX_FMT_RGB48 AV_PIX_FMT_NE(RGB48BE, RGB48LE)
-+#define AV_PIX_FMT_RGB565 AV_PIX_FMT_NE(RGB565BE, RGB565LE)
-+#define AV_PIX_FMT_RGB555 AV_PIX_FMT_NE(RGB555BE, RGB555LE)
-+#define AV_PIX_FMT_RGB444 AV_PIX_FMT_NE(RGB444BE, RGB444LE)
-+#define AV_PIX_FMT_RGBA64 AV_PIX_FMT_NE(RGBA64BE, RGBA64LE)
-+#define AV_PIX_FMT_BGR48 AV_PIX_FMT_NE(BGR48BE, BGR48LE)
-+#define AV_PIX_FMT_BGR565 AV_PIX_FMT_NE(BGR565BE, BGR565LE)
-+#define AV_PIX_FMT_BGR555 AV_PIX_FMT_NE(BGR555BE, BGR555LE)
-+#define AV_PIX_FMT_BGR444 AV_PIX_FMT_NE(BGR444BE, BGR444LE)
-+#define AV_PIX_FMT_BGRA64 AV_PIX_FMT_NE(BGRA64BE, BGRA64LE)
-+
-+#define AV_PIX_FMT_YUV420P9 AV_PIX_FMT_NE(YUV420P9BE , YUV420P9LE)
-+#define AV_PIX_FMT_YUV422P9 AV_PIX_FMT_NE(YUV422P9BE , YUV422P9LE)
-+#define AV_PIX_FMT_YUV444P9 AV_PIX_FMT_NE(YUV444P9BE , YUV444P9LE)
-+#define AV_PIX_FMT_YUV420P10 AV_PIX_FMT_NE(YUV420P10BE, YUV420P10LE)
-+#define AV_PIX_FMT_YUV422P10 AV_PIX_FMT_NE(YUV422P10BE, YUV422P10LE)
-+#define AV_PIX_FMT_YUV440P10 AV_PIX_FMT_NE(YUV440P10BE, YUV440P10LE)
-+#define AV_PIX_FMT_YUV444P10 AV_PIX_FMT_NE(YUV444P10BE, YUV444P10LE)
-+#define AV_PIX_FMT_YUV420P12 AV_PIX_FMT_NE(YUV420P12BE, YUV420P12LE)
-+#define AV_PIX_FMT_YUV422P12 AV_PIX_FMT_NE(YUV422P12BE, YUV422P12LE)
-+#define AV_PIX_FMT_YUV440P12 AV_PIX_FMT_NE(YUV440P12BE, YUV440P12LE)
-+#define AV_PIX_FMT_YUV444P12 AV_PIX_FMT_NE(YUV444P12BE, YUV444P12LE)
-+#define AV_PIX_FMT_YUV420P14 AV_PIX_FMT_NE(YUV420P14BE, YUV420P14LE)
-+#define AV_PIX_FMT_YUV422P14 AV_PIX_FMT_NE(YUV422P14BE, YUV422P14LE)
-+#define AV_PIX_FMT_YUV444P14 AV_PIX_FMT_NE(YUV444P14BE, YUV444P14LE)
-+#define AV_PIX_FMT_YUV420P16 AV_PIX_FMT_NE(YUV420P16BE, YUV420P16LE)
-+#define AV_PIX_FMT_YUV422P16 AV_PIX_FMT_NE(YUV422P16BE, YUV422P16LE)
-+#define AV_PIX_FMT_YUV444P16 AV_PIX_FMT_NE(YUV444P16BE, YUV444P16LE)
-+
-+#define AV_PIX_FMT_YUV444P10MSB AV_PIX_FMT_NE(YUV444P10MSBBE, YUV444P10MSBLE)
-+#define AV_PIX_FMT_YUV444P12MSB AV_PIX_FMT_NE(YUV444P12MSBBE, YUV444P12MSBLE)
-+
-+#define AV_PIX_FMT_GBRP9 AV_PIX_FMT_NE(GBRP9BE , GBRP9LE)
-+#define AV_PIX_FMT_GBRP10 AV_PIX_FMT_NE(GBRP10BE, GBRP10LE)
-+#define AV_PIX_FMT_GBRP12 AV_PIX_FMT_NE(GBRP12BE, GBRP12LE)
-+#define AV_PIX_FMT_GBRP14 AV_PIX_FMT_NE(GBRP14BE, GBRP14LE)
-+#define AV_PIX_FMT_GBRP16 AV_PIX_FMT_NE(GBRP16BE, GBRP16LE)
-+#define AV_PIX_FMT_GBRAP10 AV_PIX_FMT_NE(GBRAP10BE, GBRAP10LE)
-+#define AV_PIX_FMT_GBRAP12 AV_PIX_FMT_NE(GBRAP12BE, GBRAP12LE)
-+#define AV_PIX_FMT_GBRAP14 AV_PIX_FMT_NE(GBRAP14BE, GBRAP14LE)
-+#define AV_PIX_FMT_GBRAP16 AV_PIX_FMT_NE(GBRAP16BE, GBRAP16LE)
-+#define AV_PIX_FMT_GBRAP32 AV_PIX_FMT_NE(GBRAP32BE, GBRAP32LE)
-+
-+#define AV_PIX_FMT_GBRP10MSB AV_PIX_FMT_NE(GBRP10MSBBE, GBRP10MSBLE)
-+#define AV_PIX_FMT_GBRP12MSB AV_PIX_FMT_NE(GBRP12MSBBE, GBRP12MSBLE)
-+
-+#define AV_PIX_FMT_BAYER_BGGR16 AV_PIX_FMT_NE(BAYER_BGGR16BE, BAYER_BGGR16LE)
-+#define AV_PIX_FMT_BAYER_RGGB16 AV_PIX_FMT_NE(BAYER_RGGB16BE, BAYER_RGGB16LE)
-+#define AV_PIX_FMT_BAYER_GBRG16 AV_PIX_FMT_NE(BAYER_GBRG16BE, BAYER_GBRG16LE)
-+#define AV_PIX_FMT_BAYER_GRBG16 AV_PIX_FMT_NE(BAYER_GRBG16BE, BAYER_GRBG16LE)
-+
-+#define AV_PIX_FMT_GBRPF16 AV_PIX_FMT_NE(GBRPF16BE, GBRPF16LE)
-+#define AV_PIX_FMT_GBRAPF16 AV_PIX_FMT_NE(GBRAPF16BE, GBRAPF16LE)
-+#define AV_PIX_FMT_GBRPF32 AV_PIX_FMT_NE(GBRPF32BE, GBRPF32LE)
-+#define AV_PIX_FMT_GBRAPF32 AV_PIX_FMT_NE(GBRAPF32BE, GBRAPF32LE)
-+
-+#define AV_PIX_FMT_GRAYF16 AV_PIX_FMT_NE(GRAYF16BE, GRAYF16LE)
-+#define AV_PIX_FMT_GRAYF32 AV_PIX_FMT_NE(GRAYF32BE, GRAYF32LE)
-+
-+#define AV_PIX_FMT_YAF16 AV_PIX_FMT_NE(YAF16BE, YAF16LE)
-+#define AV_PIX_FMT_YAF32 AV_PIX_FMT_NE(YAF32BE, YAF32LE)
-+
-+#define AV_PIX_FMT_YUVA420P9 AV_PIX_FMT_NE(YUVA420P9BE , YUVA420P9LE)
-+#define AV_PIX_FMT_YUVA422P9 AV_PIX_FMT_NE(YUVA422P9BE , YUVA422P9LE)
-+#define AV_PIX_FMT_YUVA444P9 AV_PIX_FMT_NE(YUVA444P9BE , YUVA444P9LE)
-+#define AV_PIX_FMT_YUVA420P10 AV_PIX_FMT_NE(YUVA420P10BE, YUVA420P10LE)
-+#define AV_PIX_FMT_YUVA422P10 AV_PIX_FMT_NE(YUVA422P10BE, YUVA422P10LE)
-+#define AV_PIX_FMT_YUVA444P10 AV_PIX_FMT_NE(YUVA444P10BE, YUVA444P10LE)
-+#define AV_PIX_FMT_YUVA422P12 AV_PIX_FMT_NE(YUVA422P12BE, YUVA422P12LE)
-+#define AV_PIX_FMT_YUVA444P12 AV_PIX_FMT_NE(YUVA444P12BE, YUVA444P12LE)
-+#define AV_PIX_FMT_YUVA420P16 AV_PIX_FMT_NE(YUVA420P16BE, YUVA420P16LE)
-+#define AV_PIX_FMT_YUVA422P16 AV_PIX_FMT_NE(YUVA422P16BE, YUVA422P16LE)
-+#define AV_PIX_FMT_YUVA444P16 AV_PIX_FMT_NE(YUVA444P16BE, YUVA444P16LE)
-+
-+#define AV_PIX_FMT_XYZ12 AV_PIX_FMT_NE(XYZ12BE, XYZ12LE)
-+#define AV_PIX_FMT_NV20 AV_PIX_FMT_NE(NV20BE, NV20LE)
-+#define AV_PIX_FMT_AYUV64 AV_PIX_FMT_NE(AYUV64BE, AYUV64LE)
-+#define AV_PIX_FMT_P010 AV_PIX_FMT_NE(P010BE, P010LE)
-+#define AV_PIX_FMT_P012 AV_PIX_FMT_NE(P012BE, P012LE)
-+#define AV_PIX_FMT_P016 AV_PIX_FMT_NE(P016BE, P016LE)
-+
-+#define AV_PIX_FMT_Y210 AV_PIX_FMT_NE(Y210BE, Y210LE)
-+#define AV_PIX_FMT_Y212 AV_PIX_FMT_NE(Y212BE, Y212LE)
-+#define AV_PIX_FMT_Y216 AV_PIX_FMT_NE(Y216BE, Y216LE)
-+#define AV_PIX_FMT_XV30 AV_PIX_FMT_NE(XV30BE, XV30LE)
-+#define AV_PIX_FMT_XV36 AV_PIX_FMT_NE(XV36BE, XV36LE)
-+#define AV_PIX_FMT_XV48 AV_PIX_FMT_NE(XV48BE, XV48LE)
-+#define AV_PIX_FMT_V30X AV_PIX_FMT_NE(V30XBE, V30XLE)
-+#define AV_PIX_FMT_X2RGB10 AV_PIX_FMT_NE(X2RGB10BE, X2RGB10LE)
-+#define AV_PIX_FMT_X2BGR10 AV_PIX_FMT_NE(X2BGR10BE, X2BGR10LE)
-+
-+#define AV_PIX_FMT_P210 AV_PIX_FMT_NE(P210BE, P210LE)
-+#define AV_PIX_FMT_P410 AV_PIX_FMT_NE(P410BE, P410LE)
-+#define AV_PIX_FMT_P212 AV_PIX_FMT_NE(P212BE, P212LE)
-+#define AV_PIX_FMT_P412 AV_PIX_FMT_NE(P412BE, P412LE)
-+#define AV_PIX_FMT_P216 AV_PIX_FMT_NE(P216BE, P216LE)
-+#define AV_PIX_FMT_P416 AV_PIX_FMT_NE(P416BE, P416LE)
-+
-+#define AV_PIX_FMT_RGBF16 AV_PIX_FMT_NE(RGBF16BE, RGBF16LE)
-+#define AV_PIX_FMT_RGBAF16 AV_PIX_FMT_NE(RGBAF16BE, RGBAF16LE)
-+
-+#define AV_PIX_FMT_RGBF32 AV_PIX_FMT_NE(RGBF32BE, RGBF32LE)
-+#define AV_PIX_FMT_RGBAF32 AV_PIX_FMT_NE(RGBAF32BE, RGBAF32LE)
-+
-+#define AV_PIX_FMT_RGB96 AV_PIX_FMT_NE(RGB96BE, RGB96LE)
-+#define AV_PIX_FMT_RGBA128 AV_PIX_FMT_NE(RGBA128BE, RGBA128LE)
-+
-+/**
-+ * Chromaticity coordinates of the source primaries.
-+ * These values match the ones defined by ISO/IEC 23091-2_2019 subclause 8.1 and ITU-T H.273.
-+ */
-+enum AVColorPrimaries {
-+ AVCOL_PRI_RESERVED0 = 0,
-+ AVCOL_PRI_BT709 = 1, ///< also ITU-R BT1361 / IEC 61966-2-4 / SMPTE RP 177 Annex B
-+ AVCOL_PRI_UNSPECIFIED = 2,
-+ AVCOL_PRI_RESERVED = 3,
-+ AVCOL_PRI_BT470M = 4, ///< also FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
-+
-+ AVCOL_PRI_BT470BG = 5, ///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM
-+ AVCOL_PRI_SMPTE170M = 6, ///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
-+ AVCOL_PRI_SMPTE240M = 7, ///< identical to above, also called "SMPTE C" even though it uses D65
-+ AVCOL_PRI_FILM = 8, ///< colour filters using Illuminant C
-+ AVCOL_PRI_BT2020 = 9, ///< ITU-R BT2020
-+ AVCOL_PRI_SMPTE428 = 10, ///< SMPTE ST 428-1 (CIE 1931 XYZ)
-+ AVCOL_PRI_SMPTEST428_1 = AVCOL_PRI_SMPTE428,
-+ AVCOL_PRI_SMPTE431 = 11, ///< SMPTE ST 431-2 (2011) / DCI P3
-+ AVCOL_PRI_SMPTE432 = 12, ///< SMPTE ST 432-1 (2010) / P3 D65 / Display P3
-+ AVCOL_PRI_EBU3213 = 22, ///< EBU Tech. 3213-E (nothing there) / one of JEDEC P22 group phosphors
-+ AVCOL_PRI_JEDEC_P22 = AVCOL_PRI_EBU3213,
-+ AVCOL_PRI_NB, ///< Not part of ABI
-+
-+ /* The following entries are not part of H.273, but custom extensions */
-+ AVCOL_PRI_EXT_BASE = 256,
-+ AVCOL_PRI_V_GAMUT = AVCOL_PRI_EXT_BASE,
-+ AVCOL_PRI_EXT_NB ///< Not part of ABI
-+};
-+
-+/**
-+ * Color Transfer Characteristic.
-+ * These values match the ones defined by ISO/IEC 23091-2_2019 subclause 8.2.
-+ */
-+enum AVColorTransferCharacteristic {
-+ AVCOL_TRC_RESERVED0 = 0,
-+ AVCOL_TRC_BT709 = 1, ///< also ITU-R BT1361
-+ AVCOL_TRC_UNSPECIFIED = 2,
-+ AVCOL_TRC_RESERVED = 3,
-+ AVCOL_TRC_GAMMA22 = 4, ///< also ITU-R BT470M / ITU-R BT1700 625 PAL & SECAM
-+ AVCOL_TRC_GAMMA28 = 5, ///< also ITU-R BT470BG
-+ AVCOL_TRC_SMPTE170M = 6, ///< also ITU-R BT601-6 525 or 625 / ITU-R BT1358 525 or 625 / ITU-R BT1700 NTSC
-+ AVCOL_TRC_SMPTE240M = 7,
-+ AVCOL_TRC_LINEAR = 8, ///< "Linear transfer characteristics"
-+ AVCOL_TRC_LOG = 9, ///< "Logarithmic transfer characteristic (100:1 range)"
-+ AVCOL_TRC_LOG_SQRT = 10, ///< "Logarithmic transfer characteristic (100 * Sqrt(10) : 1 range)"
-+ AVCOL_TRC_IEC61966_2_4 = 11, ///< IEC 61966-2-4
-+ AVCOL_TRC_BT1361_ECG = 12, ///< ITU-R BT1361 Extended Colour Gamut
-+ AVCOL_TRC_IEC61966_2_1 = 13, ///< IEC 61966-2-1 (sRGB or sYCC)
-+ AVCOL_TRC_BT2020_10 = 14, ///< ITU-R BT2020 for 10-bit system
-+ AVCOL_TRC_BT2020_12 = 15, ///< ITU-R BT2020 for 12-bit system
-+ AVCOL_TRC_SMPTE2084 = 16, ///< SMPTE ST 2084 for 10-, 12-, 14- and 16-bit systems
-+ AVCOL_TRC_SMPTEST2084 = AVCOL_TRC_SMPTE2084,
-+ AVCOL_TRC_SMPTE428 = 17, ///< SMPTE ST 428-1
-+ AVCOL_TRC_SMPTEST428_1 = AVCOL_TRC_SMPTE428,
-+ AVCOL_TRC_ARIB_STD_B67 = 18, ///< ARIB STD-B67, known as "Hybrid log-gamma"
-+ AVCOL_TRC_NB, ///< Not part of ABI
-+
-+ /* The following entries are not part of H.273, but custom extensions */
-+ AVCOL_TRC_EXT_BASE = 256,
-+ AVCOL_TRC_V_LOG = AVCOL_TRC_EXT_BASE,
-+ AVCOL_TRC_EXT_NB ///< Not part of ABI
-+};
-+
-+/**
-+ * YUV colorspace type.
-+ * These values match the ones defined by ISO/IEC 23091-2_2019 subclause 8.3.
-+ */
-+enum AVColorSpace {
-+ AVCOL_SPC_RGB = 0, ///< order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB), YZX and ST 428-1
-+ AVCOL_SPC_BT709 = 1, ///< also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / derived in SMPTE RP 177 Annex B
-+ AVCOL_SPC_UNSPECIFIED = 2,
-+ AVCOL_SPC_RESERVED = 3, ///< reserved for future use by ITU-T and ISO/IEC just like 15-255 are
-+ AVCOL_SPC_FCC = 4, ///< FCC Title 47 Code of Federal Regulations 73.682 (a)(20)
-+ AVCOL_SPC_BT470BG = 5, ///< also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601
-+ AVCOL_SPC_SMPTE170M = 6, ///< also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC / functionally identical to above
-+ AVCOL_SPC_SMPTE240M = 7, ///< derived from 170M primaries and D65 white point, 170M is derived from BT470 System M's primaries
-+ AVCOL_SPC_YCGCO = 8, ///< used by Dirac / VC-2 and H.264 FRext, see ITU-T SG16
-+ AVCOL_SPC_YCOCG = AVCOL_SPC_YCGCO,
-+ AVCOL_SPC_BT2020_NCL = 9, ///< ITU-R BT2020 non-constant luminance system
-+ AVCOL_SPC_BT2020_CL = 10, ///< ITU-R BT2020 constant luminance system
-+ AVCOL_SPC_SMPTE2085 = 11, ///< SMPTE 2085, Y'D'zD'x
-+ AVCOL_SPC_CHROMA_DERIVED_NCL = 12, ///< Chromaticity-derived non-constant luminance system
-+ AVCOL_SPC_CHROMA_DERIVED_CL = 13, ///< Chromaticity-derived constant luminance system
-+ AVCOL_SPC_ICTCP = 14, ///< ITU-R BT.2100-0, ICtCp
-+ AVCOL_SPC_IPT_C2 = 15, ///< SMPTE ST 2128, IPT-C2
-+ AVCOL_SPC_YCGCO_RE = 16, ///< YCgCo-R, even addition of bits
-+ AVCOL_SPC_YCGCO_RO = 17, ///< YCgCo-R, odd addition of bits
-+ AVCOL_SPC_NB ///< Not part of ABI
-+};
-+
-+/**
-+ * Visual content value range.
-+ *
-+ * These values are based on definitions that can be found in multiple
-+ * specifications, such as ITU-T BT.709 (3.4 - Quantization of RGB, luminance
-+ * and colour-difference signals), ITU-T BT.2020 (Table 5 - Digital
-+ * Representation) as well as ITU-T BT.2100 (Table 9 - Digital 10- and 12-bit
-+ * integer representation). At the time of writing, the BT.2100 one is
-+ * recommended, as it also defines the full range representation.
-+ *
-+ * Common definitions:
-+ * - For RGB and luma planes such as Y in YCbCr and I in ICtCp,
-+ * 'E' is the original value in range of 0.0 to 1.0.
-+ * - For chroma planes such as Cb,Cr and Ct,Cp, 'E' is the original
-+ * value in range of -0.5 to 0.5.
-+ * - 'n' is the output bit depth.
-+ * - For additional definitions such as rounding and clipping to valid n
-+ * bit unsigned integer range, please refer to BT.2100 (Table 9).
-+ */
-+enum AVColorRange {
-+ AVCOL_RANGE_UNSPECIFIED = 0,
-+
-+ /**
-+ * Narrow or limited range content.
-+ *
-+ * - For luma planes:
-+ *
-+ * (219 * E + 16) * 2^(n-8)
-+ *
-+ * F.ex. the range of 16-235 for 8 bits
-+ *
-+ * - For chroma planes:
-+ *
-+ * (224 * E + 128) * 2^(n-8)
-+ *
-+ * F.ex. the range of 16-240 for 8 bits
-+ */
-+ AVCOL_RANGE_MPEG = 1,
-+
-+ /**
-+ * Full range content.
-+ *
-+ * - For RGB and luma planes:
-+ *
-+ * (2^n - 1) * E
-+ *
-+ * F.ex. the range of 0-255 for 8 bits
-+ *
-+ * - For chroma planes:
-+ *
-+ * (2^n - 1) * E + 2^(n - 1)
-+ *
-+ * F.ex. the range of 1-255 for 8 bits
-+ */
-+ AVCOL_RANGE_JPEG = 2,
-+ AVCOL_RANGE_NB ///< Not part of ABI
-+};
-+
-+/**
-+ * Location of chroma samples.
-+ *
-+ * Illustration showing the location of the first (top left) chroma sample of the
-+ * image, the left shows only luma, the right
-+ * shows the location of the chroma sample, the 2 could be imagined to overlay
-+ * each other but are drawn separately due to limitations of ASCII
-+ *
-+ * 1st 2nd 1st 2nd horizontal luma sample positions
-+ * v v v v
-+ * ______ ______
-+ *1st luma line > |X X ... |3 4 X ... X are luma samples,
-+ * | |1 2 1-6 are possible chroma positions
-+ *2nd luma line > |X X ... |5 6 X ... 0 is undefined/unknown position
-+ */
-+enum AVChromaLocation {
-+ AVCHROMA_LOC_UNSPECIFIED = 0,
-+ AVCHROMA_LOC_LEFT = 1, ///< MPEG-2/4 4:2:0, H.264 default for 4:2:0
-+ AVCHROMA_LOC_CENTER = 2, ///< MPEG-1 4:2:0, JPEG 4:2:0, H.263 4:2:0
-+ AVCHROMA_LOC_TOPLEFT = 3, ///< ITU-R 601, SMPTE 274M 296M S314M(DV 4:1:1), mpeg2 4:2:2
-+ AVCHROMA_LOC_TOP = 4,
-+ AVCHROMA_LOC_BOTTOMLEFT = 5,
-+ AVCHROMA_LOC_BOTTOM = 6,
-+ AVCHROMA_LOC_NB ///< Not part of ABI
-+};
-+
-+/**
-+ * Correlation between the alpha channel and color values.
-+ */
-+enum AVAlphaMode {
-+ AVALPHA_MODE_UNSPECIFIED = 0, ///< Unknown alpha handling, or no alpha channel
-+ AVALPHA_MODE_PREMULTIPLIED = 1, ///< Alpha channel is multiplied into color values
-+ AVALPHA_MODE_STRAIGHT = 2, ///< Alpha channel is independent of color values
-+ AVALPHA_MODE_NB ///< Not part of ABI
-+};
-+
-+#endif /* AVUTIL_PIXFMT_H */
-diff --git a/dom/media/platforms/ffmpeg/ffmpeg62/include/libavutil/rational.h b/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/rational.h
-similarity index 100%
-copy from dom/media/platforms/ffmpeg/ffmpeg62/include/libavutil/rational.h
-copy to dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/rational.h
-diff --git a/dom/media/platforms/ffmpeg/ffmpeg62/include/libavutil/samplefmt.h b/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/samplefmt.h
-similarity index 100%
-copy from dom/media/platforms/ffmpeg/ffmpeg62/include/libavutil/samplefmt.h
-copy to dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/samplefmt.h
-diff --git a/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/version.h b/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/version.h
-new file mode 100644
-index 000000000000..d5bf20cf8975
---- /dev/null
-+++ b/dom/media/platforms/ffmpeg/ffmpeg63/include/libavutil/version.h
-@@ -0,0 +1,118 @@
-+/*
-+ * copyright (c) 2003 Fabrice Bellard
-+ *
-+ * This file is part of FFmpeg.
-+ *
-+ * FFmpeg is free software; you can redistribute it and/or
-+ * modify it under the terms of the GNU Lesser General Public
-+ * License as published by the Free Software Foundation; either
-+ * version 2.1 of the License, or (at your option) any later version.
-+ *
-+ * FFmpeg is distributed in the hope that it will be useful,
-+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
-+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+ * Lesser General Public License for more details.
-+ *
-+ * You should have received a copy of the GNU Lesser General Public
-+ * License along with FFmpeg; if not, write to the Free Software
-+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
-+ */
-+
-+/**
-+ * @file
-+ * @ingroup lavu
-+ * Libavutil version macros
-+ */
-+
-+#ifndef AVUTIL_VERSION_H
-+#define AVUTIL_VERSION_H
-+
-+#include "macros.h"
-+
-+/**
-+ * @addtogroup version_utils
-+ *
-+ * Useful to check and match library version in order to maintain
-+ * backward compatibility.
-+ *
-+ * The FFmpeg libraries follow a versioning scheme very similar to
-+ * Semantic Versioning (http://semver.org/)
-+ * The difference is that the component called PATCH is called MICRO in FFmpeg
-+ * and its value is reset to 100 instead of 0 to keep it above or equal to 100.
-+ * Also we do not increase MICRO for every bugfix or change in git master.
-+ *
-+ * Prior to FFmpeg 3.2 point releases did not change any lib version number to
-+ * avoid aliassing different git master checkouts.
-+ * Starting with FFmpeg 3.2, the released library versions will occupy
-+ * a separate MAJOR.MINOR that is not used on the master development branch.
-+ * That is if we branch a release of master 55.10.123 we will bump to 55.11.100
-+ * for the release and master will continue at 55.12.100 after it. Each new
-+ * point release will then bump the MICRO improving the usefulness of the lib
-+ * versions.
-+ *
-+ * @{
-+ */
-+
-+#define AV_VERSION_INT(a, b, c) ((a)<<16 | (b)<<8 | (c))
-+#define AV_VERSION_DOT(a, b, c) a ##.## b ##.## c
-+#define AV_VERSION(a, b, c) AV_VERSION_DOT(a, b, c)
-+
-+/**
-+ * Extract version components from the full ::AV_VERSION_INT int as returned
-+ * by functions like ::avformat_version() and ::avcodec_version()
-+ */
-+#define AV_VERSION_MAJOR(a) ((a) >> 16)
-+#define AV_VERSION_MINOR(a) (((a) & 0x00FF00) >> 8)
-+#define AV_VERSION_MICRO(a) ((a) & 0xFF)
-+
-+/**
-+ * @}
-+ */
-+
-+/**
-+ * @defgroup lavu_ver Version and Build diagnostics
-+ *
-+ * Macros and function useful to check at compile time and at runtime
-+ * which version of libavutil is in use.
-+ *
-+ * @{
-+ */
-+
-+#define LIBAVUTIL_VERSION_MAJOR 61
-+#define LIBAVUTIL_VERSION_MINOR 5
-+#define LIBAVUTIL_VERSION_MICRO 100
-+
-+#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
-+ LIBAVUTIL_VERSION_MINOR, \
-+ LIBAVUTIL_VERSION_MICRO)
-+#define LIBAVUTIL_VERSION AV_VERSION(LIBAVUTIL_VERSION_MAJOR, \
-+ LIBAVUTIL_VERSION_MINOR, \
-+ LIBAVUTIL_VERSION_MICRO)
-+#define LIBAVUTIL_BUILD LIBAVUTIL_VERSION_INT
-+
-+#define LIBAVUTIL_IDENT "Lavu" AV_STRINGIFY(LIBAVUTIL_VERSION)
-+
-+/**
-+ * @defgroup lavu_depr_guards Deprecation Guards
-+ * FF_API_* defines may be placed below to indicate public API that will be
-+ * dropped at a future version bump. The defines themselves are not part of
-+ * the public API and may change, break or disappear at any time.
-+ *
-+ * @note, when bumping the major version it is recommended to manually
-+ * disable each FF_API_* in its own commit instead of disabling them all
-+ * at once through the bump. This improves the git bisect-ability of the change.
-+ *
-+ * @{
-+ */
-+
-+#define FF_API_CPU_FLAG_FORCE (LIBAVUTIL_VERSION_MAJOR < 62)
-+#define FF_API_DOVI_L11_INVALID_PROPS (LIBAVUTIL_VERSION_MAJOR < 62)
-+#define FF_API_ASSERT_FPU (LIBAVUTIL_VERSION_MAJOR < 62)
-+#define FF_API_VULKAN_SYNC_QUEUES (LIBAVUTIL_VERSION_MAJOR < 62)
-+
-+/**
-+ * @}
-+ * @}
-+ */
-+
-+#endif /* AVUTIL_VERSION_H */
-diff --git a/dom/media/platforms/ffmpeg/ffmpeg61/moz.build b/dom/media/platforms/ffmpeg/ffmpeg63/moz.build
-similarity index 100%
-copy from dom/media/platforms/ffmpeg/ffmpeg61/moz.build
-copy to dom/media/platforms/ffmpeg/ffmpeg63/moz.build
-diff --git a/dom/media/platforms/ffmpeg/moz.build b/dom/media/platforms/ffmpeg/moz.build
-index 48baf252f1ba..921a31688389 100644
---- a/dom/media/platforms/ffmpeg/moz.build
-+++ b/dom/media/platforms/ffmpeg/moz.build
-@@ -16,6 +16,7 @@ DIRS += [
- "ffmpeg60",
- "ffmpeg61",
- "ffmpeg62",
-+ "ffmpeg63",
- ]
-
- UNIFIED_SOURCES += ["FFmpegRuntimeLinker.cpp"]
-diff --git a/tools/rewriting/ThirdPartyPaths.txt b/tools/rewriting/ThirdPartyPaths.txt
-index 3a7b65ea26a4..9e3b38290dbf 100644
---- a/tools/rewriting/ThirdPartyPaths.txt
-+++ b/tools/rewriting/ThirdPartyPaths.txt
-@@ -35,6 +35,7 @@ dom/media/platforms/ffmpeg/ffmpeg59/
- dom/media/platforms/ffmpeg/ffmpeg60/
- dom/media/platforms/ffmpeg/ffmpeg61/
- dom/media/platforms/ffmpeg/ffmpeg62/
-+dom/media/platforms/ffmpeg/ffmpeg63/
- dom/media/platforms/ffmpeg/libav53/
- dom/media/platforms/ffmpeg/libav54/
- dom/media/platforms/ffmpeg/libav55/
diff --git a/src/external-patches/firefox/expose_tiled_attribute_to_all_platforms/D312028.patch b/src/external-patches/firefox/expose_tiled_attribute_to_all_platforms/D312028.patch
deleted file mode 100644
index 905b694ce..000000000
--- a/src/external-patches/firefox/expose_tiled_attribute_to_all_platforms/D312028.patch
+++ /dev/null
@@ -1,136 +0,0 @@
-diff --git a/browser/themes/linux/browser.css b/browser/themes/linux/browser.css
---- a/browser/themes/linux/browser.css
-+++ b/browser/themes/linux/browser.css
-@@ -32,11 +32,11 @@
- */
- @media (-moz-gtk-csd-transparency-available) {
- :root[customtitlebar] {
- background-color: transparent;
-
-- &[sizemode="normal"]:not([gtktiledwindow]) {
-+ &[sizemode="normal"]:not([tiled]) {
- /* Firefox draws its contents to a child window, while GTK takes care of
- * drawing the toplevel (which in most cases is just the window
- * decorations).
- *
- * Due to how X11 child windows work, pixels painted by a child window will
-diff --git a/browser/themes/shared/browser-shared.css b/browser/themes/shared/browser-shared.css
---- a/browser/themes/shared/browser-shared.css
-+++ b/browser/themes/shared/browser-shared.css
-@@ -433,18 +433,18 @@
- }
- }
-
- @media (-moz-platform: linux) and (-moz-gtk-csd-reversed-placement: 0) {
- :root:not([sizemode="normal"]) &[type="pre-tabs"],
-- :root[gtktiledwindow] &[type="pre-tabs"] {
-+ :root[tiled] &[type="pre-tabs"] {
- display: none;
- }
- }
-
- @media (-moz-gtk-csd-reversed-placement) {
- :root:not([sizemode="normal"]) &[type="post-tabs"],
-- :root[gtktiledwindow] &[type="post-tabs"] {
-+ :root[tiled] &[type="post-tabs"] {
- display: none;
- }
- }
-
- @media (max-width: 500px) {
-diff --git a/widget/gtk/nsWindow.cpp b/widget/gtk/nsWindow.cpp
---- a/widget/gtk/nsWindow.cpp
-+++ b/widget/gtk/nsWindow.cpp
-@@ -3683,11 +3683,11 @@
- #ifdef ACCESSIBILITY
- DispatchRestoreEventAccessible();
- #endif // ACCESSIBILITY
- }
-
-- mIsTiled = aEvent->new_window_state & GDK_WINDOW_STATE_TILED;
-+ SetIsTiled(aEvent->new_window_state & GDK_WINDOW_STATE_TILED);
- LOG("\tTiled: %d\n", int(mIsTiled));
- mResizableEdges = [&] {
- Sides result;
- if (mSizeMode != nsSizeMode_Normal) {
- return result;
-diff --git a/widget/nsIWidget.h b/widget/nsIWidget.h
---- a/widget/nsIWidget.h
-+++ b/widget/nsIWidget.h
-@@ -1379,10 +1379,12 @@
-
- protected:
- // Returns whether compositing should use an external surface size.
- virtual bool UseExternalCompositingSurface() const { return false; }
-
-+ void SetIsTiled(bool);
-+
- /**
- * Starts the OMTC compositor destruction sequence.
- *
- * When this function returns, the compositor should not be
- * able to access the opengl context anymore.
-diff --git a/widget/nsIWidget.cpp b/widget/nsIWidget.cpp
---- a/widget/nsIWidget.cpp
-+++ b/widget/nsIWidget.cpp
-@@ -327,10 +327,16 @@
- void nsIWidget::QuitIME() {
- IMEStateManager::WidgetOnQuit(this);
- this->mIMEHasQuit = true;
- }
-
-+void nsIWidget::SetIsTiled(bool aIsTiled) {
-+ // TODO: Do we want to report an event here or something when stuff changes?
-+ // For now this is propagated in a somewhat out-of-band way via AppWindow.
-+ mIsTiled = aIsTiled;
-+}
-+
- void nsIWidget::DestroyCompositor() {
- RevokeTransactionIdAllocator();
-
- // We release this before releasing the compositor, since it may hold the
- // last reference to our ClientLayerManager. ClientLayerManager's dtor can
-diff --git a/xpcom/ds/StaticAtoms.py b/xpcom/ds/StaticAtoms.py
---- a/xpcom/ds/StaticAtoms.py
-+++ b/xpcom/ds/StaticAtoms.py
-@@ -1512,11 +1512,10 @@
- Atom("gamma", "gamma"),
- Atom("glyphRef", "glyphRef"),
- Atom("grad", "grad"),
- Atom("gradientTransform", "gradientTransform"),
- Atom("gradientUnits", "gradientUnits"),
-- Atom("gtktiledwindow", "gtktiledwindow"),
- Atom("hardLight", "hard-light"),
- Atom("hue", "hue"),
- Atom("hueRotate", "hueRotate"),
- Atom("identity", "identity"),
- Atom("image_rendering", "image-rendering"),
-@@ -1950,10 +1949,11 @@
- Atom("superscriptshift", "superscriptshift"),
- Atom("symmetric", "symmetric"),
- Atom("tanh", "tanh"),
- Atom("tan", "tan"),
- Atom("tendsto", "tendsto"),
-+ Atom("tiled", "tiled"),
- Atom("times", "times"),
- Atom("transpose", "transpose"),
- Atom("union_", "union"),
- Atom("uplimit", "uplimit"),
- Atom("variance", "variance"),
-diff --git a/xpfe/appshell/AppWindow.cpp b/xpfe/appshell/AppWindow.cpp
---- a/xpfe/appshell/AppWindow.cpp
-+++ b/xpfe/appshell/AppWindow.cpp
-@@ -1992,11 +1992,11 @@
- aRootElement.SetAttr(nsGkAtoms::sizemode, sizeString, IgnoreErrors());
- if (aShouldPersist && aPersistString.Find(u"sizemode") >= 0) {
- (void)SetPersistentValue(nsGkAtoms::sizemode, sizeString);
- }
- }
-- aRootElement.SetBoolAttr(nsGkAtoms::gtktiledwindow, mWindow->IsTiled());
-+ aRootElement.SetBoolAttr(nsGkAtoms::tiled, mWindow->IsTiled());
- }
-
- void AppWindow::SavePersistentAttributes(
- const PersistentAttributes aAttributes) {
- // can happen when the persistence timer fires at an inopportune time
-
diff --git a/src/external-patches/firefox/expose_tiled_attribute_to_all_platforms/D312036.patch b/src/external-patches/firefox/expose_tiled_attribute_to_all_platforms/D312036.patch
deleted file mode 100644
index da5bd2a7e..000000000
--- a/src/external-patches/firefox/expose_tiled_attribute_to_all_platforms/D312036.patch
+++ /dev/null
@@ -1,18 +0,0 @@
-diff --git a/widget/windows/nsWindow.cpp b/widget/windows/nsWindow.cpp
---- a/widget/windows/nsWindow.cpp
-+++ b/widget/windows/nsWindow.cpp
-@@ -6423,10 +6423,13 @@
- // Skip window size change events below on minimization.
- return;
- }
- }
-
-+ // Recompute tiled state.
-+ SetIsTiled(mWnd && ::IsWindowArranged(mWnd));
-+
- // Notify visibility change when window is activated.
- if (!(wp->flags & SWP_NOACTIVATE) && NeedsToTrackWindowOcclusionState()) {
- WinWindowOcclusionTracker::Get()->OnWindowVisibilityChanged(
- this, mFrameState->GetSizeMode() != nsSizeMode_Minimized);
- }
-
diff --git a/src/external-patches/firefox/expose_tiled_attribute_to_all_platforms/D312091.patch b/src/external-patches/firefox/expose_tiled_attribute_to_all_platforms/D312091.patch
index c57ec7208..01e85b2ea 100644
--- a/src/external-patches/firefox/expose_tiled_attribute_to_all_platforms/D312091.patch
+++ b/src/external-patches/firefox/expose_tiled_attribute_to_all_platforms/D312091.patch
@@ -1,19 +1,19 @@
diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm
--- a/widget/cocoa/nsCocoaWindow.mm
+++ b/widget/cocoa/nsCocoaWindow.mm
-@@ -70,10 +70,11 @@
- #include "nsDocShell.h"
+@@ -71,10 +71,11 @@
#include "gfxPlatform.h"
#include "qcms.h"
+ #include
+#import
#include "mozilla/AutoRestore.h"
#include "mozilla/BasicEvents.h"
- #include "mozilla/dom/Document.h"
#include "mozilla/Maybe.h"
#include "mozilla/NativeKeyBindingsType.h"
-@@ -6948,10 +6949,31 @@
+ #include "mozilla/Preferences.h"
+@@ -6948,10 +6949,31 @@ static nsSizeMode GetWindowSizeMode(NSWindow* aWindow, bool aFullScreen) {
return nsSizeMode_Maximized;
}
return nsSizeMode_Normal;
@@ -45,7 +45,7 @@ diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm
// Prevent recursion, which can become infinite (see bug 708278). This
// can happen when the call to [NSWindow setFrameTopLeftPoint:] in
-@@ -6961,10 +6983,11 @@
+@@ -6961,10 +6983,11 @@ static nsSizeMode GetWindowSizeMode(NSWindow* aWindow, bool aFullScreen) {
return;
}
mInReportMoveEvent = true;
@@ -57,7 +57,7 @@ diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm
// update our internal mSizeMode. This can happen either if we're maximized
// and then moved, or if we're not maximized and moved back to zoomed state.
if (mWindow && (mSizeMode == nsSizeMode_Maximized) ^ mWindow.isZoomed) {
-@@ -7055,10 +7078,11 @@
+@@ -7055,10 +7078,11 @@ static nsSizeMode GetWindowSizeMode(NSWindow* aWindow, bool aFullScreen) {
void nsCocoaWindow::ReportSizeEvent() {
NS_OBJC_BEGIN_TRY_IGNORE_BLOCK;
@@ -69,4 +69,3 @@ diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm
mWidgetListener->WindowResized(this, innerBounds.Size());
}
if (mAttachedWidgetListener) {
-
diff --git a/src/external-patches/firefox/gh-12979_clip_dirty_rect_to_device_size.patch b/src/external-patches/firefox/gh-12979_clip_dirty_rect_to_device_size.patch
deleted file mode 100644
index 4cd381da1..000000000
--- a/src/external-patches/firefox/gh-12979_clip_dirty_rect_to_device_size.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-diff --git a/gfx/wr/webrender/src/renderer/composite.rs b/gfx/wr/webrender/src/renderer/composite.rs
---- a/gfx/wr/webrender/src/renderer/composite.rs
-+++ b/gfx/wr/webrender/src/renderer/composite.rs
-@@ -974,12 +974,15 @@
- .iter()
- .chain(self.layer_compositor_frame_state_in_prev_frame.as_ref().unwrap().rects_without_id.iter()) {
- combined_dirty_rect = combined_dirty_rect.union(&rect);
- }
-
-+ let device_rect = DeviceRect::from_size(device_size.to_f32());
-+ let clipped_dirty_rect = combined_dirty_rect.intersection_unchecked(&device_rect);
-+
- partial_present_mode = Some(PartialPresentMode::Single {
-- dirty_rect: combined_dirty_rect,
-+ dirty_rect: clipped_dirty_rect,
- });
- } else {
- partial_present_mode = None;
- }
-
-
diff --git a/src/external-patches/manifest.json b/src/external-patches/manifest.json
index bd0a21c02..a5a180a98 100644
--- a/src/external-patches/manifest.json
+++ b/src/external-patches/manifest.json
@@ -37,22 +37,7 @@
},
{
"type": "phabricator",
- "id": "D291714",
- "name": "gh-12979 Clip dirty_rect to device_size"
- },
- {
- "type": "phabricator",
- "ids": [
- "D312028",
- "D312036",
- "D312091"
- ],
+ "id": "D312091",
"name": "Expose tiled attribute to all platforms"
- },
- {
- "type": "patch",
- "url": "https://gitlab.archlinux.org/archlinux/packaging/packages/firefox/-/raw/main/0002-Bug-2057577-DOM-Media-Add-FFmpeg-63-support.-r-alwu-.patch",
- "dest": "firefox",
- "filename": "bug-2057577-ffmpeg-63-support.patch"
}
]
diff --git a/src/gfx/layers/AnimationInfo-cpp.patch b/src/gfx/layers/AnimationInfo-cpp.patch
index 83ce49a05..18032d367 100644
--- a/src/gfx/layers/AnimationInfo-cpp.patch
+++ b/src/gfx/layers/AnimationInfo-cpp.patch
@@ -1,16 +1,16 @@
diff --git a/gfx/layers/AnimationInfo.cpp b/gfx/layers/AnimationInfo.cpp
-index b4941588bfbd94a337f2e848c659021723e1500d..8f91ca5b2fcca6ff04aa2c0af5ba26dd9fe7df0e 100644
+index 538808aa15d1902fc517f79e3a6d62f4d7fd9d37..4b0760b7be9d872a926f99716d16f3f64dcb2378 100644
--- a/gfx/layers/AnimationInfo.cpp
+++ b/gfx/layers/AnimationInfo.cpp
-@@ -14,6 +14,7 @@
- #include "mozilla/MotionPathUtils.h"
- #include "mozilla/PresShell.h"
- #include "mozilla/ScrollContainerFrame.h"
+@@ -18,6 +18,7 @@
+ #include "mozilla/layers/AnimationStorageData.h"
+ #include "mozilla/layers/CompositorThread.h"
+ #include "mozilla/layers/WebRenderLayerManager.h"
+#include "mozilla/nsZenBoostsBackend.h"
#include "nsIContent.h"
#include "nsLayoutUtils.h"
#include "nsRefreshDriver.h"
-@@ -341,9 +342,13 @@ static void SetAnimatable(NonCustomCSSPropertyId aProperty,
+@@ -367,9 +368,13 @@ static void SetAnimatable(NonCustomCSSPropertyId aProperty,
case eCSSProperty_background_color: {
// We don't support color animation on the compositor yet so that we can
// resolve currentColor at this moment.
diff --git a/src/layout/generic/nsTextPaintStyle-cpp.patch b/src/layout/generic/nsTextPaintStyle-cpp.patch
index 2bd0f3b9b..3989cd21b 100644
--- a/src/layout/generic/nsTextPaintStyle-cpp.patch
+++ b/src/layout/generic/nsTextPaintStyle-cpp.patch
@@ -1,5 +1,5 @@
diff --git a/layout/generic/nsTextPaintStyle.cpp b/layout/generic/nsTextPaintStyle.cpp
-index f741ab5eb83778ec2460a5d975757f09b3f2865e..f39a019c0d82db7ba9a122ce5269d0833ae04568 100644
+index 9dba72de611cd84ed07805f5ce40f882071240f0..782dea67f6d975ba5b7daa1e2e2ed862f7941952 100644
--- a/layout/generic/nsTextPaintStyle.cpp
+++ b/layout/generic/nsTextPaintStyle.cpp
@@ -240,7 +240,7 @@ bool nsTextPaintStyle::GetTargetTextColor(nscolor* aForeColor) {
@@ -39,17 +39,14 @@ index f741ab5eb83778ec2460a5d975757f09b3f2865e..f39a019c0d82db7ba9a122ce5269d083
return NS_GET_A(*aBackColor) != 0;
}
-@@ -462,12 +463,12 @@ bool nsTextPaintStyle::InitSelectionColorsAndShadow() {
- mSelectionPseudoStyle = std::move(style);
-
- if (nscolor bgColor = mSelectionPseudoStyle->GetVisitedDependentColor(
-- &nsStyleBackground::mBackgroundColor);
-+ &nsStyleBackground::mBackgroundColor, mFrame);
- mSelectionPseudoStyle->HasAuthorSpecifiedTextColor() ||
- NS_GET_A(bgColor) > 0) {
- mSelectionBGColor = bgColor;
+@@ -463,9 +464,9 @@ bool nsTextPaintStyle::InitSelectionColorsAndShadow() {
+ if (mSelectionPseudoStyle->HasAuthorSpecifiedTextColor() ||
+ mSelectionPseudoStyle->HasAuthorSpecifiedBorderOrBackground()) {
+ mSelectionBGColor = mSelectionPseudoStyle->GetVisitedDependentColor(
+- &nsStyleBackground::mBackgroundColor);
- mSelectionTextColor =
- mSelectionPseudoStyle->GetVisitedDependentColor(&nsStyleText::mColor);
++ &nsStyleBackground::mBackgroundColor, mFrame);
+ mSelectionTextColor = mSelectionPseudoStyle->GetVisitedDependentColor(
+ &nsStyleText::mColor, mFrame);
return true;
diff --git a/src/layout/svg/SVGImageContext-cpp.patch b/src/layout/svg/SVGImageContext-cpp.patch
index 9a8fbd935..b83784c10 100644
--- a/src/layout/svg/SVGImageContext-cpp.patch
+++ b/src/layout/svg/SVGImageContext-cpp.patch
@@ -1,5 +1,5 @@
diff --git a/layout/svg/SVGImageContext.cpp b/layout/svg/SVGImageContext.cpp
-index 384401ae2cb80a1bf438b1fb3d849254de100210..e5ef332bc529e6588c33b507993880ca9def51d1 100644
+index 4d43db157aa9447105eeb5459cad74de6cef01d6..327d8e4f7e21783824616800fa821218c8c848e8 100644
--- a/layout/svg/SVGImageContext.cpp
+++ b/layout/svg/SVGImageContext.cpp
@@ -10,6 +10,7 @@
@@ -39,20 +39,17 @@ index 384401ae2cb80a1bf438b1fb3d849254de100210..e5ef332bc529e6588c33b507993880ca
const nsStyleSVG* style = aStyle.StyleSVG();
if (!style->ExposesContextProperties()) {
// Content must have '-moz-context-properties' set to the names of the
-@@ -64,12 +80,14 @@ void SVGImageContext::MaybeStoreContextPaint(SVGImageContext& aContext,
+@@ -62,11 +78,11 @@ void SVGImageContext::MaybeStoreContextPaint(SVGImageContext& aContext,
+
if ((style->mMozContextProperties.bits & StyleContextPropertyBits::FILL) &&
style->mFill.kind.IsColor()) {
- haveContextPaint = true;
-- contextPaint->SetFill(style->mFill.kind.AsColor().CalcColor(aStyle));
-+ contextPaint->SetFill(
-+ style->mFill.kind.AsColor().CalcColor(aStyle, nullptr));
+- fill = Some(style->mFill.kind.AsColor().CalcColor(aStyle));
++ fill = Some(style->mFill.kind.AsColor().CalcColor(aStyle, nullptr));
}
if ((style->mMozContextProperties.bits & StyleContextPropertyBits::STROKE) &&
style->mStroke.kind.IsColor()) {
- haveContextPaint = true;
-- contextPaint->SetStroke(style->mStroke.kind.AsColor().CalcColor(aStyle));
-+ contextPaint->SetStroke(
-+ style->mStroke.kind.AsColor().CalcColor(aStyle, nullptr));
+- stroke = Some(style->mStroke.kind.AsColor().CalcColor(aStyle));
++ stroke = Some(style->mStroke.kind.AsColor().CalcColor(aStyle, nullptr));
}
- if (style->mMozContextProperties.bits &
- StyleContextPropertyBits::FILL_OPACITY) {
+ if ((style->mMozContextProperties.bits &
+ StyleContextPropertyBits::FILL_OPACITY) &&
diff --git a/src/toolkit/content/widgets/tabbox-js.patch b/src/toolkit/content/widgets/tabbox-js.patch
index 40f876dc8..8056fd11b 100644
--- a/src/toolkit/content/widgets/tabbox-js.patch
+++ b/src/toolkit/content/widgets/tabbox-js.patch
@@ -1,5 +1,5 @@
diff --git a/toolkit/content/widgets/tabbox.js b/toolkit/content/widgets/tabbox.js
-index 9334120e818b609c6cb6792fd509e90c9b362551..2dde0c8698eb75bac0d0eb4d800d11b577e10a46 100644
+index 402fe6a74b5327a30199667de18f053ad75fe910..9bcbc827d18db2f996d964f7c7e3439e064c9e0d 100644
--- a/toolkit/content/widgets/tabbox.js
+++ b/toolkit/content/widgets/tabbox.js
@@ -11,6 +11,23 @@
@@ -26,7 +26,7 @@ index 9334120e818b609c6cb6792fd509e90c9b362551..2dde0c8698eb75bac0d0eb4d800d11b5
let imports = {};
ChromeUtils.defineESModuleGetters(imports, {
DeferredTask: "resource://gre/modules/DeferredTask.sys.mjs",
-@@ -225,7 +242,7 @@
+@@ -226,7 +243,7 @@
) {
this._inAsyncOperation = false;
if (oldPanel != this._selectedPanel) {
@@ -35,7 +35,7 @@ index 9334120e818b609c6cb6792fd509e90c9b362551..2dde0c8698eb75bac0d0eb4d800d11b5
this._selectedPanel?.classList.add("deck-selected");
}
this.setAttribute("selectedIndex", val);
-@@ -924,7 +941,7 @@
+@@ -898,7 +915,7 @@
if (!tab) {
return;
}
@@ -44,7 +44,7 @@ index 9334120e818b609c6cb6792fd509e90c9b362551..2dde0c8698eb75bac0d0eb4d800d11b5
if (otherTab != tab && otherTab.selected) {
otherTab._selected = false;
}
-@@ -960,6 +977,7 @@
+@@ -934,6 +951,7 @@
* @param {MozTab|null} [val]
*/
set selectedItem(val) {
@@ -52,7 +52,7 @@ index 9334120e818b609c6cb6792fd509e90c9b362551..2dde0c8698eb75bac0d0eb4d800d11b5
if (val && !val.selected) {
// The selectedIndex setter ignores invalid values
// such as -1 if |val| isn't one of our child nodes.
-@@ -1137,7 +1155,7 @@
+@@ -1111,7 +1129,7 @@
if (tab == startTab) {
return null;
}
@@ -61,10 +61,10 @@ index 9334120e818b609c6cb6792fd509e90c9b362551..2dde0c8698eb75bac0d0eb4d800d11b5
return tab;
}
}
-@@ -1199,13 +1217,30 @@
- * @param {boolean} [aWrap]
+@@ -1175,13 +1193,30 @@
*/
- advanceSelectedTab(aDir, aWrap) {
+ // eslint-disable-next-line no-unused-vars
+ advanceSelectedTab(aDir, aWrap, aEvent) {
+ if (window?.gZenGlanceManager?._animating) return;
let { ariaFocusedItem } = this;
let startTab = ariaFocusedItem;
@@ -93,7 +93,7 @@ index 9334120e818b609c6cb6792fd509e90c9b362551..2dde0c8698eb75bac0d0eb4d800d11b5
// Handle keyboard navigation for a hidden tab that can be selected, like the Firefox View tab,
// which has a random placement in this.allTabs.
if (startTab.hidden) {
-@@ -1218,7 +1253,7 @@
+@@ -1194,7 +1229,7 @@
newTab = this.findNextTab(startTab, {
direction: aDir,
wrap: aWrap,
diff --git a/src/toolkit/themes/shared/menulist-css.patch b/src/toolkit/themes/shared/menulist-css.patch
index 427888eed..b89bfa0c4 100644
--- a/src/toolkit/themes/shared/menulist-css.patch
+++ b/src/toolkit/themes/shared/menulist-css.patch
@@ -1,13 +1,13 @@
diff --git a/toolkit/themes/shared/menulist.css b/toolkit/themes/shared/menulist.css
-index 3b3e855f20c74f096324c42814e63cbdeb486051..f52e47fc8acea20a4e073b7f4a588d4d4e721aa8 100644
+index d763691ab48424aebd1f5152c8b60011445f2244..984b39f8a21c9460d316f8c0b77003a279aa2b6e 100644
--- a/toolkit/themes/shared/menulist.css
+++ b/toolkit/themes/shared/menulist.css
-@@ -53,7 +53,7 @@
+@@ -55,7 +55,7 @@
:host(:not([native])) {
appearance: none;
-- background-color: var(--button-background-color);
+- background-color: var(--select-background-color);
+ background-color: light-dark(rgba(0,0,0,.1), rgba(255,255,255,.1));
- color: var(--button-text-color);
- border-radius: var(--button-border-radius);
- padding-block: var(--space-xsmall);
+ color: var(--select-text-color);
+ border: var(--select-border);
+ border-radius: var(--select-border-radius);
diff --git a/src/toolkit/xre/nsXREDirProvider-cpp.patch b/src/toolkit/xre/nsXREDirProvider-cpp.patch
index 963848a85..63b9c99ac 100644
--- a/src/toolkit/xre/nsXREDirProvider-cpp.patch
+++ b/src/toolkit/xre/nsXREDirProvider-cpp.patch
@@ -1,8 +1,8 @@
diff --git a/toolkit/xre/nsXREDirProvider.cpp b/toolkit/xre/nsXREDirProvider.cpp
-index b54980f967ab8fe9b9c13bbad8fae6323ec84f1f..f1a5481fb3bd44c1f8f6e40f4163aa7842623325 100644
+index dcce3335e14f9f5d3c0b9fe6a86527be6011c143..ca788d6bd1db3a14d80bf571813e9c706456968f 100644
--- a/toolkit/xre/nsXREDirProvider.cpp
+++ b/toolkit/xre/nsXREDirProvider.cpp
-@@ -1333,9 +1333,11 @@ nsresult nsXREDirProvider::AppendFromAppData(nsIFile* aFile, bool aIsDotted) {
+@@ -1335,14 +1335,10 @@ nsresult nsXREDirProvider::AppendFromAppData(nsIFile* aFile, bool aIsDotted) {
// Similar to nsXREDirProvider::AppendProfilePath.
// TODO: Bug 1990407 - Evaluate if refactoring might be required there in the
// future?
@@ -10,12 +10,17 @@ index b54980f967ab8fe9b9c13bbad8fae6323ec84f1f..f1a5481fb3bd44c1f8f6e40f4163aa78
+ // Use aIsDotted for a different purpose here, will probably break in the future
+ if (gAppData->profile && aIsDotted) {
nsAutoCString profile;
- profile = gAppData->profile;
+-# if defined(MOZ_THUNDERBIRD)
+- if (gAppData->profile[0] != '.') {
+- profile.Assign('.');
+- }
+-# endif
+- profile.Append(gAppData->profile);
+ profile = "."_ns + nsDependentCString(gAppData->profile);
MOZ_TRY(aFile->AppendRelativeNativePath(profile));
} else {
nsAutoCString vendor;
-@@ -1345,8 +1347,6 @@ nsresult nsXREDirProvider::AppendFromAppData(nsIFile* aFile, bool aIsDotted) {
+@@ -1352,8 +1348,6 @@ nsresult nsXREDirProvider::AppendFromAppData(nsIFile* aFile, bool aIsDotted) {
ToLowerCase(vendor);
ToLowerCase(appName);
@@ -24,11 +29,16 @@ index b54980f967ab8fe9b9c13bbad8fae6323ec84f1f..f1a5481fb3bd44c1f8f6e40f4163aa78
MOZ_TRY(aFile->AppendRelativeNativePath(appName));
}
-@@ -1514,13 +1514,8 @@ nsresult nsXREDirProvider::GetLegacyOrXDGHomePath(const char* aHomeDir,
-
- // If the build was made against a specific profile name, MOZ_APP_PROFILE=
- // then make sure we respect this and dont move to XDG directory
-- if (gAppData->profile) {
+@@ -1530,18 +1524,8 @@ nsresult nsXREDirProvider::GetLegacyOrXDGHomePath(const char* aHomeDir,
+ // of a specific build where legacy needs to be forced, similar to the
+ // Firefox handling. Both casing are verified to account for systems where
+ // that matters.
+- if (gAppData->profile
+-# if defined(MOZ_THUNDERBIRD)
+- && strcmp(gAppData->profile, "thunderbird") != 0 &&
+- strcmp(gAppData->profile, "Thunderbird") != 0
+-# endif
+- ) {
- MOZ_TRY(NS_NewNativeLocalFile(nsDependentCString(aHomeDir),
- getter_AddRefs(localDir)));
- } else {
diff --git a/src/widget/SwipeTracker-cpp.patch b/src/widget/SwipeTracker-cpp.patch
index 965a670ea..39bceca6f 100644
--- a/src/widget/SwipeTracker-cpp.patch
+++ b/src/widget/SwipeTracker-cpp.patch
@@ -1,15 +1,15 @@
diff --git a/widget/SwipeTracker.cpp b/widget/SwipeTracker.cpp
-index 887d06d3bd9cdaa934880e0ae7a11ec8b737fb61..979f93ddab0d661ac1a1d73e7a0ba27fa2c8f9b7 100644
+index 83b80a808261ce28e5c571dc802993556477f0c8..8de39d5c724e23f540a70f47e893e46bcf1112e6 100644
--- a/widget/SwipeTracker.cpp
+++ b/widget/SwipeTracker.cpp
-@@ -3,6 +3,7 @@
- * You can obtain one at http://mozilla.org/MPL/2.0/. */
-
- #include "SwipeTracker.h"
+@@ -10,6 +10,7 @@
+ #include "mozilla/PresShell.h"
+ #include "mozilla/StaticPrefs_browser.h"
+ #include "mozilla/StaticPrefs_widget.h"
+#include "mozilla/StaticPrefs_zen.h"
-
- #include "InputData.h"
- #include "mozilla/FlushType.h"
+ #include "mozilla/TimeStamp.h"
+ #include "mozilla/TouchEvents.h"
+ #include "mozilla/dom/SimpleGestureEventBinding.h"
@@ -67,6 +68,9 @@ double SwipeTracker::SwipeSuccessTargetValue() const {
}
diff --git a/src/widget/Theme-cpp.patch b/src/widget/Theme-cpp.patch
index 1b88b2c75..f8a79df1b 100644
--- a/src/widget/Theme-cpp.patch
+++ b/src/widget/Theme-cpp.patch
@@ -1,16 +1,16 @@
diff --git a/widget/Theme.cpp b/widget/Theme.cpp
-index 766a8ca4bc6fcc98f719ad4f472b20bc1d198ac9..be4419cfafb55e5cac8f5de741185ee3cabc4722 100644
+index 0d9c9014dabfe7177c25d6f983ff823c4435a327..7995de05ed556fa6373b83e3e44bffc1b857dd73 100644
--- a/widget/Theme.cpp
+++ b/widget/Theme.cpp
-@@ -18,6 +18,7 @@
- #include "mozilla/RelativeLuminanceUtils.h"
- #include "mozilla/ScrollContainerFrame.h"
- #include "mozilla/StaticPrefs_widget.h"
+@@ -25,6 +25,7 @@
+ #include "mozilla/gfx/Filters.h"
+ #include "mozilla/gfx/Rect.h"
+ #include "mozilla/gfx/Types.h"
+#include "mozilla/nsZenBoostsBackend.h"
#include "mozilla/webrender/WebRenderAPI.h"
#include "nsCSSColorUtils.h"
#include "nsCSSRendering.h"
-@@ -670,10 +671,15 @@ template
+@@ -671,10 +672,15 @@ template
void Theme::PaintTextField(PaintBackendData& aPaintData,
const LayoutDeviceRect& aRect,
const ElementState& aState, const Colors& aColors,
@@ -27,7 +27,7 @@ index 766a8ca4bc6fcc98f719ad4f472b20bc1d198ac9..be4419cfafb55e5cac8f5de741185ee3
const CSSCoord radius = 2.0f;
ThemeDrawing::PaintRoundedRectWithRadius(aPaintData, aRect, backgroundColor,
-@@ -690,9 +696,9 @@ template
+@@ -691,9 +697,9 @@ template
void Theme::PaintListbox(PaintBackendData& aPaintData,
const LayoutDeviceRect& aRect,
const ElementState& aState, const Colors& aColors,
@@ -39,7 +39,7 @@ index 766a8ca4bc6fcc98f719ad4f472b20bc1d198ac9..be4419cfafb55e5cac8f5de741185ee3
}
template
-@@ -1158,10 +1164,12 @@ bool Theme::DoDrawWidgetBackground(PaintBackendData& aPaintData,
+@@ -1159,10 +1165,12 @@ bool Theme::DoDrawWidgetBackground(PaintBackendData& aPaintData,
case StyleAppearance::Textfield:
case StyleAppearance::NumberInput:
case StyleAppearance::PasswordInput:
diff --git a/src/widget/cocoa/VibrancyManager-mm.patch b/src/widget/cocoa/VibrancyManager-mm.patch
index 00ea2b670..0c899dc86 100644
--- a/src/widget/cocoa/VibrancyManager-mm.patch
+++ b/src/widget/cocoa/VibrancyManager-mm.patch
@@ -1,16 +1,16 @@
diff --git a/widget/cocoa/VibrancyManager.mm b/widget/cocoa/VibrancyManager.mm
-index 5df70a63afb235d2db11712276bb63f756222a0f..a2865aa2748433cbfd956ae46d197200fbbcfadd 100644
+index bc62ff28285691c605fe0680e7a98927f11d5882..63403611b9c5c5d12fe221c2bb56f884fabe85ba 100644
--- a/widget/cocoa/VibrancyManager.mm
+++ b/widget/cocoa/VibrancyManager.mm
-@@ -11,6 +11,7 @@
+@@ -9,6 +9,7 @@
+ #import
- #include "nsCocoaWindow.h"
#include "mozilla/StaticPrefs_widget.h"
+#include "mozilla/StaticPrefs_zen.h"
+ #include "nsCocoaWindow.h"
using namespace mozilla;
-
-@@ -29,6 +30,9 @@ static NSVisualEffectState VisualEffectStateForVibrancyType(
+@@ -28,6 +29,9 @@ static NSVisualEffectState VisualEffectStateForVibrancyType(
case VibrancyType::Sidebar:
break;
}
@@ -20,7 +20,7 @@ index 5df70a63afb235d2db11712276bb63f756222a0f..a2865aa2748433cbfd956ae46d197200
return NSVisualEffectStateFollowsWindowActiveState;
}
-@@ -36,7 +40,23 @@ static NSVisualEffectMaterial VisualEffectMaterialForVibrancyType(
+@@ -35,7 +39,23 @@ static NSVisualEffectMaterial VisualEffectMaterialForVibrancyType(
VibrancyType aType) {
switch (aType) {
case VibrancyType::Sidebar:
@@ -45,7 +45,7 @@ index 5df70a63afb235d2db11712276bb63f756222a0f..a2865aa2748433cbfd956ae46d197200
case VibrancyType::Titlebar:
return NSVisualEffectMaterialTitlebar;
}
-@@ -76,6 +96,7 @@ - (NSView*)hitTest:(NSPoint)aPoint {
+@@ -75,6 +95,7 @@ - (NSView*)hitTest:(NSPoint)aPoint {
- (void)prefChanged {
self.blendingMode = VisualEffectBlendingModeForVibrancyType(mType);
@@ -53,7 +53,7 @@ index 5df70a63afb235d2db11712276bb63f756222a0f..a2865aa2748433cbfd956ae46d197200
}
@end
-@@ -86,6 +107,7 @@ static void PrefChanged(const char* aPref, void* aClosure) {
+@@ -85,6 +106,7 @@ static void PrefChanged(const char* aPref, void* aClosure) {
static constexpr nsLiteralCString kObservedPrefs[] = {
"widget.macos.sidebar-blend-mode.behind-window"_ns,
"widget.macos.titlebar-blend-mode.behind-window"_ns,
diff --git a/src/widget/cocoa/nsDragService-mm.patch b/src/widget/cocoa/nsDragService-mm.patch
index 8109f2625..8308e701c 100644
--- a/src/widget/cocoa/nsDragService-mm.patch
+++ b/src/widget/cocoa/nsDragService-mm.patch
@@ -1,16 +1,16 @@
diff --git a/widget/cocoa/nsDragService.mm b/widget/cocoa/nsDragService.mm
-index 81fe6f749c1d046141003ad2413605b4d4acf9ed..f26c2556657ad683dad3fa712feca5965343175d 100644
+index 340a9ad81c5cb23bb7e5f927d11d5cffdde7ce70..32fc707ccfa56fa8c307860868d092c4a9050419 100644
--- a/widget/cocoa/nsDragService.mm
+++ b/widget/cocoa/nsDragService.mm
-@@ -22,6 +22,7 @@
- #include "mozilla/PresShell.h"
+@@ -10,6 +10,7 @@
#include "mozilla/dom/Document.h"
#include "mozilla/dom/DocumentInlines.h"
-+#include "mozilla/nsZenDragAndDrop.h"
- #include "nsIContent.h"
- #include "nsCocoaUtils.h"
#include "mozilla/gfx/2D.h"
-@@ -146,6 +147,10 @@
++#include "mozilla/nsZenDragAndDrop.h"
+ #include "nsArrayUtils.h"
+ #include "nsCOMPtr.h"
+ #include "nsClipboard.h"
+@@ -145,6 +146,10 @@
bitsPerPixel:32];
uint8_t* dest = [imageRep bitmapData];
@@ -21,7 +21,7 @@ index 81fe6f749c1d046141003ad2413605b4d4acf9ed..f26c2556657ad683dad3fa712feca596
for (uint32_t i = 0; i < height; ++i) {
uint8_t* src = map.mData + i * map.mStride;
for (uint32_t j = 0; j < width; ++j) {
-@@ -153,15 +158,15 @@
+@@ -152,15 +157,15 @@
// is premultipled here. Also, Quartz likes RGBA, so do that translation
// as well.
#ifdef IS_BIG_ENDIAN
diff --git a/src/zen/common/modules/ZenUIManager.mjs b/src/zen/common/modules/ZenUIManager.mjs
index 13434de29..d5e605771 100644
--- a/src/zen/common/modules/ZenUIManager.mjs
+++ b/src/zen/common/modules/ZenUIManager.mjs
@@ -4,6 +4,7 @@
import { nsZenMultiWindowFeature } from "chrome://browser/content/zen-components/ZenCommonUtils.mjs";
import { nsZenMenuBar } from "chrome://browser/content/zen-components/ZenMenubar.mjs";
+import { UrlbarShared } from "chrome://browser/content/urlbar/UrlbarShared.mjs";
window.gZenUIManager = {
_popupTrackingElements: [],
@@ -467,7 +468,7 @@ window.gZenUIManager = {
let searchMode = null;
if (!currentSearchMode) {
searchMode = {
- source: UrlbarUtils.RESULT_SOURCE.ZEN_ACTIONS,
+ source: UrlbarShared.RESULT_SOURCE.ZEN_ACTIONS,
isPreview: true,
};
}
diff --git a/src/zen/common/styles/zen-omnibox.css b/src/zen/common/styles/zen-omnibox.css
index 6d6df9b2c..542e67de7 100644
--- a/src/zen/common/styles/zen-omnibox.css
+++ b/src/zen/common/styles/zen-omnibox.css
@@ -642,7 +642,7 @@
.urlbarView-row {
--urlbarView-row-padding-inline: 8px;
- --urlbarView-row-padding-block: 10px;
+ --urlbarview-row-padding-block: 10px;
color: light-dark(rgba(0, 0, 0, 0.7), rgba(255, 255, 255, 0.7)) !important;
&:hover {
diff --git a/src/zen/common/styles/zen-theme.css b/src/zen/common/styles/zen-theme.css
index 15d632dea..7d3c987f0 100644
--- a/src/zen/common/styles/zen-theme.css
+++ b/src/zen/common/styles/zen-theme.css
@@ -253,7 +253,7 @@
--zen-active-tab-scale: 0.985;
/* Define tab hover background color */
- --tab-hover-background-color: var(--toolbarbutton-hover-background);
+ --tab-background-color-hover: var(--toolbarbutton-hover-background);
/* Sidebar Notifications */
--zen-sidebar-notification-bg: color-mix(
diff --git a/src/zen/folders/zen-folders.css b/src/zen/folders/zen-folders.css
index f3ba4cdfd..a413d3445 100644
--- a/src/zen/folders/zen-folders.css
+++ b/src/zen/folders/zen-folders.css
@@ -60,7 +60,7 @@ zen-folder {
}
}
- margin: 0 var(--tab-block-margin);
+ margin: 0 var(--tab-margin-block);
margin-inline-end: 0;
& > .tab-group-label-container {
@@ -70,7 +70,7 @@ zen-folder {
--tab-group-color: transparent !important;
padding-block-end: 0 !important;
margin: 0 !important;
- height: calc(var(--tab-block-margin) * 2 + var(--tab-min-height));
+ height: calc(var(--tab-margin-block) * 2 + var(--tab-min-height));
padding-inline: var(--tab-group-label-padding);
:root[zen-sidebar-expanded="true"] & {
@@ -161,7 +161,7 @@ zen-folder {
}
&:hover::before {
- background-color: var(--tab-hover-background-color) !important;
+ background-color: var(--tab-background-color-hover) !important;
}
&:after {
diff --git a/src/zen/live-folders/ZenLiveFoldersManager.sys.mjs b/src/zen/live-folders/ZenLiveFoldersManager.sys.mjs
index 43b6785b3..d0a29942b 100644
--- a/src/zen/live-folders/ZenLiveFoldersManager.sys.mjs
+++ b/src/zen/live-folders/ZenLiveFoldersManager.sys.mjs
@@ -343,7 +343,6 @@ class nsZenLiveFoldersManager {
],
},
});
-
}
deleteFolder(id, deleteFolder = true) {
diff --git a/src/zen/spaces/ZenSpaceManager.mjs b/src/zen/spaces/ZenSpaceManager.mjs
index 1ecb1e25a..faf473bb0 100644
--- a/src/zen/spaces/ZenSpaceManager.mjs
+++ b/src/zen/spaces/ZenSpaceManager.mjs
@@ -1846,8 +1846,10 @@ class nsZenWorkspaces {
)
) {
delete this._alwaysAnimatePaddingTop;
- const essentialsHeight =
- window.windowUtils.getBoundsWithoutFlushing(essentialContainer).height;
+ const essentialsHeight = Math.max(
+ 2,
+ window.windowUtils.getBoundsWithoutFlushing(essentialContainer).height
+ );
requestAnimationFrame(() => {
workspaceElement.style.paddingTop = essentialsHeight + "px";
});
diff --git a/src/zen/spaces/zen-workspaces.css b/src/zen/spaces/zen-workspaces.css
index 46315b83b..d80ecb2b2 100644
--- a/src/zen/spaces/zen-workspaces.css
+++ b/src/zen/spaces/zen-workspaces.css
@@ -205,7 +205,7 @@
&:hover,
&[open='true'] {
&::before {
- background: var(--tab-hover-background-color);
+ background: var(--tab-background-color-hover);
}
}
}
@@ -324,7 +324,7 @@ zen-workspace {
color: color-mix(in srgb, var(--toolbox-textcolor) 95%, var(--zen-primary-color));
--tab-background-color-selected: color-mix(in srgb, light-dark(rgba(255, 255, 255, 0.8), rgba(255, 255, 255, 0.18)) 95%, var(--zen-primary-color)) !important;
- --tab-selected-shadow: 0 0.8px 1.5px 0px light-dark(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.05)) !important;
+ --tab-box-shadow-selected: 0 0.8px 1.5px 0px light-dark(rgba(0, 0, 0, 0.15), rgba(0, 0, 0, 0.05)) !important;
--tab-selected-textcolor: color-mix(in srgb, var(--toolbox-textcolor) 95%, var(--zen-primary-color)) !important;
@media not (prefers-reduced-motion: reduce) {
diff --git a/src/zen/split-view/ZenViewSplitter.mjs b/src/zen/split-view/ZenViewSplitter.mjs
index bf8c489a9..61900855c 100644
--- a/src/zen/split-view/ZenViewSplitter.mjs
+++ b/src/zen/split-view/ZenViewSplitter.mjs
@@ -1559,11 +1559,20 @@ class nsZenViewSplitter extends nsZenDOMOperatedFeature {
if (reset) {
this.removeSplitters();
}
- splitData.tabs.forEach(tab => {
- if (tab.hasAttribute("pending")) {
- gBrowser.getBrowserForTab(tab).reload();
- }
- });
+ const pendingTabs = splitData.tabs.filter(tab =>
+ tab.hasAttribute("pending")
+ );
+ if (pendingTabs.length) {
+ pendingTabs.forEach(tab => gBrowser._insertBrowser(tab));
+ // SessionStore listens for this on the tab container and restores each
+ // tab's saved history, scroll position and form data. Kept non-bubbling
+ // so it doesn't reach tabbrowser, which tracks Firefox's own split view.
+ gBrowser.tabContainer.dispatchEvent(
+ new CustomEvent("TabSplitViewActivate", {
+ detail: { tabs: pendingTabs },
+ })
+ );
+ }
// Apply grid to tabs first to set zen-split attribute on containers
// before setting zen-split-view on parents. This prevents the black flash
diff --git a/src/zen/split-view/zen-split-group.inc.css b/src/zen/split-view/zen-split-group.inc.css
index 420bfc9b1..10ed6422e 100644
--- a/src/zen/split-view/zen-split-group.inc.css
+++ b/src/zen/split-view/zen-split-group.inc.css
@@ -38,8 +38,8 @@ tab-group[split-view-group] {
border-radius: var(--border-radius-medium);
padding: 0 2px;
- margin-inline: var(--tab-block-margin);
- margin-block: var(--tab-block-margin);
+ margin-inline: var(--tab-margin-block);
+ margin-block: var(--tab-margin-block);
min-height: var(--tab-min-height);
outline: var(--tab-outline);
outline-offset: var(--tab-outline-offset);
@@ -58,8 +58,8 @@ tab-group[split-view-group] {
& > .tabbrowser-tab {
--tab-background-color-selected: var(--zen-split-view-active-tab-bg);
- --tab-hover-background-color: transparent;
- --tab-selected-shadow: none;
+ --tab-background-color-hover: transparent;
+ --tab-box-shadow-selected: none;
--border-radius-medium: var(--tab-border-radius);
--zen-active-tab-scale: 1;
--zen-folder-indent: 0 !important;
@@ -107,10 +107,10 @@ tab-group[split-view-group] {
tab-group[split-view-group]:where([hasactivetab]) &,
&:has(> tab:is([multiselected])) {
background-color: var(--tab-background-color-selected);
- box-shadow: var(--tab-selected-shadow);
+ box-shadow: var(--tab-box-shadow-selected);
& > .tabbrowser-tab {
- --tab-hover-background-color: var(--zen-split-view-active-tab-bg);
+ --tab-background-color-hover: var(--zen-split-view-active-tab-bg);
& .tab-background {
background-color: var(--zen-split-view-active-tab-bg) !important;
}
diff --git a/src/zen/split-view/zen-split-view.css b/src/zen/split-view/zen-split-view.css
index 6e856e9db..68543ca7e 100644
--- a/src/zen/split-view/zen-split-view.css
+++ b/src/zen/split-view/zen-split-view.css
@@ -261,6 +261,6 @@
zen-split-fake-tab {
border-radius: var(--border-radius-medium);
background-color: color-mix(in srgb, var(--button-background-color-primary), transparent 40%);
- margin: var(--tab-block-margin);
+ margin: var(--tab-margin-block);
flex: 1;
}
diff --git a/src/zen/tabs/zen-tabs/vertical-tabs.css b/src/zen/tabs/zen-tabs/vertical-tabs.css
index c5efa0be4..2a001d0fd 100644
--- a/src/zen/tabs/zen-tabs/vertical-tabs.css
+++ b/src/zen/tabs/zen-tabs/vertical-tabs.css
@@ -302,7 +302,7 @@
position: relative;
border-bottom: 0 solid transparent !important;
- --tab-block-margin: 2px;
+ --tab-margin-block: 2px;
grid-gap: 0 !important;
&[overflow]::after,
@@ -530,7 +530,7 @@
}
& #tabbrowser-arrowscrollbox-periphery {
- margin-inline: var(--tab-block-margin);
+ margin-inline: var(--tab-margin-block);
}
& #nav-bar {
@@ -631,7 +631,7 @@
}
& .tab-background {
- margin-inline: var(--tab-block-margin);
+ margin-inline: var(--tab-margin-block);
width: -moz-available;
}
@@ -942,8 +942,8 @@
.tab-reset-pin-button {
display: flex;
position: relative;
- height: calc(100% - var(--tab-block-margin) * 2);
- margin-left: calc(-1 * var(--tab-inline-padding) + var(--tab-block-margin));
+ height: calc(100% - var(--tab-margin-block) * 2);
+ margin-left: calc(-1 * var(--tab-inline-padding) + var(--tab-margin-block));
margin-right: 8px;
padding: 0 calc(var(--toolbarbutton-padding-inner) - 2px) 0 calc(var(--toolbarbutton-padding-inner) / 3 + var(--tab-inline-padding) - 2px);
border-radius: 0;
@@ -1085,7 +1085,7 @@
&[in-urlbar] {
background: var(--tab-background-color-selected) !important;
- box-shadow: var(--tab-selected-shadow);
+ box-shadow: var(--tab-box-shadow-selected);
}
}
diff --git a/src/zen/tests/ub-actions/browser_workspace_restrict_search.js b/src/zen/tests/ub-actions/browser_workspace_restrict_search.js
index 27adf48eb..acd717871 100644
--- a/src/zen/tests/ub-actions/browser_workspace_restrict_search.js
+++ b/src/zen/tests/ub-actions/browser_workspace_restrict_search.js
@@ -6,6 +6,7 @@
ChromeUtils.defineESModuleGetters(this, {
UrlbarTestUtils: "resource://testing-common/UrlbarTestUtils.sys.mjs",
UrlbarUtils: "moz-src:///browser/components/urlbar/UrlbarUtils.sys.mjs",
+ UrlbarShared: "chrome://browser/content/urlbar/UrlbarShared.mjs",
});
UrlbarTestUtils.init(this);
@@ -29,7 +30,7 @@ add_task(async function test_Workspace_Search_OneOff_Pref() {
function getWorkspaceShortcut() {
return [...oneOffSearchButtons.localButtons].find(
- button => button.source == UrlbarUtils.RESULT_SOURCE.WORKSPACES
+ button => button.source == UrlbarShared.RESULT_SOURCE.WORKSPACES
);
}
@@ -108,7 +109,7 @@ add_task(async function test_Workspace_Restrict_Search() {
ok(gURLBar.searchMode, "The urlbar should enter search mode");
Assert.equal(
gURLBar.searchMode.source,
- UrlbarUtils.RESULT_SOURCE.WORKSPACES,
+ UrlbarShared.RESULT_SOURCE.WORKSPACES,
"The typed token should enter workspace search mode"
);
Assert.equal(
@@ -129,7 +130,7 @@ add_task(async function test_Workspace_Restrict_Search() {
ok(
resultDetails.every(
({ result, source }) =>
- source == UrlbarUtils.RESULT_SOURCE.WORKSPACES &&
+ source == UrlbarShared.RESULT_SOURCE.WORKSPACES &&
result.providerName == "ZenUrlbarProviderGlobalActions"
),
"Typing the workspace token should limit results to workspace actions"
diff --git a/src/zen/urlbar/ZenUBActionsProvider.sys.mjs b/src/zen/urlbar/ZenUBActionsProvider.sys.mjs
index 3cbea40db..cdec35c28 100644
--- a/src/zen/urlbar/ZenUBActionsProvider.sys.mjs
+++ b/src/zen/urlbar/ZenUBActionsProvider.sys.mjs
@@ -7,6 +7,7 @@ import {
UrlbarProvider,
UrlbarUtils,
} from "moz-src:///browser/components/urlbar/UrlbarUtils.sys.mjs";
+import { UrlbarShared } from "chrome://browser/content/urlbar/UrlbarShared.mjs";
import { globalActions } from "resource:///modules/ZenUBGlobalActions.sys.mjs";
import { zenUrlbarResultsLearner } from "./ZenUBResultsLearner.sys.mjs";
@@ -154,9 +155,10 @@ export class ZenUrlbarProviderGlobalActions extends UrlbarProvider {
*/
async isActive(queryContext) {
return (
- queryContext.searchMode?.source == UrlbarUtils.RESULT_SOURCE.WORKSPACES ||
queryContext.searchMode?.source ==
- UrlbarUtils.RESULT_SOURCE.ZEN_ACTIONS ||
+ UrlbarShared.RESULT_SOURCE.WORKSPACES ||
+ queryContext.searchMode?.source ==
+ UrlbarShared.RESULT_SOURCE.ZEN_ACTIONS ||
(lazy.enabledPref &&
queryContext.searchString &&
queryContext.searchString.length < UrlbarUtils.MAX_TEXT_LENGTH &&
@@ -345,10 +347,10 @@ export class ZenUrlbarProviderGlobalActions extends UrlbarProvider {
async startQuery(queryContext, addCallback) {
const query = queryContext.trimmedLowerCaseSearchString;
const isWorkspaceSearch =
- queryContext.searchMode?.source == UrlbarUtils.RESULT_SOURCE.WORKSPACES;
+ queryContext.searchMode?.source == UrlbarShared.RESULT_SOURCE.WORKSPACES;
const isPrefixed =
isWorkspaceSearch ||
- queryContext.searchMode?.source == UrlbarUtils.RESULT_SOURCE.ZEN_ACTIONS;
+ queryContext.searchMode?.source == UrlbarShared.RESULT_SOURCE.ZEN_ACTIONS;
if (!query && !isPrefixed) {
return;
@@ -391,10 +393,10 @@ export class ZenUrlbarProviderGlobalActions extends UrlbarProvider {
zenUrlbarResultsLearner.shouldPrioritize(action.commandId) &&
!isPrefixed;
let result = new lazy.UrlbarResult({
- type: UrlbarUtils.RESULT_TYPE.DYNAMIC,
+ type: UrlbarShared.RESULT_TYPE.DYNAMIC,
source: isWorkspaceSearch
- ? UrlbarUtils.RESULT_SOURCE.WORKSPACES
- : UrlbarUtils.RESULT_SOURCE.ZEN_ACTIONS,
+ ? UrlbarShared.RESULT_SOURCE.WORKSPACES
+ : UrlbarShared.RESULT_SOURCE.ZEN_ACTIONS,
payload,
highlights: payloadHighlights,
heuristic: shouldBePrioritized,
diff --git a/surfer.json b/surfer.json
index 3d67a1cd9..ca6fb51aa 100644
--- a/surfer.json
+++ b/surfer.json
@@ -6,7 +6,7 @@
"version": {
"product": "firefox",
"version": "153.0.4",
- "candidate": "153.0.4",
+ "candidate": "154.0",
"candidateBuild": 1
},
"buildOptions": {