libbpg-0.9.5
This commit is contained in:
parent
6e56352f86
commit
357f186837
35 changed files with 3022 additions and 2134 deletions
24
bpgenc.h
24
bpgenc.h
|
@ -29,7 +29,9 @@ extern "C" {
|
|||
|
||||
typedef struct {
|
||||
int w, h;
|
||||
BPGImageFormatEnum format;
|
||||
BPGImageFormatEnum format; /* x_VIDEO values are forbidden here */
|
||||
uint8_t c_h_phase; /* 4:2:2 or 4:2:0 : give the horizontal chroma
|
||||
position. 0=MPEG2, 1=JPEG. */
|
||||
uint8_t has_alpha;
|
||||
uint8_t has_w_plane;
|
||||
uint8_t limited_range;
|
||||
|
@ -42,6 +44,12 @@ typedef struct {
|
|||
} Image;
|
||||
|
||||
typedef struct {
|
||||
int width;
|
||||
int height;
|
||||
int chroma_format; /* 0-3 */
|
||||
int bit_depth; /* 8-14 */
|
||||
int intra_only; /* 0-1 */
|
||||
|
||||
int qp; /* quantizer 0-51 */
|
||||
int lossless; /* 0-1 lossless mode */
|
||||
int sei_decoded_picture_hash; /* 0=no hash, 1=MD5 hash */
|
||||
|
@ -49,10 +57,20 @@ typedef struct {
|
|||
int verbose;
|
||||
} HEVCEncodeParams;
|
||||
|
||||
typedef struct HEVCEncoderContext HEVCEncoderContext;
|
||||
|
||||
typedef struct {
|
||||
HEVCEncoderContext *(*open)(const HEVCEncodeParams *params);
|
||||
int (*encode)(HEVCEncoderContext *s, Image *img);
|
||||
int (*close)(HEVCEncoderContext *s, uint8_t **pbuf);
|
||||
} HEVCEncoder;
|
||||
|
||||
extern HEVCEncoder jctvc_encoder;
|
||||
extern HEVCEncoder x265_hevc_encoder;
|
||||
|
||||
int x265_encode_picture(uint8_t **pbuf, Image *img,
|
||||
const HEVCEncodeParams *params);
|
||||
int jctvc_encode_picture(uint8_t **pbuf, Image *img,
|
||||
const HEVCEncodeParams *params);
|
||||
void save_yuv1(Image *img, FILE *f);
|
||||
void save_yuv(Image *img, const char *filename);
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue