#include "avifincrtest_helpers.h"
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <cstring>
#include <iostream>
#include <memory>
#include <vector>
#include "avif/avif.h"
#include "aviftest_helpers.h"
#include "gtest/gtest.h"
namespace avif {
namespace testutil {
namespace {
void ComparePartialYuva(const avifImage& image1, const avifImage& image2,
uint32_t row_count) { … }
uint32_t GetMinDecodedRowCount(uint32_t height, uint32_t cell_height,
bool has_alpha, size_t available_byte_count,
size_t byte_count,
bool enable_fine_incremental_check) { … }
struct PartialData { … };
avifResult PartialRead(struct avifIO* io, uint32_t read_flags,
uint64_t offset64, size_t size, avifROData* out) { … }
void EncodeAsGrid(const avifImage& image, uint32_t grid_cols,
uint32_t grid_rows, avifRWData* output, uint32_t* cell_width,
uint32_t* cell_height) { … }
void EncodeAsIncremental(const avifImage& image, bool flat_cells,
avifRWData* output, uint32_t* cell_width,
uint32_t* cell_height) { … }
}
void EncodeRectAsIncremental(const avifImage& image, uint32_t width,
uint32_t height, bool create_alpha_if_none,
bool flat_cells, avifRWData* output,
uint32_t* cell_width, uint32_t* cell_height) { … }
avifResult DecodeIncrementally(const avifRWData& encoded_avif,
avifDecoder* decoder, bool is_persistent,
bool give_size_hint, bool use_nth_image_api,
const avifImage& reference, uint32_t cell_height,
bool enable_fine_incremental_check,
bool expect_whole_file_read) { … }
avifResult DecodeNonIncrementallyAndIncrementally(
const avifRWData& encoded_avif, avifDecoder* decoder, bool is_persistent,
bool give_size_hint, bool use_nth_image_api, uint32_t cell_height,
bool enable_fine_incremental_check, bool expect_whole_file_read) { … }
}
}