Skip to content

Commit

Permalink
Обновлен ffmpeg n7.2-dev-897-g90af8e07b0.
Browse files Browse the repository at this point in the history
  • Loading branch information
v0lt committed Dec 14, 2024
1 parent ca33b7b commit 97b2322
Show file tree
Hide file tree
Showing 33 changed files with 756 additions and 151 deletions.
3 changes: 3 additions & 0 deletions docs/Changelog.Rus.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ YouTube
Обновлен испанский перевод (автор IPeluchito).
Обновлен румынский перевод (автор Andrei Miloiu).

Обновлены библиотеки:
ffmpeg n7.2-dev-897-g90af8e07b0.


1.8.2 - 2024-12-07
=============================
Expand Down
3 changes: 3 additions & 0 deletions docs/Changelog.txt
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ Updated Italian translation (by mapi68).
Updated Spanish translation (by IPeluchito).
Updated Romanian translation (by Andrei Miloiu).

Updated libraries:
ffmpeg n7.2-dev-897-g90af8e07b0.


1.8.2 - 2024-12-07
=============================
Expand Down
5 changes: 4 additions & 1 deletion src/ExtLib/ffmpeg/libavcodec/aac/aacdec_usac.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,7 @@ static int decode_usac_extension(AACDecContext *ac, AACUsacElemConfig *e,
/* No configuration needed - fallthrough (len should be 0) */
default:
skip_bits(gb, 8*ext_config_len);
e->ext.type = ID_EXT_ELE_FILL;
break;
};

Expand Down Expand Up @@ -917,8 +918,10 @@ static int decode_usac_stereo_info(AACDecContext *ac, AACUSACConfig *usac,
}

ret = setup_sce(ac, sce1, usac);
if (ret < 0)
if (ret < 0) {
ics2->max_sfb = 0;
return ret;
}

