This repository has been archived by the owner on Oct 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 3
/
dsv_decoder.h
65 lines (53 loc) · 1.58 KB
/
dsv_decoder.h
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
/*****************************************************************************/
/*
* Digital Subband Video 1
* DSV-1
*
* -
* =-- 2023-2024 EMMIR
* ==--- Envel Graphics
* ===----
*
* GitHub : https://github.com/LMP88959
* YouTube: https://www.youtube.com/@EMMIR_KC/videos
* Discord: https://discord.com/invite/hdYctSmyQJ
*/
/*****************************************************************************/
#ifndef _DSV_DECODER_H_
#define _DSV_DECODER_H_
#ifdef __cplusplus
extern "C" {
#endif
#include "dsv.h"
typedef struct {
DSV_PARAMS params;
DSV_FRAME *out_frame;
DSV_FRAME *ref_frame;
unsigned char *stable_blocks;
int refcount;
} DSV_IMAGE;
typedef struct {
DSV_META vidmeta;
DSV_IMAGE *ref;
#define DSV_DRAW_STABHQ 1 /* stable / high quality blocks */
#define DSV_DRAW_MOVECS 2 /* motion vectors */
#define DSV_DRAW_IBLOCK 4 /* intra subblocks */
int draw_info; /* set by user */
int got_metadata;
} DSV_DECODER;
#define DSV_DEC_OK 0
#define DSV_DEC_ERROR 1
#define DSV_DEC_EOS 2
#define DSV_DEC_GOT_META 3
#define DSV_DEC_NEED_NEXT 4
/* decode a buffer, returns a frame in *out and the frame number in *fn */
extern int dsv_dec(DSV_DECODER *d, DSV_BUF *buf, DSV_FRAME **out, DSV_FNUM *fn);
/* get the metadata that was decoded. NOTE: if no metadata has been decoded
* yet, the returned struct will not contain any useful values. */
extern DSV_META *dsv_get_metadata(DSV_DECODER *d);
/* free anything the decoder was holding on to */
extern void dsv_dec_free(DSV_DECODER *d);
#ifdef __cplusplus
}
#endif
#endif