mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-08 00:07:30 +09:00
Update libaom to commit ID 1e227d41f0616de9548a673a83a21ef990b62591
This commit is contained in:
parent
77c9089b7d
commit
368651059a
526 changed files with 34535 additions and 15900 deletions
6
third_party/aom/aom_scale/aom_scale.h
vendored
6
third_party/aom/aom_scale/aom_scale.h
vendored
|
|
@ -9,8 +9,8 @@
|
|||
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
|
||||
*/
|
||||
|
||||
#ifndef AOM_SCALE_AOM_SCALE_H_
|
||||
#define AOM_SCALE_AOM_SCALE_H_
|
||||
#ifndef AOM_AOM_SCALE_AOM_SCALE_H_
|
||||
#define AOM_AOM_SCALE_AOM_SCALE_H_
|
||||
|
||||
#include "aom_scale/yv12config.h"
|
||||
|
||||
|
|
@ -20,4 +20,4 @@ extern void aom_scale_frame(YV12_BUFFER_CONFIG *src, YV12_BUFFER_CONFIG *dst,
|
|||
unsigned int vscale, unsigned int vratio,
|
||||
unsigned int interlaced, const int num_planes);
|
||||
|
||||
#endif // AOM_SCALE_AOM_SCALE_H_
|
||||
#endif // AOM_AOM_SCALE_AOM_SCALE_H_
|
||||
|
|
|
|||
24
third_party/aom/aom_scale/generic/yv12config.c
vendored
24
third_party/aom/aom_scale/generic/yv12config.c
vendored
|
|
@ -14,6 +14,7 @@
|
|||
#include "aom_mem/aom_mem.h"
|
||||
#include "aom_ports/mem.h"
|
||||
#include "aom_scale/yv12config.h"
|
||||
#include "av1/common/enums.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Exports
|
||||
|
|
@ -50,11 +51,11 @@ int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
|
|||
int border, int byte_alignment,
|
||||
aom_codec_frame_buffer_t *fb,
|
||||
aom_get_frame_buffer_cb_fn_t cb, void *cb_priv) {
|
||||
if (ybf) {
|
||||
#if CONFIG_SIZE_LIMIT
|
||||
if (width > DECODE_WIDTH_LIMIT || height > DECODE_HEIGHT_LIMIT) return -1;
|
||||
if (width > DECODE_WIDTH_LIMIT || height > DECODE_HEIGHT_LIMIT) return -1;
|
||||
#endif
|
||||
|
||||
if (ybf) {
|
||||
const int aom_byte_align = (byte_alignment == 0) ? 1 : byte_alignment;
|
||||
const int aligned_width = (width + 7) & ~7;
|
||||
const int aligned_height = (height + 7) & ~7;
|
||||
|
|
@ -74,6 +75,17 @@ int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
|
|||
|
||||
uint8_t *buf = NULL;
|
||||
|
||||
#if defined AOM_MAX_ALLOCABLE_MEMORY
|
||||
// The size of ybf->buffer_alloc.
|
||||
uint64_t alloc_size = frame_size;
|
||||
// The size of ybf->y_buffer_8bit.
|
||||
if (use_highbitdepth) alloc_size += yplane_size;
|
||||
// The decoder may allocate REF_FRAMES frame buffers in the frame buffer
|
||||
// pool. Bound the total amount of allocated memory as if these REF_FRAMES
|
||||
// frame buffers were allocated in a single allocation.
|
||||
if (alloc_size > AOM_MAX_ALLOCABLE_MEMORY / REF_FRAMES) return -1;
|
||||
#endif
|
||||
|
||||
if (cb != NULL) {
|
||||
const int align_addr_extra_size = 31;
|
||||
const uint64_t external_frame_size = frame_size + align_addr_extra_size;
|
||||
|
|
@ -94,7 +106,7 @@ int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
|
|||
// This memset is needed for fixing the issue of using uninitialized
|
||||
// value in msan test. It will cause a perf loss, so only do this for
|
||||
// msan test.
|
||||
memset(ybf->buffer_alloc, 0, (int)frame_size);
|
||||
memset(ybf->buffer_alloc, 0, (size_t)frame_size);
|
||||
#endif
|
||||
#endif
|
||||
} else if (frame_size > (size_t)ybf->buffer_alloc_sz) {
|
||||
|
|
@ -165,7 +177,11 @@ int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
|
|||
ybf->y_buffer_8bit = (uint8_t *)aom_memalign(32, (size_t)yplane_size);
|
||||
if (!ybf->y_buffer_8bit) return -1;
|
||||
} else {
|
||||
assert(!ybf->y_buffer_8bit);
|
||||
if (ybf->y_buffer_8bit) {
|
||||
aom_free(ybf->y_buffer_8bit);
|
||||
ybf->y_buffer_8bit = NULL;
|
||||
ybf->buf_8bit_valid = 0;
|
||||
}
|
||||
}
|
||||
|
||||
ybf->corrupted = 0; /* assume not corrupted by errors */
|
||||
|
|
|
|||
10
third_party/aom/aom_scale/yv12config.h
vendored
10
third_party/aom/aom_scale/yv12config.h
vendored
|
|
@ -9,8 +9,8 @@
|
|||
* PATENTS file, you can obtain it at www.aomedia.org/license/patent.
|
||||
*/
|
||||
|
||||
#ifndef AOM_SCALE_YV12CONFIG_H_
|
||||
#define AOM_SCALE_YV12CONFIG_H_
|
||||
#ifndef AOM_AOM_SCALE_YV12CONFIG_H_
|
||||
#define AOM_AOM_SCALE_YV12CONFIG_H_
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
|
@ -28,7 +28,11 @@ extern "C" {
|
|||
// TODO(jingning): Use unified inter predictor for encoder and
|
||||
// decoder during the development process. Revisit the frame border
|
||||
// to improve the decoder performance.
|
||||
#if CONFIG_REDUCED_ENCODER_BORDER
|
||||
#define AOM_BORDER_IN_PIXELS 160
|
||||
#else
|
||||
#define AOM_BORDER_IN_PIXELS 288
|
||||
#endif // CONFIG_REDUCED_ENCODER_BORDER
|
||||
|
||||
typedef struct yv12_buffer_config {
|
||||
union {
|
||||
|
|
@ -136,4 +140,4 @@ int aom_free_frame_buffer(YV12_BUFFER_CONFIG *ybf);
|
|||
}
|
||||
#endif
|
||||
|
||||
#endif // AOM_SCALE_YV12CONFIG_H_
|
||||
#endif // AOM_AOM_SCALE_YV12CONFIG_H_
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue