#include <dlfcn.h>
#include <nvEncodeAPI.h>
#include "libavutil/internal.h"
#include "libavutil/imgutils.h"
#include "libavutil/avassert.h"
#include "libavutil/opt.h"
#include "libavutil/mem.h"
#include "avcodec.h"
#include "internal.h"
#include "thread.h"
Go to the source code of this file.
|
static NvencData * | data_queue_dequeue (NvencDataList *queue) |
|
static int | data_queue_enqueue (NvencDataList *queue, NvencData *data) |
|
static int | out_surf_queue_enqueue (NvencDataList *queue, NvencOutputSurface *surface) |
|
static NvencOutputSurface * | out_surf_queue_dequeue (NvencDataList *queue) |
|
static int | timestamp_queue_enqueue (NvencDataList *queue, int64_t timestamp) |
|
static int64_t | timestamp_queue_dequeue (NvencDataList *queue) |
|
static av_cold int | nvenc_dyload_cuda (AVCodecContext *avctx) |
|
static av_cold int | check_cuda_errors (AVCodecContext *avctx, CUresult err, const char *func) |
|
static av_cold int | nvenc_check_cuda (AVCodecContext *avctx) |
|
static av_cold int | nvenc_dyload_nvenc (AVCodecContext *avctx) |
|
static av_cold void | nvenc_unload_nvenc (AVCodecContext *avctx) |
|
static av_cold int | nvenc_encode_init (AVCodecContext *avctx) |
|
static av_cold int | nvenc_encode_close (AVCodecContext *avctx) |
|
static int | process_output_surface (AVCodecContext *avctx, AVPacket *pkt, AVFrame *coded_frame, NvencOutputSurface *tmpoutsurf) |
|
static int | nvenc_encode_frame (AVCodecContext *avctx, AVPacket *pkt, const AVFrame *frame, int *got_packet) |
|
|
static const GUID | dummy_license = { 0x0, 0x0, 0x0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } } |
|
static enum AVPixelFormat | pix_fmts_nvenc [] |
|
static const AVOption | options [] |
|
static const AVClass | nvenc_class |
|
static const AVCodecDefault | nvenc_defaults [] |
|
AVCodec | ff_nvenc_encoder |
|
#define LOAD_FUNC |
( |
|
l, |
|
|
|
s |
|
) |
| dlsym(l, s) |
#define DL_CLOSE_FUNC |
( |
|
l | ) |
dlclose(l) |
#define CHECK_LOAD_FUNC |
( |
|
t, |
|
|
|
f, |
|
|
|
s |
|
) |
| |
#define check_cuda_errors |
( |
|
f | ) |
if (!check_cuda_errors(avctx, f, #f)) goto error |
typedef NVENCSTATUS(NVENCAPI* PNVENCODEAPICREATEINSTANCE)(NV_ENCODE_API_FUNCTION_LIST *functionList) |
- Enumerator:
-
Definition at line 53 of file nvenc.c.
static int timestamp_queue_enqueue |
( |
NvencDataList * |
queue, |
|
|
int64_t |
timestamp |
|
) |
| |
|
static |
const GUID dummy_license = { 0x0, 0x0, 0x0, { 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0, 0x0 } } |
|
static |
Initial value:
Definition at line 1178 of file nvenc.c.
Initial value:= {
{
"preset",
"Set the encoding preset (one of hq, hp, bd, ll, llhq, llhp, default)",
OFFSET(
preset),
AV_OPT_TYPE_STRING, { .str =
"hq" }, 0, 0,
VE },
{
"2pass",
"Use 2pass cbr encoding mode (low latency mode only)",
OFFSET(twopass),
AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1,
VE },
{
"gpu",
"Selects which NVENC capable GPU to use. First GPU is 0, second is 1, and so on.",
OFFSET(gpu),
AV_OPT_TYPE_INT, { .i64 = 0 }, 0, INT_MAX,
VE },
}
Definition at line 1185 of file nvenc.c.
Initial value:= {
.class_name = "nvenc",
}
Definition at line 1193 of file nvenc.c.
Initial value:= {
{ "b", "0" },
{ "qmin", "-1" },
{ "qmax", "-1" },
{ "qdiff", "-1" },
{ "qblur", "-1" },
{ "qcomp", "-1" },
}
Definition at line 1200 of file nvenc.c.
Initial value:
Definition at line 1210 of file nvenc.c.