32 #include <libavcodec/avcodec.h> 185 uint8_t *data[AV_NUM_DATA_POINTERS];
186 int linesize[AV_NUM_DATA_POINTERS];
int bit_rate
average bitrate in VBR mode (bit_rate != 0 and qp == 0)
Definition: hve.h:163
const char * device
NULL / "" or device, e.g. "/dev/dri/renderD128".
Definition: hve.h:158
int input_height
optional scaling if non-zero and different from height
Definition: hve.h:156
int compression_level
speed-quality tradeoff, 0 for default, 1 for the highest quality, 7 for the fastest ...
Definition: hve.h:166
hve_retval_enum
Constants returned by most of library functions.
Definition: hve.h:192
int width
width of the encoded frames
Definition: hve.h:153
int hve_send_frame(struct hve *h, struct hve_frame *frame)
Send frame to hardware for encoding.
Definition: hve.c:344
error occured with errno set
Definition: hve.h:194
succesfull execution
Definition: hve.h:195
Encoder configuration.
Definition: hve.h:151
int gop_size
group of pictures size, 0 for default, -1 for intra only
Definition: hve.h:165
int qp
quantization parameter in CQP mode (qp != 0 and bit_rate == 0)
Definition: hve.h:164
const char * pixel_format
NULL / "" for NV12 or format, e.g. "rgb0", "bgr0", "nv12", "yuv420p", "p010le".
Definition: hve.h:160
int low_power
alternative limited low-power encoding if non-zero
Definition: hve.h:167
struct hve * hve_init(const struct hve_config *config)
initialize internal library data.
Definition: hve.c:57
Data to be encoded (single frame).
Definition: hve.h:183
int input_width
optional scaling if non-zero and different from width
Definition: hve.h:155
int profile
0 to guess from input or profile e.g. FF_PROFILE_H264_MAIN, FF_PROFILE_H264_HIGH, FF_PROFILE_HEVC_MAI...
Definition: hve.h:161
AVPacket * hve_receive_packet(struct hve *h, int *error)
Retrieve encoded frame data from hardware.
Definition: hve.c:432
const char * encoder
NULL / "" or encoder, e.g. "h264_vaapi".
Definition: hve.h:159
int framerate
framerate of the encoded video
Definition: hve.h:157
void hve_close(struct hve *h)
free library resources
Definition: hve.c:162
int max_b_frames
maximum number of B-frames between non-B-frames (disable if you need low latency) ...
Definition: hve.h:162
int height
height of the encoded frames
Definition: hve.h:154
Internal library data passed around by the user.
Definition: hve.c:25