ret = setup_sce(ac, sce2, usac);
if (ret < 0)
Expand Down
4 changes: 2 additions & 2 deletions src/ExtLib/ffmpeg/libavcodec/cbs_h266_syntax_template.c
Original file line number Diff line number Diff line change
Expand Up @@ -1151,7 +1151,7 @@ static int FUNC(sps)(CodedBitstreamContext *ctx, RWContext *rw,
else
infer(sps_subpic_width_minus1[0], max_width_minus1);
if (current->sps_pic_height_max_in_luma_samples > ctb_size_y)
us(hlen, sps_subpic_height_minus1[0], 0, max_width_minus1, 1, 0);
us(hlen, sps_subpic_height_minus1[0], 0, max_height_minus1, 1, 0);
else
infer(sps_subpic_height_minus1[0], max_height_minus1);
if (!current->sps_independent_subpics_flag) {
Expand Down Expand Up @@ -2812,7 +2812,7 @@ static int FUNC(picture_header) (CodedBitstreamContext *ctx, RWContext *rw,
0, 2 * (ctb_log2_size_y - min_cb_log2_size_y));
if (sps->sps_max_mtt_hierarchy_depth_intra_slice_chroma != 0) {
unsigned int min_qt_log2_size_intra_c =
sps->sps_log2_diff_min_qt_min_cb_intra_slice_chroma +
current->ph_log2_diff_min_qt_min_cb_intra_slice_chroma +
min_cb_log2_size_y;
ue(ph_log2_diff_max_bt_min_qt_intra_slice_chroma,
0, FFMIN(6, ctb_log2_size_y) - min_qt_log2_size_intra_c);
Expand Down
2 changes: 2 additions & 0 deletions src/ExtLib/ffmpeg/libavcodec/hevc/dsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,8 @@ int i = 0;
ff_hevc_dsp_init_arm(hevcdsp, bit_depth);
#elif ARCH_PPC
ff_hevc_dsp_init_ppc(hevcdsp, bit_depth);
#elif ARCH_WASM
ff_hevc_dsp_init_wasm(hevcdsp, bit_depth);
#elif ARCH_X86
ff_hevc_dsp_init_x86(hevcdsp, bit_depth);
#elif ARCH_MIPS
Expand Down
1 change: 1 addition & 0 deletions src/ExtLib/ffmpeg/libavcodec/hevc/dsp.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ extern const int8_t ff_hevc_qpel_filters[4][16];
void ff_hevc_dsp_init_aarch64(HEVCDSPContext *c, const int bit_depth);
void ff_hevc_dsp_init_arm(HEVCDSPContext *c, const int bit_depth);
void ff_hevc_dsp_init_ppc(HEVCDSPContext *c, const int bit_depth);
void ff_hevc_dsp_init_wasm(HEVCDSPContext *c, const int bit_depth);
void ff_hevc_dsp_init_x86(HEVCDSPContext *c, const int bit_depth);
void ff_hevc_dsp_init_mips(HEVCDSPContext *c, const int bit_depth);
void ff_hevc_dsp_init_loongarch(HEVCDSPContext *c, const int bit_depth);
Expand Down
6 changes: 3 additions & 3 deletions src/ExtLib/ffmpeg/libavcodec/jpeg2000dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1886,10 +1886,10 @@ static void decode_sigpass(Jpeg2000T1Context *t1, int width, int height,
if (ff_mqc_decode(&t1->mqc, t1->mqc.cx_states + ff_jpeg2000_getsigctxno(t1->flags[(y+1) * t1->stride + x+1] & flags_mask, bandno))) {
int xorbit, ctxno = ff_jpeg2000_getsgnctxno(t1->flags[(y+1) * t1->stride + x+1] & flags_mask, &xorbit);
if (t1->mqc.raw) {
t1->data[(y) * t1->stride + x] |= ff_mqc_decode(&t1->mqc, t1->mqc.cx_states + ctxno) << 31;
t1->data[(y) * t1->stride + x] |= (uint32_t)(ff_mqc_decode(&t1->mqc, t1->mqc.cx_states + ctxno)) << 31;
t1->data[(y) * t1->stride + x] |= mask;
} else {
t1->data[(y) * t1->stride + x] |= (ff_mqc_decode(&t1->mqc, t1->mqc.cx_states + ctxno) ^ xorbit) << 31;
t1->data[(y) * t1->stride + x] |= (uint32_t)(ff_mqc_decode(&t1->mqc, t1->mqc.cx_states + ctxno) ^ xorbit) << 31;
t1->data[(y) * t1->stride + x] |= mask;
}
ff_jpeg2000_set_significance(t1, x, y,
Expand Down Expand Up @@ -1969,7 +1969,7 @@ static void decode_clnpass(const Jpeg2000DecoderContext *s, Jpeg2000T1Context *t
int xorbit;
int ctxno = ff_jpeg2000_getsgnctxno(t1->flags[(y + 1) * t1->stride + x + 1] & flags_mask,
&xorbit);
t1->data[(y) * t1->stride + x] |= (ff_mqc_decode(&t1->mqc, t1->mqc.cx_states + ctxno) ^ xorbit) << 31;
t1->data[(y) * t1->stride + x] |= (uint32_t)(ff_mqc_decode(&t1->mqc, t1->mqc.cx_states + ctxno) ^ xorbit) << 31;
t1->data[(y) * t1->stride + x] |= mask;
ff_jpeg2000_set_significance(t1, x, y, t1->data[(y) * t1->stride + x] & INT32_MIN);
}
Expand Down
6 changes: 3 additions & 3 deletions src/ExtLib/ffmpeg/libavcodec/jpeg2000htdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -1070,7 +1070,7 @@ static void jpeg2000_process_stripes_block(StateVars *sig_prop, int i_s, int j_s
uint8_t *state_p = block_states + (i + 1) * stride + (j + 1);
if ((state_p[0] >> HT_SHIFT_REF) & 1) {
bit = jpeg2000_peek_bit(sig_prop, magref_segment, magref_length);
*sp |= (int32_t)bit << 31;
*sp |= (uint32_t)bit << 31;
}
}
}
Expand Down Expand Up @@ -1160,7 +1160,7 @@ jpeg2000_decode_magref_segment( uint16_t width, uint16_t block_height, const int
jpeg2000_modify_state(i, j, stride, 1 << HT_SHIFT_REF_IND, block_states);
bit = jpeg2000_import_magref_bit(&mag_ref, magref_segment, magref_length);
tmp = 0xFFFFFFFE | (uint32_t)bit;
tmp <<= pLSB;
tmp = (uint32_t)tmp << pLSB;
sp[0] &= tmp;
sp[0] |= 1 << (pLSB - 1); // Add 0.5 (reconstruction parameter = 1/2)
}
Expand All @@ -1176,7 +1176,7 @@ jpeg2000_decode_magref_segment( uint16_t width, uint16_t block_height, const int
jpeg2000_modify_state(i, j, stride, 1 << HT_SHIFT_REF_IND, block_states);
bit = jpeg2000_import_magref_bit(&mag_ref, magref_segment, magref_length);
tmp = 0xFFFFFFFE | (uint32_t)bit;
tmp <<= pLSB;
tmp = (uint32_t)tmp << pLSB;
sp[0] &= tmp;
sp[0] |= 1 << (pLSB - 1); // Add 0.5 (reconstruction parameter = 1/2)
}
Expand Down
12 changes: 7 additions & 5 deletions src/ExtLib/ffmpeg/libavcodec/pngdec.c
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,7 @@ static int populate_avctx_color_fields(AVCodecContext *avctx, AVFrame *frame)
if (clli) {
/*
* 0.0001 divisor value
* see: https://www.w3.org/TR/png-3/#cLLi-chunk
* see: https://www.w3.org/TR/png-3/#cLLI-chunk
*/
clli->MaxCLL = s->clli_max / 10000;
clli->MaxFALL = s->clli_avg / 10000;
Expand Down Expand Up @@ -1566,18 +1566,20 @@ static int decode_frame_common(AVCodecContext *avctx, PNGDecContext *s,

break;
}
case MKTAG('c', 'L', 'L', 'i'):
case MKTAG('c', 'L', 'L', 'i'): /* legacy spelling, for backwards compat */
case MKTAG('c', 'L', 'L', 'I'):
if (bytestream2_get_bytes_left(&gb_chunk) != 8) {
av_log(avctx, AV_LOG_WARNING, "Invalid cLLi chunk size: %d\n", bytestream2_get_bytes_left(&gb_chunk));
av_log(avctx, AV_LOG_WARNING, "Invalid cLLI chunk size: %d\n", bytestream2_get_bytes_left(&gb_chunk));
break;
}
s->have_clli = 1;
s->clli_max = bytestream2_get_be32u(&gb_chunk);
s->clli_avg = bytestream2_get_be32u(&gb_chunk);
break;
case MKTAG('m', 'D', 'C', 'v'):
case MKTAG('m', 'D', 'C', 'v'): /* legacy spelling, for backward compat */
case MKTAG('m', 'D', 'C', 'V'):
if (bytestream2_get_bytes_left(&gb_chunk) != 24) {
av_log(avctx, AV_LOG_WARNING, "Invalid mDCv chunk size: %d\n", bytestream2_get_bytes_left(&gb_chunk));
av_log(avctx, AV_LOG_WARNING, "Invalid mDCV chunk size: %d\n", bytestream2_get_bytes_left(&gb_chunk));
break;
}
s->have_mdcv = 1;
Expand Down
10 changes: 9 additions & 1 deletion src/ExtLib/ffmpeg/libavcodec/vvc/cabac.c
Original file line number Diff line number Diff line change
Expand Up @@ -1257,11 +1257,19 @@ int ff_vvc_pred_mode_ibc_flag(VVCLocalContext *lc, const int is_chroma)
return GET_CABAC(PRED_MODE_IBC_FLAG + inc);
}

static av_always_inline
uint8_t get_mip_inc(VVCLocalContext *lc, const uint8_t *ctx)
{
uint8_t left = 0, top = 0;
get_left_top(lc, &left, &top, lc->cu->x0, lc->cu->y0, ctx, ctx);
return (left & 1) + (top & 1);
}

int ff_vvc_intra_mip_flag(VVCLocalContext *lc, const uint8_t *intra_mip_flag)
{
const int w = lc->cu->cb_width;
const int h = lc->cu->cb_height;
const int inc = (w > h * 2 || h > w * 2) ? 3 : get_inc(lc, intra_mip_flag);
const int inc = (w > h * 2 || h > w * 2) ? 3 : get_mip_inc(lc, intra_mip_flag);
return GET_CABAC(INTRA_MIP_FLAG + inc);
}

Expand Down
14 changes: 10 additions & 4 deletions src/ExtLib/ffmpeg/libavcodec/vvc/ctu.c
Original file line number Diff line number Diff line change
Expand Up @@ -946,6 +946,12 @@ static void derive_chroma_intra_pred_mode(VVCLocalContext *lc,
}
}

static av_always_inline uint8_t pack_mip_info(int intra_mip_flag,
int intra_mip_transposed_flag, int intra_mip_mode)
{
return (intra_mip_mode << 2) | (intra_mip_transposed_flag << 1) | intra_mip_flag;
}

static void intra_luma_pred_modes(VVCLocalContext *lc)
{
VVCFrameContext *fc = lc->fc;
Expand Down Expand Up @@ -974,9 +980,9 @@ static void intra_luma_pred_modes(VVCLocalContext *lc)
int x = y_cb * pps->min_cb_width + x_cb;
for (int y = 0; y < (cb_height>>log2_min_cb_size); y++) {
int width = cb_width>>log2_min_cb_size;
memset(&fc->tab.imf[x], cu->intra_mip_flag, width);
fc->tab.imtf[x] = intra_mip_transposed_flag;
fc->tab.imm[x] = intra_mip_mode;
const uint8_t mip_info = pack_mip_info(cu->intra_mip_flag,
intra_mip_transposed_flag, intra_mip_mode);
memset(&fc->tab.imf[x], mip_info, width);
x += pps->min_cb_width;
}
cu->intra_pred_mode_y = intra_mip_mode;
Expand Down Expand Up @@ -1493,7 +1499,7 @@ static int hls_merge_data(VVCLocalContext *lc)

static void hls_mvd_coding(VVCLocalContext *lc, Mv* mvd)
{
int16_t mv[2];
int32_t mv[2];

for (int i = 0; i < 2; i++) {
mv[i] = ff_vvc_abs_mvd_greater0_flag(lc);
Expand Down
2 changes: 0 additions & 2 deletions src/ExtLib/ffmpeg/libavcodec/vvc/dec.c
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,6 @@ static void min_cb_tl_init(TabList *l, VVCFrameContext *fc)
tl_init(l, 1, changed);

TL_ADD(imf, pic_size_in_min_cb);
TL_ADD(imm, pic_size_in_min_cb);

for (int i = LUMA; i <= CHROMA; i++)
TL_ADD(cb_width[i], pic_size_in_min_cb); //is_a0_available requires this
Expand All @@ -143,7 +142,6 @@ static void min_cb_nz_tl_init(TabList *l, VVCFrameContext *fc)
tl_init(l, 0, changed);

TL_ADD(skip, pic_size_in_min_cb);
TL_ADD(imtf, pic_size_in_min_cb);
TL_ADD(ipm, pic_size_in_min_cb);

for (int i = LUMA; i <= CHROMA; i++) {
Expand Down
4 changes: 1 addition & 3 deletions src/ExtLib/ffmpeg/libavcodec/vvc/dec.h
Original file line number Diff line number Diff line change
Expand Up @@ -161,9 +161,7 @@ typedef struct VVCFrameContext {
uint8_t *skip; ///< CuSkipFlag[][]
uint8_t *ispmf; ///< intra_sub_partitions_mode_flag
uint8_t *msm[2]; ///< MttSplitMode[][][] in 32 pixels
uint8_t *imf; ///< IntraMipFlag[][]
uint8_t *imtf; ///< intra_mip_transposed_flag[][]
uint8_t *imm; ///< intra_mip_mode[][]
uint8_t *imf; ///< IntraMipFlag[][], intra_mip_transposed_flag[][], intra_mip_mode[][]
uint8_t *ipm; ///< IntraPredModeY[][]
uint8_t *cpm[2]; ///< CuPredMode[][][]
uint8_t *msf; ///< MergeSubblockFlag[][]
Expand Down
9 changes: 9 additions & 0 deletions src/ExtLib/ffmpeg/libavcodec/vvc/dsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,15 @@ static int vvc_sad(const int16_t *src0, const int16_t *src1, int dx, int dy,
return sad;
}

static av_always_inline void unpack_mip_info(int *intra_mip_transposed_flag,
int *intra_mip_mode, const uint8_t mip_info)
{
if (intra_mip_transposed_flag)
*intra_mip_transposed_flag = (mip_info >> 1) & 0x1;
if (intra_mip_mode)
*intra_mip_mode = (mip_info >> 2) & 0xf;
}

typedef struct IntraEdgeParams {
uint8_t* top;
uint8_t* left;
Expand Down
5 changes: 3 additions & 2 deletions src/ExtLib/ffmpeg/libavcodec/vvc/intra_template.c
Original file line number Diff line number Diff line change
Expand Up @@ -627,8 +627,9 @@ static void FUNC(intra_pred)(const VVCLocalContext *lc, int x0, int y0,
FUNC(prepare_intra_edge_params)(lc, &edge, src, stride, x, y, w, h, c_idx, is_intra_mip, mode, ref_idx, need_pdpc);

if (is_intra_mip) {
int intra_mip_transposed_flag = SAMPLE_CTB(fc->tab.imtf, x_cb, y_cb);
int intra_mip_mode = SAMPLE_CTB(fc->tab.imm, x_cb, y_cb);
int intra_mip_transposed_flag;
int intra_mip_mode;
unpack_mip_info(&intra_mip_transposed_flag, &intra_mip_mode, intra_mip_flag);

fc->vvcdsp.intra.pred_mip((uint8_t *)src, edge.top, edge.left,
w, h, stride, intra_mip_mode, intra_mip_transposed_flag);
Expand Down
4 changes: 2 additions & 2 deletions src/ExtLib/ffmpeg/libavcodec/vvc/mvs.c
Original file line number Diff line number Diff line change
Expand Up @@ -1627,12 +1627,12 @@ static int ibc_spatial_candidates(const VVCLocalContext *lc, const int merge_idx

init_neighbour_context(&nctx, lc);

if (check_available(a1, lc, 1)) {
if (check_available(a1, lc, 0)) {
cand_list[num_cands++] = TAB_MVF(a1->x, a1->y).mv[L0];
if (num_cands > merge_idx)
return 1;
}
if (check_available(b1, lc, 1)) {
if (check_available(b1, lc, 0)) {
const MvField *mvf = &TAB_MVF(b1->x, b1->y);
if (!num_cands || !IS_SAME_MV(&cand_list[0], mvf->mv)) {
cand_list[num_cands++] = mvf->mv[L0];
Expand Down
8 changes: 4 additions & 4 deletions src/ExtLib/ffmpeg/libavcodec/vvc/ps.c
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,7 @@ static int lmcs_derive_lut(VVCLMCS *lmcs, const H266RawAPS *rlmcs, const H266Raw
return AVERROR_INVALIDDATA;

lmcs->min_bin_idx = rlmcs->lmcs_min_bin_idx;
lmcs->max_bin_idx = LMCS_MAX_BIN_SIZE - 1 - rlmcs->lmcs_min_bin_idx;
lmcs->max_bin_idx = LMCS_MAX_BIN_SIZE - 1 - rlmcs->lmcs_delta_max_bin_idx;

memset(cw, 0, sizeof(cw));
for (int i = lmcs->min_bin_idx; i <= lmcs->max_bin_idx; i++)
Expand Down Expand Up @@ -1113,17 +1113,17 @@ static void scaling_derive(VVCScalingList *sl, const H266RawAPS *aps)
//dc
if (id >= SL_START_16x16) {
if (!aps->scaling_list_copy_mode_flag[id] && !aps->scaling_list_pred_mode_flag[id]) {
sl->scaling_matrix_dc_rec[id - SL_START_16x16] = 8;
dc += 8;
} else if (!aps->scaling_list_pred_id_delta[id]) {
sl->scaling_matrix_dc_rec[id - SL_START_16x16] = 16;
dc += 16;
} else {
const int ref_id = id - aps->scaling_list_pred_id_delta[id];
if (ref_id >= SL_START_16x16)
dc += sl->scaling_matrix_dc_rec[ref_id - SL_START_16x16];
else
dc += sl->scaling_matrix_rec[ref_id][0];
sl->scaling_matrix_dc_rec[id - SL_START_16x16] = dc & 255;
}
sl->scaling_matrix_dc_rec[id - SL_START_16x16] = dc & 255;
}

//ac
Expand Down
1 change: 1 addition & 0 deletions src/ExtLib/ffmpeg/libavutil/channel_layout.c
Original file line number Diff line number Diff line change
Expand Up @@ -221,6 +221,7 @@ static const struct channel_layout_name channel_layout_map[] = {
{ "7.1.4", AV_CHANNEL_LAYOUT_7POINT1POINT4_BACK },
{ "7.2.3", AV_CHANNEL_LAYOUT_7POINT2POINT3 },
{ "9.1.4", AV_CHANNEL_LAYOUT_9POINT1POINT4_BACK },
{ "9.1.6", AV_CHANNEL_LAYOUT_9POINT1POINT6 },
{ "hexadecagonal", AV_CHANNEL_LAYOUT_HEXADECAGONAL },
{ "binaural", AV_CHANNEL_LAYOUT_BINAURAL },
{ "downmix", AV_CHANNEL_LAYOUT_STEREO_DOWNMIX, },
Expand Down
4 changes: 3 additions & 1 deletion src/ExtLib/ffmpeg/libavutil/channel_layout.h
Original file line number Diff line number Diff line change
Expand Up @@ -248,10 +248,11 @@ enum AVChannelOrder {
#define AV_CH_LAYOUT_7POINT1POINT4_BACK (AV_CH_LAYOUT_7POINT1POINT2|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT)
#define AV_CH_LAYOUT_7POINT2POINT3 (AV_CH_LAYOUT_7POINT1POINT2|AV_CH_TOP_BACK_CENTER|AV_CH_LOW_FREQUENCY_2)
#define AV_CH_LAYOUT_9POINT1POINT4_BACK (AV_CH_LAYOUT_7POINT1POINT4_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER)
#define AV_CH_LAYOUT_9POINT1POINT6 (AV_CH_LAYOUT_9POINT1POINT4_BACK|AV_CH_TOP_SIDE_LEFT|AV_CH_TOP_SIDE_RIGHT)
#define AV_CH_LAYOUT_HEXADECAGONAL (AV_CH_LAYOUT_OCTAGONAL|AV_CH_WIDE_LEFT|AV_CH_WIDE_RIGHT|AV_CH_TOP_BACK_LEFT|AV_CH_TOP_BACK_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_FRONT_LEFT|AV_CH_TOP_FRONT_RIGHT)
#define AV_CH_LAYOUT_BINAURAL (AV_CH_BINAURAL_LEFT|AV_CH_BINAURAL_RIGHT)
#define AV_CH_LAYOUT_STEREO_DOWNMIX (AV_CH_STEREO_LEFT|AV_CH_STEREO_RIGHT)
#define AV_CH_LAYOUT_22POINT2 (AV_CH_LAYOUT_7POINT1POINT4_BACK|AV_CH_FRONT_LEFT_OF_CENTER|AV_CH_FRONT_RIGHT_OF_CENTER|AV_CH_BACK_CENTER|AV_CH_LOW_FREQUENCY_2|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_CENTER|AV_CH_TOP_SIDE_LEFT|AV_CH_TOP_SIDE_RIGHT|AV_CH_TOP_BACK_CENTER|AV_CH_BOTTOM_FRONT_CENTER|AV_CH_BOTTOM_FRONT_LEFT|AV_CH_BOTTOM_FRONT_RIGHT)
#define AV_CH_LAYOUT_22POINT2 (AV_CH_LAYOUT_9POINT1POINT6|AV_CH_BACK_CENTER|AV_CH_LOW_FREQUENCY_2|AV_CH_TOP_FRONT_CENTER|AV_CH_TOP_CENTER|AV_CH_TOP_BACK_CENTER|AV_CH_BOTTOM_FRONT_CENTER|AV_CH_BOTTOM_FRONT_LEFT|AV_CH_BOTTOM_FRONT_RIGHT)

#define AV_CH_LAYOUT_7POINT1_TOP_BACK AV_CH_LAYOUT_5POINT1POINT2_BACK

Expand Down Expand Up @@ -423,6 +424,7 @@ typedef struct AVChannelLayout {
#define AV_CHANNEL_LAYOUT_7POINT1POINT4_BACK AV_CHANNEL_LAYOUT_MASK(12, AV_CH_LAYOUT_7POINT1POINT4_BACK)
#define AV_CHANNEL_LAYOUT_7POINT2POINT3 AV_CHANNEL_LAYOUT_MASK(12, AV_CH_LAYOUT_7POINT2POINT3)
#define AV_CHANNEL_LAYOUT_9POINT1POINT4_BACK AV_CHANNEL_LAYOUT_MASK(14, AV_CH_LAYOUT_9POINT1POINT4_BACK)
#define AV_CHANNEL_LAYOUT_9POINT1POINT6 AV_CHANNEL_LAYOUT_MASK(16, AV_CH_LAYOUT_9POINT1POINT6)
#define AV_CHANNEL_LAYOUT_HEXADECAGONAL AV_CHANNEL_LAYOUT_MASK(16, AV_CH_LAYOUT_HEXADECAGONAL)
#define AV_CHANNEL_LAYOUT_BINAURAL AV_CHANNEL_LAYOUT_MASK(2, AV_CH_LAYOUT_BINAURAL)
#define AV_CHANNEL_LAYOUT_STEREO_DOWNMIX AV_CHANNEL_LAYOUT_MASK(2, AV_CH_LAYOUT_STEREO_DOWNMIX)
Expand Down
6 changes: 6 additions & 0 deletions src/ExtLib/ffmpeg/libavutil/cpu.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,8 @@ static int get_cpu_flags(void)
return ff_get_cpu_flags_ppc();
#elif ARCH_RISCV
return ff_get_cpu_flags_riscv();
#elif ARCH_WASM
return ff_get_cpu_flags_wasm();
#elif ARCH_X86
return ff_get_cpu_flags_x86();
#elif ARCH_LOONGARCH
Expand Down Expand Up @@ -200,6 +202,8 @@ int av_parse_cpu_caps(unsigned *flags, const char *s)
{ "zbb", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_RVB_BASIC }, .unit = "flags" },
{ "zvbb", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_RV_ZVBB }, .unit = "flags" },
{ "misaligned", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_RV_MISALIGNED }, .unit = "flags" },
#elif ARCH_WASM
{ "simd128", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = AV_CPU_FLAG_SIMD128 }, .unit = "flags" },
#endif
{ NULL },
};
Expand Down Expand Up @@ -283,6 +287,8 @@ size_t av_cpu_max_align(void)
return ff_get_cpu_max_align_arm();
#elif ARCH_PPC
return ff_get_cpu_max_align_ppc();
#elif ARCH_WASM
return ff_get_cpu_max_align_wasm();
#elif ARCH_X86
return ff_get_cpu_max_align_x86();
#elif ARCH_LOONGARCH
Expand Down
3 changes: 3 additions & 0 deletions src/ExtLib/ffmpeg/libavutil/cpu.h
Original file line number Diff line number Diff line change
Expand Up @@ -101,6 +101,9 @@
#define AV_CPU_FLAG_RV_MISALIGNED (1 <<10) ///< Fast misaligned accesses
#define AV_CPU_FLAG_RVB (1 <<11) ///< B (bit manipulations)

// WASM extensions
#define AV_CPU_FLAG_SIMD128 (1 << 0)

/**
* Return the flags which specify extensions supported by the CPU.
* The returned value is affected by av_force_cpu_flags() if that was used
Expand Down
Loading

0 comments on commit 97b2322

Please sign in to comment.