diff --git a/ext_includes/libavcodec/avcodec.h b/ext_includes/libavcodec/avcodec.h index 00f9c82a..65555509 100644 --- a/ext_includes/libavcodec/avcodec.h +++ b/ext_includes/libavcodec/avcodec.h @@ -446,6 +446,7 @@ enum AVCodecID { AV_CODEC_ID_MSCC, AV_CODEC_ID_SRGC, AV_CODEC_ID_SVG, + AV_CODEC_ID_GDV, /* various PCM "codecs" */ AV_CODEC_ID_FIRST_AUDIO = 0x10000, ///< A dummy id pointing at the start of audio codecs @@ -548,6 +549,7 @@ enum AVCodecID { AV_CODEC_ID_SOL_DPCM, AV_CODEC_ID_SDX2_DPCM = 0x14800, + AV_CODEC_ID_GREMLIN_DPCM, /* audio codecs */ AV_CODEC_ID_MP2 = 0x15000, @@ -637,6 +639,7 @@ enum AVCodecID { AV_CODEC_ID_DST, AV_CODEC_ID_ATRAC3AL, AV_CODEC_ID_ATRAC3PAL, + AV_CODEC_ID_DOLBY_E, /* subtitle codecs */ AV_CODEC_ID_FIRST_SUBTITLE = 0x17000, ///< A dummy ID pointing at the start of subtitle codecs. @@ -3946,7 +3949,7 @@ typedef struct AVHWAccel { /** * Called for every Macroblock in a slice. * - * XvMC uses it to replace the ff_mpv_decode_mb(). + * XvMC uses it to replace the ff_mpv_reconstruct_mb(). * Instead of decoding to raw picture, MB parameters are * stored in an array provided by the video driver. * @@ -3999,6 +4002,20 @@ typedef struct AVHWAccel { */ #define AV_HWACCEL_FLAG_ALLOW_HIGH_DEPTH (1 << 1) +/** + * Hardware acceleration should still be attempted for decoding when the + * codec profile does not match the reported capabilities of the hardware. + * + * For example, this can be used to try to decode baseline profile H.264 + * streams in hardware - it will often succeed, because many streams marked + * as baseline profile actually conform to constrained baseline profile. + * + * @warning If the stream is actually not supported then the behaviour is + * undefined, and may include returning entirely incorrect output + * while indicating success. + */ +#define AV_HWACCEL_FLAG_ALLOW_PROFILE_MISMATCH (1 << 2) + /** * @} */ @@ -5648,22 +5665,14 @@ int av_picture_pad(AVPicture *dst, const AVPicture *src, int height, int width, * @{ */ +#if FF_API_GETCHROMA /** - * Utility function to access log2_chroma_w log2_chroma_h from - * the pixel format AVPixFmtDescriptor. - * - * This function asserts that pix_fmt is valid. See av_pix_fmt_get_chroma_sub_sample - * for one that returns a failure code and continues in case of invalid - * pix_fmts. - * - * @param[in] pix_fmt the pixel format - * @param[out] h_shift store log2_chroma_w - * @param[out] v_shift store log2_chroma_h - * - * @see av_pix_fmt_get_chroma_sub_sample + * @deprecated Use av_pix_fmt_get_chroma_sub_sample */ +attribute_deprecated void avcodec_get_chroma_sub_sample(enum AVPixelFormat pix_fmt, int *h_shift, int *v_shift); +#endif /** * Return a value representing the fourCC code associated to the diff --git a/ext_includes/libavcodec/version.h b/ext_includes/libavcodec/version.h index 5f2321cf..48e57bd8 100644 --- a/ext_includes/libavcodec/version.h +++ b/ext_includes/libavcodec/version.h @@ -28,8 +28,8 @@ #include "libavutil/version.h" #define LIBAVCODEC_VERSION_MAJOR 57 -#define LIBAVCODEC_VERSION_MINOR 96 -#define LIBAVCODEC_VERSION_MICRO 101 +#define LIBAVCODEC_VERSION_MINOR 103 +#define LIBAVCODEC_VERSION_MICRO 100 #define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \ LIBAVCODEC_VERSION_MINOR, \ @@ -60,9 +60,6 @@ #ifndef FF_API_AVCODEC_RESAMPLE #define FF_API_AVCODEC_RESAMPLE FF_API_AUDIO_CONVERT #endif -#ifndef FF_API_GETCHROMA -#define FF_API_GETCHROMA (LIBAVCODEC_VERSION_MAJOR < 58) -#endif #ifndef FF_API_MISSING_SAMPLE #define FF_API_MISSING_SAMPLE (LIBAVCODEC_VERSION_MAJOR < 58) #endif @@ -238,6 +235,9 @@ #ifndef FF_API_TAG_STRING #define FF_API_TAG_STRING (LIBAVCODEC_VERSION_MAJOR < 59) #endif +#ifndef FF_API_GETCHROMA +#define FF_API_GETCHROMA (LIBAVCODEC_VERSION_MAJOR < 59) +#endif #endif /* AVCODEC_VERSION_H */ diff --git a/ext_includes/libavformat/avformat.h b/ext_includes/libavformat/avformat.h index 4ab217dc..b0de66ac 100644 --- a/ext_includes/libavformat/avformat.h +++ b/ext_includes/libavformat/avformat.h @@ -2954,6 +2954,7 @@ int avformat_match_stream_specifier(AVFormatContext *s, AVStream *st, int avformat_queue_attached_pictures(AVFormatContext *s); +#if FF_API_OLD_BSF /** * Apply a list of bitstream filters to a packet. * @@ -2965,7 +2966,6 @@ int avformat_queue_attached_pictures(AVFormatContext *s); * @return >=0 on success; * AVERROR code on failure */ -#if FF_API_OLD_BSF attribute_deprecated int av_apply_bitstream_filters(AVCodecContext *codec, AVPacket *pkt, AVBitStreamFilterContext *bsfc); diff --git a/ext_includes/libavformat/avio.h b/ext_includes/libavformat/avio.h index 525eb712..f14b003b 100644 --- a/ext_includes/libavformat/avio.h +++ b/ext_includes/libavformat/avio.h @@ -137,7 +137,13 @@ enum AVIODataMarkerType { * Trailer data, which doesn't contain actual content, but only for * finalizing the output file. */ - AVIO_DATA_MARKER_TRAILER + AVIO_DATA_MARKER_TRAILER, + /** + * A point in the output bytestream where the underlying AVIOContext might + * flush the buffer depending on latency or buffering requirements. Typically + * means the end of a packet. + */ + AVIO_DATA_MARKER_FLUSH_POINT, }; /** @@ -168,8 +174,9 @@ typedef struct AVIOContext { const AVClass *av_class; /* - * The following shows the relationship between buffer, buf_ptr, buf_end, buf_size, - * and pos, when reading and when writing (since AVIOContext is used for both): + * The following shows the relationship between buffer, buf_ptr, + * buf_ptr_max, buf_end, buf_size, and pos, when reading and when writing + * (since AVIOContext is used for both): * ********************************************************************************** * READING @@ -196,21 +203,24 @@ typedef struct AVIOContext { * WRITING ********************************************************************************** * - * | buffer_size | - * |-------------------------------| - * | | + * | buffer_size | + * |--------------------------------------| + * | | * - * buffer buf_ptr buf_end - * +-------------------+-----------+ - * |/ / / / / / / / / /| | - * write buffer: | / to be flushed / | | - * |/ / / / / / / / / /| | - * +-------------------+-----------+ + * buf_ptr_max + * buffer (buf_ptr) buf_end + * +-----------------------+--------------+ + * |/ / / / / / / / / / / /| | + * write buffer: | / / to be flushed / / | | + * |/ / / / / / / / / / / /| | + * +-----------------------+--------------+ + * buf_ptr can be in this + * due to a backward seek * - * pos - * +--------------------------+-----------------------------------+ - * output file: | | | - * +--------------------------+-----------------------------------+ + * pos + * +-------------+----------------------------------------------+ + * output file: | | | + * +-------------+----------------------------------------------+ * */ unsigned char *buffer; /**< Start of the buffer. */ @@ -226,7 +236,7 @@ typedef struct AVIOContext { int (*write_packet)(void *opaque, uint8_t *buf, int buf_size); int64_t (*seek)(void *opaque, int64_t offset, int whence); int64_t pos; /**< position in the file of the current buffer */ - int must_flush; /**< true if the next seek should flush */ + int must_flush; /**< unused */ int eof_reached; /**< true if eof reached */ int write_flag; /**< true if open for writing */ int max_packet_size; @@ -329,6 +339,17 @@ typedef struct AVIOContext { int (*short_seek_get)(void *opaque); int64_t written; + + /** + * Maximum reached position before a backward seek in the write buffer, + * used keeping track of already written data for a later flush. + */ + unsigned char *buf_ptr_max; + + /** + * Try to buffer at least this amount of data before flushing it + */ + int min_packet_size; } AVIOContext; /** diff --git a/ext_includes/libavformat/version.h b/ext_includes/libavformat/version.h index 411fd661..a8cf4c15 100644 --- a/ext_includes/libavformat/version.h +++ b/ext_includes/libavformat/version.h @@ -32,8 +32,8 @@ // Major bumping may affect Ticket5467, 5421, 5451(compatibility with Chromium) // Also please add any ticket numbers that you believe might be affected here #define LIBAVFORMAT_VERSION_MAJOR 57 -#define LIBAVFORMAT_VERSION_MINOR 72 -#define LIBAVFORMAT_VERSION_MICRO 101 +#define LIBAVFORMAT_VERSION_MINOR 77 +#define LIBAVFORMAT_VERSION_MICRO 100 #define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \ LIBAVFORMAT_VERSION_MINOR, \ diff --git a/ext_includes/libavutil/ffversion.h b/ext_includes/libavutil/ffversion.h index 02d49a43..44703a1e 100644 --- a/ext_includes/libavutil/ffversion.h +++ b/ext_includes/libavutil/ffversion.h @@ -1,5 +1,5 @@ /* Automatically generated by version.sh, do not manually edit! */ #ifndef AVUTIL_FFVERSION_H #define AVUTIL_FFVERSION_H -#define FFMPEG_VERSION "N-86221-g3dd242ef49" +#define FFMPEG_VERSION "N-87071-g511fb115ac" #endif /* AVUTIL_FFVERSION_H */ diff --git a/ext_includes/libavutil/frame.h b/ext_includes/libavutil/frame.h index 26261d7e..013043c2 100644 --- a/ext_includes/libavutil/frame.h +++ b/ext_includes/libavutil/frame.h @@ -134,6 +134,13 @@ enum AVFrameSideDataType { * 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, }; enum AVActiveFormatDescription { @@ -766,6 +773,40 @@ AVFrameSideData *av_frame_get_side_data(const AVFrame *frame, */ 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 Libav API is generally not allowed, and causes undefined behavior + * (such as crashes). You can pass unaligned data only to Libav 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 */ diff --git a/ext_includes/libavutil/hwcontext.h b/ext_includes/libavutil/hwcontext.h index cfc6ad0e..afb0d80d 100644 --- a/ext_includes/libavutil/hwcontext.h +++ b/ext_includes/libavutil/hwcontext.h @@ -31,6 +31,8 @@ enum AVHWDeviceType { AV_HWDEVICE_TYPE_DXVA2, AV_HWDEVICE_TYPE_QSV, AV_HWDEVICE_TYPE_VIDEOTOOLBOX, + AV_HWDEVICE_TYPE_NONE, + AV_HWDEVICE_TYPE_D3D11VA, }; typedef struct AVHWDeviceInternal AVHWDeviceInternal; @@ -223,6 +225,33 @@ typedef struct AVHWFramesContext { int width, height; } AVHWFramesContext; +/** + * Look up an AVHWDeviceType by name. + * + * @param name String name of the device type (case-insensitive). + * @return The type from enum AVHWDeviceType, or AV_HWDEVICE_TYPE_NONE if + * not found. + */ +enum AVHWDeviceType av_hwdevice_find_type_by_name(const char *name); + +/** Get the string name of an AVHWDeviceType. + * + * @param type Type from enum AVHWDeviceType. + * @return Pointer to a static string containing the name, or NULL if the type + * is not valid. + */ +const char *av_hwdevice_get_type_name(enum AVHWDeviceType type); + +/** + * Iterate over supported device types. + * + * @param type AV_HWDEVICE_TYPE_NONE initially, then the previous type + * returned by this function in subsequent iterations. + * @return The next usable device type from enum AVHWDeviceType, or + * AV_HWDEVICE_TYPE_NONE if there are no more. + */ +enum AVHWDeviceType av_hwdevice_iterate_types(enum AVHWDeviceType prev); + /** * Allocate an AVHWDeviceContext for a given hardware type. * @@ -270,6 +299,32 @@ int av_hwdevice_ctx_init(AVBufferRef *ref); int av_hwdevice_ctx_create(AVBufferRef **device_ctx, enum AVHWDeviceType type, const char *device, AVDictionary *opts, int flags); +/** + * Create a new device of the specified type from an existing device. + * + * If the source device is a device of the target type or was originally + * derived from such a device (possibly through one or more intermediate + * devices of other types), then this will return a reference to the + * existing device of the same type as is requested. + * + * Otherwise, it will attempt to derive a new device from the given source + * device. If direct derivation to the new type is not implemented, it will + * attempt the same derivation from each ancestor of the source device in + * turn looking for an implemented derivation method. + * + * @param dst_ctx On success, a reference to the newly-created + * AVHWDeviceContext. + * @param type The type of the new device to create. + * @param src_ctx A reference to an existing AVHWDeviceContext which will be + * used to create the new device. + * @param flags Currently unused; should be set to zero. + * @return Zero on success, a negative AVERROR code on failure. + */ +int av_hwdevice_ctx_create_derived(AVBufferRef **dst_ctx, + enum AVHWDeviceType type, + AVBufferRef *src_ctx, int flags); + + /** * Allocate an AVHWFramesContext tied to a given device context. * @@ -512,7 +567,9 @@ int av_hwframe_map(AVFrame *dst, const AVFrame *src, int flags); * AVHWFramesContext on. * @param source_frame_ctx A reference to an existing AVHWFramesContext * which will be mapped to the derived context. - * @param flags Currently unused; should be set to zero. + * @param flags Some combination of AV_HWFRAME_MAP_* flags, defining the + * mapping parameters to apply to frames which are allocated + * in the derived device. * @return Zero on success, negative AVERROR code on failure. */ int av_hwframe_ctx_create_derived(AVBufferRef **derived_frame_ctx, diff --git a/ext_includes/libavutil/hwcontext_d3d11va.h b/ext_includes/libavutil/hwcontext_d3d11va.h new file mode 100644 index 00000000..98db7ce3 --- /dev/null +++ b/ext_includes/libavutil/hwcontext_d3d11va.h @@ -0,0 +1,168 @@ +/* + * 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_D3D11VA_H +#define AVUTIL_HWCONTEXT_D3D11VA_H + +/** + * @file + * An API-specific header for AV_HWDEVICE_TYPE_D3D11VA. + * + * The default pool implementation will be fixed-size if initial_pool_size is + * set (and allocate elements from an array texture). Otherwise it will allocate + * individual textures. Be aware that decoding requires a single array texture. + * + * Using sw_format==AV_PIX_FMT_YUV420P has special semantics, and maps to + * DXGI_FORMAT_420_OPAQUE. av_hwframe_transfer_data() is not supported for + * this format. Refer to MSDN for details. + * + * av_hwdevice_ctx_create() for this device type supports a key named "debug" + * for the AVDictionary entry. If this is set to any value, the device creation + * code will try to load various supported D3D debugging layers. + */ + +#include + +/** + * This struct is allocated as AVHWDeviceContext.hwctx + */ +typedef struct AVD3D11VADeviceContext { + /** + * Device used for texture creation and access. This can also be used to + * set the libavcodec decoding device. + * + * Must be set by the user. This is the only mandatory field - the other + * device context fields are set from this and are available for convenience. + * + * Deallocating the AVHWDeviceContext will always release this interface, + * and it does not matter whether it was user-allocated. + */ + ID3D11Device *device; + + /** + * If unset, this will be set from the device field on init. + * + * Deallocating the AVHWDeviceContext will always release this interface, + * and it does not matter whether it was user-allocated. + */ + ID3D11DeviceContext *device_context; + + /** + * If unset, this will be set from the device field on init. + * + * Deallocating the AVHWDeviceContext will always release this interface, + * and it does not matter whether it was user-allocated. + */ + ID3D11VideoDevice *video_device; + + /** + * If unset, this will be set from the device_context field on init. + * + * Deallocating the AVHWDeviceContext will always release this interface, + * and it does not matter whether it was user-allocated. + */ + ID3D11VideoContext *video_context; + + /** + * Callbacks for locking. They protect accesses to device_context and + * video_context calls. They also protect access to the internal staging + * texture (for av_hwframe_transfer_data() calls). They do NOT protect + * access to hwcontext or decoder state in general. + * + * If unset on init, the hwcontext implementation will set them to use an + * internal mutex. + * + * The underlying lock must be recursive. lock_ctx is for free use by the + * locking implementation. + */ + void (*lock)(void *lock_ctx); + void (*unlock)(void *lock_ctx); + void *lock_ctx; +} AVD3D11VADeviceContext; + +/** + * D3D11 frame descriptor for pool allocation. + * + * In user-allocated pools, AVHWFramesContext.pool must return AVBufferRefs + * with the data pointer pointing at an object of this type describing the + * planes of the frame. + * + * This has no use outside of custom allocation, and AVFrame AVBufferRef do not + * necessarily point to an instance of this struct. + */ +typedef struct AVD3D11FrameDescriptor { + /** + * The texture in which the frame is located. The reference count is + * managed by the AVBufferRef, and destroying the reference will release + * the interface. + * + * Normally stored in AVFrame.data[0]. + */ + ID3D11Texture2D *texture; + + /** + * The index into the array texture element representing the frame, or 0 + * if the texture is not an array texture. + * + * Normally stored in AVFrame.data[1] (cast from intptr_t). + */ + intptr_t index; +} AVD3D11FrameDescriptor; + +/** + * This struct is allocated as AVHWFramesContext.hwctx + */ +typedef struct AVD3D11VAFramesContext { + /** + * The canonical texture used for pool allocation. If this is set to NULL + * on init, the hwframes implementation will allocate and set an array + * texture if initial_pool_size > 0. + * + * The only situation when the API user should set this is: + * - the user wants to do manual pool allocation (setting + * AVHWFramesContext.pool), instead of letting AVHWFramesContext + * allocate the pool + * - of an array texture + * - and wants it to use it for decoding + * - this has to be done before calling av_hwframe_ctx_init() + * + * Deallocating the AVHWFramesContext will always release this interface, + * and it does not matter whether it was user-allocated. + * + * This is in particular used by the libavcodec D3D11VA hwaccel, which + * requires a single array texture. It will create ID3D11VideoDecoderOutputView + * objects for each array texture element on decoder initialization. + */ + ID3D11Texture2D *texture; + + /** + * D3D11_TEXTURE2D_DESC.BindFlags used for texture creation. The user must + * at least set D3D11_BIND_DECODER if the frames context is to be used for + * video decoding. + * This field is ignored/invalid if a user-allocated texture is provided. + */ + UINT BindFlags; + + /** + * D3D11_TEXTURE2D_DESC.MiscFlags used for texture creation. + * This field is ignored/invalid if a user-allocated texture is provided. + */ + UINT MiscFlags; +} AVD3D11VAFramesContext; + +#endif /* AVUTIL_HWCONTEXT_D3D11VA_H */ diff --git a/ext_includes/libavutil/hwcontext_dxva2.h b/ext_includes/libavutil/hwcontext_dxva2.h index 6c36cb4b..e1b79bc0 100644 --- a/ext_includes/libavutil/hwcontext_dxva2.h +++ b/ext_includes/libavutil/hwcontext_dxva2.h @@ -65,6 +65,9 @@ typedef struct AVDXVA2FramesContext { * * If it is non-NULL, libavutil will call IDirectXVideoDecoder_Release() on * it just before the internal surface pool is freed. + * + * This is for convenience only. Some code uses other methods to manage the + * decoder reference. */ IDirectXVideoDecoder *decoder_to_release; } AVDXVA2FramesContext; diff --git a/ext_includes/libavutil/hwcontext_vaapi.h b/ext_includes/libavutil/hwcontext_vaapi.h index da1d4fe6..0b2e071c 100644 --- a/ext_includes/libavutil/hwcontext_vaapi.h +++ b/ext_includes/libavutil/hwcontext_vaapi.h @@ -51,6 +51,13 @@ enum { * so the surface allocation code will not try to use it. */ AV_VAAPI_DRIVER_QUIRK_ATTRIB_MEMTYPE = (1 << 2), + + /** + * The driver does not support surface attributes at all. + * The surface allocation code will never pass them to surface allocation, + * and the results of the vaQuerySurfaceAttributes() call will be faked. + */ + AV_VAAPI_DRIVER_QUIRK_SURFACE_ATTRIBUTES = (1 << 3), }; /** diff --git a/ext_includes/libavutil/imgutils.h b/ext_includes/libavutil/imgutils.h index ea083b10..2ab90ac0 100644 --- a/ext_includes/libavutil/imgutils.h +++ b/ext_includes/libavutil/imgutils.h @@ -238,6 +238,33 @@ int av_image_check_size2(unsigned int w, unsigned int h, int64_t max_pixels, enu */ int av_image_check_sar(unsigned int w, unsigned int h, AVRational sar); +/** + * Overwrite the image data with black. This is suitable for filling a + * sub-rectangle of an image, meaning the padding between the right most pixel + * and the left most pixel on the next line will not be overwritten. For some + * formats, the image size might be rounded up due to inherent alignment. + * + * If the pixel format has alpha, the alpha is cleared to opaque. + * + * This can return an error if the pixel format is not supported. Normally, all + * non-hwaccel pixel formats should be supported. + * + * Passing NULL for dst_data is allowed. Then the function returns whether the + * operation would have succeeded. (It can return an error if the pix_fmt is + * not supported.) + * + * @param dst_data data pointers to destination image + * @param dst_linesize linesizes for the destination image + * @param pix_fmt the pixel format of the image + * @param range the color range of the image (important for colorspaces such as YUV) + * @param width the width of the image in pixels + * @param height the height of the image in pixels + * @return 0 if the image data was cleared, a negative AVERROR code otherwise + */ +int av_image_fill_black(uint8_t *dst_data[4], const ptrdiff_t dst_linesize[4], + enum AVPixelFormat pix_fmt, enum AVColorRange range, + int width, int height); + /** * @} */ diff --git a/ext_includes/libavutil/pixdesc.h b/ext_includes/libavutil/pixdesc.h index 1cd57ed0..841fd075 100644 --- a/ext_includes/libavutil/pixdesc.h +++ b/ext_includes/libavutil/pixdesc.h @@ -181,6 +181,12 @@ typedef struct AVPixFmtDescriptor { */ #define AV_PIX_FMT_FLAG_BAYER (1 << 8) +/** + * The pixel format contains IEEE-754 floating point values. Precision (double, + * single, or half) should be determined by the pixel size (64, 32, or 16 bits). + */ +#define AV_PIX_FMT_FLAG_FLOAT (1 << 9) + /** * Return the number of bits per pixel used by the pixel format * described by pixdesc. Note that this is not the same as the number diff --git a/ext_includes/libavutil/pixfmt.h b/ext_includes/libavutil/pixfmt.h index 3c915c64..6dd09437 100644 --- a/ext_includes/libavutil/pixfmt.h +++ b/ext_includes/libavutil/pixfmt.h @@ -240,7 +240,7 @@ enum AVPixelFormat { */ AV_PIX_FMT_MMAL, - AV_PIX_FMT_D3D11VA_VLD, ///< HW decoding through Direct3D11, Picture.data[3] contains a ID3D11VideoDecoderOutputView pointer + 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 @@ -314,6 +314,26 @@ enum AVPixelFormat { 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 + 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 }; @@ -330,6 +350,7 @@ enum AVPixelFormat { #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_GRAY16 AV_PIX_FMT_NE(GRAY16BE, GRAY16LE) @@ -377,6 +398,8 @@ enum AVPixelFormat { #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_GBRPF32 AV_PIX_FMT_NE(GBRPF32BE, GBRPF32LE) +#define AV_PIX_FMT_GBRAPF32 AV_PIX_FMT_NE(GBRAPF32BE, GBRAPF32LE) #define AV_PIX_FMT_YUVA420P9 AV_PIX_FMT_NE(YUVA420P9BE , YUVA420P9LE) #define AV_PIX_FMT_YUVA422P9 AV_PIX_FMT_NE(YUVA422P9BE , YUVA422P9LE) @@ -465,10 +488,11 @@ enum AVColorSpace { 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_NB ///< Not part of ABI }; -#define AVCOL_SPC_YCGCO AVCOL_SPC_YCOCG - /** * MPEG vs JPEG YUV range. diff --git a/ext_includes/libavutil/version.h b/ext_includes/libavutil/version.h index fb61dcc6..6e25b469 100644 --- a/ext_includes/libavutil/version.h +++ b/ext_includes/libavutil/version.h @@ -80,7 +80,7 @@ #define LIBAVUTIL_VERSION_MAJOR 55 -#define LIBAVUTIL_VERSION_MINOR 63 +#define LIBAVUTIL_VERSION_MINOR 74 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ diff --git a/ext_libs/avcodec-vgmstream-57.def b/ext_libs/avcodec-vgmstream-57.def index 3f31c67c..a07a0c40 100644 --- a/ext_libs/avcodec-vgmstream-57.def +++ b/ext_libs/avcodec-vgmstream-57.def @@ -205,6 +205,7 @@ EXPORTS avpriv_copy_bits avpriv_copy_pce_data avpriv_dca_convert_bitstream + avpriv_dca_parse_core_frame_header avpriv_dca_sample_rates DATA avpriv_find_pix_fmt avpriv_find_start_code diff --git a/ext_libs/avcodec-vgmstream-57.dll b/ext_libs/avcodec-vgmstream-57.dll index c443eada..d1e5829b 100644 Binary files a/ext_libs/avcodec-vgmstream-57.dll and b/ext_libs/avcodec-vgmstream-57.dll differ diff --git a/ext_libs/avcodec-vgmstream-57.dll.asc b/ext_libs/avcodec-vgmstream-57.dll.asc index d0d813f6..bd0aa9d7 100644 --- a/ext_libs/avcodec-vgmstream-57.dll.asc +++ b/ext_libs/avcodec-vgmstream-57.dll.asc @@ -1,17 +1,17 @@ -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iQIcBAABCAAGBQJZIm+NAAoJEI1smEefSt5xBp4P/2CGBl86MzvwdeTrkfuHd7c4 -14KohstmMjQOanTYBxEqvOGaBfg2uuvUjZxA5O1S5lqvBT5oOZB+t+pPO+rNydjd -QHA6VmoQbmXYD+y39jcBq8zYrSINslwwzS3bxmNKV93/AS36qcJ6ntz5LIkJoJcH -qF1AaJemTDvIZm65zUx/McWCKy6BLoF9WesZPS+6P1SKIg6hbgh9zpVEBLjKlQAZ -NYhg4WmV5YfJOedkw+51J1qbjB+d19cv2djqruWKQQfOxEJ83utw3MRIwwpPXgE+ -Xab7g7voKSbUS/wfMS0I28fvY146Tv5NcM6kNHypzBOb3vKLDEigCWVFyDvXUjiY -jbDL7vv58fR3QL547UFh3/UBKSgqRLEjihgKJ+i8IIhaJ2DNRC7yqU7NZj8BC/Jk -QrJSJu8vH3dHYRHX8JQbTY7uyEls2qi/OLCxEsxeqmQr6zbA/tgvaI5RyWUHahwi -fFO7jjBxKxqSXHonRpIpdmN1IlszZ7yEYSgd/5MZmjmJArJ7TJ7xXrhAsKAYxtEX -uhTKPzB6Y0IDNcqJ9NfpKaNS5/TZklU9E7W3crXioZd984O7mMQfRFcwaJr8l4B5 -H0Me4U/VFB49bl/jCQYe9OZwlR3CPg+IMwlA3QyzwNLbpFtOkSRk1mR20S9DETb4 -k5anj6uZJvNPYj4SsnY6 -=iyI1 +iQIcBAABCAAGBQJZoOOuAAoJEI1smEefSt5x0TcP/j75QCjmou6nkNu/30KoPTt4 +hqadNthpA16yOSDBwUeX/CguEGWUinnSJ/lYOEtfl8kztOkr9r4Cz19b3Qyy0tP+ +1WSugCJOr92nniaN0NBouLdAo+UxBMCWzegm17hPz3eV+AlpE9K7tvvyqjykzO5e +1YiyiG2JSWF9ePhX6ib8RKdHxRSnNR+0WvsE2yfIRMvIdDsXRY5iNL4kqnYgjqQP +aijWv1/qDwnOdfahVFNnwIdSCkbaieinf+qa+sa61SY4TafHcOwwTLEInMRcyshU +IJiSIGNyBRlW5WPSxgx98SZc9TrfdkyFgYmCq3dy7G1i7hkaMUadHdraQVngSgEo +ocK6j5kJGKo1GAA9ZhvLzMelIj6K+uA/gvni0GMJamcLBeAGHZHVfsUlVRpZ7uh9 +h2C96hju6tQHzh+q3HeVq95V39f9Hi4p1jnxHxx5Sb6P6WqUcOe1UQZgEHpPKnuw +y3eXhkldPP7bXx/VSzbKCXRtSAEgQ+Xx+mPVxuLYRageXXZLCYVcY5EKkgx0QWki +EsWbTQo+komx3XpTQJ0HaS01j/Q0qAZ9M+0PdH9FTayw8ycn13BmC5/klVWILgvs +M2LQSZzJC1/CRJarh7PxyODbBIlItayu/AkhlkI2KPRANWsImHI5ybMTrWi4CpoA +pIDUzD0PXE5FzG6a5Z6p +=gT8M -----END PGP SIGNATURE----- diff --git a/ext_libs/avformat-vgmstream-57.dll b/ext_libs/avformat-vgmstream-57.dll index 7da632c5..96f4351a 100644 Binary files a/ext_libs/avformat-vgmstream-57.dll and b/ext_libs/avformat-vgmstream-57.dll differ diff --git a/ext_libs/avformat-vgmstream-57.dll.asc b/ext_libs/avformat-vgmstream-57.dll.asc index 8652fda4..85547cf4 100644 --- a/ext_libs/avformat-vgmstream-57.dll.asc +++ b/ext_libs/avformat-vgmstream-57.dll.asc @@ -1,17 +1,17 @@ -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iQIcBAABCAAGBQJZIm+NAAoJEI1smEefSt5xXuMP/R/oZQ8qjH2yPtLOUdZxAhOl -E73H0nfKvTquFxFQBlNed4YQz904TMPhfXcd6ovGA/3qD6oBwzYI5wGSB7wjiZRw -X35wMQYOJf6YhNYaT2YxvDMwGbkc5K5tHAIaE6XVV4JSlJNk0sjoUEd2tYU2WV/F -pJShSseVeC177nGucYLuBTquzN3JtfeD1MkHEqbHjCHs8/aVIH8I9It4vH1FP7xL -1FgsdTgA4NN155N5glADh7taDauVVgxq0xaiB0GFV7T0/V5n04lgPwd8ayrGS3Bq -MwVOds2aYApadCcsVCGwcCxv0Ow4AT54LIy6cZNflWHKU3tHJmaR/A1Y+J3OKKUH -oFukcSh10Ibm1FYG1HBcp81fB731TtqmBhR0XdPAOZG9tNyR75ucLCbzGOnyy0Yc -Zi+b5jgtlrrpmwulDemT5L9WL1wwvmNVtKnhTy/ky2XsJ434gQZY79FkAWHg5fv4 -NiTyH+gdvKFqUdahq2aowdVQFzWEnkBEIycS/kJ4JE7wo4Fsy6+eVUwrbQ7Ks3wH -GBoCzL3LDVw01GpuLyoGsJ3Qai3DttSJONPPCOEtjFxwnjuGvnuMKQ1i29oc5zHM -OLqigaWfPq0Mb+4ZKlC+RqeUSysCTqmH1S4HClFwEvxOdXZ3NCMIy4IPaUSlwcQ3 -OyK0ENQ4O/VQxyctYC5v -=ACam +iQIcBAABCAAGBQJZoOOvAAoJEI1smEefSt5xSfUQAKZ/tpNg1lL4Sy/bwrC5wnl7 +00glPpfBCIKV+WJp5l/wK0HiKLn3GOV3fy6zVQxBQ1wep7RPWeh9c6Y+EX2ifwFo +Mg688vzxvRf92N+x74h6cEgZpQm9bjOnve6GXkdeLTEVMPfkfTQPniMcMggChX70 +K+GQ6NWBhwZC+3TwBRfIbfNzQl+RaHWCJDF1FudAhwgoIc2+RF4t+XRlvG406ae9 +OvW9r2eIIj40XvL4jD5YRf2+aY+gYrxSSFH/fN9lESFZYI6dH7hdbJIvRHv1mXUT +VvcLRuw9EFrB3YhRt7d07J2AzmnXR0Q1Torr9m5tU5aBxkGbdc+EoEYhEPPKrdn5 +0W8Jrolnpk7rVVv98EotAs+fXpmAlsg0FBQURzMtfyvlWhsroDkP85EjORAV+Qme ++0+qqvcmo1xubMkOlpkPKBiU01Z/u+dlqiico15shxJdqWXhcZYpEyrXXsSb0Zhk +i2I3BK6Acceftrkm3x9ats+MEJ/YQ/isNT0gd3mlz5dg3KeR8131wDjlGG07tkDP +WxnlKPlc9PX+l03KV1SF0I6WUYK0P4hXg3g/cb+MsQtR5JuvafJxU40ddHeZVQSs +Gv/b64bKX5eFmSMvcd2dfKAUBuuagQftIM4XQyrEqi91T5Hodk6ZcFeELYYaopBs +aSIGvswR23LQyPqzNHBq +=c6c1 -----END PGP SIGNATURE----- diff --git a/ext_libs/avutil-vgmstream-55.def b/ext_libs/avutil-vgmstream-55.def index d983429b..33ee8132 100644 --- a/ext_libs/avutil-vgmstream-55.def +++ b/ext_libs/avutil-vgmstream-55.def @@ -145,6 +145,7 @@ EXPORTS av_force_cpu_flags av_fourcc_make_string av_frame_alloc + av_frame_apply_cropping av_frame_clone av_frame_copy av_frame_copy_props @@ -239,9 +240,13 @@ EXPORTS av_hmac_update av_hwdevice_ctx_alloc av_hwdevice_ctx_create + av_hwdevice_ctx_create_derived av_hwdevice_ctx_init + av_hwdevice_find_type_by_name av_hwdevice_get_hwframe_constraints + av_hwdevice_get_type_name av_hwdevice_hwconfig_alloc + av_hwdevice_iterate_types av_hwframe_constraints_free av_hwframe_ctx_alloc av_hwframe_ctx_create_derived @@ -260,6 +265,7 @@ EXPORTS av_image_copy_to_buffer av_image_copy_uc_from av_image_fill_arrays + av_image_fill_black av_image_fill_linesizes av_image_fill_max_pixsteps av_image_fill_pointers @@ -492,6 +498,9 @@ EXPORTS avpriv_request_sample avpriv_scalarproduct_float_c avpriv_set_systematic_pal2 + avpriv_slicethread_create + avpriv_slicethread_execute + avpriv_slicethread_free avpriv_solve_lls avpriv_tempfile avpriv_vga16_font DATA diff --git a/ext_libs/avutil-vgmstream-55.dll b/ext_libs/avutil-vgmstream-55.dll index bd25f0f7..9b4d3145 100644 Binary files a/ext_libs/avutil-vgmstream-55.dll and b/ext_libs/avutil-vgmstream-55.dll differ diff --git a/ext_libs/avutil-vgmstream-55.dll.asc b/ext_libs/avutil-vgmstream-55.dll.asc index 86f636de..6cb1857b 100644 --- a/ext_libs/avutil-vgmstream-55.dll.asc +++ b/ext_libs/avutil-vgmstream-55.dll.asc @@ -1,17 +1,17 @@ -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 -iQIcBAABCAAGBQJZIm+LAAoJEI1smEefSt5xRA4QAKmEJugnYFlAWOf+LYA7rZZ3 -cWKSc37OLLkRZFSpjYKN8N2EinGF95L4YBVz2t04GZz0kMIZl9AGfrr9p70J/1Ni -eHF4iGT/YhQ/Rnk9zlntA1QeAh03iL6bgSLGw0Hn4TR2fsu8yhZ/gJNpQPcHtSo+ -uE1CzK6liOzIJG/wfg7SMyjk3IZunA+1Ohc70HGjdQm9FBxKDQB4Oev7wYIQI41I -K3+smTc7AwtWrISFmAIf886Ee5smqKGhxtJHr5zSEHid8/glEYjbQTWX+PEXcM/I -FGNyuPH4re7+iEOO3rEE7upt0Aeb+nwmcsgYVpOwCO8FN04qE0o9Xxf75GGLdjna -QMk6m2oZ7vjFvr2YfBFRBp8Xhnc53ZRwHw+Ja3RGK+hxpITaL2XetX7MO4OrP0BN -0fYesCKOieCkEtxPEtbvxdWUOpUEu69geLBplt/UoZf5uyQedZlENFeHlRr39jjT -UP6AnjA1EodUvojsFAyYP6sldoHk8BAvgjhLATKzJWLijBtEk/qhGev9lhyfToxD -sM1D7pVWFZev2m7eZ9CLFrpULJzxGgzN5u1fz+1cTJkT/kw6Eil0sfFtS0ohdyTA -wKCdz42ZiwR4I15mY/8LL3i+krymDQhSbAo90jGG4dBh1KkkRCugPsjN+4GFwpJm -eC6XVDzJKNnNaJ7tJs+T -=P6x/ +iQIcBAABCAAGBQJZoOOsAAoJEI1smEefSt5xHXAQAK1tDF4/ETaw43JXLgdXAo9d +SKW+q5XCQCmAgBS9Sdq0vUIA29gK0pQPYRH+XVXuBfnOa+uVI+qKlT3RV9eT+2Af +Tl/dgNhWPbJk2im7sCczuaMJ+5bnFEoGeBpXANz6gLfe4mWxaBRRjiRW1UCBNZLq +dGcwnxE9+LwguZE1KvFvCpL/KRhriSw36NQ/Fyfl8ea5ak/oJv2Z7txNRnm2cPa2 +c8n/2QoXo7ZFQXMVhyDiN4Q4G2a8ygRmeMFUXJlNdtX5yiVdVnfVIP8YhKwVXcuQ +za7CDoHB8irDud2nbmi8xrbFBmTDdPObTf6fxwAjINX2qf1aS1uM2YG+Q55u/iBR +CgK7R2J2LN1/Jm+lA6qiKvl4QDA0tOhuON9TfB0nl/mfBoM3LRWPajAl9S0ssRYW +BgXdNJ6UCftULMJc8jtIcM1/DfBaDXUwmPB1h2dNo4FfVH3hlIFGMjjnVr4QlsOn +nMKBfz604LzEhbaYjiZSSR0va02b++41bf+wrkhnIvAzWU1yupXbfOrNujASzVcn ++zyDk6venaFZqo3GJpGKfGb5jrQiGq7cuCa6W8g/qv7Ce5l8wNNppa+4OToF5xST +q6yDBEAFhsXA7DjBOI5kY3D3WBJJx1JG1f/g7ScVVun2qfitJbRSw+LI4WGQVYqv +j3X2VOD3FyfTKLb+faiI +=6ff6 -----END PGP SIGNATURE-----