-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathcodec.h
125 lines (121 loc) · 2.66 KB
/
codec.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
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
#ifndef CODEC_H
#define CODEC_H
#include "ngtc.h"
// Codec Settings Structure
typedef struct CodecSettings {
char ts[512];
char hostname[256];
// Mux format
AVOutputFormat *fmt;
AVFormatContext *oc;
// Streams
AVStream *audio_st;
AVStream *video_st;
// Encoder Context
AVCodecContext *aEncCtx;
AVCodecContext *vEncCtx;
// Codecs
AVCodec *aEncCodec;
AVCodec *vEncCodec;
//
int copy_audio;
int copy_video;
// Audio sample format
int sample_fmt;
// Codec ID
char mux_format[25];
char audio_codec[25];
char video_codec[25];
int audio_codec_id;
int video_codec_id;
// Misc Settings
int mux;
int do_demux;
int do_video;
int do_audio;
int do_sub;
int do_interlace;
int do_threads;
// Aspect Ratio
AVRational dar;
double ar;
// Tags/Meta Information
char title[512];
char author[512];
char copyright[512];
char comment[512];
char album[512];
// Encoder Settings
int crop_left;
int crop_right;
int crop_top;
int crop_bottom;
int ssim;
int psnr;
AVRational sar;
AVRational ofps;
double out_fps;
int w;
int h;
int bitrate;
int abitrate;
int audio_quality;
int achan;
int arate;
int64_t channel_layout;
int audio_profile;
// Extended Encoder Settings
int sws_flags;
int deinterlace;
int hq;
double bt;
double qsquish;
int crf;
int cabac;
int wpred;
int weightp;
int mixed_refs;
char profile[30];
double level;
int fastpskip;
int bpyramid;
int aud;
int partitions;
int goplen;
int gop;
int refs;
int maxrate;
int minrate;
int bufsize;
int bframes;
int bstrategy;
// x264
int mbtree;
int lookahead;
int aq;
double aq_strength;
double psy_rd;
double psy_trellis;
int slices;
//
int trellis;
int nodeblock;
int deblocka;
int deblockb;
int scthreshold;
int subme;
char me_method[25];
int me_range;
int chroma_me;
int directpred;
double qcomp;
int nr;
int muxrate;
int packetsize;
//
struct hqv_data *hqv;
} CodecSettings;
void set_codec_defaults(struct CodecSettings *cs);
void init_codec(CodecSettings *cs);
int read_codec(CodecSettings *cs, char *filename);
#endif