shithub: dav1d

Download patch

ref: 2dddfaac48cf69e491427dcebab96b8ea9e25500
parent: 2756254fc6ba402c5b6ab345944d0878975ed715
author: Henrik Gramner <[email protected]>
date: Sun May 5 19:03:07 EDT 2019

Add missing dav1d prefixes to picture allocation functions

--- a/src/lib.c
+++ b/src/lib.c
@@ -61,8 +61,8 @@
     s->n_tile_threads = 1;
     s->apply_grain = 1;
     s->allocator.cookie = NULL;
-    s->allocator.alloc_picture_callback = default_picture_allocator;
-    s->allocator.release_picture_callback = default_picture_release;
+    s->allocator.alloc_picture_callback = dav1d_default_picture_alloc;
+    s->allocator.release_picture_callback = dav1d_default_picture_release;
     s->logger.cookie = NULL;
     s->logger.callback = dav1d_log_default_callback;
     s->operating_point = 0;
--- a/src/picture.c
+++ b/src/picture.c
@@ -45,7 +45,7 @@
 #include "src/thread.h"
 #include "src/thread_task.h"
 
-int default_picture_allocator(Dav1dPicture *const p, void *cookie) {
+int dav1d_default_picture_alloc(Dav1dPicture *const p, void *const cookie) {
     assert(cookie == NULL);
     const int hbd = p->p.bpc > 8;
     const int aligned_w = (p->p.w + 127) & ~127;
@@ -76,7 +76,7 @@
     return 0;
 }
 
-void default_picture_release(Dav1dPicture *const p, void *cookie) {
+void dav1d_default_picture_release(Dav1dPicture *const p, void *const cookie) {
     assert(cookie == NULL);
 #ifndef NDEBUG /* safety check */
     assert(p->allocator_data == p->data[0]);
--- a/src/picture.h
+++ b/src/picture.h
@@ -105,8 +105,8 @@
 void dav1d_thread_picture_signal(const Dav1dThreadPicture *p, int y,
                                  enum PlaneType plane_type);
 
-int default_picture_allocator(Dav1dPicture *, void *cookie);
-void default_picture_release(Dav1dPicture *, void *cookie);
+int dav1d_default_picture_alloc(Dav1dPicture *p, void *cookie);
+void dav1d_default_picture_release(Dav1dPicture *p, void *cookie);
 void dav1d_picture_unref_internal(Dav1dPicture *p);
 
 #endif /* DAV1D_SRC_PICTURE_H */