mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-10-08 08:17:31 +09:00
Update aom to v1.0.0
Update aom to commit id d14c5bb4f336ef1842046089849dee4a301fbbf0.
This commit is contained in:
parent
bb61121b44
commit
48f6d2e034
1087 changed files with 154333 additions and 265310 deletions
37
third_party/aom/aom_scale/generic/yv12config.c
vendored
37
third_party/aom/aom_scale/generic/yv12config.c
vendored
|
|
@ -16,8 +16,8 @@
|
|||
#include "aom_scale/yv12config.h"
|
||||
|
||||
/****************************************************************************
|
||||
* Exports
|
||||
****************************************************************************/
|
||||
* Exports
|
||||
****************************************************************************/
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
|
|
@ -25,7 +25,6 @@
|
|||
#define yv12_align_addr(addr, align) \
|
||||
(void *)(((size_t)(addr) + ((align)-1)) & (size_t) - (align))
|
||||
|
||||
#if CONFIG_AV1
|
||||
// TODO(jkoleszar): Maybe replace this with struct aom_image
|
||||
|
||||
int aom_free_frame_buffer(YV12_BUFFER_CONFIG *ybf) {
|
||||
|
|
@ -33,10 +32,7 @@ int aom_free_frame_buffer(YV12_BUFFER_CONFIG *ybf) {
|
|||
if (ybf->buffer_alloc_sz > 0) {
|
||||
aom_free(ybf->buffer_alloc);
|
||||
}
|
||||
|
||||
#if CONFIG_HIGHBITDEPTH && CONFIG_GLOBAL_MOTION
|
||||
if (ybf->y_buffer_8bit) aom_free(ybf->y_buffer_8bit);
|
||||
#endif
|
||||
|
||||
/* buffer_alloc isn't accessed by most functions. Rather y_buffer,
|
||||
u_buffer and v_buffer point to buffer_alloc and are used. Clear out
|
||||
|
|
@ -50,10 +46,7 @@ int aom_free_frame_buffer(YV12_BUFFER_CONFIG *ybf) {
|
|||
}
|
||||
|
||||
int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
|
||||
int ss_x, int ss_y,
|
||||
#if CONFIG_HIGHBITDEPTH
|
||||
int use_highbitdepth,
|
||||
#endif
|
||||
int ss_x, int ss_y, int use_highbitdepth,
|
||||
int border, int byte_alignment,
|
||||
aom_codec_frame_buffer_t *fb,
|
||||
aom_get_frame_buffer_cb_fn_t cb, void *cb_priv) {
|
||||
|
|
@ -72,12 +65,8 @@ int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
|
|||
const uint64_t uvplane_size =
|
||||
(uv_height + 2 * uv_border_h) * (uint64_t)uv_stride + byte_alignment;
|
||||
|
||||
#if CONFIG_HIGHBITDEPTH
|
||||
const uint64_t frame_size =
|
||||
(1 + use_highbitdepth) * (yplane_size + 2 * uvplane_size);
|
||||
#else
|
||||
const uint64_t frame_size = yplane_size + 2 * uvplane_size;
|
||||
#endif // CONFIG_HIGHBITDEPTH
|
||||
|
||||
uint8_t *buf = NULL;
|
||||
|
||||
|
|
@ -147,7 +136,6 @@ int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
|
|||
ybf->subsampling_y = ss_y;
|
||||
|
||||
buf = ybf->buffer_alloc;
|
||||
#if CONFIG_HIGHBITDEPTH
|
||||
if (use_highbitdepth) {
|
||||
// Store uint16 addresses when using 16bit framebuffers
|
||||
buf = CONVERT_TO_BYTEPTR(ybf->buffer_alloc);
|
||||
|
|
@ -155,7 +143,6 @@ int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
|
|||
} else {
|
||||
ybf->flags = 0;
|
||||
}
|
||||
#endif // CONFIG_HIGHBITDEPTH
|
||||
|
||||
ybf->y_buffer = (uint8_t *)yv12_align_addr(
|
||||
buf + (border * y_stride) + border, aom_byte_align);
|
||||
|
|
@ -167,7 +154,8 @@ int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
|
|||
(uv_border_h * uv_stride) + uv_border_w,
|
||||
aom_byte_align);
|
||||
|
||||
#if CONFIG_HIGHBITDEPTH && CONFIG_GLOBAL_MOTION
|
||||
ybf->use_external_refernce_buffers = 0;
|
||||
|
||||
if (use_highbitdepth) {
|
||||
if (ybf->y_buffer_8bit) aom_free(ybf->y_buffer_8bit);
|
||||
ybf->y_buffer_8bit = (uint8_t *)aom_memalign(32, (size_t)yplane_size);
|
||||
|
|
@ -175,7 +163,6 @@ int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
|
|||
} else {
|
||||
assert(!ybf->y_buffer_8bit);
|
||||
}
|
||||
#endif
|
||||
|
||||
ybf->corrupted = 0; /* assume not corrupted by errors */
|
||||
return 0;
|
||||
|
|
@ -184,19 +171,13 @@ int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
|
|||
}
|
||||
|
||||
int aom_alloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
|
||||
int ss_x, int ss_y,
|
||||
#if CONFIG_HIGHBITDEPTH
|
||||
int use_highbitdepth,
|
||||
#endif
|
||||
int border, int byte_alignment) {
|
||||
int ss_x, int ss_y, int use_highbitdepth, int border,
|
||||
int byte_alignment) {
|
||||
if (ybf) {
|
||||
aom_free_frame_buffer(ybf);
|
||||
return aom_realloc_frame_buffer(ybf, width, height, ss_x, ss_y,
|
||||
#if CONFIG_HIGHBITDEPTH
|
||||
use_highbitdepth,
|
||||
#endif
|
||||
border, byte_alignment, NULL, NULL, NULL);
|
||||
use_highbitdepth, border, byte_alignment,
|
||||
NULL, NULL, NULL);
|
||||
}
|
||||
return -2;
|
||||
}
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue