mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2026-01-15 18:41:07 +01:00
Compare commits
40 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d4ff0020b4 | ||
|
|
61df86efdd | ||
|
|
b8eefd0061 | ||
|
|
e1bbae68fc | ||
|
|
56b50b945b | ||
|
|
d57ea70234 | ||
|
|
422ce1f21a | ||
|
|
cf5cdc5a29 | ||
|
|
37c6124893 | ||
|
|
9ee0cd2190 | ||
|
|
962d667964 | ||
|
|
2929465718 | ||
|
|
d660dd1e0a | ||
|
|
a1d9e28272 | ||
|
|
597d574480 | ||
|
|
e8541ed9f1 | ||
|
|
4f863e52dd | ||
|
|
8904bc8e76 | ||
|
|
c9a9dbfebf | ||
|
|
cebc2b3880 | ||
|
|
3d1ca4c3ff | ||
|
|
38dc8767df | ||
|
|
c5ee01d966 | ||
|
|
3d7c02e4a2 | ||
|
|
86c4d04051 | ||
|
|
d4041282f4 | ||
|
|
868aa88d83 | ||
|
|
5eca8964a9 | ||
|
|
80daebdfdf | ||
|
|
4e5f3e6b8e | ||
|
|
116cb346e3 | ||
|
|
1cff6e41bf | ||
|
|
8ccd1593a4 | ||
|
|
48afb43549 | ||
|
|
5c5d3e315e | ||
|
|
4d476677b0 | ||
|
|
efac4e2c44 | ||
|
|
1e84d9c5da | ||
|
|
2233b51283 | ||
|
|
bf1e5f2773 |
@@ -1,7 +1,7 @@
|
||||
Entries are sorted chronologically from oldest to youngest within each release,
|
||||
releases are sorted from youngest to oldest.
|
||||
|
||||
version <next>:
|
||||
version 6.1:
|
||||
- libaribcaption decoder
|
||||
- Playdate video decoder and demuxer
|
||||
- Extend VAAPI support for libva-win32 on Windows
|
||||
|
||||
15
RELEASE_NOTES
Normal file
15
RELEASE_NOTES
Normal file
@@ -0,0 +1,15 @@
|
||||
|
||||
┌──────────────────────────────────────────┐
|
||||
│ RELEASE NOTES for FFmpeg 6.1 "Heaviside" │
|
||||
└──────────────────────────────────────────┘
|
||||
|
||||
The FFmpeg Project proudly presents FFmpeg 6.1 "Heaviside", about 8
|
||||
months after the release of FFmpeg 6.0.
|
||||
|
||||
A complete Changelog is available at the root of the project, and the
|
||||
complete Git history on https://git.ffmpeg.org/gitweb/ffmpeg.git
|
||||
|
||||
We hope you will like this release as much as we enjoyed working on it, and
|
||||
as usual, if you have any questions about it, or any FFmpeg related topic,
|
||||
feel free to join us on the #ffmpeg IRC channel (on irc.libera.chat) or ask
|
||||
on the mailing-lists.
|
||||
2
configure
vendored
2
configure
vendored
@@ -6677,7 +6677,7 @@ enabled libaom && require_pkg_config libaom "aom >= 1.0.0" aom/aom_co
|
||||
enabled libaribb24 && { check_pkg_config libaribb24 "aribb24 > 1.0.3" "aribb24/aribb24.h" arib_instance_new ||
|
||||
{ enabled gpl && require_pkg_config libaribb24 aribb24 "aribb24/aribb24.h" arib_instance_new; } ||
|
||||
die "ERROR: libaribb24 requires version higher than 1.0.3 or --enable-gpl."; }
|
||||
enabled libaribcaption && require_pkg_config libaribcaption "libaribcaption >= 0.1.0" "aribcaption/aribcaption.h" aribcc_context_alloc
|
||||
enabled libaribcaption && require_pkg_config libaribcaption "libaribcaption >= 1.1.1" "aribcaption/aribcaption.h" aribcc_context_alloc
|
||||
enabled lv2 && require_pkg_config lv2 lilv-0 "lilv/lilv.h" lilv_world_new
|
||||
enabled libiec61883 && require libiec61883 libiec61883/iec61883.h iec61883_cmp_connect -lraw1394 -lavc1394 -lrom1394 -liec61883
|
||||
enabled libass && require_pkg_config libass "libass >= 0.11.0" ass/ass.h ass_library_init
|
||||
|
||||
@@ -2,174 +2,176 @@ The last version increases of all libraries were on 2023-02-09
|
||||
|
||||
API changes, most recent first:
|
||||
|
||||
2023-10-27 - xxxxxxxxxx - lavu 58.28.100 - channel_layout.h
|
||||
-------- 8< --------- FFmpeg 6.1 was cut here -------- 8< ---------
|
||||
|
||||
2023-10-27 - 52a97642604 - lavu 58.28.100 - channel_layout.h
|
||||
Add AV_CH_LAYOUT_3POINT1POINT2 and AV_CHANNEL_LAYOUT_3POINT1POINT2.
|
||||
Add AV_CH_LAYOUT_5POINT1POINT2_BACK and AV_CHANNEL_LAYOUT_5POINT1POINT2_BACK.
|
||||
Add AV_CH_LAYOUT_5POINT1POINT4_BACK and AV_CHANNEL_LAYOUT_5POINT1POINT4_BACK.
|
||||
Add AV_CH_LAYOUT_7POINT1POINT2 and AV_CHANNEL_LAYOUT_7POINT1POINT2.
|
||||
Add AV_CH_LAYOUT_7POINT1POINT4_BACK and AV_CHANNEL_LAYOUT_7POINT1POINT4_BACK.
|
||||
|
||||
2023-10-06 - xxxxxxxxxx - lavc 60.30.101 - avcodec.h
|
||||
2023-10-06 - 804be7f9e3c - lavc 60.30.101 - avcodec.h
|
||||
AVCodecContext.coded_side_data may now be used during decoding, to be set
|
||||
by user before calling avcodec_open2() for initialization.
|
||||
|
||||
2023-10-06 - xxxxxxxxxx - lavc 60.15.100 - avformat.h
|
||||
2023-10-06 - 5432d2aacad - lavc 60.15.100 - avformat.h
|
||||
Deprecate AVFormatContext.{nb_,}side_data, av_stream_add_side_data(),
|
||||
av_stream_new_side_data(), and av_stream_get_side_data(). Side data fields
|
||||
from AVFormatContext.codecpar should be used from now on.
|
||||
|
||||
2023-10-06 - xxxxxxxxxx - lavc 60.30.100 - codec_par.h
|
||||
2023-10-06 - 21d7cc6fa9a - lavc 60.30.100 - codec_par.h
|
||||
Added {nb_,}coded_side_data to AVCodecParameters.
|
||||
The AVCodecParameters helpers will copy it to and from its AVCodecContext
|
||||
namesake.
|
||||
|
||||
2023-10-06 - xxxxxxxxxx - lavc 60.29.100 - packet.h
|
||||
2023-10-06 - 74279227dd2 - lavc 60.29.100 - packet.h
|
||||
Added av_packet_side_data_new(), av_packet_side_data_add(),
|
||||
av_packet_side_data_get(), av_packet_side_data_remove, and
|
||||
av_packet_side_data_free().
|
||||
|
||||
2023-10-03 - xxxxxxxxxx - lavc 60.28.100 - codec_par.h defs.h
|
||||
2023-10-03 - ea14e8bc302 - lavc 60.28.100 - codec_par.h defs.h
|
||||
Move the definition of enum AVFieldOrder from codec_par.h to defs.h.
|
||||
|
||||
2023-10-03 - xxxxxxxxxx - lavf 60.14.100 - avformat.h
|
||||
2023-10-03 - dd48e49d547 - lavf 60.14.100 - avformat.h
|
||||
Deprecate AVFMT_ALLOW_FLUSH without replacement. Users can always
|
||||
flush any muxer by sending a NULL packet.
|
||||
|
||||
2023-09-28 - xxxxxxxxxx - lavu 58.27.100 - pixfmt.h
|
||||
2023-09-28 - 8e1ef7c38f6 - lavu 58.27.100 - pixfmt.h
|
||||
Add AV_PIX_FMT_GBRAP14BE, AV_PIX_FMT_GBRAP14LE pixel formats.
|
||||
|
||||
2023-09-28 - xxxxxxxxxx - lavu 58.26.100 - hwcontext_cuda.h
|
||||
2023-09-28 - 05f8b2ca0f7 - lavu 58.26.100 - hwcontext_cuda.h
|
||||
Add AV_CUDA_USE_CURRENT_CONTEXT.
|
||||
|
||||
2023-09-19 - xxxxxxxxxx - lavu 58.25.100 - avutil.h
|
||||
2023-09-19 - ba9cd06c763 - lavu 58.25.100 - avutil.h
|
||||
Make AV_TIME_BASE_Q compatible with C++.
|
||||
|
||||
2023-09-xx - xxxxxxxxxx - lavf 60 - avformat.h
|
||||
2023-09-18 - 85e075587dc - lavf 60 - avformat.h
|
||||
Deprecate AVFMT_FLAG_SHORTEST without replacement.
|
||||
|
||||
2023-09-07 - xxxxxxxxxx - lavu 58.24.100 - imgutils.h
|
||||
2023-09-07 - 423b6a7e493 - lavu 58.24.100 - imgutils.h
|
||||
Add av_image_copy2(), a wrapper around the av_image_copy()
|
||||
to overcome limitations of automatic conversions.
|
||||
|
||||
2023-09-07 - xxxxxxxxxx - lavu 58.23.100 - fifo.h
|
||||
2023-09-07 - 5094d1f429e - lavu 58.23.100 - fifo.h
|
||||
Constify the AVFifo pointees in av_fifo_peek() and av_fifo_peek_to_cb().
|
||||
|
||||
2023-09-07 - xxxxxxxxxx - lavu 58.22.100 - audio_fifo.h
|
||||
2023-09-07 - fa4bf5793a0 - lavu 58.22.100 - audio_fifo.h
|
||||
Constify some pointees in av_audio_fifo_write(), av_audio_fifo_read(),
|
||||
av_audio_fifo_peek() and av_audio_fifo_peek_at().
|
||||
|
||||
2023-09-07 - xxxxxxxxxx - lavu 58.21.100 - samplefmt.h
|
||||
2023-09-07 - 9bf31f60960 - lavu 58.21.100 - samplefmt.h
|
||||
Constify some pointees in av_samples_copy() and av_samples_set_silence().
|
||||
|
||||
2023-09-07 - xxxxxxxxxx - lavu 58.20.100 - imgutils.h
|
||||
2023-09-07 - 41285890e03 - lavu 58.20.100 - imgutils.h
|
||||
Constify some pointees in av_image_copy(), av_image_copy_uc_from() and
|
||||
av_image_fill_black().
|
||||
|
||||
2023-09-07 - xxxxxxxxxx - lavf 60.12.100 - avio.h
|
||||
2023-09-07 - 2a68d945cd7 - lavf 60.12.100 - avio.h
|
||||
Constify the buffer pointees in the write_packet and write_data_type
|
||||
callbacks of AVIOContext on the next major bump.
|
||||
|
||||
2023-09-07 - xxxxxxxxxx - lavc 60.26.100 - defs.h
|
||||
2023-09-07 - 8238bc0b5e3 - lavc 60.26.100 - defs.h
|
||||
Add AV_PROFILE_* and AV_LEVEL_* replacements in defs.h for the
|
||||
defines from avcodec.h. The latter are deprecated.
|
||||
|
||||
2023-09-06 - xxxxxxxxxx - lavc 60.25.101 - avcodec.h
|
||||
2023-09-06 - b6627a57f41 - lavc 60.25.101 - avcodec.h
|
||||
AVCodecContext.rc_buffer_size may now be set by decoders.
|
||||
|
||||
2023-09-02 - xxxxxxxxxx - lavu 58.19.100 - executor.h
|
||||
2023-09-02 - 25ecc94d58f - lavu 58.19.100 - executor.h
|
||||
Add AVExecutor API
|
||||
|
||||
2023-09-xx - xxxxxxxxxx - lavc 60.25.100 - avfft.h
|
||||
2023-09-01 - 139e54911c8 - lavc 60.25.100 - avfft.h
|
||||
The entire header will be deprecated and removed in two major bumps.
|
||||
For a replacement to av_dct, av_rdft, av_fft and av_mdct, use
|
||||
the new API from libavutil/tx.h.
|
||||
|
||||
2023-07-xx - xxxxxxxxxx - lavu 58.18.100 - tx.h
|
||||
2023-09-01 - 11e22730e1e - lavu 58.18.100 - tx.h
|
||||
Add AV_TX_REAL_TO_REAL and AV_TX_REAL_TO_IMAGINARY
|
||||
|
||||
2023-08-18 - xxxxxxxxxx - lavu 58.17.100 - channel_layout.h
|
||||
2023-08-18 - ff094f5ebbd - lavu 58.17.100 - channel_layout.h
|
||||
All AV_CHANNEL_LAYOUT_* macros are now compatible with C++ 17 and older.
|
||||
|
||||
2023-08-08 - xxxxxxxxxx - lavu 58.15.100 - video_hint.h
|
||||
2023-08-08 - 5012b4ab4ca - lavu 58.15.100 - video_hint.h
|
||||
Add AVVideoHint API.
|
||||
|
||||
2023-07-xx - xxxxxxxxxx - lavc 60 - avcodec.h
|
||||
2023-08-08 - 5012b4ab4ca - lavc 60 - avcodec.h
|
||||
Deprecate AV_CODEC_FLAG_DROPCHANGED without replacement.
|
||||
|
||||
2023-07-05 - xxxxxxxxxx - lavu 58.14.100 - random_seed.h
|
||||
2023-07-05 - d694c25b44c - lavu 58.14.100 - random_seed.h
|
||||
Add av_random_bytes()
|
||||
|
||||
2023-05-29 - xxxxxxxxxx - lavc 60.16.100 - avcodec.h codec_id.h
|
||||
2023-05-29 - 637afea88ed - lavc 60.16.100 - avcodec.h codec_id.h
|
||||
Add AV_CODEC_ID_EVC, FF_PROFILE_EVC_BASELINE, and FF_PROFILE_EVC_MAIN.
|
||||
|
||||
2023-05-29 - xxxxxxxxxx - lavu 58.12.100 - mathematics.h
|
||||
2023-05-29 - 75918016ab1 - lavu 58.12.100 - mathematics.h
|
||||
Add av_bessel_i0()
|
||||
|
||||
2023-05-xx - xxxxxxxxxx - lavc 60.15.100 - avcodec.h
|
||||
2023-05-29 - f3795e18574 - lavc 60.15.100 - avcodec.h
|
||||
Add AVHWAccel.update_thread_context, AVHWAccel.free_frame_priv,
|
||||
AVHWAccel.flush.
|
||||
|
||||
2023-05-xx - xxxxxxxxxx - lavu 58.11.100 - hwcontext_vulkan.h
|
||||
2023-05-29 - db1d0227812 - lavu 58.11.100 - hwcontext_vulkan.h
|
||||
Add AVVulkanDeviceContext.lock_queue, AVVulkanDeviceContext.unlock_queue,
|
||||
AVVulkanFramesContext.format, AVVulkanFramesContext.lock_frame,
|
||||
AVVulkanFramesContext.unlock_frame, AVVkFrame.queue_family.
|
||||
Deprecate AV_VK_FRAME_FLAG_CONTIGUOUS_MEMORY (use multiplane images instead).
|
||||
|
||||
2023-05-xx - xxxxxxxxxx - lavu 58.10.100 - pixfmt.h
|
||||
2023-05-29 - bef86ba86cc - lavu 58.10.100 - pixfmt.h
|
||||
Add AV_PIX_FMT_P212BE, AV_PIX_FMT_P212LE, AV_PIX_FMT_P412BE,
|
||||
AV_PIX_FMT_P412LE.
|
||||
|
||||
2023-05-xx - xxxxxxxxxx - lavu 58.8.100 - frame.h
|
||||
2023-05-18 - 01d444c077e - lavu 58.8.100 - frame.h
|
||||
Add av_frame_replace().
|
||||
|
||||
2023-05-xx - xxxxxxxxxx - lavu 58 - frame.h
|
||||
2023-05-18 - 63767b79a57 - lavu 58 - frame.h
|
||||
Deprecate AVFrame.palette_has_changed without replacement.
|
||||
|
||||
2023-05-xx - xxxxxxxxxx - lavc 60 - avcodec.h
|
||||
2023-05-15 - 7d1d61cc5f5 - lavc 60 - avcodec.h
|
||||
Depreate AVCodecContext.ticks_per_frame in favor of
|
||||
AVCodecContext.framerate (encoding) and
|
||||
AV_CODEC_PROP_FIELDS (decoding).
|
||||
|
||||
2023-05-xx - xxxxxxxxxx - lavc 60.12.100 - codec_desc.h
|
||||
2023-05-15 - 70433abf7fb - lavc 60.12.100 - codec_desc.h
|
||||
Add AV_CODEC_PROP_FIELDS.
|
||||
|
||||
2023-05-xx - xxxxxxxxxx - lavc 60 - codec.h
|
||||
2023-05-15 - 8b20d0dcb5c - lavc 60 - codec.h
|
||||
Depreate AV_CODEC_CAP_SUBFRAMES without replacement.
|
||||
|
||||
2023-05-xx - xxxxxxxxxx - lavc 60.11.100 - codec_par.h
|
||||
2023-05-07 - c2ae8e30b7f - lavc 60.11.100 - codec_par.h
|
||||
Add AVCodecParameters.framerate.
|
||||
|
||||
2023-05-04 - xxxxxxxxxx - lavu 58.7.100 - frame.h
|
||||
2023-05-04 - 0fc9c1f6828 - lavu 58.7.100 - frame.h
|
||||
Deprecate AVFrame.interlaced_frame, AVFrame.top_field_first, and
|
||||
AVFrame.key_frame.
|
||||
Add AV_FRAME_FLAG_INTERLACED, AV_FRAME_FLAG_TOP_FIELD_FIRST, and
|
||||
AV_FRAME_FLAG_KEY flags as replacement.
|
||||
|
||||
2023-04-10 - xxxxxxxxxx - lavu 58.6.100 - frame.h
|
||||
2023-04-10 - 4eaaa38d3df - lavu 58.6.100 - frame.h
|
||||
av_frame_get_plane_buffer() now accepts const AVFrame*.
|
||||
|
||||
2023-04-04 - xxxxxxxxxx - lavu 58.6.100 - hdr_dynamic_metadata.h
|
||||
2023-04-04 - 61b27b15fc9 - lavu 58.6.100 - hdr_dynamic_metadata.h
|
||||
Add AV_HDR_PLUS_MAX_PAYLOAD_SIZE.
|
||||
av_dynamic_hdr_plus_create_side_data() now accepts a user provided
|
||||
buffer.
|
||||
|
||||
2023-03-xx - xxxxxxxxxx - lavfi 9.5.100 - avfilter.h
|
||||
2023-03-24 - 632c3499319 - lavfi 9.5.100 - avfilter.h
|
||||
Add AVFILTER_FLAG_HWDEVICE.
|
||||
|
||||
2023-03-21 - xxxxxxxxxx - lavu 58.5.100 - hdr_dynamic_metadata.h
|
||||
2023-03-21 - 0a3ce5f7384 - lavu 58.5.100 - hdr_dynamic_metadata.h
|
||||
Add av_dynamic_hdr_plus_from_t35() and av_dynamic_hdr_plus_to_t35()
|
||||
functions to convert between raw T.35 payloads containing dynamic
|
||||
HDR10+ metadata and their parsed representations as AVDynamicHDRPlus.
|
||||
|
||||
2023-03-17 - xxxxxxxxxx - lavu 58.4.100 - hdr_dynamic_vivid_metadata.h
|
||||
2023-03-17 - 3be46ee7672 - lavu 58.4.100 - hdr_dynamic_vivid_metadata.h
|
||||
Add two group of three spline params.
|
||||
Deprecate previous define which only supports one group of params.
|
||||
|
||||
2023-03-02 - xxxxxxxxxx - lavc 60.6.100 - avcodec.h
|
||||
2023-03-02 - 373ef1c4fae - lavc 60.6.100 - avcodec.h
|
||||
Add FF_PROFILE_EAC3_DDP_ATMOS, FF_PROFILE_TRUEHD_ATMOS,
|
||||
FF_PROFILE_DTS_HD_MA_X and FF_PROFILE_DTS_HD_MA_X_IMAX.
|
||||
|
||||
2023-02-25 - xxxxxxxxxx - lavc 60.5.100 - avcodec.h
|
||||
2023-02-25 - f4593775436 - lavc 60.5.100 - avcodec.h
|
||||
Add FF_PROFILE_HEVC_SCC.
|
||||
|
||||
-------- 8< --------- FFmpeg 6.0 was cut here -------- 8< ---------
|
||||
|
||||
@@ -38,7 +38,7 @@ PROJECT_NAME = FFmpeg
|
||||
# could be handy for archiving the generated documentation or if some version
|
||||
# control system is used.
|
||||
|
||||
PROJECT_NUMBER =
|
||||
PROJECT_NUMBER = 6.1
|
||||
|
||||
# Using the PROJECT_BRIEF tag one can provide an optional one line description
|
||||
# for a project that appears at the top of each page and should give viewer a
|
||||
|
||||
2
doc/bootstrap.min.css
vendored
2
doc/bootstrap.min.css
vendored
File diff suppressed because one or more lines are too long
@@ -391,7 +391,7 @@ Specifies the encoding scheme of input subtitle text.
|
||||
|
||||
@table @samp
|
||||
@item auto
|
||||
Automatically detect text encoding.
|
||||
Automatically detect text encoding (default).
|
||||
@item jis
|
||||
8bit-char JIS encoding defined in ARIB STD B24.
|
||||
This encoding used in Japan for ISDB captions.
|
||||
@@ -403,9 +403,6 @@ Latin character encoding defined in ABNT NBR 15606-1.
|
||||
This encoding is used in South America for SBTVD / ISDB-Tb captions.
|
||||
@end table
|
||||
|
||||
The default is @dfn{ass} as same as @dfn{libaribb24} decoder.
|
||||
Some present players (e.g., @dfn{mpv}) expect ASS format for ARIB caption.
|
||||
|
||||
@item -font @var{font_name[,font_name2,...]}
|
||||
Specify comma-separated list of font family names to be used for @dfn{bitmap}
|
||||
or @dfn{ass} type subtitle rendering.
|
||||
@@ -427,12 +424,6 @@ If your player cannot handle AVSubtitles with multiple ASS rectangles properly,
|
||||
set this option to @var{true} or define @env{ASS_SINGLE_RECT=1} to change
|
||||
default behavior at compilation.
|
||||
|
||||
@item -replace_fullwidth_ascii @var{boolean}
|
||||
Specify whether to replace MSZ (Middle Size, half width) fullwidth
|
||||
alphanumerics with halfwidth alphanumerics.
|
||||
|
||||
The default is @var{true}.
|
||||
|
||||
@item -force_outline_text @var{boolean}
|
||||
Specify whether always render outline text for all characters regardless of
|
||||
the indication by charactor style.
|
||||
@@ -459,6 +450,28 @@ Specify whether to render replaced DRCS characters as Unicode characters.
|
||||
|
||||
The default is @var{true}.
|
||||
|
||||
@item -replace_msz_ascii @var{boolean}
|
||||
Specify whether to replace MSZ (Middle Size; half width) fullwidth
|
||||
alphanumerics with halfwidth alphanumerics.
|
||||
|
||||
The default is @var{true}.
|
||||
|
||||
@item -replace_msz_japanese @var{boolean}
|
||||
Specify whether to replace some MSZ (Middle Size; half width) fullwidth
|
||||
japanese special characters with halfwidth ones.
|
||||
|
||||
The default is @var{true}.
|
||||
|
||||
@item -replace_msz_glyph @var{boolean}
|
||||
Specify whether to replace MSZ (Middle Size; half width) characters
|
||||
with halfwidth glyphs if the fonts supports it.
|
||||
This option works under FreeType or DirectWrite renderer
|
||||
with Adobe-Japan1 compliant fonts.
|
||||
e.g., IBM Plex Sans JP, Morisawa BIZ UDGothic, Morisawa BIZ UDMincho,
|
||||
Yu Gothic, Yu Mincho, and Meiryo.
|
||||
|
||||
The default is @var{true}.
|
||||
|
||||
@item -canvas_size @var{image_size}
|
||||
Specify the resolution of the canvas to render subtitles to; usually, this
|
||||
should be frame size of input video.
|
||||
|
||||
106
doc/t2h.pm
106
doc/t2h.pm
@@ -20,8 +20,45 @@
|
||||
# License along with FFmpeg; if not, write to the Free Software
|
||||
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
|
||||
# Texinfo 7.0 changed the syntax of various functions.
|
||||
# Provide a shim for older versions.
|
||||
sub ff_set_from_init_file($$) {
|
||||
my $key = shift;
|
||||
my $value = shift;
|
||||
if (exists &{'texinfo_set_from_init_file'}) {
|
||||
texinfo_set_from_init_file($key, $value);
|
||||
} else {
|
||||
set_from_init_file($key, $value);
|
||||
}
|
||||
}
|
||||
|
||||
sub ff_get_conf($) {
|
||||
my $key = shift;
|
||||
if (exists &{'texinfo_get_conf'}) {
|
||||
texinfo_get_conf($key);
|
||||
} else {
|
||||
get_conf($key);
|
||||
}
|
||||
}
|
||||
|
||||
sub get_formatting_function($$) {
|
||||
my $obj = shift;
|
||||
my $func = shift;
|
||||
|
||||
my $sub = $obj->can('formatting_function');
|
||||
if ($sub) {
|
||||
return $obj->formatting_function($func);
|
||||
} else {
|
||||
return $obj->{$func};
|
||||
}
|
||||
}
|
||||
|
||||
# determine texinfo version
|
||||
my $program_version_num = version->declare(ff_get_conf('PACKAGE_VERSION'))->numify;
|
||||
my $program_version_6_8 = $program_version_num >= 6.008000;
|
||||
|
||||
# no navigation elements
|
||||
set_from_init_file('HEADERS', 0);
|
||||
ff_set_from_init_file('HEADERS', 0);
|
||||
|
||||
sub ffmpeg_heading_command($$$$$)
|
||||
{
|
||||
@@ -55,7 +92,7 @@ sub ffmpeg_heading_command($$$$$)
|
||||
$element = $command->{'parent'};
|
||||
}
|
||||
if ($element) {
|
||||
$result .= &{$self->{'format_element_header'}}($self, $cmdname,
|
||||
$result .= &{get_formatting_function($self, 'format_element_header')}($self, $cmdname,
|
||||
$command, $element);
|
||||
}
|
||||
|
||||
@@ -112,7 +149,11 @@ sub ffmpeg_heading_command($$$$$)
|
||||
$cmdname
|
||||
= $Texinfo::Common::level_to_structuring_command{$cmdname}->[$heading_level];
|
||||
}
|
||||
$result .= &{$self->{'format_heading_text'}}(
|
||||
# format_heading_text expects an array of headings for texinfo >= 7.0
|
||||
if ($program_version_num >= 7.000000) {
|
||||
$heading = [$heading];
|
||||
}
|
||||
$result .= &{get_formatting_function($self,'format_heading_text')}(
|
||||
$self, $cmdname, $heading,
|
||||
$heading_level +
|
||||
$self->get_conf('CHAPTER_HEADER_LEVEL') - 1, $command);
|
||||
@@ -126,23 +167,19 @@ foreach my $command (keys(%Texinfo::Common::sectioning_commands), 'node') {
|
||||
texinfo_register_command_formatting($command, \&ffmpeg_heading_command);
|
||||
}
|
||||
|
||||
# determine if texinfo is at least version 6.8
|
||||
my $program_version_num = version->declare(get_conf('PACKAGE_VERSION'))->numify;
|
||||
my $program_version_6_8 = $program_version_num >= 6.008000;
|
||||
|
||||
# print the TOC where @contents is used
|
||||
if ($program_version_6_8) {
|
||||
set_from_init_file('CONTENTS_OUTPUT_LOCATION', 'inline');
|
||||
ff_set_from_init_file('CONTENTS_OUTPUT_LOCATION', 'inline');
|
||||
} else {
|
||||
set_from_init_file('INLINE_CONTENTS', 1);
|
||||
ff_set_from_init_file('INLINE_CONTENTS', 1);
|
||||
}
|
||||
|
||||
# make chapters <h2>
|
||||
set_from_init_file('CHAPTER_HEADER_LEVEL', 2);
|
||||
ff_set_from_init_file('CHAPTER_HEADER_LEVEL', 2);
|
||||
|
||||
# Do not add <hr>
|
||||
set_from_init_file('DEFAULT_RULE', '');
|
||||
set_from_init_file('BIG_RULE', '');
|
||||
ff_set_from_init_file('DEFAULT_RULE', '');
|
||||
ff_set_from_init_file('BIG_RULE', '');
|
||||
|
||||
# Customized file beginning
|
||||
sub ffmpeg_begin_file($$$)
|
||||
@@ -159,7 +196,18 @@ sub ffmpeg_begin_file($$$)
|
||||
my ($title, $description, $encoding, $date, $css_lines,
|
||||
$doctype, $bodytext, $copying_comment, $after_body_open,
|
||||
$extra_head, $program_and_version, $program_homepage,
|
||||
$program, $generator) = $self->_file_header_informations($command);
|
||||
$program, $generator);
|
||||
if ($program_version_num >= 7.000000) {
|
||||
($title, $description, $encoding, $date, $css_lines,
|
||||
$doctype, $bodytext, $copying_comment, $after_body_open,
|
||||
$extra_head, $program_and_version, $program_homepage,
|
||||
$program, $generator) = $self->_file_header_information($command);
|
||||
} else {
|
||||
($title, $description, $encoding, $date, $css_lines,
|
||||
$doctype, $bodytext, $copying_comment, $after_body_open,
|
||||
$extra_head, $program_and_version, $program_homepage,
|
||||
$program, $generator) = $self->_file_header_informations($command);
|
||||
}
|
||||
|
||||
my $links = $self->_get_links ($filename, $element);
|
||||
|
||||
@@ -223,7 +271,7 @@ if ($program_version_6_8) {
|
||||
sub ffmpeg_end_file($)
|
||||
{
|
||||
my $self = shift;
|
||||
my $program_string = &{$self->{'format_program_string'}}($self);
|
||||
my $program_string = &{get_formatting_function($self,'format_program_string')}($self);
|
||||
my $program_text = <<EOT;
|
||||
<p style="font-size: small;">
|
||||
$program_string
|
||||
@@ -244,7 +292,7 @@ if ($program_version_6_8) {
|
||||
|
||||
# Dummy title command
|
||||
# Ignore title. Title is handled through ffmpeg_begin_file().
|
||||
set_from_init_file('USE_TITLEPAGE_FOR_TITLE', 1);
|
||||
ff_set_from_init_file('USE_TITLEPAGE_FOR_TITLE', 1);
|
||||
sub ffmpeg_title($$$$)
|
||||
{
|
||||
return '';
|
||||
@@ -262,8 +310,14 @@ sub ffmpeg_float($$$$$)
|
||||
my $args = shift;
|
||||
my $content = shift;
|
||||
|
||||
my ($caption, $prepended) = Texinfo::Common::float_name_caption($self,
|
||||
$command);
|
||||
my ($caption, $prepended);
|
||||
if ($program_version_num >= 7.000000) {
|
||||
($caption, $prepended) = Texinfo::Convert::Converter::float_name_caption($self,
|
||||
$command);
|
||||
} else {
|
||||
($caption, $prepended) = Texinfo::Common::float_name_caption($self,
|
||||
$command);
|
||||
}
|
||||
my $caption_text = '';
|
||||
my $prepended_text;
|
||||
my $prepended_save = '';
|
||||
@@ -335,8 +389,13 @@ sub ffmpeg_float($$$$$)
|
||||
$caption->{'args'}->[0], 'float caption');
|
||||
}
|
||||
if ($prepended_text.$caption_text ne '') {
|
||||
$prepended_text = $self->_attribute_class('div','float-caption'). '>'
|
||||
. $prepended_text;
|
||||
if ($program_version_num >= 7.000000) {
|
||||
$prepended_text = $self->html_attribute_class('div',['float-caption']). '>'
|
||||
. $prepended_text;
|
||||
} else {
|
||||
$prepended_text = $self->_attribute_class('div','float-caption'). '>'
|
||||
. $prepended_text;
|
||||
}
|
||||
$caption_text .= '</div>';
|
||||
}
|
||||
my $html_class = '';
|
||||
@@ -349,8 +408,13 @@ sub ffmpeg_float($$$$$)
|
||||
$prepended_text = '';
|
||||
$caption_text = '';
|
||||
}
|
||||
return $self->_attribute_class('div', $html_class). '>' . "\n" .
|
||||
$prepended_text . $caption_text . $content . '</div>';
|
||||
if ($program_version_num >= 7.000000) {
|
||||
return $self->html_attribute_class('div', [$html_class]). '>' . "\n" .
|
||||
$prepended_text . $caption_text . $content . '</div>';
|
||||
} else {
|
||||
return $self->_attribute_class('div', $html_class). '>' . "\n" .
|
||||
$prepended_text . $caption_text . $content . '</div>';
|
||||
}
|
||||
}
|
||||
|
||||
texinfo_register_command_formatting('float',
|
||||
|
||||
@@ -2182,11 +2182,11 @@ static int copy_metadata(Muxer *mux, AVFormatContext *ic,
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
if (type_in == 'g' || type_out == 'g' || !*outspec)
|
||||
if (type_in == 'g' || type_out == 'g' || (!*outspec && !ic))
|
||||
*metadata_global_manual = 1;
|
||||
if (type_in == 's' || type_out == 's' || !*outspec)
|
||||
if (type_in == 's' || type_out == 's' || (!*outspec && !ic))
|
||||
*metadata_streams_manual = 1;
|
||||
if (type_in == 'c' || type_out == 'c' || !*outspec)
|
||||
if (type_in == 'c' || type_out == 'c' || (!*outspec && !ic))
|
||||
*metadata_chapters_manual = 1;
|
||||
|
||||
/* ic is NULL when just disabling automatic mappings */
|
||||
|
||||
@@ -887,6 +887,8 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *picture,
|
||||
}
|
||||
|
||||
if (i >= CFRAME_BUFFER_COUNT) {
|
||||
if (free_index < 0)
|
||||
return AVERROR_INVALIDDATA;
|
||||
i = free_index;
|
||||
f->cfrm[i].id = id;
|
||||
}
|
||||
|
||||
@@ -1284,7 +1284,7 @@ static void predictor_decode_stereo_3950(APEContext *ctx, int count)
|
||||
*decoded1++ = a1;
|
||||
if (num_passes > 1) {
|
||||
int32_t left = a1 - (unsigned)(a0 / 2);
|
||||
int32_t right = left + a0;
|
||||
int32_t right = left + (unsigned)a0;
|
||||
|
||||
if (FFMAX(FFABS(left), FFABS(right)) > (1<<23)) {
|
||||
ctx->interim_mode = !interim_mode;
|
||||
|
||||
@@ -1989,7 +1989,17 @@ static const CodedBitstreamUnitTypeDescriptor cbs_h266_unit_types[] = {
|
||||
CBS_UNIT_TYPE_INTERNAL_REF(VVC_DCI_NUT, H266RawDCI, extension_data.data),
|
||||
CBS_UNIT_TYPE_INTERNAL_REF(VVC_OPI_NUT, H266RawOPI, extension_data.data),
|
||||
CBS_UNIT_TYPE_INTERNAL_REF(VVC_VPS_NUT, H266RawVPS, extension_data.data),
|
||||
CBS_UNIT_TYPE_INTERNAL_REF(VVC_SPS_NUT, H266RawSPS, extension_data.data),
|
||||
{
|
||||
.nb_unit_types = 1,
|
||||
.unit_type.list[0] = VVC_SPS_NUT,
|
||||
.content_type = CBS_CONTENT_TYPE_INTERNAL_REFS,
|
||||
.content_size = sizeof(H266RawSPS),
|
||||
.type.ref = {
|
||||
.nb_offsets = 2,
|
||||
.offsets = { offsetof(H266RawSPS, extension_data.data),
|
||||
offsetof(H266RawSPS, vui.extension_data.data) }
|
||||
},
|
||||
},
|
||||
CBS_UNIT_TYPE_INTERNAL_REF(VVC_PPS_NUT, H266RawPPS, extension_data.data),
|
||||
CBS_UNIT_TYPE_INTERNAL_REF(VVC_PREFIX_APS_NUT, H266RawAPS, extension_data.data),
|
||||
CBS_UNIT_TYPE_INTERNAL_REF(VVC_SUFFIX_APS_NUT, H266RawAPS, extension_data.data),
|
||||
|
||||
@@ -149,7 +149,7 @@ static inline uint64_t get_ue_coef(GetBitContext *gb, const AVDOVIRpuDataHeader
|
||||
|
||||
case RPU_COEFF_FLOAT:
|
||||
fpart.u32 = get_bits_long(gb, 32);
|
||||
return fpart.f32 * (1 << hdr->coef_log2_denom);
|
||||
return fpart.f32 * (1LL << hdr->coef_log2_denom);
|
||||
}
|
||||
|
||||
return 0; /* unreachable */
|
||||
@@ -168,7 +168,7 @@ static inline int64_t get_se_coef(GetBitContext *gb, const AVDOVIRpuDataHeader *
|
||||
|
||||
case RPU_COEFF_FLOAT:
|
||||
fpart.u32 = get_bits_long(gb, 32);
|
||||
return fpart.f32 * (1 << hdr->coef_log2_denom);
|
||||
return fpart.f32 * (1LL << hdr->coef_log2_denom);
|
||||
}
|
||||
|
||||
return 0; /* unreachable */
|
||||
|
||||
@@ -58,8 +58,12 @@ int ff_evc_parse_slice_header(GetBitContext *gb, EVCParserSliceHeader *sh,
|
||||
if (!sh->arbitrary_slice_flag)
|
||||
sh->last_tile_id = get_bits(gb, pps->tile_id_len_minus1 + 1);
|
||||
else {
|
||||
sh->num_remaining_tiles_in_slice_minus1 = get_ue_golomb_long(gb);
|
||||
num_tiles_in_slice = sh->num_remaining_tiles_in_slice_minus1 + 2;
|
||||
unsigned num_remaining_tiles_in_slice_minus1 = get_ue_golomb_long(gb);
|
||||
if (num_remaining_tiles_in_slice_minus1 > EVC_MAX_TILE_ROWS * EVC_MAX_TILE_COLUMNS - 2)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
num_tiles_in_slice = num_remaining_tiles_in_slice_minus1 + 2;
|
||||
sh->num_remaining_tiles_in_slice_minus1 = num_remaining_tiles_in_slice_minus1;
|
||||
for (int i = 0; i < num_tiles_in_slice - 1; ++i)
|
||||
sh->delta_tile_id_minus1[i] = get_ue_golomb_long(gb);
|
||||
}
|
||||
@@ -172,7 +176,11 @@ int ff_evc_derive_poc(const EVCParamSets *ps, const EVCParserSliceHeader *sh,
|
||||
poc->PicOrderCntVal = 0;
|
||||
poc->DocOffset = -1;
|
||||
} else {
|
||||
int SubGopLength = (int)pow(2.0, sps->log2_sub_gop_length);
|
||||
int SubGopLength = 1 << sps->log2_sub_gop_length;
|
||||
|
||||
if (tid > (SubGopLength > 1 ? 1 + av_log2(SubGopLength - 1) : 0))
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (tid == 0) {
|
||||
poc->PicOrderCntVal = poc->prevPicOrderCntVal + SubGopLength;
|
||||
poc->DocOffset = 0;
|
||||
@@ -187,15 +195,16 @@ int ff_evc_derive_poc(const EVCParamSets *ps, const EVCParserSliceHeader *sh,
|
||||
poc->prevPicOrderCntVal += SubGopLength;
|
||||
ExpectedTemporalId = 0;
|
||||
} else
|
||||
ExpectedTemporalId = 1 + (int)log2(poc->DocOffset);
|
||||
ExpectedTemporalId = 1 + av_log2(poc->DocOffset);
|
||||
|
||||
while (tid != ExpectedTemporalId) {
|
||||
poc->DocOffset = (poc->DocOffset + 1) % SubGopLength;
|
||||
if (poc->DocOffset == 0)
|
||||
ExpectedTemporalId = 0;
|
||||
else
|
||||
ExpectedTemporalId = 1 + (int)log2(poc->DocOffset);
|
||||
ExpectedTemporalId = 1 + av_log2(poc->DocOffset);
|
||||
}
|
||||
PocOffset = (int)(SubGopLength * ((2.0 * poc->DocOffset + 1) / (int)pow(2.0, tid) - 2));
|
||||
PocOffset = (int)(SubGopLength * ((2.0 * poc->DocOffset + 1) / (1 << tid) - 2));
|
||||
poc->PicOrderCntVal = poc->prevPicOrderCntVal + PocOffset;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -642,7 +642,7 @@ static int flic_decode_frame_8BPP(AVCodecContext *avctx,
|
||||
"has incorrect size, skipping chunk\n", chunk_size - 6);
|
||||
bytestream2_skip(&g2, chunk_size - 6);
|
||||
} else {
|
||||
for (y_ptr = 0; check_pixel_ptr(y_ptr, 0, pixel_limit, direction) == 0;
|
||||
for (y_ptr = 0; check_pixel_ptr(y_ptr, s->avctx->width, pixel_limit, direction) == 0;
|
||||
y_ptr += s->frame->linesize[0]) {
|
||||
bytestream2_get_buffer(&g2, &pixels[y_ptr],
|
||||
s->avctx->width);
|
||||
@@ -949,7 +949,7 @@ static int flic_decode_frame_15_16BPP(AVCodecContext *avctx,
|
||||
|
||||
if (bytestream2_get_bytes_left(&g2) < 2 * s->avctx->width * s->avctx->height )
|
||||
return AVERROR_INVALIDDATA;
|
||||
for (y_ptr = 0; check_pixel_ptr(y_ptr, 0, pixel_limit, direction) == 0;
|
||||
for (y_ptr = 0; check_pixel_ptr(y_ptr, 2*s->avctx->width, pixel_limit, direction) == 0;
|
||||
y_ptr += s->frame->linesize[0]) {
|
||||
|
||||
pixel_countdown = s->avctx->width;
|
||||
@@ -1235,7 +1235,7 @@ static int flic_decode_frame_24BPP(AVCodecContext *avctx,
|
||||
"bigger than image, skipping chunk\n", chunk_size - 6);
|
||||
bytestream2_skip(&g2, chunk_size - 6);
|
||||
} else {
|
||||
for (y_ptr = 0; check_pixel_ptr(y_ptr, 0, pixel_limit, direction) == 0;
|
||||
for (y_ptr = 0; check_pixel_ptr(y_ptr, 3*s->avctx->width, pixel_limit, direction) == 0;
|
||||
y_ptr += s->frame->linesize[0]) {
|
||||
|
||||
bytestream2_get_buffer(&g2, pixels + y_ptr, 3*s->avctx->width);
|
||||
|
||||
@@ -68,14 +68,16 @@ typedef struct ARIBCaptionContext {
|
||||
|
||||
int subtitle_type;
|
||||
int encoding_scheme;
|
||||
bool ass_single_rect;
|
||||
int ass_single_rect;
|
||||
char *font;
|
||||
bool replace_fullwidth_ascii;
|
||||
bool force_stroke_text;
|
||||
bool ignore_background;
|
||||
bool ignore_ruby;
|
||||
int force_stroke_text;
|
||||
int ignore_background;
|
||||
int ignore_ruby;
|
||||
float stroke_width;
|
||||
bool replace_drcs;
|
||||
int replace_drcs;
|
||||
int replace_msz_ascii;
|
||||
int replace_msz_japanese;
|
||||
int replace_msz_glyph;
|
||||
|
||||
int64_t pts;
|
||||
AVRational time_base;
|
||||
@@ -1004,7 +1006,9 @@ static int aribcaption_init(AVCodecContext *avctx)
|
||||
return AVERROR_EXTERNAL;
|
||||
}
|
||||
aribcc_decoder_set_replace_msz_fullwidth_ascii(ctx->decoder,
|
||||
ctx->replace_fullwidth_ascii);
|
||||
ctx->replace_msz_ascii);
|
||||
aribcc_decoder_set_replace_msz_fullwidth_japanese(ctx->decoder,
|
||||
ctx->replace_msz_japanese);
|
||||
|
||||
/* Similar behavior as ffmpeg tool to set canvas size */
|
||||
if (ctx->canvas_width > 0 && ctx->canvas_height > 0 &&
|
||||
@@ -1057,6 +1061,8 @@ static int aribcaption_init(AVCodecContext *avctx)
|
||||
aribcc_renderer_set_force_no_background(ctx->renderer, ctx->ignore_background);
|
||||
aribcc_renderer_set_force_no_ruby(ctx->renderer, ctx->ignore_ruby);
|
||||
aribcc_renderer_set_stroke_width(ctx->renderer, ctx->stroke_width);
|
||||
aribcc_renderer_set_replace_msz_halfwidth_glyph(ctx->renderer,
|
||||
ctx->replace_msz_glyph);
|
||||
if (ctx->font) {
|
||||
int is_nomem = 0;
|
||||
size_t count = 0;
|
||||
@@ -1132,8 +1138,6 @@ static const AVOption options[] = {
|
||||
OFFSET(ass_single_rect), AV_OPT_TYPE_BOOL, { .i64 = ASS_SINGLE_RECT }, 0, 1, SD },
|
||||
{ "font", "comma-separated font family [ass, bitmap]",
|
||||
OFFSET(font), AV_OPT_TYPE_STRING, { .str = NULL }, 0, 0, SD },
|
||||
{ "replace_fullwidth_ascii", "replace MSZ fullwidth alphanumerics with halfwidth alphanumerics [ass, bitmap]",
|
||||
OFFSET(replace_fullwidth_ascii), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, SD },
|
||||
{ "force_outline_text", "always render characters with outline [(ass), bitmap]",
|
||||
OFFSET(force_stroke_text), AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, SD },
|
||||
{ "ignore_background", "ignore rendering caption background [(ass), bitmap]",
|
||||
@@ -1144,6 +1148,12 @@ static const AVOption options[] = {
|
||||
OFFSET(stroke_width), AV_OPT_TYPE_FLOAT, { .dbl = 1.5 }, 0.0, 3.0, SD },
|
||||
{ "replace_drcs", "replace known DRCS [bitmap]",
|
||||
OFFSET(replace_drcs), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, SD },
|
||||
{ "replace_msz_ascii", "replace MSZ fullwidth alphanumerics with halfwidth alphanumerics [ass, bitmap]",
|
||||
OFFSET(replace_msz_ascii), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, SD },
|
||||
{ "replace_msz_japanese", "replace MSZ fullwidth Japanese with halfwidth [ass, bitmap]",
|
||||
OFFSET(replace_msz_japanese), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, SD },
|
||||
{ "replace_msz_glyph", "replace MSZ characters with halfwidth glyphs [bitmap]",
|
||||
OFFSET(replace_msz_glyph), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, SD },
|
||||
{"canvas_size", "set input video size (WxH or abbreviation) [bitmap]",
|
||||
OFFSET(canvas_width), AV_OPT_TYPE_IMAGE_SIZE, { .str = NULL }, 0, INT_MAX, SD },
|
||||
{ NULL }
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBAVCODEC_VERSION_MINOR 30
|
||||
#define LIBAVCODEC_VERSION_MINOR 31
|
||||
#define LIBAVCODEC_VERSION_MICRO 102
|
||||
|
||||
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
|
||||
|
||||
@@ -356,10 +356,10 @@ static void add_level(VLC_MULTI_ELEM *table, const int is16bit,
|
||||
uint32_t curcode, int curlen,
|
||||
int curlimit, int curlevel,
|
||||
const int minlen, const int max,
|
||||
unsigned* levelcnt, VLC_MULTI_ELEM *info)
|
||||
unsigned* levelcnt, VLC_MULTI_ELEM info)
|
||||
{
|
||||
int max_symbols = VLC_MULTI_MAX_SYMBOLS >> is16bit;
|
||||
for (int i = num-1; i > max; i--) {
|
||||
for (int i = num-1; i >= max; i--) {
|
||||
for (int j = 0; j < 2; j++) {
|
||||
int newlimit, sym;
|
||||
int t = j ? i-1 : i;
|
||||
@@ -372,16 +372,16 @@ static void add_level(VLC_MULTI_ELEM *table, const int is16bit,
|
||||
code = curcode + (buf[t].code >> curlen);
|
||||
newlimit = curlimit - l;
|
||||
l += curlen;
|
||||
if (is16bit) AV_WN16(info->val+2*curlevel, sym);
|
||||
else info->val[curlevel] = sym&0xFF;
|
||||
if (is16bit) AV_WN16(info.val+2*curlevel, sym);
|
||||
else info.val[curlevel] = sym&0xFF;
|
||||
|
||||
if (curlevel) { // let's not add single entries
|
||||
uint32_t val = code >> (32 - numbits);
|
||||
uint32_t nb = val + (1U << (numbits - l));
|
||||
info->len = l;
|
||||
info->num = curlevel+1;
|
||||
info.len = l;
|
||||
info.num = curlevel+1;
|
||||
for (; val < nb; val++)
|
||||
AV_COPY64(table+val, info);
|
||||
AV_COPY64(table+val, &info);
|
||||
levelcnt[curlevel-1]++;
|
||||
}
|
||||
|
||||
@@ -398,23 +398,34 @@ static int vlc_multi_gen(VLC_MULTI_ELEM *table, const VLC *single,
|
||||
const int is16bit, const int nb_codes, const int numbits,
|
||||
VLCcode *buf, void *logctx)
|
||||
{
|
||||
int minbits, maxbits, max = nb_codes-1;
|
||||
int minbits, maxbits, max;
|
||||
unsigned count[VLC_MULTI_MAX_SYMBOLS-1] = { 0, };
|
||||
VLC_MULTI_ELEM info = { { 0, }, 0, 0, };
|
||||
int count0 = 0;
|
||||
|
||||
minbits = buf[0].bits;
|
||||
maxbits = buf[0].bits;
|
||||
for (int j = 0; j < 1<<numbits; j++) {
|
||||
if (single->table[j].len > 0) {
|
||||
count0 ++;
|
||||
j += (1 << (numbits - single->table[j].len)) - 1;
|
||||
}
|
||||
}
|
||||
|
||||
for (int n = 1; n < nb_codes; n++) {
|
||||
minbits = 32;
|
||||
maxbits = 0;
|
||||
|
||||
for (int n = nb_codes - count0; n < nb_codes; n++) {
|
||||
minbits = FFMIN(minbits, buf[n].bits);
|
||||
maxbits = FFMAX(maxbits, buf[n].bits);
|
||||
}
|
||||
maxbits = FFMIN(maxbits, numbits);
|
||||
av_assert0(maxbits <= numbits);
|
||||
|
||||
while (max >= nb_codes/2) {
|
||||
if (buf[max].bits+minbits > maxbits)
|
||||
for (max = nb_codes; max > nb_codes - count0; max--) {
|
||||
// We can only add a code that fits with the shortest other code into the table
|
||||
// We assume the table is sorted by bits and we skip subtables which from our
|
||||
// point of view are basically random corrupted entries
|
||||
// If we have not a single useable vlc we end with max = nb_codes
|
||||
if (buf[max - 1].bits+minbits > numbits)
|
||||
break;
|
||||
max--;
|
||||
}
|
||||
|
||||
for (int j = 0; j < 1<<numbits; j++) {
|
||||
@@ -424,7 +435,7 @@ static int vlc_multi_gen(VLC_MULTI_ELEM *table, const VLC *single,
|
||||
}
|
||||
|
||||
add_level(table, is16bit, nb_codes, numbits, buf,
|
||||
0, 0, FFMIN(maxbits, numbits), 0, minbits, max, count, &info);
|
||||
0, 0, FFMIN(maxbits, numbits), 0, minbits, max, count, info);
|
||||
|
||||
av_log(logctx, AV_LOG_DEBUG, "Joint: %d/%d/%d/%d/%d codes min=%ubits max=%u\n",
|
||||
count[0], count[1], count[2], count[3], count[4], minbits, max);
|
||||
|
||||
@@ -406,10 +406,14 @@ static int vk_h264_start_frame(AVCodecContext *avctx,
|
||||
}
|
||||
|
||||
/* Fill in long-term refs */
|
||||
for (int r = 0, i = h->short_ref_count; i < h->short_ref_count + h->long_ref_count; i++, r++) {
|
||||
for (int r = 0, i = h->short_ref_count; r < H264_MAX_DPB_FRAMES &&
|
||||
i < h->short_ref_count + h->long_ref_count; r++) {
|
||||
if (!h->long_ref[r])
|
||||
continue;
|
||||
|
||||
dpb_slot_index = 0;
|
||||
for (unsigned slot = 0; slot < H264_MAX_PICTURE_COUNT; slot++) {
|
||||
if (h->long_ref[i] == &h->DPB[slot]) {
|
||||
for (unsigned slot = 0; slot < 16; slot++) {
|
||||
if (h->long_ref[r] == &h->DPB[slot]) {
|
||||
dpb_slot_index = slot;
|
||||
break;
|
||||
}
|
||||
@@ -422,6 +426,7 @@ static int vk_h264_start_frame(AVCodecContext *avctx,
|
||||
dpb_slot_index);
|
||||
if (err < 0)
|
||||
return err;
|
||||
i++;
|
||||
}
|
||||
|
||||
hp->h264pic = (StdVideoDecodeH264PictureInfo) {
|
||||
|
||||
@@ -648,8 +648,8 @@ static int add_display_matrix(AVFormatContext *avctx, AVStream *st)
|
||||
av_display_matrix_flip(display_matrix, 1, 0);
|
||||
}
|
||||
|
||||
side_data = av_packet_side_data_new(&st->codecpar->side_data,
|
||||
&st->codecpar->nb_side_data,
|
||||
side_data = av_packet_side_data_new(&st->codecpar->coded_side_data,
|
||||
&st->codecpar->nb_coded_side_data,
|
||||
AV_PKT_DATA_DISPLAYMATRIX,
|
||||
sizeof(display_matrix), 0);
|
||||
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBAVDEVICE_VERSION_MINOR 2
|
||||
#define LIBAVDEVICE_VERSION_MICRO 101
|
||||
#define LIBAVDEVICE_VERSION_MINOR 3
|
||||
#define LIBAVDEVICE_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
|
||||
LIBAVDEVICE_VERSION_MINOR, \
|
||||
|
||||
@@ -293,7 +293,7 @@ static int asink_query_formats(AVFilterContext *ctx)
|
||||
cleanup_redundant_layouts(ctx);
|
||||
for (i = 0; i < NB_ITEMS(buf->channel_layouts); i++)
|
||||
if ((ret = av_channel_layout_from_mask(&layout, buf->channel_layouts[i])) < 0 ||
|
||||
(ret = ff_add_channel_layout(&layouts, &layout) < 0))
|
||||
(ret = ff_add_channel_layout(&layouts, &layout)) < 0)
|
||||
return ret;
|
||||
for (i = 0; i < NB_ITEMS(buf->channel_counts); i++) {
|
||||
layout = FF_COUNT2LAYOUT(buf->channel_counts[i]);
|
||||
|
||||
@@ -288,7 +288,7 @@ int ff_framesync_get_frame(FFFrameSync *fs, unsigned in, AVFrame **rframe,
|
||||
if (need_copy) {
|
||||
if (!(frame = av_frame_clone(frame)))
|
||||
return AVERROR(ENOMEM);
|
||||
if ((ret = ff_inlink_make_frame_writable(fs->parent->inputs[in], &frame) < 0)) {
|
||||
if ((ret = ff_inlink_make_frame_writable(fs->parent->inputs[in], &frame)) < 0) {
|
||||
av_frame_free(&frame);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBAVFILTER_VERSION_MINOR 11
|
||||
#define LIBAVFILTER_VERSION_MINOR 12
|
||||
#define LIBAVFILTER_VERSION_MICRO 100
|
||||
|
||||
|
||||
|
||||
@@ -325,8 +325,8 @@ static int bwdif_vulkan_config_input(AVFilterLink *inlink)
|
||||
|
||||
/* Defaults */
|
||||
vkctx->output_format = input_frames->sw_format;
|
||||
vkctx->output_width = input_frames->width;
|
||||
vkctx->output_height = input_frames->height;
|
||||
vkctx->output_width = inlink->w;
|
||||
vkctx->output_height = inlink->h;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -94,7 +94,7 @@ static void insert_horizontal_pass(FFVkSPIRVShader *shd, int nb_rows, int first,
|
||||
GLSLC(2, #pragma unroll(1) );
|
||||
GLSLF(2, for (r = 0; r < %i; r++) { ,nb_rows);
|
||||
GLSLC(3, prefix_sum = DTYPE(0); );
|
||||
GLSLC(3, offset = uint64_t(int_stride)*(pos.y + r)*T_ALIGN; );
|
||||
GLSLC(3, offset = int_stride * uint64_t(pos.y + r); );
|
||||
GLSLC(3, dst = DataBuffer(uint64_t(integral_data) + offset); );
|
||||
GLSLC(0, );
|
||||
GLSLF(3, for (pos.x = 0; pos.x < width[%i]; pos.x++) { ,plane);
|
||||
@@ -122,7 +122,7 @@ static void insert_vertical_pass(FFVkSPIRVShader *shd, int nb_rows, int first, i
|
||||
GLSLC(0, );
|
||||
GLSLF(1, if (pos.x < width[%i]) { ,plane);
|
||||
GLSLF(2, for (pos.y = 0; pos.y < height[%i]; pos.y++) { ,plane);
|
||||
GLSLC(3, offset = uint64_t(int_stride)*pos.y*T_ALIGN; );
|
||||
GLSLC(3, offset = int_stride * uint64_t(pos.y); );
|
||||
GLSLC(3, dst = DataBuffer(uint64_t(integral_data) + offset); );
|
||||
GLSLC(0, );
|
||||
GLSLC(3, #pragma unroll(1) );
|
||||
@@ -167,40 +167,26 @@ static void insert_weights_pass(FFVkSPIRVShader *shd, int nb_rows, int vert,
|
||||
GLSLC(0, );
|
||||
GLSLC(3, lt = ((pos.x - p) < 0) || ((pos.y - p) < 0); );
|
||||
GLSLC(0, );
|
||||
if (TYPE_ELEMS == 4) {
|
||||
GLSLF(3, src[0] = texture(input_img[%i], pos + offs[0])[%i]; ,plane, comp);
|
||||
GLSLF(3, src[1] = texture(input_img[%i], pos + offs[1])[%i]; ,plane, comp);
|
||||
GLSLF(3, src[2] = texture(input_img[%i], pos + offs[2])[%i]; ,plane, comp);
|
||||
GLSLF(3, src[3] = texture(input_img[%i], pos + offs[3])[%i]; ,plane, comp);
|
||||
} else {
|
||||
for (int i = 0; i < 16; i++)
|
||||
GLSLF(3, src[%i][%i] = texture(input_img[%i], pos + offs[%i])[%i];
|
||||
,i / 4, i % 4, plane, i, comp);
|
||||
|
||||
}
|
||||
GLSLF(3, src[0] = texture(input_img[%i], pos + offs[0])[%i]; ,plane, comp);
|
||||
GLSLF(3, src[1] = texture(input_img[%i], pos + offs[1])[%i]; ,plane, comp);
|
||||
GLSLF(3, src[2] = texture(input_img[%i], pos + offs[2])[%i]; ,plane, comp);
|
||||
GLSLF(3, src[3] = texture(input_img[%i], pos + offs[3])[%i]; ,plane, comp);
|
||||
GLSLC(0, );
|
||||
GLSLC(3, if (lt == false) { );
|
||||
GLSLC(4, a = integral_data.v[(pos.y - p)*int_stride + pos.x - p]; );
|
||||
GLSLC(4, c = integral_data.v[(pos.y - p)*int_stride + pos.x + p]; );
|
||||
GLSLC(4, b = integral_data.v[(pos.y + p)*int_stride + pos.x - p]; );
|
||||
GLSLC(4, d = integral_data.v[(pos.y + p)*int_stride + pos.x + p]; );
|
||||
GLSLC(3, offset = int_stride * uint64_t(pos.y - p); );
|
||||
GLSLC(3, dst = DataBuffer(uint64_t(integral_data) + offset); );
|
||||
GLSLC(4, a = dst.v[pos.x - p]; );
|
||||
GLSLC(4, c = dst.v[pos.x + p]; );
|
||||
GLSLC(3, offset = int_stride * uint64_t(pos.y + p); );
|
||||
GLSLC(3, dst = DataBuffer(uint64_t(integral_data) + offset); );
|
||||
GLSLC(4, b = dst.v[pos.x - p]; );
|
||||
GLSLC(4, d = dst.v[pos.x + p]; );
|
||||
GLSLC(3, } );
|
||||
GLSLC(0, );
|
||||
GLSLC(3, patch_diff = d + a - b - c; );
|
||||
if (TYPE_ELEMS == 4) {
|
||||
GLSLF(3, w = exp(patch_diff * strength[%i]); ,dst_comp);
|
||||
GLSLC(3, w_sum = w[0] + w[1] + w[2] + w[3]; );
|
||||
GLSLC(3, sum = dot(w, src*255); );
|
||||
} else {
|
||||
for (int i = 0; i < 4; i++)
|
||||
GLSLF(3, w[%i] = exp(patch_diff[%i] * strength[%i]); ,i,i,dst_comp);
|
||||
for (int i = 0; i < 4; i++)
|
||||
GLSLF(3, w_sum %s w[%i][0] + w[%i][1] + w[%i][2] + w[%i][3];
|
||||
,!i ? "=" : "+=", i, i, i, i);
|
||||
for (int i = 0; i < 4; i++)
|
||||
GLSLF(3, sum %s dot(w[%i], src[%i]*255);
|
||||
,!i ? "=" : "+=", i, i);
|
||||
}
|
||||
GLSLF(3, w = exp(patch_diff * strength[%i]); ,dst_comp);
|
||||
GLSLC(3, w_sum = w[0] + w[1] + w[2] + w[3]; );
|
||||
GLSLC(3, sum = dot(w, src*255); );
|
||||
GLSLC(0, );
|
||||
if (t > 1) {
|
||||
GLSLF(3, atomicAdd(weights_%i[pos.y*ws_stride[%i] + pos.x], w_sum); ,dst_comp, dst_comp);
|
||||
@@ -220,8 +206,8 @@ typedef struct HorizontalPushData {
|
||||
int32_t patch_size[4];
|
||||
float strength[4];
|
||||
VkDeviceAddress integral_base;
|
||||
uint32_t integral_size;
|
||||
uint32_t int_stride;
|
||||
uint64_t integral_size;
|
||||
uint64_t int_stride;
|
||||
uint32_t xyoffs_start;
|
||||
} HorizontalPushData;
|
||||
|
||||
@@ -275,8 +261,8 @@ static av_cold int init_weights_pipeline(FFVulkanContext *vkctx, FFVkExecPool *e
|
||||
GLSLC(1, ivec4 patch_size; );
|
||||
GLSLC(1, vec4 strength; );
|
||||
GLSLC(1, DataBuffer integral_base; );
|
||||
GLSLC(1, uint integral_size; );
|
||||
GLSLC(1, uint int_stride; );
|
||||
GLSLC(1, uint64_t integral_size; );
|
||||
GLSLC(1, uint64_t int_stride; );
|
||||
GLSLC(1, uint xyoffs_start; );
|
||||
GLSLC(0, }; );
|
||||
GLSLC(0, );
|
||||
@@ -371,13 +357,11 @@ static av_cold int init_weights_pipeline(FFVulkanContext *vkctx, FFVkExecPool *e
|
||||
GLSLF(1, ivec2 offs[%i]; ,TYPE_ELEMS);
|
||||
GLSLC(0, );
|
||||
GLSLC(1, int invoc_idx = int(gl_WorkGroupID.z); );
|
||||
|
||||
GLSLC(1, offset = uint64_t(integral_size)*invoc_idx; );
|
||||
GLSLC(1, dst = DataBuffer(uint64_t(integral_data) + offset); );
|
||||
|
||||
GLSLC(0, );
|
||||
GLSLC(1, offset = integral_size * invoc_idx; );
|
||||
GLSLC(1, integral_data = DataBuffer(uint64_t(integral_base) + offset); );
|
||||
for (int i = 0; i < TYPE_ELEMS*2; i += 2)
|
||||
GLSLF(1, offs[%i] = xyoffsets[xyoffs_start + 2*%i*invoc_idx + %i]; ,i/2,TYPE_ELEMS,i);
|
||||
for (int i = 0; i < TYPE_ELEMS; i++)
|
||||
GLSLF(1, offs[%i] = xyoffsets[xyoffs_start + %i*invoc_idx + %i]; ,i,TYPE_ELEMS,i);
|
||||
GLSLC(0, );
|
||||
GLSLC(1, DTYPE a; );
|
||||
GLSLC(1, DTYPE b; );
|
||||
@@ -759,7 +743,7 @@ static int nlmeans_vulkan_filter_frame(AVFilterLink *link, AVFrame *in)
|
||||
/* Integral */
|
||||
AVBufferRef *integral_buf = NULL;
|
||||
FFVkBuffer *integral_vk;
|
||||
uint32_t int_stride;
|
||||
size_t int_stride;
|
||||
size_t int_size;
|
||||
|
||||
/* Weights/sums */
|
||||
@@ -787,8 +771,8 @@ static int nlmeans_vulkan_filter_frame(AVFilterLink *link, AVFrame *in)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
/* Integral image */
|
||||
int_stride = s->pl_weights.wg_size[0]*s->pl_weights_rows;
|
||||
int_size = int_stride * int_stride * TYPE_SIZE;
|
||||
int_stride = s->pl_weights.wg_size[0]*s->pl_weights_rows*TYPE_SIZE;
|
||||
int_size = s->pl_weights.wg_size[0]*s->pl_weights_rows*int_stride;
|
||||
|
||||
/* Plane dimensions */
|
||||
for (int i = 0; i < desc->nb_components; i++) {
|
||||
@@ -982,9 +966,9 @@ static int nlmeans_vulkan_filter_frame(AVFilterLink *link, AVFrame *in)
|
||||
{ s->patch[0], s->patch[1], s->patch[2], s->patch[3] },
|
||||
{ s->strength[0], s->strength[1], s->strength[2], s->strength[2], },
|
||||
integral_vk->address,
|
||||
int_size,
|
||||
int_stride,
|
||||
offsets_dispatched * 2,
|
||||
(uint64_t)int_size,
|
||||
(uint64_t)int_stride,
|
||||
offsets_dispatched,
|
||||
};
|
||||
|
||||
if (offsets_dispatched) {
|
||||
|
||||
@@ -70,11 +70,17 @@ static const AVOption tpad_options[] = {
|
||||
|
||||
AVFILTER_DEFINE_CLASS(tpad);
|
||||
|
||||
static int needs_drawing(const TPadContext *s) {
|
||||
return (
|
||||
(s->stop_mode == MODE_ADD && (s->pad_stop != 0 || s->stop_duration != 0)) ||
|
||||
(s->start_mode == MODE_ADD && (s->pad_start != 0 || s->start_duration != 0))
|
||||
);
|
||||
}
|
||||
|
||||
static int query_formats(AVFilterContext *ctx)
|
||||
{
|
||||
TPadContext *s = ctx->priv;
|
||||
if ((s->stop_mode == MODE_ADD && s->pad_stop != 0) ||
|
||||
(s->start_mode == MODE_ADD && s->pad_start != 0))
|
||||
if (needs_drawing(s))
|
||||
return ff_set_common_formats(ctx, ff_draw_supported_pixel_formats(0));
|
||||
|
||||
return ff_set_common_formats(ctx, ff_all_formats(AVMEDIA_TYPE_VIDEO));
|
||||
@@ -196,8 +202,7 @@ static int config_input(AVFilterLink *inlink)
|
||||
AVFilterContext *ctx = inlink->dst;
|
||||
TPadContext *s = ctx->priv;
|
||||
|
||||
if ((s->stop_mode == MODE_ADD && s->pad_stop != 0) ||
|
||||
(s->start_mode == MODE_ADD && s->pad_start != 0)) {
|
||||
if (needs_drawing(s)) {
|
||||
ff_draw_init(&s->draw, inlink->format, 0);
|
||||
ff_draw_color(&s->draw, &s->color, s->rgba_color);
|
||||
}
|
||||
|
||||
@@ -139,7 +139,9 @@ static int laf_read_header(AVFormatContext *ctx)
|
||||
s->index = 0;
|
||||
s->stored_index = 0;
|
||||
s->bpp = bpp;
|
||||
if ((int64_t)bpp * st_count * (int64_t)sample_rate >= INT32_MAX)
|
||||
if ((int64_t)bpp * st_count * (int64_t)sample_rate >= INT32_MAX ||
|
||||
(int64_t)bpp * st_count * (int64_t)sample_rate == 0
|
||||
)
|
||||
return AVERROR_INVALIDDATA;
|
||||
s->data = av_calloc(st_count * sample_rate, bpp);
|
||||
if (!s->data)
|
||||
|
||||
@@ -1222,6 +1222,8 @@ static int mov_read_ftyp(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||
int ret = ffio_read_size(pb, type, 4);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
if (c->fc->nb_streams)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
if (strcmp(type, "qt "))
|
||||
c->isom = 1;
|
||||
@@ -4628,6 +4630,10 @@ static int mov_read_trak(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||
MOVStreamContext *sc;
|
||||
int ret;
|
||||
|
||||
if (c->is_still_picture_avif) {
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
||||
st = avformat_new_stream(c->fc, NULL);
|
||||
if (!st) return AVERROR(ENOMEM);
|
||||
st->id = -1;
|
||||
|
||||
@@ -31,8 +31,8 @@
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBAVFORMAT_VERSION_MINOR 15
|
||||
#define LIBAVFORMAT_VERSION_MICRO 101
|
||||
#define LIBAVFORMAT_VERSION_MINOR 16
|
||||
#define LIBAVFORMAT_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
|
||||
LIBAVFORMAT_VERSION_MINOR, \
|
||||
|
||||
@@ -217,7 +217,7 @@ static int vaapi_get_image_format(AVHWDeviceContext *hwdev,
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
return AVERROR(EINVAL);
|
||||
return AVERROR(ENOSYS);
|
||||
}
|
||||
|
||||
static int vaapi_frames_get_constraints(AVHWDeviceContext *hwdev,
|
||||
@@ -817,7 +817,7 @@ static int vaapi_map_frame(AVHWFramesContext *hwfc,
|
||||
err = vaapi_get_image_format(hwfc->device_ctx, dst->format, &image_format);
|
||||
if (err < 0) {
|
||||
// Requested format is not a valid output format.
|
||||
return AVERROR(EINVAL);
|
||||
return err;
|
||||
}
|
||||
|
||||
map = av_malloc(sizeof(*map));
|
||||
@@ -992,7 +992,7 @@ static int vaapi_map_to_memory(AVHWFramesContext *hwfc, AVFrame *dst,
|
||||
if (dst->format != AV_PIX_FMT_NONE) {
|
||||
err = vaapi_get_image_format(hwfc->device_ctx, dst->format, NULL);
|
||||
if (err < 0)
|
||||
return AVERROR(ENOSYS);
|
||||
return err;
|
||||
}
|
||||
|
||||
err = vaapi_map_frame(hwfc, dst, src, flags);
|
||||
|
||||
@@ -298,8 +298,12 @@ static int vkfmt_from_pixfmt2(AVHWDeviceContext *dev_ctx, enum AVPixelFormat p,
|
||||
|
||||
for (int i = 0; i < nb_vk_formats_list; i++) {
|
||||
if (vk_formats_list[i].pixfmt == p) {
|
||||
VkFormatProperties3 fprops = {
|
||||
.sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_3,
|
||||
};
|
||||
VkFormatProperties2 prop = {
|
||||
.sType = VK_STRUCTURE_TYPE_FORMAT_PROPERTIES_2,
|
||||
.pNext = &fprops,
|
||||
};
|
||||
VkFormatFeatureFlagBits2 feats_primary, feats_secondary;
|
||||
int basics_primary = 0, basics_secondary = 0;
|
||||
@@ -310,8 +314,7 @@ static int vkfmt_from_pixfmt2(AVHWDeviceContext *dev_ctx, enum AVPixelFormat p,
|
||||
&prop);
|
||||
|
||||
feats_primary = tiling == VK_IMAGE_TILING_LINEAR ?
|
||||
prop.formatProperties.linearTilingFeatures :
|
||||
prop.formatProperties.optimalTilingFeatures;
|
||||
fprops.linearTilingFeatures : fprops.optimalTilingFeatures;
|
||||
basics_primary = (feats_primary & basic_flags) == basic_flags;
|
||||
storage_primary = !!(feats_primary & VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT);
|
||||
|
||||
@@ -320,8 +323,7 @@ static int vkfmt_from_pixfmt2(AVHWDeviceContext *dev_ctx, enum AVPixelFormat p,
|
||||
vk_formats_list[i].fallback[0],
|
||||
&prop);
|
||||
feats_secondary = tiling == VK_IMAGE_TILING_LINEAR ?
|
||||
prop.formatProperties.linearTilingFeatures :
|
||||
prop.formatProperties.optimalTilingFeatures;
|
||||
fprops.linearTilingFeatures : fprops.optimalTilingFeatures;
|
||||
basics_secondary = (feats_secondary & basic_flags) == basic_flags;
|
||||
storage_secondary = !!(feats_secondary & VK_FORMAT_FEATURE_2_STORAGE_IMAGE_BIT);
|
||||
} else {
|
||||
@@ -1164,6 +1166,11 @@ static int setup_queue_families(AVHWDeviceContext *ctx, VkDeviceCreateInfo *cd)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Only resources created by vulkan_device_create should be released here,
|
||||
* resources created by vulkan_device_init should be released by
|
||||
* vulkan_device_uninit, to make sure we don't free user provided resources,
|
||||
* and there is no leak.
|
||||
*/
|
||||
static void vulkan_device_free(AVHWDeviceContext *ctx)
|
||||
{
|
||||
VulkanDevicePriv *p = ctx->internal->priv;
|
||||
@@ -1183,15 +1190,20 @@ static void vulkan_device_free(AVHWDeviceContext *ctx)
|
||||
if (p->libvulkan)
|
||||
dlclose(p->libvulkan);
|
||||
|
||||
RELEASE_PROPS(hwctx->enabled_inst_extensions, hwctx->nb_enabled_inst_extensions);
|
||||
RELEASE_PROPS(hwctx->enabled_dev_extensions, hwctx->nb_enabled_dev_extensions);
|
||||
}
|
||||
|
||||
static void vulkan_device_uninit(AVHWDeviceContext *ctx)
|
||||
{
|
||||
VulkanDevicePriv *p = ctx->internal->priv;
|
||||
|
||||
for (uint32_t i = 0; i < p->nb_tot_qfs; i++) {
|
||||
pthread_mutex_destroy(p->qf_mutex[i]);
|
||||
av_freep(&p->qf_mutex[i]);
|
||||
}
|
||||
av_freep(&p->qf_mutex);
|
||||
|
||||
RELEASE_PROPS(hwctx->enabled_inst_extensions, hwctx->nb_enabled_inst_extensions);
|
||||
RELEASE_PROPS(hwctx->enabled_dev_extensions, hwctx->nb_enabled_dev_extensions);
|
||||
|
||||
ff_vk_uninit(&p->vkctx);
|
||||
}
|
||||
|
||||
@@ -1654,11 +1666,6 @@ static int vulkan_frames_get_constraints(AVHWDeviceContext *ctx,
|
||||
NULL, NULL, NULL, NULL, 0, 0) >= 0;
|
||||
}
|
||||
|
||||
#if CONFIG_CUDA
|
||||
if (p->dev_is_nvidia)
|
||||
count++;
|
||||
#endif
|
||||
|
||||
constraints->valid_sw_formats = av_malloc_array(count + 1,
|
||||
sizeof(enum AVPixelFormat));
|
||||
if (!constraints->valid_sw_formats)
|
||||
@@ -1674,10 +1681,6 @@ static int vulkan_frames_get_constraints(AVHWDeviceContext *ctx,
|
||||
}
|
||||
}
|
||||
|
||||
#if CONFIG_CUDA
|
||||
if (p->dev_is_nvidia)
|
||||
constraints->valid_sw_formats[count++] = AV_PIX_FMT_CUDA;
|
||||
#endif
|
||||
constraints->valid_sw_formats[count++] = AV_PIX_FMT_NONE;
|
||||
|
||||
constraints->min_width = 1;
|
||||
@@ -2406,12 +2409,22 @@ static int vulkan_transfer_get_formats(AVHWFramesContext *hwfc,
|
||||
enum AVHWFrameTransferDirection dir,
|
||||
enum AVPixelFormat **formats)
|
||||
{
|
||||
enum AVPixelFormat *fmts = av_malloc_array(2, sizeof(*fmts));
|
||||
enum AVPixelFormat *fmts;
|
||||
int n = 2;
|
||||
|
||||
#if CONFIG_CUDA
|
||||
n++;
|
||||
#endif
|
||||
fmts = av_malloc_array(n, sizeof(*fmts));
|
||||
if (!fmts)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
fmts[0] = hwfc->sw_format;
|
||||
fmts[1] = AV_PIX_FMT_NONE;
|
||||
n = 0;
|
||||
fmts[n++] = hwfc->sw_format;
|
||||
#if CONFIG_CUDA
|
||||
fmts[n++] = AV_PIX_FMT_CUDA;
|
||||
#endif
|
||||
fmts[n++] = AV_PIX_FMT_NONE;
|
||||
|
||||
*formats = fmts;
|
||||
return 0;
|
||||
@@ -3702,6 +3715,7 @@ const HWContextType ff_hwcontext_type_vulkan = {
|
||||
.frames_priv_size = sizeof(VulkanFramesPriv),
|
||||
|
||||
.device_init = &vulkan_device_init,
|
||||
.device_uninit = &vulkan_device_uninit,
|
||||
.device_create = &vulkan_device_create,
|
||||
.device_derive = &vulkan_device_derive,
|
||||
|
||||
|
||||
@@ -79,7 +79,7 @@
|
||||
*/
|
||||
|
||||
#define LIBAVUTIL_VERSION_MAJOR 58
|
||||
#define LIBAVUTIL_VERSION_MINOR 28
|
||||
#define LIBAVUTIL_VERSION_MINOR 29
|
||||
#define LIBAVUTIL_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
|
||||
|
||||
@@ -136,8 +136,8 @@ typedef struct AVVideoBlockParams {
|
||||
int32_t delta_qp;
|
||||
} AVVideoBlockParams;
|
||||
|
||||
/*
|
||||
* Get the block at the specified {@code idx}. Must be between 0 and nb_blocks.
|
||||
/**
|
||||
* Get the block at the specified {@code idx}. Must be between 0 and nb_blocks - 1.
|
||||
*/
|
||||
static av_always_inline AVVideoBlockParams*
|
||||
av_video_enc_params_block(AVVideoEncParams *par, unsigned int idx)
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBPOSTPROC_VERSION_MINOR 2
|
||||
#define LIBPOSTPROC_VERSION_MINOR 3
|
||||
#define LIBPOSTPROC_VERSION_MICRO 100
|
||||
|
||||
#define LIBPOSTPROC_VERSION_INT AV_VERSION_INT(LIBPOSTPROC_VERSION_MAJOR, \
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBSWRESAMPLE_VERSION_MINOR 11
|
||||
#define LIBSWRESAMPLE_VERSION_MINOR 12
|
||||
#define LIBSWRESAMPLE_VERSION_MICRO 100
|
||||
|
||||
#define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBSWSCALE_VERSION_MINOR 4
|
||||
#define LIBSWSCALE_VERSION_MINOR 5
|
||||
#define LIBSWSCALE_VERSION_MICRO 100
|
||||
|
||||
#define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
|
||||
|
||||
@@ -221,6 +221,7 @@ int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
|
||||
case AV_CODEC_ID_CFHD: maxpixels /= 16384; break;
|
||||
case AV_CODEC_ID_CINEPAK: maxpixels /= 128; break;
|
||||
case AV_CODEC_ID_COOK: maxsamples /= 1<<20; break;
|
||||
case AV_CODEC_ID_CSCD: maxpixels /= 1024; break;
|
||||
case AV_CODEC_ID_DFA: maxpixels /= 1024; break;
|
||||
case AV_CODEC_ID_DIRAC: maxpixels /= 8192; break;
|
||||
case AV_CODEC_ID_DSICINVIDEO: maxpixels /= 1024; break;
|
||||
|
||||
Reference in New Issue
Block a user