Compare commits
43 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 9047fa1b08 | |||
| e1a84cd003 | |||
| 5c923e26ab | |||
| c471fce2bf | |||
| 5f3122760f | |||
| 43a4771cd0 | |||
| 8a8881d226 | |||
| 7dad4d2cb5 | |||
| a5a1653a9e | |||
| 0a8bf5fcaa | |||
| 29e0d0ef13 | |||
| 93c915a572 | |||
| fcbbd8b394 | |||
| 7df9a56f0d | |||
| 6f890cb104 | |||
| 42692d0f57 | |||
| 259ee609ac | |||
| b6a617c8bf | |||
| a5696b44a6 | |||
| 5bc4a9898c | |||
| b6faea362a | |||
| ca6e0ee7aa | |||
| f851191ce6 | |||
| 60f3904718 | |||
| 56217dccd6 | |||
| 4f72addce1 | |||
| 1f217b4b7d | |||
| 0ce7bd66a7 | |||
| 2803bcd5d5 | |||
| 2cf15d3fc0 | |||
| c9cf8cf9c3 | |||
| 21719ece26 | |||
| b842218402 | |||
| c88ae59e31 | |||
| 711b69c615 | |||
| 511387e49a | |||
| c9a5f7c6ca | |||
| 680ac1aa32 | |||
| b013bbf092 | |||
| d8d4a96414 | |||
| b1da475805 | |||
| b6db764c86 | |||
| 0ab823b47a |
@@ -1,8 +1,6 @@
|
||||
Entries are sorted chronologically from oldest to youngest within each release,
|
||||
releases are sorted from youngest to oldest.
|
||||
|
||||
version <next>:
|
||||
|
||||
|
||||
version 8.1:
|
||||
- ffprobe -codec option
|
||||
|
||||
@@ -0,0 +1,15 @@
|
||||
|
||||
┌──────────────────────────────────────┐
|
||||
│ RELEASE NOTES for FFmpeg 8.1 "Hoare" │
|
||||
└──────────────────────────────────────┘
|
||||
|
||||
The FFmpeg Project proudly presents FFmpeg 8.1 "Hoare", about 7
|
||||
months after the release of FFmpeg 8.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,6 +2,10 @@ The last version increases of all libraries were on 2025-03-28
|
||||
|
||||
API changes, most recent first:
|
||||
|
||||
2026-03-14 - xxxxxxxxxx - lavu 60.26.100 - hwcontext_vulkan.h
|
||||
Deprecate AVVulkanDeviceContext.lock_queue and
|
||||
AVVulkanDeviceContext.unlock_queue without replacement.
|
||||
|
||||
2026-03-07 - c23d56b173a - lavc 62.26.100 - codec_desc.h
|
||||
Add AV_CODEC_PROP_ENHANCEMENT.
|
||||
|
||||
|
||||
+1
-1
@@ -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 = 8.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
|
||||
|
||||
+3
-2
@@ -253,7 +253,6 @@ void term_init(void)
|
||||
/* read a key without blocking */
|
||||
static int read_key(void)
|
||||
{
|
||||
unsigned char ch = -1;
|
||||
#if HAVE_TERMIOS_H
|
||||
int n = 1;
|
||||
struct timeval tv;
|
||||
@@ -265,6 +264,7 @@ static int read_key(void)
|
||||
tv.tv_usec = 0;
|
||||
n = select(1, &rfds, NULL, NULL, &tv);
|
||||
if (n > 0) {
|
||||
unsigned char ch;
|
||||
n = read(0, &ch, 1);
|
||||
if (n == 1)
|
||||
return ch;
|
||||
@@ -289,6 +289,7 @@ static int read_key(void)
|
||||
}
|
||||
//Read it
|
||||
if(nchars != 0) {
|
||||
unsigned char ch;
|
||||
if (read(0, &ch, 1) == 1)
|
||||
return ch;
|
||||
return 0;
|
||||
@@ -300,7 +301,7 @@ static int read_key(void)
|
||||
if(kbhit())
|
||||
return(getch());
|
||||
#endif
|
||||
return ch;
|
||||
return -1;
|
||||
}
|
||||
|
||||
static int decode_interrupt_cb(void *ctx)
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
#include "libavutil/bprint.h"
|
||||
#include "libavutil/mem.h"
|
||||
#include "libavutil/internal.h"
|
||||
|
||||
#endif
|
||||
|
||||
@@ -115,14 +116,22 @@ static void hwctx_lock_queue(void *priv, uint32_t qf, uint32_t qidx)
|
||||
{
|
||||
AVHWDeviceContext *avhwctx = priv;
|
||||
const AVVulkanDeviceContext *hwctx = avhwctx->hwctx;
|
||||
#if FF_API_VULKAN_SYNC_QUEUES
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
hwctx->lock_queue(avhwctx, qf, qidx);
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
}
|
||||
|
||||
static void hwctx_unlock_queue(void *priv, uint32_t qf, uint32_t qidx)
|
||||
{
|
||||
AVHWDeviceContext *avhwctx = priv;
|
||||
const AVVulkanDeviceContext *hwctx = avhwctx->hwctx;
|
||||
#if FF_API_VULKAN_SYNC_QUEUES
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
hwctx->unlock_queue(avhwctx, qf, qidx);
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
}
|
||||
|
||||
static int add_instance_extension(const char **ext, unsigned num_ext,
|
||||
@@ -283,7 +292,11 @@ static void placebo_lock_queue(struct AVHWDeviceContext *dev_ctx,
|
||||
{
|
||||
RendererContext *ctx = dev_ctx->user_opaque;
|
||||
pl_vulkan vk = ctx->placebo_vulkan;
|
||||
#if FF_API_VULKAN_SYNC_QUEUES
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
vk->lock_queue(vk, queue_family, index);
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
}
|
||||
|
||||
static void placebo_unlock_queue(struct AVHWDeviceContext *dev_ctx,
|
||||
@@ -292,7 +305,11 @@ static void placebo_unlock_queue(struct AVHWDeviceContext *dev_ctx,
|
||||
{
|
||||
RendererContext *ctx = dev_ctx->user_opaque;
|
||||
pl_vulkan vk = ctx->placebo_vulkan;
|
||||
#if FF_API_VULKAN_SYNC_QUEUES
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
vk->unlock_queue(vk, queue_family, index);
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
}
|
||||
|
||||
static int get_decode_queue(VkRenderer *renderer, int *index, int *count)
|
||||
@@ -386,8 +403,12 @@ static int create_vk_by_placebo(VkRenderer *renderer,
|
||||
device_ctx->user_opaque = ctx;
|
||||
|
||||
vk_dev_ctx = device_ctx->hwctx;
|
||||
#if FF_API_VULKAN_SYNC_QUEUES
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
vk_dev_ctx->lock_queue = placebo_lock_queue;
|
||||
vk_dev_ctx->unlock_queue = placebo_unlock_queue;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
vk_dev_ctx->get_proc_addr = ctx->placebo_instance->get_proc_addr;
|
||||
|
||||
|
||||
+1
-1
@@ -3238,7 +3238,7 @@ int main(int argc, char **argv)
|
||||
char *buf;
|
||||
char *f_name = NULL, *f_args = NULL;
|
||||
int ret, input_ret;
|
||||
AVTextFormatDataDump data_dump_format_id;
|
||||
AVTextFormatDataDump data_dump_format_id = AV_TEXTFORMAT_DATADUMP_XXD;
|
||||
|
||||
init_dynload();
|
||||
|
||||
|
||||
@@ -1293,7 +1293,8 @@ static void spectrum_decode(AACDecContext *ac, AACUSACConfig *usac,
|
||||
SingleChannelElement *sce = &cpe->ch[ch];
|
||||
AACUsacElemData *ue = &sce->ue;
|
||||
|
||||
spectrum_scale(ac, sce, ue);
|
||||
if (!ue->core_mode)
|
||||
spectrum_scale(ac, sce, ue);
|
||||
}
|
||||
|
||||
if (nb_channels > 1 && us->common_window) {
|
||||
@@ -1343,8 +1344,9 @@ static void spectrum_decode(AACDecContext *ac, AACUSACConfig *usac,
|
||||
if (sce->tns.present && ((nb_channels == 1) || (us->tns_on_lr)))
|
||||
ac->dsp.apply_tns(sce->coeffs, &sce->tns, &sce->ics, 1);
|
||||
|
||||
ac->oc[1].m4ac.frame_length_short ? ac->dsp.imdct_and_windowing_768(ac, sce) :
|
||||
ac->dsp.imdct_and_windowing(ac, sce);
|
||||
if (!sce->ue.core_mode)
|
||||
ac->oc[1].m4ac.frame_length_short ? ac->dsp.imdct_and_windowing_768(ac, sce) :
|
||||
ac->dsp.imdct_and_windowing(ac, sce);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -591,9 +591,6 @@ static int get_freq_strides(int16_t *freq_strides, int band_stride,
|
||||
}
|
||||
}
|
||||
|
||||
for (int i = 0; i <= data_bands; i++)
|
||||
freq_strides[i] = av_clip_uintp2(freq_strides[i], 2);
|
||||
|
||||
return data_bands;
|
||||
}
|
||||
|
||||
@@ -643,7 +640,8 @@ int ff_aac_ec_data_dec(GetBitContext *gb, AACMPSLosslessData *ld,
|
||||
fine_to_coarse(ld->last_data, data_type, start_band, end_band);
|
||||
}
|
||||
|
||||
int data_bands = get_freq_strides(ld->freq_res,
|
||||
int16_t freq_stride_map[MPS_MAX_PARAM_BANDS + 1];
|
||||
int data_bands = get_freq_strides(freq_stride_map,
|
||||
stride_table[ld->freq_res[set_idx]],
|
||||
start_band, end_band);
|
||||
|
||||
@@ -651,7 +649,7 @@ int ff_aac_ec_data_dec(GetBitContext *gb, AACMPSLosslessData *ld,
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
for (int j = 0; j < data_bands; j++)
|
||||
ld->last_data[start_band + j] = ld->last_data[ld->freq_res[j]];
|
||||
ld->last_data[start_band + j] = ld->last_data[freq_stride_map[j]];
|
||||
|
||||
int err = ec_pair_dec(gb,
|
||||
ld->data[set_idx + 0], ld->data[set_idx + 1],
|
||||
@@ -664,11 +662,11 @@ int ff_aac_ec_data_dec(GetBitContext *gb, AACMPSLosslessData *ld,
|
||||
if (data_type == MPS_IPD) {
|
||||
const int mask = ld->coarse_quant[set_idx] ? 0x7 : 0xF;
|
||||
for (int j = 0; j < data_bands; j++)
|
||||
for (int k = ld->freq_res[j + 0]; k < ld->freq_res[j + 1]; k++)
|
||||
for (int k = freq_stride_map[j + 0]; k < freq_stride_map[j + 1]; k++)
|
||||
ld->last_data[k] = ld->data[set_idx + data_pair][start_band + j] & mask;
|
||||
} else {
|
||||
for (int j = 0; j < data_bands; j++)
|
||||
for (int k = ld->freq_res[j + 0]; k < ld->freq_res[j + 1]; k++)
|
||||
for (int k = freq_stride_map[j + 0]; k < freq_stride_map[j + 1]; k++)
|
||||
ld->last_data[k] = ld->data[set_idx + data_pair][start_band + j];
|
||||
}
|
||||
|
||||
|
||||
@@ -152,8 +152,9 @@ int ff_aom_parse_film_grain_sets(AVFilmGrainAFGS1Params *s,
|
||||
payload_4byte = get_bits1(gb);
|
||||
payload_size = get_bits(gb, payload_4byte ? 2 : 8);
|
||||
set_idx = get_bits(gb, 3);
|
||||
|
||||
fgp = av_film_grain_params_alloc(&fgp_size);
|
||||
if (!fgp)
|
||||
if (!fgp || s->sets[set_idx])
|
||||
goto error;
|
||||
aom = &fgp->codec.aom;
|
||||
|
||||
@@ -212,7 +213,7 @@ int ff_aom_parse_film_grain_sets(AVFilmGrainAFGS1Params *s,
|
||||
}
|
||||
|
||||
predict_scaling = get_bits1(gb);
|
||||
if (predict_scaling && (!ref || ref == fgp))
|
||||
if (predict_scaling && !ref)
|
||||
goto error; // prediction must be from valid, different set
|
||||
|
||||
predict_y_scaling = predict_scaling ? get_bits1(gb) : 0;
|
||||
|
||||
@@ -30,6 +30,7 @@
|
||||
#include "h2645_parse.h"
|
||||
#include "h264.h"
|
||||
#include "lcevc.h"
|
||||
#include "lcevc_parse.h"
|
||||
#include "startcode.h"
|
||||
#include "vc1_common.h"
|
||||
#include "vvc.h"
|
||||
@@ -268,22 +269,6 @@ static int extract_extradata_h2645(AVBSFContext *ctx, AVPacket *pkt,
|
||||
return 0;
|
||||
}
|
||||
|
||||
static inline uint64_t get_mb(GetBitContext *s) {
|
||||
int more, i = 0;
|
||||
uint64_t mb = 0;
|
||||
|
||||
do {
|
||||
int byte = get_bits(s, 8);
|
||||
unsigned bits = byte & 0x7f;
|
||||
more = byte & 0x80;
|
||||
mb = (mb << 7) | bits;
|
||||
if (++i == 10)
|
||||
break;
|
||||
} while (more);
|
||||
|
||||
return mb;
|
||||
}
|
||||
|
||||
/**
|
||||
* Rewrite the NALu stripping the unneeded blocks.
|
||||
* Given that length fields coded inside the NALu are not aware of any emulation_3bytes
|
||||
@@ -304,7 +289,8 @@ static int write_lcevc_nalu(AVBSFContext *ctx, PutByteContext *pbc, const H2645N
|
||||
|
||||
while (bytestream2_get_bytes_left(&gbc) > 1) {
|
||||
GetBitContext gb;
|
||||
int payload_size_type, payload_type, payload_size;
|
||||
int payload_size_type, payload_type;
|
||||
uint64_t payload_size;
|
||||
int block_size, raw_block_size, block_end;
|
||||
|
||||
init_get_bits8(&gb, gbc.buffer, bytestream2_get_bytes_left(&gbc));
|
||||
@@ -317,6 +303,9 @@ static int write_lcevc_nalu(AVBSFContext *ctx, PutByteContext *pbc, const H2645N
|
||||
if (payload_size_type == 7)
|
||||
payload_size = get_mb(&gb);
|
||||
|
||||
if (payload_size > INT_MAX - (get_bits_count(&gb) >> 3))
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
block_size = raw_block_size = payload_size + (get_bits_count(&gb) >> 3);
|
||||
if (block_size >= bytestream2_get_bytes_left(&gbc))
|
||||
return AVERROR_INVALIDDATA;
|
||||
@@ -380,8 +369,9 @@ static int extract_extradata_lcevc(AVBSFContext *ctx, AVPacket *pkt,
|
||||
for (i = 0; i < s->h2645_pkt.nb_nals; i++) {
|
||||
H2645NAL *nal = &s->h2645_pkt.nals[i];
|
||||
if (val_in_array(extradata_nal_types, nb_extradata_nal_types, nal->type)) {
|
||||
bytestream2_init_writer(&pb_extradata, NULL, 0);
|
||||
// dummy pass to find sc, gc or ai
|
||||
// dummy pass to find sc, gc or ai. A dummy pointer is used to prevent
|
||||
// UB in PutByteContext. Nothing will be written.
|
||||
bytestream2_init_writer(&pb_extradata, nal->data, 0);
|
||||
if (!write_lcevc_nalu(ctx, &pb_extradata, nal, 0))
|
||||
extradata_size += nal->raw_size + 3;
|
||||
}
|
||||
@@ -407,14 +397,10 @@ static int extract_extradata_lcevc(AVBSFContext *ctx, AVPacket *pkt,
|
||||
return AVERROR(ENOMEM);
|
||||
}
|
||||
|
||||
*data = extradata;
|
||||
*size = 0;
|
||||
|
||||
bytestream2_init_writer(&pb_extradata, extradata, extradata_size);
|
||||
if (s->remove)
|
||||
bytestream2_init_writer(&pb_filtered_data, filtered_buf->data, filtered_size);
|
||||
|
||||
filtered_size = 0;
|
||||
for (i = 0; i < s->h2645_pkt.nb_nals; i++) {
|
||||
H2645NAL *nal = &s->h2645_pkt.nals[i];
|
||||
if (val_in_array(extradata_nal_types, nb_extradata_nal_types,
|
||||
@@ -422,33 +408,34 @@ static int extract_extradata_lcevc(AVBSFContext *ctx, AVPacket *pkt,
|
||||
bytestream2_put_be24(&pb_extradata, 1); //startcode
|
||||
ret = write_lcevc_nalu(ctx, &pb_extradata, nal, 0);
|
||||
if (ret < 0) {
|
||||
av_freep(data);
|
||||
av_freep(&extradata);
|
||||
av_buffer_unref(&filtered_buf);
|
||||
return ret;
|
||||
}
|
||||
*size += ret;
|
||||
if (s->remove) {
|
||||
bytestream2_put_be24(&pb_filtered_data, 1); //startcode
|
||||
ret = write_lcevc_nalu(ctx, &pb_filtered_data, nal, 1);
|
||||
if (ret < 0) {
|
||||
av_freep(data);
|
||||
av_freep(&extradata);
|
||||
av_buffer_unref(&filtered_buf);
|
||||
return ret;
|
||||
}
|
||||
filtered_size += ret;
|
||||
}
|
||||
} else if (s->remove) {
|
||||
bytestream2_put_be24(&pb_filtered_data, 1); //startcode
|
||||
bytestream2_put_bufferu(&pb_filtered_data, nal->raw_data, nal->raw_size);
|
||||
filtered_size += nal->raw_size;
|
||||
}
|
||||
}
|
||||
*data = extradata;
|
||||
*size = bytestream2_tell_p(&pb_extradata);
|
||||
av_assert0(*size <= extradata_size);
|
||||
|
||||
if (s->remove) {
|
||||
av_assert0(bytestream2_tell_p(&pb_filtered_data) <= filtered_size);
|
||||
av_buffer_unref(&pkt->buf);
|
||||
pkt->buf = filtered_buf;
|
||||
pkt->data = filtered_buf->data;
|
||||
pkt->size = filtered_size;
|
||||
pkt->size = bytestream2_tell_p(&pb_filtered_data);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1216,7 +1216,7 @@ static int FUNC(sps)(CodedBitstreamContext *ctx, RWContext *rw,
|
||||
int num_subpic_cols = tmp_width_val /
|
||||
(current->sps_subpic_width_minus1[0] + 1);
|
||||
if (tmp_width_val % (current->sps_subpic_width_minus1[0] + 1) ||
|
||||
tmp_height_val % (current->sps_subpic_width_minus1[0] + 1) ||
|
||||
tmp_height_val % (current->sps_subpic_height_minus1[0] + 1) ||
|
||||
current->sps_num_subpics_minus1 !=
|
||||
(num_subpic_cols * tmp_height_val /
|
||||
(current->sps_subpic_height_minus1[0] + 1) - 1))
|
||||
@@ -1971,6 +1971,8 @@ static int FUNC(pps) (CodedBitstreamContext *ctx, RWContext *rw,
|
||||
current->slice_top_left_tile_idx[i] = tile_idx;
|
||||
tile_x = tile_idx % current->num_tile_columns;
|
||||
tile_y = tile_idx / current->num_tile_columns;
|
||||
if (tile_y >= current->num_tile_rows)
|
||||
return AVERROR_INVALIDDATA;
|
||||
if (tile_x != current->num_tile_columns - 1) {
|
||||
ues(pps_slice_width_in_tiles_minus1[i],
|
||||
0, current->num_tile_columns - 1 - tile_x, 1, i);
|
||||
@@ -3506,7 +3508,7 @@ static int FUNC(slice_header) (CodedBitstreamContext *ctx, RWContext *rw,
|
||||
tile_idx <=
|
||||
current->sh_slice_address +
|
||||
current->sh_num_tiles_in_slice_minus1; tile_idx++) {
|
||||
tile_y = tile_idx / pps->num_tile_rows;
|
||||
tile_y = tile_idx / pps->num_tile_columns;
|
||||
height = pps->row_height_val[tile_y];
|
||||
current->num_entry_points += (entropy_sync ? height : 1);
|
||||
}
|
||||
|
||||
@@ -637,6 +637,9 @@ static int piz_uncompress(const EXRContext *s, const uint8_t *src, int ssize,
|
||||
max_non_zero - min_non_zero + 1);
|
||||
memset(td->bitmap + max_non_zero + 1, 0, BITMAP_SIZE - max_non_zero - 1);
|
||||
|
||||
if (bytestream2_get_bytes_left(&gb) < 4)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
maxval = reverse_lut(td->bitmap, td->lut);
|
||||
|
||||
bytestream2_skip(&gb, 4);
|
||||
|
||||
@@ -241,7 +241,7 @@ static int vulkan_encode_ffv1_submit_frame(AVCodecContext *avctx,
|
||||
if (maxsize < fv->max_heap_size) {
|
||||
out_buf_flags = VK_MEMORY_PROPERTY_DEVICE_LOCAL_BIT;
|
||||
/* If we can't map host memory, we can't let the GPU copy its buffer. */
|
||||
if (!fv->s.extensions & FF_VK_EXT_EXTERNAL_HOST_MEMORY)
|
||||
if (!(fv->s.extensions & FF_VK_EXT_EXTERNAL_HOST_MEMORY))
|
||||
out_buf_flags |= VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT;
|
||||
} else {
|
||||
out_buf_flags = VK_MEMORY_PROPERTY_HOST_VISIBLE_BIT |
|
||||
|
||||
+103
-67
@@ -159,92 +159,128 @@ static int decode_registered_user_data(H2645SEI *h, GetByteContext *gb,
|
||||
}
|
||||
|
||||
/* itu_t_t35_payload_byte follows */
|
||||
provider_code = bytestream2_get_be16u(gb);
|
||||
|
||||
if (country_code == ITU_T_T35_COUNTRY_CODE_US && provider_code == ITU_T_T35_PROVIDER_CODE_ATSC) {
|
||||
uint32_t user_identifier;
|
||||
switch (country_code) {
|
||||
case ITU_T_T35_COUNTRY_CODE_US:
|
||||
provider_code = bytestream2_get_be16u(gb);
|
||||
|
||||
if (bytestream2_get_bytes_left(gb) < 4)
|
||||
return AVERROR_INVALIDDATA;
|
||||
switch (provider_code) {
|
||||
case ITU_T_T35_PROVIDER_CODE_ATSC: {
|
||||
uint32_t user_identifier;
|
||||
|
||||
user_identifier = bytestream2_get_be32u(gb);
|
||||
switch (user_identifier) {
|
||||
case MKBETAG('D', 'T', 'G', '1'): // afd_data
|
||||
return decode_registered_user_data_afd(&h->afd, gb);
|
||||
case MKBETAG('G', 'A', '9', '4'): // closed captions
|
||||
return decode_registered_user_data_closed_caption(&h->a53_caption, gb);
|
||||
default:
|
||||
av_log(logctx, AV_LOG_VERBOSE,
|
||||
"Unsupported User Data Registered ITU-T T35 SEI message (atsc user_identifier = 0x%04x)\n",
|
||||
user_identifier);
|
||||
if (bytestream2_get_bytes_left(gb) < 4)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
user_identifier = bytestream2_get_be32u(gb);
|
||||
switch (user_identifier) {
|
||||
case MKBETAG('D', 'T', 'G', '1'): // afd_data
|
||||
return decode_registered_user_data_afd(&h->afd, gb);
|
||||
case MKBETAG('G', 'A', '9', '4'): // closed captions
|
||||
return decode_registered_user_data_closed_caption(&h->a53_caption, gb);
|
||||
default:
|
||||
av_log(logctx, AV_LOG_VERBOSE,
|
||||
"Unsupported User Data Registered ITU-T T35 SEI message (atsc user_identifier = 0x%04x)\n",
|
||||
user_identifier);
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
} else if (country_code == ITU_T_T35_COUNTRY_CODE_UK && provider_code == ITU_T_T35_PROVIDER_CODE_VNOVA) {
|
||||
#if CONFIG_HEVC_SEI
|
||||
case ITU_T_T35_PROVIDER_CODE_AOM: {
|
||||
const uint16_t aom_grain_provider_oriented_code = 0x0001;
|
||||
uint16_t provider_oriented_code;
|
||||
|
||||
if (!IS_HEVC(codec_id))
|
||||
break;
|
||||
|
||||
if (bytestream2_get_bytes_left(gb) < 2)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
provider_oriented_code = bytestream2_get_byteu(gb);
|
||||
if (provider_oriented_code == aom_grain_provider_oriented_code) {
|
||||
return ff_aom_parse_film_grain_sets(&h->aom_film_grain,
|
||||
gb->buffer,
|
||||
bytestream2_get_bytes_left(gb));
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ITU_T_T35_PROVIDER_CODE_SAMSUNG: {
|
||||
// A/341 Amendment - 2094-40
|
||||
const uint16_t smpte2094_40_provider_oriented_code = 0x0001;
|
||||
const uint8_t smpte2094_40_application_identifier = 0x04;
|
||||
uint16_t provider_oriented_code;
|
||||
uint8_t application_identifier;
|
||||
|
||||
if (!IS_HEVC(codec_id))
|
||||
break;
|
||||
|
||||
if (bytestream2_get_bytes_left(gb) < 3)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
provider_oriented_code = bytestream2_get_be16u(gb);
|
||||
application_identifier = bytestream2_get_byteu(gb);
|
||||
if (provider_oriented_code == smpte2094_40_provider_oriented_code &&
|
||||
application_identifier == smpte2094_40_application_identifier) {
|
||||
return decode_registered_user_data_dynamic_hdr_plus(&h->dynamic_hdr_plus, gb);
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case ITU_T_T35_COUNTRY_CODE_UK:
|
||||
bytestream2_skipu(gb, 1); // t35_uk_country_code_second_octet
|
||||
if (bytestream2_get_bytes_left(gb) < 2)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
bytestream2_skipu(gb, 1); // user_data_type_code
|
||||
return decode_registered_user_data_lcevc(&h->lcevc, gb);
|
||||
}
|
||||
provider_code = bytestream2_get_be16u(gb);
|
||||
|
||||
switch (provider_code) {
|
||||
case ITU_T_T35_PROVIDER_CODE_VNOVA:
|
||||
if (bytestream2_get_bytes_left(gb) < 2)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
return decode_registered_user_data_lcevc(&h->lcevc, gb);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
#if CONFIG_HEVC_SEI
|
||||
else if (country_code == ITU_T_T35_COUNTRY_CODE_CN && provider_code == ITU_T_T35_PROVIDER_CODE_HDR_VIVID) {
|
||||
case ITU_T_T35_COUNTRY_CODE_CN: {
|
||||
const uint16_t cuva_provider_oriented_code = 0x0005;
|
||||
uint16_t provider_oriented_code;
|
||||
|
||||
if (!IS_HEVC(codec_id))
|
||||
goto unsupported_provider_code;
|
||||
provider_code = bytestream2_get_be16u(gb);
|
||||
|
||||
if (bytestream2_get_bytes_left(gb) < 2)
|
||||
return AVERROR_INVALIDDATA;
|
||||
switch (provider_code) {
|
||||
case ITU_T_T35_PROVIDER_CODE_HDR_VIVID:
|
||||
if (!IS_HEVC(codec_id))
|
||||
break;
|
||||
|
||||
provider_oriented_code = bytestream2_get_be16u(gb);
|
||||
if (provider_oriented_code == cuva_provider_oriented_code) {
|
||||
return decode_registered_user_data_dynamic_hdr_vivid(&h->dynamic_hdr_vivid, gb);
|
||||
}
|
||||
} else if(country_code == ITU_T_T35_COUNTRY_CODE_US && provider_code == ITU_T_T35_PROVIDER_CODE_SAMSUNG) {
|
||||
// A/341 Amendment - 2094-40
|
||||
const uint16_t smpte2094_40_provider_oriented_code = 0x0001;
|
||||
const uint8_t smpte2094_40_application_identifier = 0x04;
|
||||
uint16_t provider_oriented_code;
|
||||
uint8_t application_identifier;
|
||||
|
||||
if (!IS_HEVC(codec_id))
|
||||
goto unsupported_provider_code;
|
||||
|
||||
if (bytestream2_get_bytes_left(gb) < 3)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
provider_oriented_code = bytestream2_get_be16u(gb);
|
||||
application_identifier = bytestream2_get_byteu(gb);
|
||||
if (provider_oriented_code == smpte2094_40_provider_oriented_code &&
|
||||
application_identifier == smpte2094_40_application_identifier) {
|
||||
return decode_registered_user_data_dynamic_hdr_plus(&h->dynamic_hdr_plus, gb);
|
||||
}
|
||||
} else if (country_code == ITU_T_T35_COUNTRY_CODE_US && provider_code == ITU_T_T35_PROVIDER_CODE_AOM) {
|
||||
const uint16_t aom_grain_provider_oriented_code = 0x0001;
|
||||
uint16_t provider_oriented_code;
|
||||
|
||||
if (!IS_HEVC(codec_id))
|
||||
goto unsupported_provider_code;
|
||||
|
||||
if (bytestream2_get_bytes_left(gb) < 2)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
provider_oriented_code = bytestream2_get_byteu(gb);
|
||||
if (provider_oriented_code == aom_grain_provider_oriented_code) {
|
||||
return ff_aom_parse_film_grain_sets(&h->aom_film_grain,
|
||||
gb->buffer,
|
||||
bytestream2_get_bytes_left(gb));
|
||||
if (bytestream2_get_bytes_left(gb) < 2)
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
provider_oriented_code = bytestream2_get_be16u(gb);
|
||||
if (provider_oriented_code == cuva_provider_oriented_code) {
|
||||
return decode_registered_user_data_dynamic_hdr_vivid(&h->dynamic_hdr_vivid, gb);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
else {
|
||||
unsupported_provider_code:
|
||||
av_log(logctx, AV_LOG_VERBOSE,
|
||||
"Unsupported User Data Registered ITU-T T35 SEI message (country_code = %d, provider_code = %d)\n",
|
||||
country_code, provider_code);
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
av_log(logctx, AV_LOG_VERBOSE,
|
||||
"Unsupported User Data Registered ITU-T T35 SEI message (country_code = %d, provider_code = %d)\n",
|
||||
country_code, provider_code);
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
@@ -1979,6 +1979,12 @@ static int h264_slice_init(H264Context *h, H264SliceContext *sl,
|
||||
h->ps.pps->chroma_qp_index_offset[1]) +
|
||||
6 * (h->ps.sps->bit_depth_luma - 8);
|
||||
|
||||
// slice_table is uint16_t initialized to 0xFFFF as a sentinel.
|
||||
if (h->current_slice >= 0xFFFE) {
|
||||
av_log(h->avctx, AV_LOG_ERROR, "Too many slices (%d)\n", h->current_slice + 1);
|
||||
return AVERROR_PATCHWELCOME;
|
||||
}
|
||||
|
||||
sl->slice_num = ++h->current_slice;
|
||||
|
||||
if (sl->slice_num)
|
||||
|
||||
+1
-3
@@ -30,10 +30,8 @@
|
||||
// - CN providers
|
||||
#define ITU_T_T35_PROVIDER_CODE_HDR_VIVID 0x0004
|
||||
// - UK providers
|
||||
// V-Nova should be 0x5000 according to UK Register of Manufacturer Codes
|
||||
// https://www.cix.co.uk/~bpechey/H221/h221code.htm
|
||||
// but FFmpeg has been using 0x0050
|
||||
#define ITU_T_T35_PROVIDER_CODE_VNOVA 0x0050
|
||||
#define ITU_T_T35_PROVIDER_CODE_VNOVA 0x5000
|
||||
// - US providers
|
||||
#define ITU_T_T35_PROVIDER_CODE_ATSC 0x0031
|
||||
#define ITU_T_T35_PROVIDER_CODE_DOLBY 0x003B
|
||||
|
||||
@@ -0,0 +1,42 @@
|
||||
/*
|
||||
* 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 AVCODEC_LCEVC_PARSE_H
|
||||
#define AVCODEC_LCEVC_PARSE_H
|
||||
|
||||
#include <stdint.h>
|
||||
|
||||
#include "get_bits.h"
|
||||
|
||||
static inline uint64_t get_mb(GetBitContext *s) {
|
||||
int more, i = 0;
|
||||
uint64_t mb = 0;
|
||||
|
||||
do {
|
||||
int byte = get_bits(s, 8);
|
||||
unsigned bits = byte & 0x7f;
|
||||
more = byte & 0x80;
|
||||
mb = (mb << 7) | bits;
|
||||
if (++i == 10)
|
||||
break;
|
||||
} while (more);
|
||||
|
||||
return mb;
|
||||
}
|
||||
|
||||
#endif /* AVCODEC_LCEVC_PARSE_H */
|
||||
@@ -25,6 +25,7 @@
|
||||
#include "get_bits.h"
|
||||
#include "h2645_parse.h"
|
||||
#include "lcevc.h"
|
||||
#include "lcevc_parse.h"
|
||||
#include "parser.h"
|
||||
#include "parser_internal.h"
|
||||
|
||||
@@ -100,22 +101,6 @@ static const struct {
|
||||
{ 7680, 4800 },
|
||||
};
|
||||
|
||||
static inline uint64_t get_mb(GetBitContext *s) {
|
||||
int more, i = 0;
|
||||
uint64_t mb = 0;
|
||||
|
||||
do {
|
||||
int byte = get_bits(s, 8);
|
||||
unsigned bits = byte & 0x7f;
|
||||
more = byte & 0x80;
|
||||
mb = (mb << 7) | bits;
|
||||
if (++i == 10)
|
||||
break;
|
||||
} while (more);
|
||||
|
||||
return mb;
|
||||
}
|
||||
|
||||
static int parse_nal_unit(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
const H2645NAL *nal)
|
||||
{
|
||||
@@ -125,10 +110,13 @@ static int parse_nal_unit(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
|
||||
while (bytestream2_get_bytes_left(&gbc) > 1) {
|
||||
GetBitContext gb;
|
||||
int payload_size_type, payload_type, payload_size;
|
||||
uint64_t payload_size;
|
||||
int payload_size_type, payload_type;
|
||||
int block_size;
|
||||
|
||||
init_get_bits8(&gb, gbc.buffer, bytestream2_get_bytes_left(&gbc));
|
||||
int ret = init_get_bits8(&gb, gbc.buffer, bytestream2_get_bytes_left(&gbc));
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
payload_size_type = get_bits(&gb, 3);
|
||||
payload_type = get_bits(&gb, 5);
|
||||
@@ -138,6 +126,9 @@ static int parse_nal_unit(AVCodecParserContext *s, AVCodecContext *avctx,
|
||||
if (payload_size_type == 7)
|
||||
payload_size = get_mb(&gb);
|
||||
|
||||
if (payload_size > INT_MAX - (get_bits_count(&gb) >> 3))
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
block_size = payload_size + (get_bits_count(&gb) >> 3);
|
||||
if (block_size >= bytestream2_get_bytes_left(&gbc))
|
||||
return AVERROR_INVALIDDATA;
|
||||
|
||||
+2
-2
@@ -175,7 +175,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
int height = avctx->height; // Real image height
|
||||
unsigned int mszh_dlen;
|
||||
unsigned char yq, y1q, uq, vq;
|
||||
int uqvq, ret;
|
||||
int ret;
|
||||
unsigned int mthread_inlen, mthread_outlen;
|
||||
unsigned int len = buf_size;
|
||||
int linesize, offset;
|
||||
@@ -306,7 +306,7 @@ static int decode_frame(AVCodecContext *avctx, AVFrame *frame,
|
||||
for (row = 0; row < height; row++) {
|
||||
pixel_ptr = row * width * 3;
|
||||
yq = encoded[pixel_ptr++];
|
||||
uqvq = AV_RL16(encoded+pixel_ptr);
|
||||
unsigned uqvq = AV_RL16(encoded+pixel_ptr);
|
||||
pixel_ptr += 2;
|
||||
for (col = 1; col < width; col++) {
|
||||
encoded[pixel_ptr] = yq -= encoded[pixel_ptr];
|
||||
|
||||
@@ -463,6 +463,8 @@ int ff_celt_decode_frame(CeltFrame *f, OpusRangeCoder *rc,
|
||||
block->emph_coeff,
|
||||
ff_opus_deemph_weights,
|
||||
frame_size);
|
||||
if (!isnormal(block->emph_coeff))
|
||||
block->emph_coeff = 0.0;
|
||||
}
|
||||
|
||||
if (channels == 1)
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBAVCODEC_VERSION_MINOR 29
|
||||
#define LIBAVCODEC_VERSION_MINOR 28
|
||||
#define LIBAVCODEC_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVCODEC_VERSION_INT AV_VERSION_INT(LIBAVCODEC_VERSION_MAJOR, \
|
||||
|
||||
@@ -343,6 +343,8 @@ static int parse_mb_skip(WMV2DecContext *w)
|
||||
mb_type[mb_y * h->c.mb_stride + mb_x] =
|
||||
MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_FORWARD_MV;
|
||||
} else {
|
||||
if (get_bits_left(&h->gb) < h->c.mb_width)
|
||||
return AVERROR_INVALIDDATA;
|
||||
for (int mb_x = 0; mb_x < h->c.mb_width; mb_x++)
|
||||
mb_type[mb_y * h->c.mb_stride + mb_x] =
|
||||
(get_bits1(&h->gb) ? MB_TYPE_SKIP : 0) | MB_TYPE_16x16 | MB_TYPE_FORWARD_MV;
|
||||
@@ -358,6 +360,8 @@ static int parse_mb_skip(WMV2DecContext *w)
|
||||
mb_type[mb_y * h->c.mb_stride + mb_x] =
|
||||
MB_TYPE_SKIP | MB_TYPE_16x16 | MB_TYPE_FORWARD_MV;
|
||||
} else {
|
||||
if (get_bits_left(&h->gb) < h->c.mb_height)
|
||||
return AVERROR_INVALIDDATA;
|
||||
for (int mb_y = 0; mb_y < h->c.mb_height; mb_y++)
|
||||
mb_type[mb_y * h->c.mb_stride + mb_x] =
|
||||
(get_bits1(&h->gb) ? MB_TYPE_SKIP : 0) | MB_TYPE_16x16 | MB_TYPE_FORWARD_MV;
|
||||
|
||||
+1
-1
@@ -68,7 +68,7 @@ static av_cold int xan_decode_init(AVCodecContext *avctx)
|
||||
}
|
||||
|
||||
s->buffer_size = avctx->width * avctx->height;
|
||||
s->y_buffer = av_malloc(s->buffer_size);
|
||||
s->y_buffer = av_mallocz(s->buffer_size);
|
||||
if (!s->y_buffer)
|
||||
return AVERROR(ENOMEM);
|
||||
s->scratch_buffer = av_malloc(s->buffer_size + 130);
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBAVDEVICE_VERSION_MINOR 4
|
||||
#define LIBAVDEVICE_VERSION_MINOR 3
|
||||
#define LIBAVDEVICE_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVDEVICE_VERSION_INT AV_VERSION_INT(LIBAVDEVICE_VERSION_MAJOR, \
|
||||
|
||||
@@ -74,6 +74,7 @@ typedef struct LV2Context {
|
||||
float *controls;
|
||||
|
||||
LilvInstance *instance;
|
||||
int instance_activated;
|
||||
|
||||
LilvNode *atom_AtomPort;
|
||||
LilvNode *atom_Sequence;
|
||||
@@ -387,6 +388,9 @@ static int config_output(AVFilterLink *outlink)
|
||||
inlink->min_samples = inlink->max_samples = 4096;
|
||||
}
|
||||
|
||||
lilv_instance_activate(s->instance);
|
||||
s->instance_activated = 1;
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
@@ -562,6 +566,8 @@ static av_cold void uninit(AVFilterContext *ctx)
|
||||
{
|
||||
LV2Context *s = ctx->priv;
|
||||
|
||||
if (s->instance_activated)
|
||||
lilv_instance_deactivate(s->instance);
|
||||
lilv_node_free(s->powerOf2BlockLength);
|
||||
lilv_node_free(s->fixedBlockLength);
|
||||
lilv_node_free(s->boundedBlockLength);
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBAVFILTER_VERSION_MINOR 15
|
||||
#define LIBAVFILTER_VERSION_MINOR 14
|
||||
#define LIBAVFILTER_VERSION_MICRO 100
|
||||
|
||||
|
||||
|
||||
+14
-5
@@ -77,11 +77,20 @@ static int filter_slice(AVFilterContext *ctx, void *arg, int jobnr, int nb_jobs)
|
||||
uint8_t *next = &yadif->next->data[td->plane][y * linesize];
|
||||
uint8_t *dst = &td->frame->data[td->plane][y * td->frame->linesize[td->plane]];
|
||||
if (yadif->current_field == YADIF_FIELD_END) {
|
||||
s->dsp.filter_intra(dst, cur, td->w, (y + df) < td->h ? refs : -refs,
|
||||
y > (df - 1) ? -refs : refs,
|
||||
(y + 3*df) < td->h ? 3 * refs : -refs,
|
||||
y > (3*df - 1) ? -3 * refs : refs,
|
||||
td->parity ^ td->tff, clip_max);
|
||||
if ((y < 3) || ((y + 3) >= td->h)) {
|
||||
s->dsp.filter_edge(dst, prev, cur, next, td->w,
|
||||
(y + df) < td->h ? refs : -refs,
|
||||
y > (df - 1) ? -refs : refs,
|
||||
refs << 1, -(refs << 1),
|
||||
td->parity ^ td->tff, clip_max,
|
||||
(y < 2) || ((y + 3) > td->h) ? 0 : 1);
|
||||
} else {
|
||||
s->dsp.filter_intra(dst, cur, td->w, (y + df) < td->h ? refs : -refs,
|
||||
y > (df - 1) ? -refs : refs,
|
||||
(y + 3*df) < td->h ? 3 * refs : -refs,
|
||||
y > (3*df - 1) ? -3 * refs : refs,
|
||||
td->parity ^ td->tff, clip_max);
|
||||
}
|
||||
} else if ((y < 4) || ((y + 5) > td->h)) {
|
||||
s->dsp.filter_edge(dst, prev, cur, next, td->w,
|
||||
(y + df) < td->h ? refs : -refs,
|
||||
|
||||
@@ -667,14 +667,22 @@ static void lock_queue(void *priv, uint32_t qf, uint32_t qidx)
|
||||
{
|
||||
AVHWDeviceContext *avhwctx = priv;
|
||||
const AVVulkanDeviceContext *hwctx = avhwctx->hwctx;
|
||||
#if FF_API_VULKAN_SYNC_QUEUES
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
hwctx->lock_queue(avhwctx, qf, qidx);
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
}
|
||||
|
||||
static void unlock_queue(void *priv, uint32_t qf, uint32_t qidx)
|
||||
{
|
||||
AVHWDeviceContext *avhwctx = priv;
|
||||
const AVVulkanDeviceContext *hwctx = avhwctx->hwctx;
|
||||
#if FF_API_VULKAN_SYNC_QUEUES
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
hwctx->unlock_queue(avhwctx, qf, qidx);
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "libavutil/dict.h"
|
||||
#include "libavutil/mem.h"
|
||||
#include "avformat.h"
|
||||
#include "avio_internal.h"
|
||||
#include "demux.h"
|
||||
#include "internal.h"
|
||||
#include "pcm.h"
|
||||
@@ -368,9 +369,10 @@ static int aiff_read_header(AVFormatContext *s)
|
||||
if (len == 11 && size > 11) {
|
||||
uint8_t chunk[11];
|
||||
|
||||
ret = avio_read(pb, chunk, 11);
|
||||
if (ret > 0)
|
||||
size -= ret;
|
||||
ret = ffio_read_size(pb, chunk, 11);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
size -= ret;
|
||||
if (!memcmp(chunk, "VADPCMCODES", sizeof(chunk))) {
|
||||
if ((ret = ff_get_extradata(s, st->codecpar, pb, size)) < 0)
|
||||
return ret;
|
||||
|
||||
+1
-1
@@ -252,7 +252,7 @@ static int64_t get_duration(AVFormatContext *s)
|
||||
int64_t size = avio_size(s->pb);
|
||||
int64_t ret = 0;
|
||||
|
||||
if (start_pos + 20 > size)
|
||||
if (start_pos < 0 || start_pos > size - 20)
|
||||
return 0;
|
||||
|
||||
avio_skip(s->pb, 16);
|
||||
|
||||
@@ -118,6 +118,10 @@ static int hxvs_probe(const AVProbeData *p)
|
||||
i += 4;
|
||||
if (tag == HXVF || tag == HXAF) {
|
||||
bytes = AV_RL32(&p->buf[i]);
|
||||
|
||||
if (12 + bytes > INT_MAX - i)
|
||||
return 0;
|
||||
|
||||
i += 12 + bytes;
|
||||
flag |= (tag == HXVF) ? 2 : 4;
|
||||
continue;
|
||||
|
||||
@@ -3697,6 +3697,9 @@ static int mov_read_sdtp(MOVContext *c, AVIOContext *pb, MOVAtom atom)
|
||||
av_freep(&sc->sdtp_data);
|
||||
sc->sdtp_count = 0;
|
||||
|
||||
if (entries < 0 || entries > SIZE_MAX)
|
||||
return AVERROR(ERANGE);
|
||||
|
||||
sc->sdtp_data = av_malloc(entries);
|
||||
if (!sc->sdtp_data)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
@@ -1041,10 +1041,10 @@ static int new_pes_packet(PESContext *pes, AVPacket *pkt)
|
||||
"Invalid JPEG-XS header size %"PRIu32" > packet size %d\n",
|
||||
header_size, pkt->size);
|
||||
pes->flags |= AV_PKT_FLAG_CORRUPT;
|
||||
return AVERROR_INVALIDDATA;
|
||||
} else {
|
||||
pkt->data += header_size;
|
||||
pkt->size -= header_size;
|
||||
}
|
||||
pkt->data += header_size;
|
||||
pkt->size -= header_size;
|
||||
}
|
||||
|
||||
memset(pkt->data + pkt->size, 0, AV_INPUT_BUFFER_PADDING_SIZE);
|
||||
@@ -1703,7 +1703,7 @@ static int mp4_read_iods(AVFormatContext *s, const uint8_t *buf, unsigned size,
|
||||
|
||||
ret = parse_mp4_descr(&d, avio_tell(&d.pb.pub), size, MP4IODescrTag);
|
||||
|
||||
*descr_count = d.descr_count;
|
||||
*descr_count += d.descr_count;
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -2614,7 +2614,7 @@ static void pmt_cb(MpegTSFilter *filter, const uint8_t *section, int section_len
|
||||
get8(&p, p_end); // label
|
||||
len -= 2;
|
||||
mp4_read_iods(ts->stream, p, len, mp4_descr + mp4_descr_count,
|
||||
&mp4_descr_count, MAX_MP4_DESCR_COUNT);
|
||||
&mp4_descr_count, MAX_MP4_DESCR_COUNT - mp4_descr_count);
|
||||
} else if (tag == REGISTRATION_DESCRIPTOR && len >= 4) {
|
||||
prog_reg_desc = bytestream_get_le32(&p);
|
||||
len -= 4;
|
||||
|
||||
@@ -2736,7 +2736,8 @@ static int rtmp_open(URLContext *s, const char *uri, int flags, AVDictionary **o
|
||||
if (rt->listen)
|
||||
ff_url_join(buf, sizeof(buf), "tcp", NULL, hostname, port,
|
||||
"?listen&listen_timeout=%d&tcp_nodelay=%d",
|
||||
rt->listen_timeout * 1000, rt->tcp_nodelay);
|
||||
rt->listen_timeout < 0 ? -1 : rt->listen_timeout * 1000,
|
||||
rt->tcp_nodelay);
|
||||
else
|
||||
ff_url_join(buf, sizeof(buf), "tcp", NULL, hostname, port, "?tcp_nodelay=%d", rt->tcp_nodelay);
|
||||
}
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBAVFORMAT_VERSION_MINOR 13
|
||||
#define LIBAVFORMAT_VERSION_MINOR 12
|
||||
#define LIBAVFORMAT_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVFORMAT_VERSION_INT AV_VERSION_INT(LIBAVFORMAT_VERSION_MAJOR, \
|
||||
|
||||
@@ -82,7 +82,7 @@ static int get_metadata(AVFormatContext *s, const char *const tag, const unsigne
|
||||
if (!buf)
|
||||
return AVERROR(ENOMEM);
|
||||
|
||||
if ((ret = avio_read(s->pb, buf, size)) < 0) {
|
||||
if ((ret = ffio_read_size(s->pb, buf, size)) < 0) {
|
||||
av_free(buf);
|
||||
return ret;
|
||||
}
|
||||
|
||||
@@ -46,9 +46,14 @@
|
||||
# define AV_HAS_ATTRIBUTE(x) 0
|
||||
#endif
|
||||
|
||||
#if defined(__cplusplus) && defined(__has_cpp_attribute)
|
||||
#if defined(__cplusplus) && \
|
||||
defined(__has_cpp_attribute) && \
|
||||
__cplusplus >= 201103L
|
||||
# define AV_HAS_STD_ATTRIBUTE(x) __has_cpp_attribute(x)
|
||||
#elif !defined(__cplusplus) && defined(__has_c_attribute)
|
||||
#elif !defined(__cplusplus) && \
|
||||
defined(__has_c_attribute) && \
|
||||
defined(__STDC_VERSION__) && \
|
||||
__STDC_VERSION__ >= 202311L
|
||||
# define AV_HAS_STD_ATTRIBUTE(x) __has_c_attribute(x)
|
||||
#else
|
||||
# define AV_HAS_STD_ATTRIBUTE(x) 0
|
||||
|
||||
@@ -2119,10 +2119,14 @@ FF_ENABLE_DEPRECATION_WARNINGS
|
||||
p->img_qfs[p->nb_img_qfs++] = hwctx->qf[i].idx;
|
||||
}
|
||||
|
||||
#if FF_API_VULKAN_SYNC_QUEUES
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
if (!hwctx->lock_queue)
|
||||
hwctx->lock_queue = lock_queue;
|
||||
if (!hwctx->unlock_queue)
|
||||
hwctx->unlock_queue = unlock_queue;
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
/* Re-query device capabilities, in case the device was created externally */
|
||||
vk->GetPhysicalDeviceMemoryProperties(hwctx->phys_dev, &p->mprops);
|
||||
|
||||
@@ -168,18 +168,26 @@ typedef struct AVVulkanDeviceContext {
|
||||
int nb_decode_queues;
|
||||
#endif
|
||||
|
||||
#if FF_API_VULKAN_SYNC_QUEUES
|
||||
/**
|
||||
* Locks a queue, preventing other threads from submitting any command
|
||||
* buffers to this queue.
|
||||
* If set to NULL, will be set to lavu-internal functions that utilize a
|
||||
* mutex.
|
||||
*
|
||||
* Deprecated: use VK_KHR_internally_synchronized_queues.
|
||||
*/
|
||||
attribute_deprecated
|
||||
void (*lock_queue)(struct AVHWDeviceContext *ctx, uint32_t queue_family, uint32_t index);
|
||||
|
||||
/**
|
||||
* Similar to lock_queue(), unlocks a queue. Must only be called after locking.
|
||||
*
|
||||
* Deprecated: use VK_KHR_internally_synchronized_queues.
|
||||
*/
|
||||
attribute_deprecated
|
||||
void (*unlock_queue)(struct AVHWDeviceContext *ctx, uint32_t queue_family, uint32_t index);
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Queue families used. Must be preferentially ordered. List may contain
|
||||
|
||||
+10
-1
@@ -211,6 +211,7 @@ int av_timecode_init(AVTimecode *tc, AVRational rate, int flags, int frame_start
|
||||
int av_timecode_init_from_components(AVTimecode *tc, AVRational rate, int flags, int hh, int mm, int ss, int ff, void *log_ctx)
|
||||
{
|
||||
int ret;
|
||||
int64_t s;
|
||||
|
||||
memset(tc, 0, sizeof(*tc));
|
||||
tc->flags = flags;
|
||||
@@ -221,7 +222,15 @@ int av_timecode_init_from_components(AVTimecode *tc, AVRational rate, int flags,
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
|
||||
tc->start = (hh*3600 + mm*60 + ss) * tc->fps + ff;
|
||||
s = hh*3600LL + mm*60LL + ss;
|
||||
if (s != (int32_t)s)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
s = s * tc->fps + ff;
|
||||
if (s != (int32_t)s)
|
||||
return AVERROR(EINVAL);
|
||||
tc->start = s;
|
||||
|
||||
if (tc->flags & AV_TIMECODE_FLAG_DROPFRAME) { /* adjust frame number */
|
||||
int tmins = 60*hh + mm;
|
||||
tc->start -= (tc->fps / 30 * 2) * (tmins - tmins/10);
|
||||
|
||||
+2
-1
@@ -79,7 +79,7 @@
|
||||
*/
|
||||
|
||||
#define LIBAVUTIL_VERSION_MAJOR 60
|
||||
#define LIBAVUTIL_VERSION_MINOR 27
|
||||
#define LIBAVUTIL_VERSION_MINOR 26
|
||||
#define LIBAVUTIL_VERSION_MICRO 100
|
||||
|
||||
#define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \
|
||||
@@ -113,6 +113,7 @@
|
||||
#define FF_API_CPU_FLAG_FORCE (LIBAVUTIL_VERSION_MAJOR < 61)
|
||||
#define FF_API_DOVI_L11_INVALID_PROPS (LIBAVUTIL_VERSION_MAJOR < 61)
|
||||
#define FF_API_ASSERT_FPU (LIBAVUTIL_VERSION_MAJOR < 61)
|
||||
#define FF_API_VULKAN_SYNC_QUEUES (LIBAVUTIL_VERSION_MAJOR < 62)
|
||||
|
||||
/**
|
||||
* @}
|
||||
|
||||
@@ -928,9 +928,17 @@ int ff_vk_exec_submit(FFVulkanContext *s, FFVkExecContext *e)
|
||||
return AVERROR_EXTERNAL;
|
||||
}
|
||||
|
||||
#if FF_API_VULKAN_SYNC_QUEUES
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
s->hwctx->lock_queue(s->device, e->qf, e->qi);
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
ret = vk->QueueSubmit2(e->queue, 1, &submit_info, e->fence);
|
||||
#if FF_API_VULKAN_SYNC_QUEUES
|
||||
FF_DISABLE_DEPRECATION_WARNINGS
|
||||
s->hwctx->unlock_queue(s->device, e->qf, e->qi);
|
||||
FF_ENABLE_DEPRECATION_WARNINGS
|
||||
#endif
|
||||
|
||||
if (ret != VK_SUCCESS) {
|
||||
av_log(s, AV_LOG_ERROR, "Unable to submit command buffer: %s\n",
|
||||
|
||||
@@ -30,7 +30,7 @@
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBSWRESAMPLE_VERSION_MINOR 4
|
||||
#define LIBSWRESAMPLE_VERSION_MINOR 3
|
||||
#define LIBSWRESAMPLE_VERSION_MICRO 100
|
||||
|
||||
#define LIBSWRESAMPLE_VERSION_INT AV_VERSION_INT(LIBSWRESAMPLE_VERSION_MAJOR, \
|
||||
|
||||
+4
-4
@@ -1128,8 +1128,8 @@ yuv2rgba64_X_c_template(SwsInternal *c, const int16_t *lumFilter,
|
||||
int j;
|
||||
unsigned Y1 = -0x40000000;
|
||||
unsigned Y2 = -0x40000000;
|
||||
int U = -(128 << 23); // 19
|
||||
int V = -(128 << 23);
|
||||
unsigned U = -(128 << 23); // 19
|
||||
unsigned V = -(128 << 23);
|
||||
int R, G, B;
|
||||
|
||||
for (j = 0; j < lumFilterSize; j++) {
|
||||
@@ -1159,8 +1159,8 @@ yuv2rgba64_X_c_template(SwsInternal *c, const int16_t *lumFilter,
|
||||
Y1 += 0x10000;
|
||||
Y2 = (int)Y2 >> 14;
|
||||
Y2 += 0x10000;
|
||||
U >>= 14;
|
||||
V >>= 14;
|
||||
U = (int)U >> 14;
|
||||
V = (int)V >> 14;
|
||||
|
||||
// 8 bits: 27 -> 17 bits, 16 bits: 31 - 14 = 17 bits
|
||||
Y1 -= c->yuv2rgb_y_offset;
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
#include "version_major.h"
|
||||
|
||||
#define LIBSWSCALE_VERSION_MINOR 6
|
||||
#define LIBSWSCALE_VERSION_MINOR 5
|
||||
#define LIBSWSCALE_VERSION_MICRO 100
|
||||
|
||||
#define LIBSWSCALE_VERSION_INT AV_VERSION_INT(LIBSWSCALE_VERSION_MAJOR, \
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#codec_id 0: rawvideo
|
||||
#dimensions 0: 720x576
|
||||
#sar 0: 16/15
|
||||
0, 9, 9, 1, 622080, 0xd435648a
|
||||
0, 9, 9, 1, 622080, 0x3f25bfc2
|
||||
0, 10, 10, 1, 622080, 0x62085455
|
||||
0, 11, 11, 1, 622080, 0x60f943a0
|
||||
0, 12, 12, 1, 622080, 0x5396f14a
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#codec_id 0: rawvideo
|
||||
#dimensions 0: 720x576
|
||||
#sar 0: 16/15
|
||||
0, 18, 18, 1, 622080, 0xd435648a
|
||||
0, 18, 18, 1, 622080, 0x3f25bfc2
|
||||
0, 19, 19, 1, 622080, 0xef4617cc
|
||||
0, 20, 20, 1, 622080, 0x62085455
|
||||
0, 21, 21, 1, 622080, 0x5b5ae735
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
#codec_id 0: rawvideo
|
||||
#dimensions 0: 720x576
|
||||
#sar 0: 16/15
|
||||
0, 9, 9, 1, 1244160, 0x57c21e2b
|
||||
0, 9, 9, 1, 1244160, 0x4f0e6e1c
|
||||
0, 10, 10, 1, 1244160, 0x57152296
|
||||
0, 11, 11, 1, 1244160, 0x0074598b
|
||||
0, 12, 12, 1, 1244160, 0x44537bb8
|
||||
|
||||
Reference in New Issue
Block a user