Commit 7b908ef235 for aom

commit 7b908ef23517bf43cca0033a192cfb2f9c3e609e
Author: Ihor Buhaiov <freedbrt@gmail.com>
Date:   Tue Oct 20 17:35:02 2026 +0200

    Remove the unused third_party/vector library

    The flat array hash table was the last user of third_party/vector, so
    nothing includes vector.h or calls its functions anymore. Delete the
    library and take it out of the encoder sources in av1.cmake.

    Suggested by Jerome Jiang in the review of the flat array change.

    No functional change.

    Bug: 576320193
    Change-Id: Iffeeb5571f41b8790d330900cd86a8435a72419a

diff --git a/av1/av1.cmake b/av1/av1.cmake
index f292809191..491dd37c2e 100644
--- a/av1/av1.cmake
+++ b/av1/av1.cmake
@@ -262,8 +262,6 @@ list(APPEND AOM_AV1_ENCODER_SOURCES
             "${AOM_ROOT}/third_party/fastfeat/fast.h"
             "${AOM_ROOT}/third_party/fastfeat/fast_9.c"
             "${AOM_ROOT}/third_party/fastfeat/nonmax.c"
-            "${AOM_ROOT}/third_party/vector/vector.c"
-            "${AOM_ROOT}/third_party/vector/vector.h"
             "${AOM_ROOT}/av1/encoder/dwt.c"
             "${AOM_ROOT}/av1/encoder/dwt.h")

diff --git a/third_party/vector/LICENSE b/third_party/vector/LICENSE
deleted file mode 100644
index afcb9f00a5..0000000000
--- a/third_party/vector/LICENSE
+++ /dev/null
@@ -1,19 +0,0 @@
-The MIT License (MIT)
-Copyright (c) 2016 Peter Goldsborough
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions:
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/third_party/vector/README.libaom b/third_party/vector/README.libaom
deleted file mode 100644
index f8e06b010d..0000000000
--- a/third_party/vector/README.libaom
+++ /dev/null
@@ -1,21 +0,0 @@
-Name: vector
-URL: https://github.com/goldsborough/vector
-Version: N/A
-Update Mechanism: Manual
-Revision: 40efe82
-License: MIT
-License File: LICENSE
-Shipped in Chromium: yes
-Security Critical: yes
-
-Description:
-A feature-complete, generic and customizable resizable
-array implementation in pure C that supports almost
-the entire C++ std::vector API, including iterators.
-
-Local Modifications:
-1. Renamed some functions to fit in with the AOMedia
-naming convention.
-2. Removed non-global functions from vector.h.
-3. Made all non-global functions in vector.c static.
-4. Commented out unused code.
diff --git a/third_party/vector/vector.c b/third_party/vector/vector.c
deleted file mode 100644
index 0416f38170..0000000000
--- a/third_party/vector/vector.c
+++ /dev/null
@@ -1,560 +0,0 @@
-/*
-The MIT License(MIT)
-Copyright(c) 2016 Peter Goldsborough
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions :
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-#define __STDC_WANT_LIB_EXT1__ 1
-
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
-#include "third_party/vector/vector.h"
-
-/***** PRIVATE *****/
-#define MAX(a, b) ((a) > (b) ? (a) : (b))
-
-static bool _vector_should_grow(Vector *vector) {
-  assert(vector->size <= vector->capacity);
-  return vector->size == vector->capacity;
-}
-
-#if 0
-static bool _vector_should_shrink(Vector *vector) {
-  assert(vector->size <= vector->capacity);
-  return vector->size == vector->capacity * VECTOR_SHRINK_THRESHOLD;
-}
-#endif  // 0
-
-static void *_vector_offset(Vector *vector, size_t index) {
-  // return vector->data + (index * vector->element_size);
-  return (unsigned char *)vector->data + (index * vector->element_size);
-}
-
-#if 0
-static const void *_vector_const_offset(const Vector *vector, size_t index) {
-  // return vector->data + (index * vector->element_size);
-  return (unsigned char *)vector->data + (index * vector->element_size);
-}
-#endif  // 0
-
-static void _vector_assign(Vector *vector, size_t index, void *element) {
-  /* Insert the element */
-  void *offset = _vector_offset(vector, index);
-  memcpy(offset, element, vector->element_size);
-}
-
-#if 0
-static int _vector_move_right(Vector *vector, size_t index) {
-  assert(vector->size < vector->capacity);
-
-  /* The location where to start to move from. */
-  void *offset = _vector_offset(vector, index);
-
-  /* How many to move to the right. */
-  size_t elements_in_bytes = (vector->size - index) * vector->element_size;
-
-#ifdef __STDC_LIB_EXT1__
-  size_t right_capacity_in_bytes =
-      (vector->capacity - (index + 1)) * vector->element_size;
-
-  /* clang-format off */
-    int return_code =  memmove_s(
-        offset + vector->element_size,
-        right_capacity_in_bytes,
-        offset,
-        elements_in_bytes);
-
-  /* clang-format on */
-
-  return return_code == 0 ? VECTOR_SUCCESS : VECTOR_ERROR;
-
-#else
-  // memmove(offset + vector->element_size, offset, elements_in_bytes);
-  memmove((unsigned char *)offset + vector->element_size, offset,
-          elements_in_bytes);
-  return VECTOR_SUCCESS;
-#endif
-}
-
-static void _vector_move_left(Vector *vector, size_t index) {
-  size_t right_elements_in_bytes;
-  void *offset;
-
-  /* The offset into the memory */
-  offset = _vector_offset(vector, index);
-
-  /* How many to move to the left */
-  right_elements_in_bytes = (vector->size - index - 1) * vector->element_size;
-
-  // memmove(offset, offset + vector->element_size, right_elements_in_bytes);
-  memmove(offset, (unsigned char *)offset + vector->element_size,
-          right_elements_in_bytes);
-}
-#endif  // 0
-
-static int _vector_reallocate(Vector *vector, size_t new_capacity) {
-  size_t new_capacity_in_bytes;
-  void *old;
-  assert(vector != NULL);
-
-  if (new_capacity < VECTOR_MINIMUM_CAPACITY) {
-    if (vector->capacity > VECTOR_MINIMUM_CAPACITY) {
-      new_capacity = VECTOR_MINIMUM_CAPACITY;
-    } else {
-      /* NO-OP */
-      return VECTOR_SUCCESS;
-    }
-  }
-
-  new_capacity_in_bytes = new_capacity * vector->element_size;
-  old = vector->data;
-
-  if ((vector->data = malloc(new_capacity_in_bytes)) == NULL) {
-    return VECTOR_ERROR;
-  }
-
-#ifdef __STDC_LIB_EXT1__
-  /* clang-format off */
-    if (memcpy_s(vector->data,
-                             new_capacity_in_bytes,
-                             old,
-                             aom_vector_byte_size(vector)) != 0) {
-        return VECTOR_ERROR;
-    }
-/* clang-format on */
-#else
-  memcpy(vector->data, old, aom_vector_byte_size(vector));
-#endif
-
-  vector->capacity = new_capacity;
-
-  free(old);
-
-  return VECTOR_SUCCESS;
-}
-
-static int _vector_adjust_capacity(Vector *vector) {
-  return _vector_reallocate(vector,
-                            MAX(1, vector->size * VECTOR_GROWTH_FACTOR));
-}
-
-#if 0
-static void _vector_swap(size_t *first, size_t *second) {
-  size_t temp = *first;
-  *first = *second;
-  *second = temp;
-}
-#endif  // 0
-
-int aom_vector_setup(Vector *vector, size_t capacity, size_t element_size) {
-  assert(vector != NULL);
-
-  if (vector == NULL) return VECTOR_ERROR;
-
-  vector->size = 0;
-  vector->capacity = MAX(VECTOR_MINIMUM_CAPACITY, capacity);
-  vector->element_size = element_size;
-  vector->data = malloc(vector->capacity * element_size);
-
-  return vector->data == NULL ? VECTOR_ERROR : VECTOR_SUCCESS;
-}
-
-#if 0
-int aom_vector_copy(Vector *destination, Vector *source) {
-  assert(destination != NULL);
-  assert(source != NULL);
-  assert(aom_vector_is_initialized(source));
-  assert(!aom_vector_is_initialized(destination));
-
-  if (destination == NULL) return VECTOR_ERROR;
-  if (source == NULL) return VECTOR_ERROR;
-  if (aom_vector_is_initialized(destination)) return VECTOR_ERROR;
-  if (!aom_vector_is_initialized(source)) return VECTOR_ERROR;
-
-  /* Copy ALL the data */
-  destination->size = source->size;
-  destination->capacity = source->size * 2;
-  destination->element_size = source->element_size;
-
-  /* Note that we are not necessarily allocating the same capacity */
-  destination->data = malloc(destination->capacity * source->element_size);
-  if (destination->data == NULL) return VECTOR_ERROR;
-
-  memcpy(destination->data, source->data, aom_vector_byte_size(source));
-
-  return VECTOR_SUCCESS;
-}
-
-int aom_vector_copy_assign(Vector *destination, Vector *source) {
-  assert(destination != NULL);
-  assert(source != NULL);
-  assert(aom_vector_is_initialized(source));
-  assert(aom_vector_is_initialized(destination));
-
-  if (destination == NULL) return VECTOR_ERROR;
-  if (source == NULL) return VECTOR_ERROR;
-  if (!aom_vector_is_initialized(destination)) return VECTOR_ERROR;
-  if (!aom_vector_is_initialized(source)) return VECTOR_ERROR;
-
-  aom_vector_destroy(destination);
-
-  return aom_vector_copy(destination, source);
-}
-
-int aom_vector_move(Vector *destination, Vector *source) {
-  assert(destination != NULL);
-  assert(source != NULL);
-
-  if (destination == NULL) return VECTOR_ERROR;
-  if (source == NULL) return VECTOR_ERROR;
-
-  *destination = *source;
-  source->data = NULL;
-
-  return VECTOR_SUCCESS;
-}
-
-int aom_vector_move_assign(Vector *destination, Vector *source) {
-  aom_vector_swap(destination, source);
-  return aom_vector_destroy(source);
-}
-
-int aom_vector_swap(Vector *destination, Vector *source) {
-  void *temp;
-
-  assert(destination != NULL);
-  assert(source != NULL);
-  assert(aom_vector_is_initialized(source));
-  assert(aom_vector_is_initialized(destination));
-
-  if (destination == NULL) return VECTOR_ERROR;
-  if (source == NULL) return VECTOR_ERROR;
-  if (!aom_vector_is_initialized(destination)) return VECTOR_ERROR;
-  if (!aom_vector_is_initialized(source)) return VECTOR_ERROR;
-
-  _vector_swap(&destination->size, &source->size);
-  _vector_swap(&destination->capacity, &source->capacity);
-  _vector_swap(&destination->element_size, &source->element_size);
-
-  temp = destination->data;
-  destination->data = source->data;
-  source->data = temp;
-
-  return VECTOR_SUCCESS;
-}
-#endif  // 0
-
-int aom_vector_destroy(Vector *vector) {
-  assert(vector != NULL);
-
-  if (vector == NULL) return VECTOR_ERROR;
-
-  free(vector->data);
-  vector->data = NULL;
-
-  return VECTOR_SUCCESS;
-}
-
-/* Insertion */
-int aom_vector_push_back(Vector *vector, void *element) {
-  assert(vector != NULL);
-  assert(element != NULL);
-
-  if (_vector_should_grow(vector)) {
-    if (_vector_adjust_capacity(vector) == VECTOR_ERROR) {
-      return VECTOR_ERROR;
-    }
-  }
-
-  _vector_assign(vector, vector->size, element);
-
-  ++vector->size;
-
-  return VECTOR_SUCCESS;
-}
-
-#if 0
-int aom_vector_push_front(Vector *vector, void *element) {
-  return aom_vector_insert(vector, 0, element);
-}
-
-int aom_vector_insert(Vector *vector, size_t index, void *element) {
-  void *offset;
-
-  assert(vector != NULL);
-  assert(element != NULL);
-  assert(index <= vector->size);
-
-  if (vector == NULL) return VECTOR_ERROR;
-  if (element == NULL) return VECTOR_ERROR;
-  if (vector->element_size == 0) return VECTOR_ERROR;
-  if (index > vector->size) return VECTOR_ERROR;
-
-  if (_vector_should_grow(vector)) {
-    if (_vector_adjust_capacity(vector) == VECTOR_ERROR) {
-      return VECTOR_ERROR;
-    }
-  }
-
-  /* Move other elements to the right */
-  if (_vector_move_right(vector, index) == VECTOR_ERROR) {
-    return VECTOR_ERROR;
-  }
-
-  /* Insert the element */
-  offset = _vector_offset(vector, index);
-  memcpy(offset, element, vector->element_size);
-  ++vector->size;
-
-  return VECTOR_SUCCESS;
-}
-
-int aom_vector_assign(Vector *vector, size_t index, void *element) {
-  assert(vector != NULL);
-  assert(element != NULL);
-  assert(index < vector->size);
-
-  if (vector == NULL) return VECTOR_ERROR;
-  if (element == NULL) return VECTOR_ERROR;
-  if (vector->element_size == 0) return VECTOR_ERROR;
-  if (index >= vector->size) return VECTOR_ERROR;
-
-  _vector_assign(vector, index, element);
-
-  return VECTOR_SUCCESS;
-}
-
-/* Deletion */
-int aom_vector_pop_back(Vector *vector) {
-  assert(vector != NULL);
-  assert(vector->size > 0);
-
-  if (vector == NULL) return VECTOR_ERROR;
-  if (vector->element_size == 0) return VECTOR_ERROR;
-
-  --vector->size;
-
-#ifndef VECTOR_NO_SHRINK
-  if (_vector_should_shrink(vector)) {
-    _vector_adjust_capacity(vector);
-  }
-#endif
-
-  return VECTOR_SUCCESS;
-}
-
-int aom_vector_pop_front(Vector *vector) { return aom_vector_erase(vector, 0); }
-
-int aom_vector_erase(Vector *vector, size_t index) {
-  assert(vector != NULL);
-  assert(index < vector->size);
-
-  if (vector == NULL) return VECTOR_ERROR;
-  if (vector->element_size == 0) return VECTOR_ERROR;
-  if (index >= vector->size) return VECTOR_ERROR;
-
-  /* Just overwrite */
-  _vector_move_left(vector, index);
-
-#ifndef VECTOR_NO_SHRINK
-  if (--vector->size == vector->capacity / 4) {
-    _vector_adjust_capacity(vector);
-  }
-#endif
-
-  return VECTOR_SUCCESS;
-}
-
-int aom_vector_clear(Vector *vector) { return aom_vector_resize(vector, 0); }
-
-/* Lookup */
-void *aom_vector_get(Vector *vector, size_t index) {
-  assert(vector != NULL);
-  assert(index < vector->size);
-
-  if (vector == NULL) return NULL;
-  if (vector->element_size == 0) return NULL;
-  if (index >= vector->size) return NULL;
-
-  return _vector_offset(vector, index);
-}
-
-const void *aom_vector_const_get(const Vector *vector, size_t index) {
-  assert(vector != NULL);
-  assert(index < vector->size);
-
-  if (vector == NULL) return NULL;
-  if (vector->element_size == 0) return NULL;
-  if (index >= vector->size) return NULL;
-
-  return _vector_const_offset(vector, index);
-}
-
-void *aom_vector_front(Vector *vector) { return aom_vector_get(vector, 0); }
-
-void *aom_vector_back(Vector *vector) {
-  return aom_vector_get(vector, vector->size - 1);
-}
-#endif  // 0
-
-/* Information */
-
-bool aom_vector_is_initialized(const Vector *vector) {
-  return vector->data != NULL;
-}
-
-size_t aom_vector_byte_size(const Vector *vector) {
-  return vector->size * vector->element_size;
-}
-
-#if 0
-size_t aom_vector_free_space(const Vector *vector) {
-  return vector->capacity - vector->size;
-}
-
-bool aom_vector_is_empty(const Vector *vector) { return vector->size == 0; }
-
-/* Memory management */
-int aom_vector_resize(Vector *vector, size_t new_size) {
-  if (new_size <= vector->capacity * VECTOR_SHRINK_THRESHOLD) {
-    vector->size = new_size;
-    if (_vector_reallocate(vector, new_size * VECTOR_GROWTH_FACTOR) == -1) {
-      return VECTOR_ERROR;
-    }
-  } else if (new_size > vector->capacity) {
-    if (_vector_reallocate(vector, new_size * VECTOR_GROWTH_FACTOR) == -1) {
-      return VECTOR_ERROR;
-    }
-  }
-
-  vector->size = new_size;
-
-  return VECTOR_SUCCESS;
-}
-
-int aom_vector_reserve(Vector *vector, size_t minimum_capacity) {
-  if (minimum_capacity > vector->capacity) {
-    if (_vector_reallocate(vector, minimum_capacity) == VECTOR_ERROR) {
-      return VECTOR_ERROR;
-    }
-  }
-
-  return VECTOR_SUCCESS;
-}
-
-int aom_vector_shrink_to_fit(Vector *vector) {
-  return _vector_reallocate(vector, vector->size);
-}
-#endif  // 0
-
-/* Iterators */
-Iterator aom_vector_begin(Vector *vector) { return aom_vector_iterator(vector, 0); }
-
-#if 0
-Iterator aom_vector_end(Vector *vector) {
-  return aom_vector_iterator(vector, vector->size);
-}
-#endif  // 0
-
-Iterator aom_vector_iterator(Vector *vector, size_t index) {
-  Iterator iterator = { NULL, 0 };
-
-  assert(vector != NULL);
-  assert(index <= vector->size);
-
-  if (vector == NULL) return iterator;
-  if (index > vector->size) return iterator;
-  if (vector->element_size == 0) return iterator;
-
-  iterator.pointer = _vector_offset(vector, index);
-  iterator.element_size = vector->element_size;
-
-  return iterator;
-}
-
-void *aom_iterator_get(Iterator *iterator) { return iterator->pointer; }
-
-#if 0
-int aom_iterator_erase(Vector *vector, Iterator *iterator) {
-  size_t index = aom_iterator_index(vector, iterator);
-
-  if (aom_vector_erase(vector, index) == VECTOR_ERROR) {
-    return VECTOR_ERROR;
-  }
-
-  *iterator = aom_vector_iterator(vector, index);
-
-  return VECTOR_SUCCESS;
-}
-#endif  // 0
-
-void aom_iterator_increment(Iterator *iterator) {
-  assert(iterator != NULL);
-  // iterator->pointer += iterator->element_size;
-  iterator->pointer =
-      (unsigned char *)iterator->pointer + iterator->element_size;
-}
-
-#if 0
-void aom_iterator_decrement(Iterator *iterator) {
-  assert(iterator != NULL);
-  // iterator->pointer -= iterator->element_size;
-  iterator->pointer =
-      (unsigned char *)iterator->pointer - iterator->element_size;
-}
-
-void *aom_iterator_next(Iterator *iterator) {
-  void *current = iterator->pointer;
-  aom_iterator_increment(iterator);
-
-  return current;
-}
-
-void *aom_iterator_previous(Iterator *iterator) {
-  void *current = iterator->pointer;
-  aom_iterator_decrement(iterator);
-
-  return current;
-}
-
-bool aom_iterator_equals(Iterator *first, Iterator *second) {
-  assert(first->element_size == second->element_size);
-  return first->pointer == second->pointer;
-}
-
-bool aom_iterator_is_before(Iterator *first, Iterator *second) {
-  assert(first->element_size == second->element_size);
-  return first->pointer < second->pointer;
-}
-
-bool aom_iterator_is_after(Iterator *first, Iterator *second) {
-  assert(first->element_size == second->element_size);
-  return first->pointer > second->pointer;
-}
-
-size_t aom_iterator_index(Vector *vector, Iterator *iterator) {
-  assert(vector != NULL);
-  assert(iterator != NULL);
-  // return (iterator->pointer - vector->data) / vector->element_size;
-  return ((unsigned char *)iterator->pointer - (unsigned char *)vector->data) /
-         vector->element_size;
-}
-#endif  // 0
diff --git a/third_party/vector/vector.h b/third_party/vector/vector.h
deleted file mode 100644
index f91acddb7c..0000000000
--- a/third_party/vector/vector.h
+++ /dev/null
@@ -1,152 +0,0 @@
-/*
-The MIT License(MIT)
-Copyright(c) 2016 Peter Goldsborough
-
-Permission is hereby granted, free of charge, to any person obtaining a copy of
-this software and associated documentation files (the "Software"), to deal in
-the Software without restriction, including without limitation the rights to
-use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
-the Software, and to permit persons to whom the Software is furnished to do so,
-subject to the following conditions :
-
-The above copyright notice and this permission notice shall be included in all
-copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
-IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
-FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.IN NO EVENT SHALL THE AUTHORS OR
-COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
-IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
-CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-*/
-
-#ifndef VECTOR_H
-#define VECTOR_H
-
-#include <stdbool.h>
-#include <stddef.h>
-
-/***** DEFINITIONS *****/
-
-#define VECTOR_MINIMUM_CAPACITY 2
-#define VECTOR_GROWTH_FACTOR 2
-#define VECTOR_SHRINK_THRESHOLD (1 / 4)
-
-#define VECTOR_ERROR -1
-#define VECTOR_SUCCESS 0
-
-#define VECTOR_UNINITIALIZED NULL
-#define VECTOR_INITIALIZER \
-  { 0, 0, 0, VECTOR_UNINITIALIZED }
-
-/***** STRUCTURES *****/
-
-typedef struct Vector {
-  size_t size;
-  size_t capacity;
-  size_t element_size;
-
-  void *data;
-} Vector;
-
-typedef struct Iterator {
-  void *pointer;
-  size_t element_size;
-} Iterator;
-
-/***** METHODS *****/
-
-/* Constructor */
-int aom_vector_setup(Vector *vector, size_t capacity, size_t element_size);
-
-#if 0
-/* Copy Constructor */
-int aom_vector_copy(Vector *destination, Vector *source);
-
-/* Copy Assignment */
-int aom_vector_copy_assign(Vector *destination, Vector *source);
-
-/* Move Constructor */
-int aom_vector_move(Vector *destination, Vector *source);
-
-/* Move Assignment */
-int aom_vector_move_assign(Vector *destination, Vector *source);
-
-int aom_vector_swap(Vector *destination, Vector *source);
-#endif  // 0
-
-/* Destructor */
-int aom_vector_destroy(Vector *vector);
-
-/* Insertion */
-int aom_vector_push_back(Vector *vector, void *element);
-#if 0
-int aom_vector_push_front(Vector *vector, void *element);
-int aom_vector_insert(Vector *vector, size_t index, void *element);
-int aom_vector_assign(Vector *vector, size_t index, void *element);
-#endif  // 0
-
-#if 0
-/* Deletion */
-int aom_vector_pop_back(Vector *vector);
-int aom_vector_pop_front(Vector *vector);
-int aom_vector_erase(Vector *vector, size_t index);
-int aom_vector_clear(Vector *vector);
-
-/* Lookup */
-void *aom_vector_get(Vector *vector, size_t index);
-const void *aom_vector_const_get(const Vector *vector, size_t index);
-void *aom_vector_front(Vector *vector);
-void *aom_vector_back(Vector *vector);
-#define VECTOR_GET_AS(type, aom_vector_pointer, index) \
-  *((type *)aom_vector_get((aom_vector_pointer), (index)))
-#endif  // 0
-
-/* Information */
-bool aom_vector_is_initialized(const Vector *vector);
-size_t aom_vector_byte_size(const Vector *vector);
-#if 0
-size_t aom_vector_free_space(const Vector *vector);
-bool aom_vector_is_empty(const Vector *vector);
-
-/* Memory management */
-int aom_vector_resize(Vector *vector, size_t new_size);
-int aom_vector_reserve(Vector *vector, size_t minimum_capacity);
-int aom_vector_shrink_to_fit(Vector *vector);
-#endif  // 0
-
-/* Iterators */
-Iterator aom_vector_begin(Vector *vector);
-#if 0
-Iterator aom_vector_end(Vector *vector);
-#endif  // 0
-Iterator aom_vector_iterator(Vector *vector, size_t index);
-
-void *aom_iterator_get(Iterator *iterator);
-#if 0
-#define ITERATOR_GET_AS(type, iterator) *((type *)aom_iterator_get((iterator)))
-
-int aom_iterator_erase(Vector *vector, Iterator *iterator);
-#endif  // 0
-
-void aom_iterator_increment(Iterator *iterator);
-#if 0
-void aom_iterator_decrement(Iterator *iterator);
-
-void *aom_iterator_next(Iterator *iterator);
-void *aom_iterator_previous(Iterator *iterator);
-
-bool aom_iterator_equals(Iterator *first, Iterator *second);
-bool aom_iterator_is_before(Iterator *first, Iterator *second);
-bool aom_iterator_is_after(Iterator *first, Iterator *second);
-
-size_t aom_iterator_index(Vector *vector, Iterator *iterator);
-
-#define VECTOR_FOR_EACH(aom_vector_pointer, iterator_name)               \
-  for (Iterator(iterator_name) = aom_vector_begin((aom_vector_pointer)), \
-      end = aom_vector_end((aom_vector_pointer));                        \
-       !aom_iterator_equals(&(iterator_name), &end);                     \
-       aom_iterator_increment(&(iterator_name)))
-#endif  // 0
-
-#endif /* VECTOR_H */