Go to the documentation of this file.
37 CUVIDPICPARAMS *pp = &
ctx->pic_params;
38 CUVIDVP9PICPARAMS *ppc = &pp->CodecSpecific.vp9;
52 *pp = (CUVIDPICPARAMS) {
53 .PicWidthInMbs = (cur_frame->
width + 15) / 16,
54 .FrameHeightInMbs = (cur_frame->
height + 15) / 16,
55 .CurrPicIdx = cf->
idx,
57 .CodecSpecific.vp9 = {
58 .width = cur_frame->
width,
59 .height = cur_frame->
height,
65 .profile =
h->h.profile,
66 .frameContextIdx =
h->h.framectxid,
67 .frameType = !
h->h.keyframe,
68 .showFrame = !
h->h.invisible,
69 .errorResilient =
h->h.errorres,
70 .frameParallelDecoding =
h->h.parallelmode,
73 .intraOnly =
h->h.intraonly,
74 .allow_high_precision_mv =
h->h.keyframe ? 0 :
h->h.highprecisionmvs,
75 .refreshEntropyProbs =
h->h.refreshctx,
77 .bitDepthMinus8Luma = pixdesc->
comp[0].
depth - 8,
78 .bitDepthMinus8Chroma = pixdesc->
comp[1].
depth - 8,
80 .loopFilterLevel =
h->h.filter.level,
81 .loopFilterSharpness =
h->h.filter.sharpness,
82 .modeRefLfEnabled =
h->h.lf_delta.enabled,
84 .log2_tile_columns =
h->h.tiling.log2_tile_cols,
85 .log2_tile_rows =
h->h.tiling.log2_tile_rows,
87 .segmentEnabled =
h->h.segmentation.enabled,
88 .segmentMapUpdate =
h->h.segmentation.update_map,
89 .segmentMapTemporalUpdate =
h->h.segmentation.temporal,
90 .segmentFeatureMode =
h->h.segmentation.absolute_vals,
93 .qpYDc =
h->h.ydc_qdelta,
94 .qpChDc =
h->h.uvdc_qdelta,
95 .qpChAc =
h->h.uvac_qdelta,
97 .resetFrameContext =
h->h.resetctx,
98 .mcomp_filter_type =
h->h.filtermode ^ (
h->h.filtermode <= 1),
100 .frameTagSize =
h->h.uncompressed_header_size,
101 .offsetToDctParts =
h->h.compressed_header_size,
103 .refFrameSignBias[0] = 0,
107 for (
i = 0;
i < 2;
i++)
108 ppc->mbModeLfDelta[
i] =
h->h.lf_delta.mode[
i];
111 ppc->mbRefLfDelta[
i] =
h->h.lf_delta.ref[
i];
114 ppc->mb_segment_tree_probs[
i] =
h->h.segmentation.prob[
i];
117 ppc->activeRefIdx[
i] =
h->h.refidx[
i];
118 ppc->segment_pred_probs[
i] =
h->h.segmentation.pred_prob[
i];
119 ppc->refFrameSignBias[
i + 1] =
h->h.signbias[
i];
122 for (
i = 0;
i < 8;
i++) {
123 ppc->segmentFeatureEnable[
i][0] =
h->h.segmentation.feat[
i].q_enabled;
124 ppc->segmentFeatureEnable[
i][1] =
h->h.segmentation.feat[
i].lf_enabled;
125 ppc->segmentFeatureEnable[
i][2] =
h->h.segmentation.feat[
i].ref_enabled;
126 ppc->segmentFeatureEnable[
i][3] =
h->h.segmentation.feat[
i].skip_enabled;
128 ppc->segmentFeatureData[
i][0] =
h->h.segmentation.feat[
i].q_val;
129 ppc->segmentFeatureData[
i][1] =
h->h.segmentation.feat[
i].lf_val;
130 ppc->segmentFeatureData[
i][2] =
h->h.segmentation.feat[
i].ref_val;
131 ppc->segmentFeatureData[
i][3] = 0;
@ AV_PIX_FMT_CUDA
HW acceleration through CUDA.
enum AVColorSpace colorspace
YUV colorspace type.
static int nvdec_vp9_start_frame(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
const AVPixFmtDescriptor * av_pix_fmt_desc_get(enum AVPixelFormat pix_fmt)
uint8_t * data
The data buffer.
int ff_nvdec_get_ref_idx(AVFrame *frame)
This struct stores per-frame lavc-internal data and is attached to it via private_ref.
This structure describes decoded (raw) audio or video data.
int depth
Number of bits in the component.
@ AVCOL_SPC_RGB
order of coefficients is actually GBR, also IEC 61966-2-1 (sRGB)
@ AVCOL_SPC_BT470BG
also ITU-R BT601-6 625 / ITU-R BT1358 625 / ITU-R BT1700 625 PAL & SECAM / IEC 61966-2-4 xvYCC601
int ff_nvdec_start_frame(AVCodecContext *avctx, AVFrame *frame)
@ AVCOL_SPC_SMPTE170M
also ITU-R BT601-6 525 / ITU-R BT1358 525 / ITU-R BT1700 NTSC
uint8_t log2_chroma_w
Amount to shift the luma width right to find the chroma width.
const AVHWAccel ff_vp9_nvdec_hwaccel
int ff_nvdec_simple_end_frame(AVCodecContext *avctx)
int ff_nvdec_decode_init(AVCodecContext *avctx)
struct AVCodecInternal * internal
Private context used for internal data.
static int nvdec_vp9_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx)
void * hwaccel_priv_data
hwaccel-specific private data
int ff_nvdec_decode_uninit(AVCodecContext *avctx)
AVBufferRef * private_ref
AVBufferRef for internal use by a single libav* library.
const char * name
Name of the hardware accelerated codec.
@ AVCOL_SPC_SMPTE240M
functionally identical to above
@ AVCOL_SPC_BT2020_NCL
ITU-R BT2020 non-constant luminance system.
main external API structure.
int ff_nvdec_simple_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
the frame and frame reference mechanism is intended to as much as expensive copies of that data while still allowing the filters to produce correct results The data is stored in buffers represented by AVFrame structures Several references can point to the same frame buffer
int ff_nvdec_frame_params(AVCodecContext *avctx, AVBufferRef *hw_frames_ctx, int dpb_size, int supports_444)
AVComponentDescriptor comp[4]
Parameters that describe how pixels are packed.
A reference to a data buffer.
Descriptor that unambiguously describes how the bits of a pixel are stored in the up to 4 data planes...
void * hwaccel_priv
Per-frame private data for hwaccels.
enum AVPixelFormat sw_pix_fmt
Nominal unaccelerated pixel format, see AV_PIX_FMT_xxx.
@ AVCOL_SPC_BT709
also ITU-R BT1361 / IEC 61966-2-4 xvYCC709 / SMPTE RP177 Annex B
uint8_t log2_chroma_h
Amount to shift the luma height right to find the chroma height.