File: testcase.h

package info (click to toggle)
libavif 0.8.4-2%2Bdeb11u1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 5,960 kB
  • sloc: ansic: 14,907; sh: 70; cpp: 56; makefile: 15
file content (35 lines) | stat: -rw-r--r-- 834 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
// Copyright 2020 Joe Drago. All rights reserved.
// SPDX-License-Identifier: BSD-2-Clause

#ifndef TESTCASE_H
#define TESTCASE_H

#include "avif/avif.h"

#include <cjson/cJSON.h>

typedef struct TestCase
{
    char * name;
    char * inputFilename;
    avifCodecChoice encodeChoice;
    avifCodecChoice decodeChoice;
    int minQuantizer;
    int maxQuantizer;
    int speed;
    avifBool active;

    int maxThreshold;
    float avgThreshold;
} TestCase;

TestCase * testCaseCreate(void);
TestCase * testCaseFromJSON(cJSON * json);
void testCaseDestroy(TestCase * tc);
void testCaseSetInputFilename(TestCase * tc, const char * inputFilename);
void testCaseGenerateName(TestCase * tc);
cJSON * testCaseToJSON(TestCase * tc);

int testCaseRun(TestCase * tc, const char * dataDir, avifBool generating); // returns 0 on failure

#endif