summaryrefslogtreecommitdiff
path: root/src/gallium/auxiliary/vl/vp8/vp8_debug.h
blob: 5d5d99c649c8a99c2c383cc5dbd5cf148bd6106f (plain)
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
/*
 *  Copyright (c) 2010 The WebM project authors. All Rights Reserved.
 *
 *  Use of this source code is governed by a BSD-style license
 *  that can be found in the LICENSE file in the root of the source
 *  tree. An additional intellectual property rights grant can be found
 *  in the file PATENTS.  All contributing project authors may
 *  be found in the AUTHORS file in the root of the source tree.
 */

#ifndef VPX_CODEC_H
#define VPX_CODEC_H

#ifdef __cplusplus
extern "C" {
#endif

#include <setjmp.h>

/**
 * \brief Algorithm return codes.
 */
typedef enum {
    /** \brief Operation completed without error */
    VPX_CODEC_OK,

    /** \brief Unspecified error */
    VPX_CODEC_ERROR,

    /** \brief Memory operation failed */
    VPX_CODEC_MEM_ERROR,

    /**
     * \brief The coded data for this stream is corrupt or incomplete.
     *
     * There was a problem decoding the current frame.  This return code
     * should only be used for failures that prevent future pictures from
     * being properly decoded. This error \ref MAY be treated as fatal to the
     * stream or \ref MAY be treated as fatal to the current GOP. If decoding
     * is continued for the current GOP, artifacts may be present.
     */
    VPX_CODEC_CORRUPT_FRAME

} vpx_codec_err_t;

struct vpx_internal_error_info
{
    vpx_codec_err_t  error_code;
    int              has_detail;
    char             detail[80];
    int              setjmp;
    jmp_buf          jmp;
};

/** \brief Internal error */
void vpx_internal_error(struct vpx_internal_error_info *info,
                        vpx_codec_err_t                 error,
                        const char                     *fmt,
                        ...);

#ifdef __cplusplus
}
#endif

#endif /* VPX_CODEC_H */