summaryrefslogtreecommitdiffstats
path: root/third_party/aom/aom_scale/generic/yv12config.c
diff options
context:
space:
mode:
authortrav90 <travawine@palemoon.org>2018-10-18 21:53:44 -0500
committertrav90 <travawine@palemoon.org>2018-10-18 21:53:44 -0500
commitec910d81405c736a4490383a250299a7837c2e64 (patch)
tree4f27cc226f93a863121aef6c56313e4153a69b3e /third_party/aom/aom_scale/generic/yv12config.c
parent01eb57073ba97b2d6cbf20f745dfcc508197adc3 (diff)
downloadUXP-ec910d81405c736a4490383a250299a7837c2e64.tar
UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.gz
UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.lz
UXP-ec910d81405c736a4490383a250299a7837c2e64.tar.xz
UXP-ec910d81405c736a4490383a250299a7837c2e64.zip
Update aom to commit id e87fb2378f01103d5d6e477a4ef6892dc714e614
Diffstat (limited to 'third_party/aom/aom_scale/generic/yv12config.c')
-rw-r--r--third_party/aom/aom_scale/generic/yv12config.c13
1 files changed, 8 insertions, 5 deletions
diff --git a/third_party/aom/aom_scale/generic/yv12config.c b/third_party/aom/aom_scale/generic/yv12config.c
index ee15ae103..fce719273 100644
--- a/third_party/aom/aom_scale/generic/yv12config.c
+++ b/third_party/aom/aom_scale/generic/yv12config.c
@@ -11,9 +11,9 @@
#include <assert.h>
-#include "aom_scale/yv12config.h"
#include "aom_mem/aom_mem.h"
#include "aom_ports/mem.h"
+#include "aom_scale/yv12config.h"
/****************************************************************************
* Exports
@@ -35,7 +35,7 @@ int aom_free_frame_buffer(YV12_BUFFER_CONFIG *ybf) {
}
#if CONFIG_HIGHBITDEPTH && CONFIG_GLOBAL_MOTION
- if (ybf->y_buffer_8bit) free(ybf->y_buffer_8bit);
+ if (ybf->y_buffer_8bit) aom_free(ybf->y_buffer_8bit);
#endif
/* buffer_alloc isn't accessed by most functions. Rather y_buffer,
@@ -168,9 +168,12 @@ int aom_realloc_frame_buffer(YV12_BUFFER_CONFIG *ybf, int width, int height,
aom_byte_align);
#if CONFIG_HIGHBITDEPTH && CONFIG_GLOBAL_MOTION
- if (ybf->y_buffer_8bit) {
- free(ybf->y_buffer_8bit);
- ybf->y_buffer_8bit = NULL;
+ 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);
+ if (!ybf->y_buffer_8bit) return -1;
+ } else {
+ assert(!ybf->y_buffer_8bit);
}
#endif