-
Notifications
You must be signed in to change notification settings - Fork 8
Expand file tree
/
Copy pathframe.h
More file actions
35 lines (22 loc) · 740 Bytes
/
frame.h
File metadata and controls
35 lines (22 loc) · 740 Bytes
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
#ifndef JPEG_FRAME_H
#define JPEG_FRAME_H
#include <stddef.h>
#include <stdint.h>
#include "common.h"
struct frame {
uint8_t components;
uint16_t Y, X;
size_t size_x, size_y;
uint8_t precision;
float *data;
};
int frame_create(struct context *context, struct frame *frame);
void frame_destroy(struct frame *frame);
int frame_to_rgb(struct frame *frame);
int write_frame(struct frame *frame, const char *path);
int read_frame_header(struct frame *frame, FILE *stream);
int frame_create_empty(struct context *context, struct frame *frame);
int read_frame_body(struct frame *frame, FILE *stream);
void transform_frame_to_components(struct context *context, struct frame *frame);
int frame_to_ycc(struct frame *frame);
#endif