mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-27 02:47:31 +09:00
ffvpx: update to 3.4.6
This commit is contained in:
parent
7c42464249
commit
402c27b560
8 changed files with 33 additions and 28 deletions
|
|
@ -1574,7 +1574,7 @@ enum AVPacketSideDataType {
|
|||
AV_PKT_DATA_METADATA_UPDATE,
|
||||
|
||||
/**
|
||||
* MPEGTS stream ID, this is required to pass the stream ID
|
||||
* MPEGTS stream ID as uint8_t, this is required to pass the stream ID
|
||||
* information from the demuxer to the corresponding muxer.
|
||||
*/
|
||||
AV_PKT_DATA_MPEGTS_STREAM_ID,
|
||||
|
|
|
|||
|
|
@ -438,7 +438,7 @@ static void guess_mv(ERContext *s)
|
|||
}
|
||||
|
||||
if ((!(s->avctx->error_concealment&FF_EC_GUESS_MVS)) ||
|
||||
num_avail <= mb_width / 2) {
|
||||
num_avail <= FFMAX(mb_width, mb_height) / 2) {
|
||||
for (mb_y = 0; mb_y < mb_height; mb_y++) {
|
||||
for (mb_x = 0; mb_x < s->mb_width; mb_x++) {
|
||||
const int mb_xy = mb_x + mb_y * s->mb_stride;
|
||||
|
|
|
|||
|
|
@ -156,8 +156,8 @@ void ff_h264_direct_ref_list_init(const H264Context *const h, H264SliceContext *
|
|||
av_log(h->avctx, AV_LOG_ERROR, "co located POCs unavailable\n");
|
||||
sl->col_parity = 1;
|
||||
} else
|
||||
sl->col_parity = (FFABS(col_poc[0] - cur_poc) >=
|
||||
FFABS(col_poc[1] - cur_poc));
|
||||
sl->col_parity = (FFABS(col_poc[0] - (int64_t)cur_poc) >=
|
||||
FFABS(col_poc[1] - (int64_t)cur_poc));
|
||||
ref1sidx =
|
||||
sidx = sl->col_parity;
|
||||
// FL -> FL & differ parity
|
||||
|
|
|
|||
|
|
@ -672,7 +672,7 @@ static void implicit_weight_table(const H264Context *h, H264SliceContext *sl, in
|
|||
cur_poc = h->cur_pic_ptr->field_poc[h->picture_structure - 1];
|
||||
}
|
||||
if (sl->ref_count[0] == 1 && sl->ref_count[1] == 1 && !FRAME_MBAFF(h) &&
|
||||
sl->ref_list[0][0].poc + (int64_t)sl->ref_list[1][0].poc == 2 * cur_poc) {
|
||||
sl->ref_list[0][0].poc + (int64_t)sl->ref_list[1][0].poc == 2LL * cur_poc) {
|
||||
sl->pwt.use_weight = 0;
|
||||
sl->pwt.use_weight_chroma = 0;
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -472,6 +472,11 @@ static int hls_slice_header(HEVCContext *s)
|
|||
|
||||
// Coded parameters
|
||||
sh->first_slice_in_pic_flag = get_bits1(gb);
|
||||
if (s->ref && sh->first_slice_in_pic_flag) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "Two slices reporting being the first in the same frame.\n");
|
||||
return 1; // This slice will be skiped later, do not corrupt state
|
||||
}
|
||||
|
||||
if ((IS_IDR(s) || IS_BLA(s)) && sh->first_slice_in_pic_flag) {
|
||||
s->seq_decode = (s->seq_decode + 1) & 0xff;
|
||||
s->max_ra = INT_MAX;
|
||||
|
|
@ -2862,6 +2867,11 @@ static int decode_nal_unit(HEVCContext *s, const H2645NAL *nal)
|
|||
ret = hls_slice_header(s);
|
||||
if (ret < 0)
|
||||
return ret;
|
||||
if (ret == 1) {
|
||||
ret = AVERROR_INVALIDDATA;
|
||||
goto fail;
|
||||
}
|
||||
|
||||
|
||||
if (s->sh.first_slice_in_pic_flag) {
|
||||
if (s->max_ra == INT_MAX) {
|
||||
|
|
|
|||
|
|
@ -100,7 +100,7 @@ static int mpegaudio_parse(AVCodecParserContext *s1,
|
|||
"MP3ADU full parser");
|
||||
*poutbuf = NULL;
|
||||
*poutbuf_size = 0;
|
||||
return 0; /* parsers must not return error codes */
|
||||
return buf_size; /* parsers must not return error codes */
|
||||
}
|
||||
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -499,7 +499,6 @@ int av_image_copy_to_buffer(uint8_t *dst, int dst_size,
|
|||
static void memset_bytes(uint8_t *dst, size_t dst_size, uint8_t *clear,
|
||||
size_t clear_size)
|
||||
{
|
||||
size_t pos = 0;
|
||||
int same = 1;
|
||||
int i;
|
||||
|
||||
|
|
@ -519,28 +518,12 @@ static void memset_bytes(uint8_t *dst, size_t dst_size, uint8_t *clear,
|
|||
if (clear_size == 1) {
|
||||
memset(dst, clear[0], dst_size);
|
||||
dst_size = 0;
|
||||
} else if (clear_size == 2) {
|
||||
uint16_t val = AV_RN16(clear);
|
||||
for (; dst_size >= 2; dst_size -= 2) {
|
||||
AV_WN16(dst, val);
|
||||
dst += 2;
|
||||
}
|
||||
} else if (clear_size == 4) {
|
||||
uint32_t val = AV_RN32(clear);
|
||||
for (; dst_size >= 4; dst_size -= 4) {
|
||||
AV_WN32(dst, val);
|
||||
dst += 4;
|
||||
}
|
||||
} else if (clear_size == 8) {
|
||||
uint32_t val = AV_RN64(clear);
|
||||
for (; dst_size >= 8; dst_size -= 8) {
|
||||
AV_WN64(dst, val);
|
||||
dst += 8;
|
||||
}
|
||||
} else {
|
||||
if (clear_size > dst_size)
|
||||
clear_size = dst_size;
|
||||
memcpy(dst, clear, clear_size);
|
||||
av_memcpy_backptr(dst + clear_size, clear_size, dst_size - clear_size);
|
||||
}
|
||||
|
||||
for (; dst_size; dst_size--)
|
||||
*dst++ = clear[pos++ % clear_size];
|
||||
}
|
||||
|
||||
// Maximum size in bytes of a plane element (usually a pixel, or multiple pixels
|
||||
|
|
|
|||
|
|
@ -385,6 +385,18 @@ static void fill32(uint8_t *dst, int len)
|
|||
{
|
||||
uint32_t v = AV_RN32(dst - 4);
|
||||
|
||||
#if HAVE_FAST_64BIT
|
||||
uint64_t v2= v + ((uint64_t)v<<32);
|
||||
while (len >= 32) {
|
||||
AV_WN64(dst , v2);
|
||||
AV_WN64(dst+ 8, v2);
|
||||
AV_WN64(dst+16, v2);
|
||||
AV_WN64(dst+24, v2);
|
||||
dst += 32;
|
||||
len -= 32;
|
||||
}
|
||||
#endif
|
||||
|
||||
while (len >= 4) {
|
||||
AV_WN32(dst, v);
|
||||
dst += 4;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue