ref: e86ddd562e89b044ecff8519f1e4f60372dcbd3e
parent: a579cb8f538002be9e65bd9c2f43782d28d89282
author: James Almer <jamrial@gmail.com>
date: Thu Aug 6 12:40:50 EDT 2020
obu: remove a few unnecessary calls to memset() The relevant structs are filled immediately after them.
--- a/src/obu.c
+++ b/src/obu.c
@@ -1374,7 +1374,6 @@
Dav1dRef *ref = dav1d_ref_create(sizeof(Dav1dContentLightLevel));
if (!ref) return DAV1D_ERR(ENOMEM);
Dav1dContentLightLevel *const content_light = ref->data;
- memset(content_light, 0, sizeof(*content_light));
content_light->max_content_light_level = dav1d_get_bits(&gb, 16);
content_light->max_frame_average_light_level = dav1d_get_bits(&gb, 16);
@@ -1396,7 +1395,6 @@
Dav1dRef *ref = dav1d_ref_create(sizeof(Dav1dMasteringDisplay));
if (!ref) return DAV1D_ERR(ENOMEM);
Dav1dMasteringDisplay *const mastering_display = ref->data;
- memset(mastering_display, 0, sizeof(*mastering_display));
for (int i = 0; i < 3; i++) {
mastering_display->primaries[i][0] = dav1d_get_bits(&gb, 16);