mirror of
https://github.com/signalwire/freeswitch.git
synced 2026-10-05 03:11:23 +00:00
[libvpx] Update to v1.12.0
This commit is contained in:
@@ -15,7 +15,13 @@
|
||||
int vp8dx_start_decode(BOOL_DECODER *br, const unsigned char *source,
|
||||
unsigned int source_sz, vpx_decrypt_cb decrypt_cb,
|
||||
void *decrypt_state) {
|
||||
br->user_buffer_end = source + source_sz;
|
||||
if (source_sz && !source) return 1;
|
||||
|
||||
// To simplify calling code this fuction can be called with |source| == null
|
||||
// and |source_sz| == 0. This and vp8dx_bool_decoder_fill() are essentially
|
||||
// no-ops in this case.
|
||||
// Work around a ubsan warning with a ternary to avoid adding 0 to null.
|
||||
br->user_buffer_end = source ? source + source_sz : source;
|
||||
br->user_buffer = source;
|
||||
br->value = 0;
|
||||
br->count = -8;
|
||||
@@ -23,8 +29,6 @@ int vp8dx_start_decode(BOOL_DECODER *br, const unsigned char *source,
|
||||
br->decrypt_cb = decrypt_cb;
|
||||
br->decrypt_state = decrypt_state;
|
||||
|
||||
if (source_sz && !source) return 1;
|
||||
|
||||
/* Populate the buffer */
|
||||
vp8dx_bool_decoder_fill(br);
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ static void decode_macroblock(VP8D_COMP *pbi, MACROBLOCKD *xd,
|
||||
vp8_short_inv_walsh4x4(&b->dqcoeff[0], xd->qcoeff);
|
||||
memset(b->qcoeff, 0, 16 * sizeof(b->qcoeff[0]));
|
||||
} else {
|
||||
b->dqcoeff[0] = b->qcoeff[0] * xd->dequant_y2[0];
|
||||
b->dqcoeff[0] = (short)(b->qcoeff[0] * xd->dequant_y2[0]);
|
||||
vp8_short_inv_walsh4x4_1(&b->dqcoeff[0], xd->qcoeff);
|
||||
memset(b->qcoeff, 0, 2 * sizeof(b->qcoeff[0]));
|
||||
}
|
||||
@@ -610,8 +610,7 @@ static void decode_mb_rows(VP8D_COMP *pbi) {
|
||||
lf_dst[2]);
|
||||
} else {
|
||||
vp8_loop_filter_row_simple(pc, lf_mic, mb_row - 1, recon_y_stride,
|
||||
recon_uv_stride, lf_dst[0], lf_dst[1],
|
||||
lf_dst[2]);
|
||||
lf_dst[0]);
|
||||
}
|
||||
if (mb_row > 1) {
|
||||
yv12_extend_frame_left_right_c(yv12_fb_new, eb_dst[0], eb_dst[1],
|
||||
@@ -647,8 +646,7 @@ static void decode_mb_rows(VP8D_COMP *pbi) {
|
||||
lf_dst[2]);
|
||||
} else {
|
||||
vp8_loop_filter_row_simple(pc, lf_mic, mb_row - 1, recon_y_stride,
|
||||
recon_uv_stride, lf_dst[0], lf_dst[1],
|
||||
lf_dst[2]);
|
||||
lf_dst[0]);
|
||||
}
|
||||
|
||||
yv12_extend_frame_left_right_c(yv12_fb_new, eb_dst[0], eb_dst[1],
|
||||
@@ -874,8 +872,8 @@ static void init_frame(VP8D_COMP *pbi) {
|
||||
xd->mode_info_stride = pc->mode_info_stride;
|
||||
xd->corrupted = 0; /* init without corruption */
|
||||
|
||||
xd->fullpixel_mask = 0xffffffff;
|
||||
if (pc->full_pixel) xd->fullpixel_mask = 0xfffffff8;
|
||||
xd->fullpixel_mask = ~0;
|
||||
if (pc->full_pixel) xd->fullpixel_mask = ~7;
|
||||
}
|
||||
|
||||
int vp8_decode_frame(VP8D_COMP *pbi) {
|
||||
|
||||
@@ -173,7 +173,8 @@ const vp8_prob vp8_sub_mv_ref_prob3[8][VP8_SUBMVREFS - 1] = {
|
||||
{ 208, 1, 1 } /* SUBMVREF_LEFT_ABOVE_ZED */
|
||||
};
|
||||
|
||||
static const vp8_prob *get_sub_mv_ref_prob(const int left, const int above) {
|
||||
static const vp8_prob *get_sub_mv_ref_prob(const uint32_t left,
|
||||
const uint32_t above) {
|
||||
int lez = (left == 0);
|
||||
int aez = (above == 0);
|
||||
int lea = (left == above);
|
||||
@@ -485,10 +486,7 @@ static void read_mb_features(vp8_reader *r, MB_MODE_INFO *mi, MACROBLOCKD *x) {
|
||||
}
|
||||
}
|
||||
|
||||
static void decode_mb_mode_mvs(VP8D_COMP *pbi, MODE_INFO *mi,
|
||||
MB_MODE_INFO *mbmi) {
|
||||
(void)mbmi;
|
||||
|
||||
static void decode_mb_mode_mvs(VP8D_COMP *pbi, MODE_INFO *mi) {
|
||||
/* Read the Macroblock segmentation map if it is being updated explicitly
|
||||
* this frame (reset to 0 above by default)
|
||||
* By default on a key frame reset all MBs to segment 0
|
||||
@@ -537,7 +535,7 @@ void vp8_decode_mode_mvs(VP8D_COMP *pbi) {
|
||||
int mb_num = mb_row * pbi->common.mb_cols + mb_col;
|
||||
#endif
|
||||
|
||||
decode_mb_mode_mvs(pbi, mi, &mi->mbmi);
|
||||
decode_mb_mode_mvs(pbi, mi);
|
||||
|
||||
#if CONFIG_ERROR_CONCEALMENT
|
||||
/* look for corruption. set mvs_corrupt_from_mb to the current
|
||||
|
||||
@@ -11,6 +11,7 @@
|
||||
#include "vp8/common/blockd.h"
|
||||
#include "onyxd_int.h"
|
||||
#include "vpx_mem/vpx_mem.h"
|
||||
#include "vpx_ports/compiler_attributes.h"
|
||||
#include "vpx_ports/mem.h"
|
||||
#include "detokenize.h"
|
||||
|
||||
@@ -52,7 +53,10 @@ static const uint8_t kZigzag[16] = { 0, 1, 4, 8, 5, 2, 3, 6,
|
||||
/* for const-casting */
|
||||
typedef const uint8_t (*ProbaArray)[NUM_CTX][NUM_PROBAS];
|
||||
|
||||
static int GetSigned(BOOL_DECODER *br, int value_to_sign) {
|
||||
// With corrupt / fuzzed streams the calculation of br->value may overflow. See
|
||||
// b/148271109.
|
||||
static VPX_NO_UNSIGNED_OVERFLOW_CHECK int GetSigned(BOOL_DECODER *br,
|
||||
int value_to_sign) {
|
||||
int split = (br->range + 1) >> 1;
|
||||
VP8_BD_VALUE bigsplit = (VP8_BD_VALUE)split << (VP8_BD_VALUE_SIZE - 8);
|
||||
int v;
|
||||
|
||||
@@ -37,7 +37,7 @@
|
||||
#if CONFIG_ERROR_CONCEALMENT
|
||||
#include "error_concealment.h"
|
||||
#endif
|
||||
#if ARCH_ARM
|
||||
#if VPX_ARCH_ARM
|
||||
#include "vpx_ports/arm.h"
|
||||
#endif
|
||||
|
||||
@@ -302,12 +302,9 @@ static int check_fragments_for_errors(VP8D_COMP *pbi) {
|
||||
return 1;
|
||||
}
|
||||
|
||||
int vp8dx_receive_compressed_data(VP8D_COMP *pbi, size_t size,
|
||||
const uint8_t *source, int64_t time_stamp) {
|
||||
int vp8dx_receive_compressed_data(VP8D_COMP *pbi, int64_t time_stamp) {
|
||||
VP8_COMMON *cm = &pbi->common;
|
||||
int retcode = -1;
|
||||
(void)size;
|
||||
(void)source;
|
||||
|
||||
pbi->common.error.error_code = VPX_CODEC_OK;
|
||||
|
||||
|
||||
@@ -10,7 +10,7 @@
|
||||
|
||||
#include "vpx_config.h"
|
||||
#include "vp8_rtcd.h"
|
||||
#if !defined(WIN32) && CONFIG_OS_SUPPORT == 1
|
||||
#if !defined(_WIN32) && CONFIG_OS_SUPPORT == 1
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
#include "onyxd_int.h"
|
||||
@@ -74,9 +74,9 @@ static void setup_decoding_thread_data(VP8D_COMP *pbi, MACROBLOCKD *xd,
|
||||
memcpy(mbd->dequant_y2, xd->dequant_y2, sizeof(xd->dequant_y2));
|
||||
memcpy(mbd->dequant_uv, xd->dequant_uv, sizeof(xd->dequant_uv));
|
||||
|
||||
mbd->fullpixel_mask = 0xffffffff;
|
||||
mbd->fullpixel_mask = ~0;
|
||||
|
||||
if (pc->full_pixel) mbd->fullpixel_mask = 0xfffffff8;
|
||||
if (pc->full_pixel) mbd->fullpixel_mask = ~7;
|
||||
}
|
||||
|
||||
for (i = 0; i < pc->mb_rows; ++i)
|
||||
|
||||
Reference in New Issue
Block a user