ref: b79c7d4535f46c17dc2ad93eb78480dc67e4dfd9
parent: f53749e12241e6d61d9d2bd51666302c59962fc9
author: Hugo Beauzée-Luyssen <hugo@videolan.org>
date: Fri Sep 28 13:55:52 EDT 2018
Remove unneeded 'once' guards This is guarateed by pthread_once now
--- a/src/qm.c
+++ b/src/qm.c
@@ -3105,9 +3105,7 @@
}
void av1_init_qm_tables(void) {
- static int done = 0;
- if (done) return;
- done = 1;
+ // This function is guaranteed to be called only once by dav1d_init
for (int i = 0; i < 15; i++)
for (int j = 0; j < 2; j++) {
--- a/src/wedge.c
+++ b/src/wedge.c
@@ -214,9 +214,7 @@
}
void av1_init_wedge_masks(void) {
- static int done = 0;
- if (done) return;
- done = 1;
+ // This function is guaranteed to be called only once by dav1d_init
enum WedgeMasterLineType {
WEDGE_MASTER_LINE_ODD,
@@ -315,9 +313,7 @@
}
void av1_init_interintra_masks(void) {
- static int done = 0;
- if (done) return;
- done = 1;
+ // This function is guaranteed to be called only once by dav1d_init
memset(ii_dc_mask, 32, 32 * 32);
#define set(a) a[II_VERT_PRED - 1], a[II_HOR_PRED - 1], a[II_SMOOTH_PRED - 1]