99 const char *err_string;
110 if (err_name && err_string)
117 #define CHECK_CU(x) check_cu(avctx, (x), #x)
128 int old_width = avctx->
width;
129 int old_height = avctx->
height;
137 memset(&cuinfo, 0,
sizeof(cuinfo));
139 ctx->internal_error = 0;
141 avctx->coded_width = cuinfo.ulWidth =
format->coded_width;
142 avctx->coded_height = cuinfo.ulHeight =
format->coded_height;
145 cuinfo.display_area.left =
format->display_area.left +
ctx->crop.left;
146 cuinfo.display_area.top =
format->display_area.top +
ctx->crop.top;
147 cuinfo.display_area.right =
format->display_area.right -
ctx->crop.right;
148 cuinfo.display_area.bottom =
format->display_area.bottom -
ctx->crop.bottom;
151 if (
ctx->resize_expr) {
152 avctx->width =
ctx->resize.width;
153 avctx->height =
ctx->resize.height;
155 avctx->width = cuinfo.display_area.right - cuinfo.display_area.left;
156 avctx->height = cuinfo.display_area.bottom - cuinfo.display_area.top;
160 cuinfo.ulTargetWidth = avctx->width = (avctx->width + 1) & ~1;
161 cuinfo.ulTargetHeight = avctx->height = (avctx->height + 1) & ~1;
164 cuinfo.target_rect.left = 0;
165 cuinfo.target_rect.top = 0;
166 cuinfo.target_rect.right = cuinfo.ulTargetWidth;
167 cuinfo.target_rect.bottom = cuinfo.ulTargetHeight;
169 switch (
format->bit_depth_luma_minus8) {
186 if (!caps || !caps->bIsSupported) {
188 format->bit_depth_luma_minus8 + 8);
194 if (surface_fmt < 0) {
205 avctx->pix_fmt = surface_fmt;
208 if (avctx->hw_frames_ctx) {
222 (
AVRational){ avctx->width, avctx->height }));
224 ctx->deint_mode_current =
format->progressive_sequence
233 if (
format->video_signal_description.video_full_range_flag)
238 avctx->color_primaries =
format->video_signal_description.color_primaries;
239 avctx->color_trc =
format->video_signal_description.transfer_characteristics;
240 avctx->colorspace =
format->video_signal_description.matrix_coefficients;
243 avctx->bit_rate =
format->bitrate;
245 if (
format->frame_rate.numerator &&
format->frame_rate.denominator) {
246 avctx->framerate.num =
format->frame_rate.numerator;
247 avctx->framerate.den =
format->frame_rate.denominator;
251 && avctx->coded_width ==
format->coded_width
252 && avctx->coded_height ==
format->coded_height
253 && avctx->width == old_width
254 && avctx->height == old_height
255 &&
ctx->chroma_format ==
format->chroma_format
259 if (
ctx->cudecoder) {
262 if (
ctx->internal_error < 0)
267 if (hwframe_ctx->pool && (
268 hwframe_ctx->width < avctx->width ||
269 hwframe_ctx->height < avctx->height ||
271 hwframe_ctx->sw_format != avctx->sw_pix_fmt)) {
272 av_log(avctx,
AV_LOG_ERROR,
"AVHWFramesContext is already initialized with incompatible parameters\n");
274 av_log(avctx,
AV_LOG_DEBUG,
"height: %d <-> %d\n", hwframe_ctx->height, avctx->height);
288 ctx->chroma_format =
format->chroma_format;
290 cuinfo.CodecType =
ctx->codec_type =
format->codec;
291 cuinfo.ChromaFormat =
format->chroma_format;
293 switch (avctx->sw_pix_fmt) {
302 av_log(avctx,
AV_LOG_ERROR,
"Output formats other than NV12, P010 or P016 are not supported\n");
307 cuinfo.ulNumDecodeSurfaces =
ctx->nb_surfaces;
308 cuinfo.ulNumOutputSurfaces = 1;
310 cuinfo.bitDepthMinus8 =
format->bit_depth_luma_minus8;
311 cuinfo.DeinterlaceMode =
ctx->deint_mode_current;
316 ctx->internal_error =
CHECK_CU(
ctx->cvdl->cuvidCreateDecoder(&
ctx->cudecoder, &cuinfo));
317 if (
ctx->internal_error < 0)
320 if (!hwframe_ctx->pool) {
322 hwframe_ctx->sw_format = avctx->sw_pix_fmt;
323 hwframe_ctx->width = avctx->width;
324 hwframe_ctx->height = avctx->height;
388 int ret = 0, eret = 0, is_flush =
ctx->decoder_flushing;
392 if (is_flush && avpkt && avpkt->size)
398 if (
ctx->bsf && avpkt && avpkt->size) {
415 avpkt = &filtered_packet;
418 ret =
CHECK_CU(
ctx->cudl->cuCtxPushCurrent(cuda_ctx));
424 memset(&cupkt, 0,
sizeof(cupkt));
426 if (avpkt && avpkt->size) {
427 cupkt.payload_size = avpkt->size;
428 cupkt.payload = avpkt->data;
432 if (avctx->pkt_timebase.num && avctx->pkt_timebase.den)
435 cupkt.timestamp = avpkt->pts;
439 ctx->decoder_flushing = 1;
442 ret =
CHECK_CU(
ctx->cvdl->cuvidParseVideoData(
ctx->cuparser, &cupkt));
450 if (
ctx->internal_error) {
452 ret =
ctx->internal_error;
476 int ret = 0, eret = 0;
507 unsigned int pitch = 0;
513 memset(¶ms, 0,
sizeof(params));
535 for (i = 0; i < 2; i++) {
539 .srcDevice = mapped_frame,
545 .Height = avctx->
height >> (i ? 1 : 0),
606 frame->
pts += pts_diff;
666 }
else if (ret < 0) {
708 int res8 = 0, res10 = 0, res12 = 0;
711 av_log(avctx,
AV_LOG_WARNING,
"Used Nvidia driver is too old to perform a capability check.\n");
713 #
if defined(_WIN32) || defined(__CYGWIN__)
718 ". Continuing blind.\n");
739 av_log(avctx,
AV_LOG_VERBOSE,
"8 bit: supported: %d, min_width: %d, max_width: %d, min_height: %d, max_height: %d\n",
741 av_log(avctx,
AV_LOG_VERBOSE,
"10 bit: supported: %d, min_width: %d, max_width: %d, min_height: %d, max_height: %d\n",
743 av_log(avctx,
AV_LOG_VERBOSE,
"12 bit: supported: %d, min_width: %d, max_width: %d, min_height: %d, max_height: %d\n",
773 if (probed_width > caps->
nMaxWidth || probed_width < caps->nMinWidth) {
779 if (probed_height > caps->
nMaxHeight || probed_height < caps->nMinHeight) {
806 int probed_bit_depth = 8;
810 probed_bit_depth = probe_desc->
comp[0].
depth;
888 device_hwctx = device_ctx->
hwctx;
895 memset(&seq_pkt, 0,
sizeof(seq_pkt));
900 #if CONFIG_H264_CUVID_DECODER
905 #if CONFIG_HEVC_CUVID_DECODER
910 #if CONFIG_MJPEG_CUVID_DECODER
915 #if CONFIG_MPEG1_CUVID_DECODER
920 #if CONFIG_MPEG2_CUVID_DECODER
925 #if CONFIG_MPEG4_CUVID_DECODER
930 #if CONFIG_VP8_CUVID_DECODER
935 #if CONFIG_VP9_CUVID_DECODER
940 #if CONFIG_VC1_CUVID_DECODER
1035 ret =
CHECK_CU(
ctx->cudl->cuCtxPushCurrent(cuda_ctx));
1042 if (!
ctx->frame_queue) {
1047 if (
ctx->cudecoder) {
1048 ctx->cvdl->cuvidDestroyDecoder(
ctx->cudecoder);
1052 if (
ctx->cuparser) {
1053 ctx->cvdl->cuvidDestroyVideoParser(
ctx->cuparser);
1057 ret =
CHECK_CU(
ctx->cvdl->cuvidCreateVideoParser(&
ctx->cuparser, &
ctx->cuparseinfo));
1061 seq_pkt.payload =
ctx->cuparse_ext.raw_seqhdr_data;
1062 seq_pkt.payload_size =
ctx->cuparse_ext.format.seqhdr_data_length;
1064 if (seq_pkt.payload && seq_pkt.payload_size) {
1065 ret =
CHECK_CU(
ctx->cvdl->cuvidParseVideoData(
ctx->cuparser, &seq_pkt));
1074 ctx->prev_pts = INT64_MIN;
1075 ctx->decoder_flushing = 0;
1082 #define OFFSET(x) offsetof(CuvidContext, x)
1083 #define VD AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_DECODING_PARAM
1090 {
"surfaces",
"Maximum surfaces to be used for decoding",
OFFSET(nb_surfaces),
AV_OPT_TYPE_INT, { .i64 = 25 }, 0, INT_MAX,
VD },
1091 {
"drop_second_field",
"Drop second field when deinterlacing",
OFFSET(drop_second_field),
AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1,
VD },
1097 #define DEFINE_CUVID_CODEC(x, X) \
1098 static const AVClass x##_cuvid_class = { \
1099 .class_name = #x "_cuvid", \
1100 .item_name = av_default_item_name, \
1101 .option = options, \
1102 .version = LIBAVUTIL_VERSION_INT, \
1104 AVHWAccel ff_##x##_cuvid_hwaccel = { \
1105 .name = #x "_cuvid", \
1106 .type = AVMEDIA_TYPE_VIDEO, \
1107 .id = AV_CODEC_ID_##X, \
1108 .pix_fmt = AV_PIX_FMT_CUDA, \
1110 AVCodec ff_##x##_cuvid_decoder = { \
1111 .name = #x "_cuvid", \
1112 .long_name = NULL_IF_CONFIG_SMALL("Nvidia CUVID " #X " decoder"), \
1113 .type = AVMEDIA_TYPE_VIDEO, \
1114 .id = AV_CODEC_ID_##X, \
1115 .priv_data_size = sizeof(CuvidContext), \
1116 .priv_class = &x##_cuvid_class, \
1117 .init = cuvid_decode_init, \
1118 .close = cuvid_decode_end, \
1119 .decode = cuvid_decode_frame, \
1120 .receive_frame = cuvid_output_frame, \
1121 .flush = cuvid_flush, \
1122 .capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_AVOID_PROBING, \
1123 .pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_CUDA, \
1127 AV_PIX_FMT_NONE }, \
1130 #if CONFIG_HEVC_CUVID_DECODER
1134 #if CONFIG_H264_CUVID_DECODER
1138 #if CONFIG_MJPEG_CUVID_DECODER
1142 #if CONFIG_MPEG1_CUVID_DECODER
1146 #if CONFIG_MPEG2_CUVID_DECODER
1150 #if CONFIG_MPEG4_CUVID_DECODER
1154 #if CONFIG_VP8_CUVID_DECODER
1158 #if CONFIG_VP9_CUVID_DECODER
1162 #if CONFIG_VC1_CUVID_DECODER
This struct aggregates all the (hardware/vendor-specific) "high-level" state, i.e.
void av_bsf_free(AVBSFContext **ctx)
Free a bitstream filter context and everything associated with it; write NULL into the supplied point...
Set when this is the last packet for this stream.
int ff_get_format(AVCodecContext *avctx, const enum AVPixelFormat *fmt)
Select the (possibly hardware accelerated) pixel format.
const struct AVCodec * codec
AVCodecParameters * par_out
Parameters of the output stream.
AVRational av_div_q(AVRational b, AVRational c)
Divide one rational by another.
void av_buffer_unref(AVBufferRef **buf)
Free a given reference and automatically free the buffer if there are no more references to it...
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
This structure describes decoded (raw) audio or video data.
tcu_ulong payload_size
IN: number of bytes in the payload (may be zero if EOS flag is set)
ptrdiff_t const GLvoid * data
#define AV_CODEC_FLAG_INTERLACED_DCT
Use interlaced DCT.
int coded_width
Bitstream width / height, may be different from width/height e.g.
int64_t pkt_pos
reordered pos from the last AVPacket that has been input into the decoder
#define AV_LOG_WARNING
Something somehow does not look correct.
static void cuvid_free_functions(CuvidFunctions **functions)
AVCUDADeviceContextInternal * internal
The bitstream filter state.
static int CUDAAPI cuvid_handle_video_sequence(void *opaque, CUVIDEOFORMAT *format)
tcuvidUnmapVideoFrame * cuvidUnmapVideoFrame
const AVBitStreamFilter * av_bsf_get_by_name(const char *name)
struct CuvidContext::@62 crop
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
This structure is used in cuvidGetDecoderCaps API.
#define DEFINE_CUVID_CODEC(x, X)
CUVIDPARSERPARAMS cuparseinfo
int ff_decode_frame_props(AVCodecContext *avctx, AVFrame *frame)
Set various frame properties from the codec context / packet data.
cudaVideoChromaFormat
Chroma format enums These enums are used in CUVIDDECODECREATEINFO and CUVIDDECODECAPS structures JPEG...
int av_bsf_init(AVBSFContext *ctx)
Prepare the filter for use, after all the parameters and options have been set.
static int cuvid_is_buffer_full(AVCodecContext *avctx)
static int check_cu(AVCodecContext *avctx, CUresult err, const char *func)
int av_fifo_generic_write(AVFifoBuffer *f, void *src, int size, int(*func)(void *, void *, int))
Feed data from a user-supplied callback to an AVFifoBuffer.
AVBufferRef * hw_frames_ctx
For hwaccel-format frames, this should be a reference to the AVHWFramesContext describing the frame...
int av_bsf_alloc(const AVBitStreamFilter *filter, AVBSFContext **ctx)
Allocate a context for a given bitstream filter.
tcuvidGetDecoderCaps * cuvidGetDecoderCaps
static void cuvid_flush(AVCodecContext *avctx)
tcuvidCreateVideoParser * cuvidCreateVideoParser
int av_bsf_receive_packet(AVBSFContext *ctx, AVPacket *pkt)
Retrieve a filtered packet.
tcuvidMapVideoFrame * cuvidMapVideoFrame
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
AVFrame * av_frame_alloc(void)
Allocate an AVFrame and set its fields to default values.
tcuvidDestroyDecoder * cuvidDestroyDecoder
#define AV_LOG_TRACE
Extremely verbose debugging, useful for libav* development.
Picture parameters for postprocessing This structure is used in cuvidMapVideoFrame API...
static int cuvid_decode_packet(AVCodecContext *avctx, const AVPacket *avpkt)
int ff_decode_get_packet(AVCodecContext *avctx, AVPacket *pkt)
Called by decoders to get the next packet for decoding.
static av_cold int cuvid_decode_init(AVCodecContext *avctx)
int64_t pts
Presentation timestamp in time_base units (time when frame should be shown to user).
AVFifoBuffer * frame_queue
uint8_t * extradata
some codecs need / can use extradata like Huffman tables.
void * hwctx
The format-specific data, allocated and freed by libavutil along with this context.
CUVIDEOFORMATEX * pExtVideoInfo
IN: [Optional] sequence header data from system layer.
int av_hwdevice_ctx_create(AVBufferRef **pdevice_ref, enum AVHWDeviceType type, const char *device, AVDictionary *opts, int flags)
Open a device of the specified type and create an AVHWDeviceContext for it.
int flags
Flags modifying the (de)muxer behaviour.
static av_cold int cuvid_decode_end(AVCodecContext *avctx)
int ff_set_sar(AVCodecContext *avctx, AVRational sar)
Check that the provided sample aspect ratio is valid and set it on the codec context.
#define AVERROR_EOF
End of file.
unsigned short nMinWidth
OUT: Min supported coded width in pixels.
#define AV_LOG_VERBOSE
Detailed information.
int interlaced_frame
The content of the picture is interlaced.
tcuCtxPushCurrent_v2 * cuCtxPushCurrent
This structure is used in cuvidCreateDecoder API.
int av_packet_ref(AVPacket *dst, const AVPacket *src)
Setup a new reference to the data described by a given packet.
int64_t av_rescale_q(int64_t a, AVRational bq, AVRational cq)
Rescale a 64-bit integer by 2 rational numbers.
Picture parameters for decoding This structure is used in cuvidDecodePicture API IN for cuvidDecodePi...
AVRational pkt_timebase
Timebase in which pkt_dts/pts and AVPacket.dts/pts are.
cudaVideoChromaFormat chroma_format
#define AV_LOG_ERROR
Something went wrong and cannot losslessly be recovered.
cudaVideoCodec codec_type
void av_frame_free(AVFrame **frame)
Free the frame and any dynamically allocated objects in it, e.g.
#define AV_LOG_DEBUG
Stuff which is only useful for libav* developers.
int av_fifo_generic_read(AVFifoBuffer *f, void *dest, int buf_size, void(*func)(void *, void *, int))
Feed data from an AVFifoBuffer to a user-supplied callback.
tcuvidDecodePicture * cuvidDecodePicture
planar YUV 4:2:0, 12bpp, 1 plane for Y and 1 plane for the UV components, which are interleaved (firs...
const char * name
Name of the codec implementation.
int av_hwframe_ctx_init(AVBufferRef *ref)
Finalize the context before use.
static const uint8_t offset[127][2]
int av_hwframe_get_buffer(AVBufferRef *hwframe_ref, AVFrame *frame, int flags)
Allocate a new frame attached to the given AVHWFramesContext.
unsigned char bIsSupported
OUT: 1 if codec supported, 0 if not supported.
tcuvidParseVideoData * cuvidParseVideoData
int extradata_size
Size of the extradata content in bytes.
static int cuvid_decode_frame(AVCodecContext *avctx, void *data, int *got_frame, AVPacket *avpkt)
int av_hwframe_transfer_data(AVFrame *dst, const AVFrame *src, int flags)
Copy data to or from a hw surface.
int progressive_frame
IN: Input is progressive (deinterlace_mode will be ignored)
uint8_t nb_components
The number of components each pixel has, (1-4)
Use dedicated video engines directly.
AVHWDeviceContext * device_ctx
The parent AVHWDeviceContext.
int second_field
IN: Output the second field (ignored if deinterlace mode is Weave)
int width
picture width / height.
static int filter_packet(AVFormatContext *avf, ConcatStream *cs, AVPacket *pkt)
AVBufferRef * hw_frames_ctx
A reference to the AVHWFramesContext describing the input (for encoding) or output (decoding) frames...
int top_field_first
IN: Input frame is top field first (1st field is top, 2nd field is bottom)
static void bit_depth(AudioStatsContext *s, uint64_t mask, uint64_t imask, AVRational *depth)
int av_bsf_send_packet(AVBSFContext *ctx, AVPacket *pkt)
Submit a packet for filtering.
tcuGetErrorString * cuGetErrorString
#define AVERROR_BSF_NOT_FOUND
Bitstream filter not found.
FFmpeg internal API for CUDA.
static int CUDAAPI cuvid_handle_picture_display(void *opaque, CUVIDPARSERDISPINFO *dispinfo)
Weave both fields (no deinterlacing)
struct CuvidContext::@63 resize
HW acceleration through CUDA.
unsigned int nMaxHeight
OUT: Max supported coded height in pixels.
preferred ID for MPEG-1/2 video decoding
static void error(const char *err)
unsigned short nMinHeight
OUT: Min supported coded height in pixels.
the normal 2^n-1 "JPEG" YUV ranges
unsigned int nBitDepthMinus8
IN: The Value "BitDepth minus 8".
tcuGetErrorName * cuGetErrorName
CUmemorytype srcMemoryType
int format
format of the frame, -1 if unknown or unset Values correspond to enum AVPixelFormat for video frames...
Libavcodec external API header.
int64_t pkt_duration
duration of the corresponding packet, expressed in AVStream->time_base units, 0 if unknown...
PFNVIDSEQUENCECALLBACK pfnSequenceCallback
IN: Called before decoding frames and/or whenever there is a fmt change.
int av_fifo_size(const AVFifoBuffer *f)
Return the amount of data in bytes in the AVFifoBuffer, that is the amount of data you can read from ...
int linesize[AV_NUM_DATA_POINTERS]
For video, size in bytes of each picture line.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
main external API structure.
void av_packet_unref(AVPacket *pkt)
Wipe the packet.
Used in cuvidParseVideoData API with PFNVIDDISPLAYCALLBACK pfnDisplayPicture.
uint8_t * data
The data buffer.
int ff_get_buffer(AVCodecContext *avctx, AVFrame *frame, int flags)
Get a buffer for a frame.
int picture_index
OUT: Index of the current picture.
a very simple circular buffer FIFO implementation
tcuMemcpy2D_v2 * cuMemcpy2D
#define AVERROR_BUG
Internal bug, also see AVERROR_BUG2.
This struct is allocated as AVHWDeviceContext.hwctx.
static const char * format
Describe the class of an AVClass context structure.
const unsigned char * payload
IN: Pointer to packet payload data (may be NULL if EOS flag is set)
Rational number (pair of numerator and denominator).
int avcodec_parameters_from_context(AVCodecParameters *par, const AVCodecContext *codec)
Fill the parameters struct based on the values from the supplied codec context.
This struct describes a set or pool of "hardware" frames (i.e.
CUvideotimestamp timestamp
OUT: Presentation time stamp.
static const AVOption options[]
int(* func)(AVBPrint *dst, const char *in, const char *arg)
refcounted data buffer API
int top_field_first
OUT: 1 if top field is displayed first; 0 otherwise.
static enum AVPixelFormat pix_fmts[]
16 bit semiplaner format.
cudaVideoCodec eCodecType
IN: cudaVideoCodec_XXX.
cudaVideoCodec CodecType
IN: cudaVideoCodec_XXX.
CUVIDPARSERDISPINFO dispinfo
static int cuvid_output_frame(AVCodecContext *avctx, AVFrame *frame)
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
AVBufferRef * device_ref
A reference to the parent AVHWDeviceContext.
attribute_deprecated int64_t pkt_pts
PTS copied from the AVPacket that was decoded to produce this frame.
the normal 219*2^(n-8) "MPEG" YUV ranges
A reference to a data buffer.
PFNVIDDECODECALLBACK pfnDecodePicture
IN: Called when a picture is ready to be decoded (decode order)
void * pUserData
IN: User data for callbacks.
#define FF_DISABLE_DEPRECATION_WARNINGS
common internal api header.
AVBufferRef * av_hwframe_ctx_alloc(AVBufferRef *device_ref_in)
Allocate an AVHWFramesContext tied to a given device context.
AVBufferRef * av_buffer_ref(AVBufferRef *buf)
Create a new reference to an AVBuffer.
static int CUDAAPI cuvid_handle_picture_decode(void *opaque, CUVIDPICPARAMS *picparams)
tcuCtxPopCurrent_v2 * cuCtxPopCurrent
static int cuvid_test_capabilities(AVCodecContext *avctx, const CUVIDPARSERPARAMS *cuparseinfo, int probed_width, int probed_height, int bit_depth)
unsigned int ulMaxNumDecodeSurfaces
IN: Max # of decode surfaces (parser will cycle through these)
tcuvidDestroyVideoParser * cuvidDestroyVideoParser
cudaVideoChromaFormat eChromaFormat
IN: cudaVideoChromaFormat_XXX.
AVFifoBuffer * av_fifo_alloc(unsigned int size)
Initialize an AVFifoBuffer.
#define FF_ENABLE_DEPRECATION_WARNINGS
int top_field_first
If the content is interlaced, is top field displayed first.
int progressive_frame
OUT: 1 if progressive frame; 0 otherwise.
PFNVIDDISPLAYCALLBACK pfnDisplayPicture
IN: Called whenever a picture is ready to be displayed (display order)
uint8_t * extradata
Extra binary data needed for initializing the decoder, codec-dependent.
Data Packet Used in cuvidParseVideoData API IN for cuvidParseVideoData.
AVRational av_mul_q(AVRational b, AVRational c)
Multiply two rationals.
cudaVideoCodec
Video codec enums These enums are used in CUVIDDECODECREATEINFO and CUVIDDECODECAPS structures...
unsigned int ulMaxDisplayDelay
IN: Max display queue delay (improves pipelining of decode with display) 0=no delay (recommended valu...
static int cuvid_load_functions(CuvidFunctions **functions)
CUVIDEOFORMATEX cuparse_ext
void av_fifo_freep(AVFifoBuffer **f)
Free an AVFifoBuffer and reset pointer to NULL.
const char * av_get_pix_fmt_name(enum AVPixelFormat pix_fmt)
Return the short name for a pixel format, NULL in case pix_fmt is unknown.
int depth
Number of bits in the component.
AVBufferRef * hw_device_ctx
A reference to the AVHWDeviceContext describing the device which will be used by a hardware encoder/d...
int pkt_size
size of the corresponding packet containing the compressed frame.
Used in cuvidCreateVideoParser API.
#define AVERROR_EXTERNAL
Generic error in an external library.
AVPixelFormat
Pixel format.
This structure stores compressed data.
AVCodecParameters * par_in
Parameters of the input stream.
#define AV_NOPTS_VALUE
Undefined timestamp value.
unsigned int nMaxWidth
OUT: Max supported coded width in pixels.