File: scale_test.h

package info (click to toggle)
mpv 0.40.0-5
  • links: PTS, VCS
  • area: main
  • in suites: forky
  • size: 12,676 kB
  • sloc: ansic: 152,062; python: 1,228; sh: 646; javascript: 612; cpp: 461; objc: 302; pascal: 49; xml: 29; makefile: 19
file content (30 lines) | stat: -rw-r--r-- 782 bytes parent folder | download | duplicates (4)
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
#pragma once

#include "img_utils.h"
#include "test_utils.h"
#include "video/mp_image.h"

struct scale_test_fns {
    bool (*scale)(void *ctx, struct mp_image *dst, struct mp_image *src);
    bool (*supports_fmts)(void *ctx, int imgfmt_dst, int imgfmt_src);
};

struct scale_test {
    // To be filled in by user.
    const struct scale_test_fns *fns;
    void *fns_priv;
    const char *test_name;
    const char *refdir;
    const char *outdir;

    // Private.
    struct mp_image *img_repack_rgb8;
    struct mp_image *img_repack_rgba8;
    struct mp_image *img_repack_rgb16;
    struct mp_image *img_repack_rgba16;
    struct mp_sws_context *sws;
    int fail;
};

// Test color repacking between packed formats (typically RGB).
void repack_test_run(struct scale_test *stest);