FFmpeg
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
dxva2_vc1.c
Go to the documentation of this file.
1 /*
2  * DXVA2 WMV3/VC-1 HW acceleration.
3  *
4  * copyright (c) 2010 Laurent Aimar
5  *
6  * This file is part of FFmpeg.
7  *
8  * FFmpeg is free software; you can redistribute it and/or
9  * modify it under the terms of the GNU Lesser General Public
10  * License as published by the Free Software Foundation; either
11  * version 2.1 of the License, or (at your option) any later version.
12  *
13  * FFmpeg is distributed in the hope that it will be useful,
14  * but WITHOUT ANY WARRANTY; without even the implied warranty of
15  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16  * Lesser General Public License for more details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with FFmpeg; if not, write to the Free Software
20  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21  */
22 
23 #include "mpegutils.h"
24 #include "vc1.h"
25 #include "vc1data.h"
26 
27 // The headers above may include w32threads.h, which uses the original
28 // _WIN32_WINNT define, while dxva2_internal.h redefines it to target a
29 // potentially newer version.
30 #include "dxva2_internal.h"
31 
32 struct dxva2_picture_context {
33  DXVA_PictureParameters pp;
34  DXVA_SliceInfo si;
35 
36  const uint8_t *bitstream;
37  unsigned bitstream_size;
38 };
39 
41  AVDXVAContext *ctx, const VC1Context *v,
42  DXVA_PictureParameters *pp)
43 {
44  const MpegEncContext *s = &v->s;
45  const Picture *current_picture = s->current_picture_ptr;
46  int intcomp = 0;
47 
48  // determine if intensity compensation is needed
49  if (s->pict_type == AV_PICTURE_TYPE_P) {
50  if ((v->fcm == ILACE_FRAME && v->intcomp) || (v->fcm != ILACE_FRAME && v->mv_mode == MV_PMODE_INTENSITY_COMP)) {
51  if (v->lumscale != 32 || v->lumshift != 0 || (s->picture_structure != PICT_FRAME && (v->lumscale2 != 32 || v->lumshift2 != 0)))
52  intcomp = 1;
53  }
54  }
55 
56  memset(pp, 0, sizeof(*pp));
57  pp->wDecodedPictureIndex =
58  pp->wDeblockedPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, current_picture->f);
59  if (s->pict_type != AV_PICTURE_TYPE_I && !v->bi_type)
60  pp->wForwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, s->last_picture.f);
61  else
62  pp->wForwardRefPictureIndex = 0xffff;
63  if (s->pict_type == AV_PICTURE_TYPE_B && !v->bi_type)
64  pp->wBackwardRefPictureIndex = ff_dxva2_get_surface_index(avctx, ctx, s->next_picture.f);
65  else
66  pp->wBackwardRefPictureIndex = 0xffff;
67  if (v->profile == PROFILE_ADVANCED) {
68  /* It is the cropped width/height -1 of the frame */
69  pp->wPicWidthInMBminus1 = avctx->width - 1;
70  pp->wPicHeightInMBminus1= avctx->height - 1;
71  } else {
72  /* It is the coded width/height in macroblock -1 of the frame */
73  pp->wPicWidthInMBminus1 = s->mb_width - 1;
74  pp->wPicHeightInMBminus1= s->mb_height - 1;
75  }
76  pp->bMacroblockWidthMinus1 = 15;
77  pp->bMacroblockHeightMinus1 = 15;
78  pp->bBlockWidthMinus1 = 7;
79  pp->bBlockHeightMinus1 = 7;
80  pp->bBPPminus1 = 7;
82  pp->bPicStructure |= 0x01;
84  pp->bPicStructure |= 0x02;
85  pp->bSecondField = v->interlace && v->fcm == ILACE_FIELD && v->second_field;
86  pp->bPicIntra = s->pict_type == AV_PICTURE_TYPE_I || v->bi_type;
87  pp->bPicBackwardPrediction = s->pict_type == AV_PICTURE_TYPE_B && !v->bi_type;
88  pp->bBidirectionalAveragingMode = (1 << 7) |
89  ((DXVA_CONTEXT_CFG_INTRARESID(avctx, ctx) != 0) << 6) |
90  ((DXVA_CONTEXT_CFG_RESIDACCEL(avctx, ctx) != 0) << 5) |
91  (intcomp << 4) |
92  ((v->profile == PROFILE_ADVANCED) << 3);
93  pp->bMVprecisionAndChromaRelation = ((v->mv_mode == MV_PMODE_1MV_HPEL_BILIN) << 3) |
94  (1 << 2) |
95  (0 << 1) |
96  (!s->quarter_sample );
97  pp->bChromaFormat = v->chromaformat;
98  DXVA_CONTEXT_REPORT_ID(avctx, ctx)++;
99  if (DXVA_CONTEXT_REPORT_ID(avctx, ctx) >= (1 << 16))
100  DXVA_CONTEXT_REPORT_ID(avctx, ctx) = 1;
101  pp->bPicScanFixed = DXVA_CONTEXT_REPORT_ID(avctx, ctx) >> 8;
102  pp->bPicScanMethod = DXVA_CONTEXT_REPORT_ID(avctx, ctx) & 0xff;
103  pp->bPicReadbackRequests = 0;
104  pp->bRcontrol = v->rnd;
105  pp->bPicSpatialResid8 = (v->panscanflag << 7) |
106  (v->refdist_flag << 6) |
107  (s->loop_filter << 5) |
108  (v->fastuvmc << 4) |
109  (v->extended_mv << 3) |
110  (v->dquant << 1) |
111  (v->vstransform );
112  pp->bPicOverflowBlocks = (v->quantizer_mode << 6) |
113  (v->multires << 5) |
114  (v->resync_marker << 4) |
115  (v->rangered << 3) |
116  (s->max_b_frames );
117  pp->bPicExtrapolation = (!v->interlace || v->fcm == PROGRESSIVE) ? 1 : 2;
118  pp->bPicDeblocked = ((!pp->bPicBackwardPrediction && v->overlap) << 6) |
119  ((v->profile != PROFILE_ADVANCED && v->rangeredfrm) << 5) |
120  (s->loop_filter << 1);
121  pp->bPicDeblockConfined = (v->postprocflag << 7) |
122  (v->broadcast << 6) |
123  (v->interlace << 5) |
124  (v->tfcntrflag << 4) |
125  (v->finterpflag << 3) |
126  ((s->pict_type != AV_PICTURE_TYPE_B) << 2) |
127  (v->psf << 1) |
128  (v->extended_dmv );
129  if (s->pict_type != AV_PICTURE_TYPE_I)
130  pp->bPic4MVallowed = v->mv_mode == MV_PMODE_MIXED_MV ||
133  if (v->profile == PROFILE_ADVANCED)
134  pp->bPicOBMC = (v->range_mapy_flag << 7) |
135  (v->range_mapy << 4) |
136  (v->range_mapuv_flag << 3) |
137  (v->range_mapuv );
138  pp->bPicBinPB = 0;
139  pp->bMV_RPS = (v->fcm == ILACE_FIELD && pp->bPicBackwardPrediction) ? v->refdist + 9 : 0;
140  pp->bReservedBits = v->pq;
142  if (intcomp) {
143  pp->wBitstreamFcodes = v->lumscale;
144  pp->wBitstreamPCEelements = v->lumshift;
145  } else {
146  pp->wBitstreamFcodes = 32;
147  pp->wBitstreamPCEelements = 0;
148  }
149  } else {
150  /* Syntax: (top_field_param << 8) | bottom_field_param */
151  if (intcomp) {
152  pp->wBitstreamFcodes = (v->lumscale << 8) | v->lumscale2;
153  pp->wBitstreamPCEelements = (v->lumshift << 8) | v->lumshift2;
154  } else {
155  pp->wBitstreamFcodes = (32 << 8) | 32;
156  pp->wBitstreamPCEelements = 0;
157  }
158  }
159  pp->bBitstreamConcealmentNeed = 0;
160  pp->bBitstreamConcealmentMethod = 0;
161 }
162 
163 static void fill_slice(AVCodecContext *avctx, DXVA_SliceInfo *slice,
164  unsigned position, unsigned size)
165 {
166  const VC1Context *v = avctx->priv_data;
167  const MpegEncContext *s = &v->s;
168 
169  memset(slice, 0, sizeof(*slice));
170  slice->wHorizontalPosition = 0;
171  slice->wVerticalPosition = s->mb_y;
172  slice->dwSliceBitsInBuffer = 8 * size;
173  slice->dwSliceDataLocation = position;
174  slice->bStartCodeBitOffset = 0;
175  slice->bReservedBits = (s->pict_type == AV_PICTURE_TYPE_B && !v->bi_type) ? v->bfraction_lut_index + 9 : 0;
176  slice->wMBbitOffset = v->p_frame_skipped ? 0xffff : get_bits_count(&s->gb) + (avctx->codec_id == AV_CODEC_ID_VC1 ? 32 : 0);
177  slice->wNumberMBsInSlice = s->mb_width * s->mb_height; /* XXX We assume 1 slice */
178  slice->wQuantizerScaleCode = v->pq;
179  slice->wBadSliceChopping = 0;
180 }
181 
185 {
186  const VC1Context *v = avctx->priv_data;
188  const MpegEncContext *s = &v->s;
190 
191  DXVA_SliceInfo *slice = &ctx_pic->si;
192 
193  static const uint8_t start_code[] = { 0, 0, 1, 0x0d };
194  const unsigned start_code_size = avctx->codec_id == AV_CODEC_ID_VC1 ? sizeof(start_code) : 0;
195  const unsigned slice_size = slice->dwSliceBitsInBuffer / 8;
196  const unsigned padding = 128 - ((start_code_size + slice_size) & 127);
197  const unsigned data_size = start_code_size + slice_size + padding;
198 
199  void *dxva_data_ptr;
200  uint8_t *dxva_data;
201  unsigned dxva_size;
202  int result;
203  unsigned type;
204 
205 #if CONFIG_D3D11VA
206  if (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD) {
207  type = D3D11_VIDEO_DECODER_BUFFER_BITSTREAM;
208  if (FAILED(ID3D11VideoContext_GetDecoderBuffer(D3D11VA_CONTEXT(ctx)->video_context,
209  D3D11VA_CONTEXT(ctx)->decoder,
210  type,
211  &dxva_size, &dxva_data_ptr)))
212  return -1;
213  }
214 #endif
215 #if CONFIG_DXVA2
216  if (avctx->pix_fmt == AV_PIX_FMT_DXVA2_VLD) {
217  type = DXVA2_BitStreamDateBufferType;
218  if (FAILED(IDirectXVideoDecoder_GetBuffer(DXVA2_CONTEXT(ctx)->decoder,
219  type,
220  &dxva_data_ptr, &dxva_size)))
221  return -1;
222  }
223 #endif
224 
225  dxva_data = dxva_data_ptr;
226  result = data_size <= dxva_size ? 0 : -1;
227  if (!result) {
228  if (start_code_size > 0) {
229  memcpy(dxva_data, start_code, start_code_size);
230  if (v->second_field)
231  dxva_data[3] = 0x0c;
232  }
233  memcpy(dxva_data + start_code_size,
234  ctx_pic->bitstream + slice->dwSliceDataLocation, slice_size);
235  if (padding > 0)
236  memset(dxva_data + start_code_size + slice_size, 0, padding);
237  slice->dwSliceBitsInBuffer = 8 * data_size;
238  }
239 #if CONFIG_D3D11VA
240  if (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD)
241  if (FAILED(ID3D11VideoContext_ReleaseDecoderBuffer(D3D11VA_CONTEXT(ctx)->video_context, D3D11VA_CONTEXT(ctx)->decoder, type)))
242  return -1;
243 #endif
244 #if CONFIG_DXVA2
245  if (avctx->pix_fmt == AV_PIX_FMT_DXVA2_VLD)
246  if (FAILED(IDirectXVideoDecoder_ReleaseBuffer(DXVA2_CONTEXT(ctx)->decoder, type)))
247  return -1;
248 #endif
249  if (result)
250  return result;
251 
252 #if CONFIG_D3D11VA
253  if (avctx->pix_fmt == AV_PIX_FMT_D3D11VA_VLD) {
254  D3D11_VIDEO_DECODER_BUFFER_DESC *dsc11 = bs;
255  memset(dsc11, 0, sizeof(*dsc11));
256  dsc11->BufferType = type;
257  dsc11->DataSize = data_size;
258  dsc11->NumMBsInBuffer = s->mb_width * s->mb_height;
259 
260  type = D3D11_VIDEO_DECODER_BUFFER_SLICE_CONTROL;
261  }
262 #endif
263 #if CONFIG_DXVA2
264  if (avctx->pix_fmt == AV_PIX_FMT_DXVA2_VLD) {
265  DXVA2_DecodeBufferDesc *dsc2 = bs;
266  memset(dsc2, 0, sizeof(*dsc2));
267  dsc2->CompressedBufferType = type;
268  dsc2->DataSize = data_size;
269  dsc2->NumMBsInBuffer = s->mb_width * s->mb_height;
270 
271  type = DXVA2_SliceControlBufferType;
272  }
273 #endif
274  assert((data_size & 127) == 0);
275 
276  return ff_dxva2_commit_buffer(avctx, ctx, sc,
277  type,
278  slice, sizeof(*slice), s->mb_width * s->mb_height);
279 }
280 
282  av_unused const uint8_t *buffer,
283  av_unused uint32_t size)
284 {
285  const VC1Context *v = avctx->priv_data;
288 
289  if (DXVA_CONTEXT_DECODER(avctx, ctx) == NULL ||
290  DXVA_CONTEXT_CFG(avctx, ctx) == NULL ||
291  DXVA_CONTEXT_COUNT(avctx, ctx) <= 0)
292  return -1;
293  assert(ctx_pic);
294 
295  fill_picture_parameters(avctx, ctx, v, &ctx_pic->pp);
296 
297  ctx_pic->bitstream_size = 0;
298  ctx_pic->bitstream = NULL;
299  return 0;
300 }
301 
303  const uint8_t *buffer,
304  uint32_t size)
305 {
306  const VC1Context *v = avctx->priv_data;
307  const Picture *current_picture = v->s.current_picture_ptr;
308  struct dxva2_picture_context *ctx_pic = current_picture->hwaccel_picture_private;
309 
310  if (ctx_pic->bitstream_size > 0)
311  return -1;
312 
313  if (avctx->codec_id == AV_CODEC_ID_VC1 &&
314  size >= 4 && IS_MARKER(AV_RB32(buffer))) {
315  buffer += 4;
316  size -= 4;
317  }
318 
319  ctx_pic->bitstream_size = size;
320  ctx_pic->bitstream = buffer;
321 
322  fill_slice(avctx, &ctx_pic->si, 0, size);
323  return 0;
324 }
325 
327 {
328  VC1Context *v = avctx->priv_data;
330  int ret;
331 
332  if (ctx_pic->bitstream_size <= 0)
333  return -1;
334 
336  &ctx_pic->pp, sizeof(ctx_pic->pp),
337  NULL, 0,
339  if (!ret)
340  ff_mpeg_draw_horiz_band(&v->s, 0, avctx->height);
341  return ret;
342 }
343 
344 #if CONFIG_WMV3_DXVA2_HWACCEL
345 AVHWAccel ff_wmv3_dxva2_hwaccel = {
346  .name = "wmv3_dxva2",
347  .type = AVMEDIA_TYPE_VIDEO,
348  .id = AV_CODEC_ID_WMV3,
349  .pix_fmt = AV_PIX_FMT_DXVA2_VLD,
350  .start_frame = dxva2_vc1_start_frame,
351  .decode_slice = dxva2_vc1_decode_slice,
352  .end_frame = dxva2_vc1_end_frame,
353  .frame_priv_data_size = sizeof(struct dxva2_picture_context),
354 };
355 #endif
356 
357 #if CONFIG_VC1_DXVA2_HWACCEL
358 AVHWAccel ff_vc1_dxva2_hwaccel = {
359  .name = "vc1_dxva2",
360  .type = AVMEDIA_TYPE_VIDEO,
361  .id = AV_CODEC_ID_VC1,
362  .pix_fmt = AV_PIX_FMT_DXVA2_VLD,
363  .start_frame = dxva2_vc1_start_frame,
364  .decode_slice = dxva2_vc1_decode_slice,
365  .end_frame = dxva2_vc1_end_frame,
366  .frame_priv_data_size = sizeof(struct dxva2_picture_context),
367 };
368 #endif
369 
370 #if CONFIG_WMV3_D3D11VA_HWACCEL
371 AVHWAccel ff_wmv3_d3d11va_hwaccel = {
372  .name = "wmv3_d3d11va",
373  .type = AVMEDIA_TYPE_VIDEO,
374  .id = AV_CODEC_ID_WMV3,
375  .pix_fmt = AV_PIX_FMT_D3D11VA_VLD,
376  .start_frame = dxva2_vc1_start_frame,
377  .decode_slice = dxva2_vc1_decode_slice,
378  .end_frame = dxva2_vc1_end_frame,
379  .frame_priv_data_size = sizeof(struct dxva2_picture_context),
380 };
381 #endif
382 
383 #if CONFIG_VC1_D3D11VA_HWACCEL
384 AVHWAccel ff_vc1_d3d11va_hwaccel = {
385  .name = "vc1_d3d11va",
386  .type = AVMEDIA_TYPE_VIDEO,
387  .id = AV_CODEC_ID_VC1,
388  .pix_fmt = AV_PIX_FMT_D3D11VA_VLD,
389  .start_frame = dxva2_vc1_start_frame,
390  .decode_slice = dxva2_vc1_decode_slice,
391  .end_frame = dxva2_vc1_end_frame,
392  .frame_priv_data_size = sizeof(struct dxva2_picture_context),
393 };
394 #endif
in the bitstream is reported as 00b
Definition: vc1.h:149
#define NULL
Definition: coverity.c:32
uint8_t bfraction_lut_index
Index for BFRACTION value (see Table 40, reproduced into ff_vc1_bfraction_lut[])
Definition: vc1.h:389
int p_frame_skipped
Definition: vc1.h:380
const char * s
Definition: avisynth_c.h:631
The VC1 Context.
Definition: vc1.h:173
uint8_t lumscale2
for interlaced field P picture
Definition: vc1.h:338
DXVA_SliceInfo si
Definition: dxva2_vc1.c:34
AVFormatContext * ctx
Definition: movenc-test.c:48
int extended_mv
Ext MV in P/B (not in Simple)
Definition: vc1.h:223
int broadcast
TFF/RFF present.
Definition: vc1.h:200
uint8_t rangeredfrm
Frame decoding info for S/M profiles only.
Definition: vc1.h:302
enum AVPixelFormat pix_fmt
Pixel format, see AV_PIX_FMT_xxx.
Definition: avcodec.h:1752
DXVA_PicParams_H264 pp
Definition: dxva2_h264.c:33
int fastuvmc
Rounding of qpel vector to hpel ? (not in Simple)
Definition: vc1.h:222
uint8_t lumshift2
Definition: vc1.h:339
DXVA_SliceInfo slice[MAX_SLICES]
Definition: dxva2_mpeg2.c:37
void ff_mpeg_draw_horiz_band(MpegEncContext *s, int y, int h)
Definition: mpegvideo.c:2732
int refdist
distance of the current picture from reference
Definition: vc1.h:355
VC-1 tables.
int bi_type
Definition: vc1.h:381
uint8_t
void * hwaccel_context
Hardware accelerator context.
Definition: avcodec.h:2855
int panscanflag
NUMPANSCANWIN, TOPLEFT{X,Y}, BOTRIGHT{X,Y} present.
Definition: vc1.h:203
int interlace
Progressive/interlaced (RPTFTM syntax element)
Definition: vc1.h:201
int second_field
Definition: vc1.h:354
int ff_dxva2_common_end_frame(AVCodecContext *avctx, AVFrame *frame, const void *pp, unsigned pp_size, const void *qm, unsigned qm_size, int(*commit_bs_si)(AVCodecContext *, DECODER_BUFFER_DESC *bs, DECODER_BUFFER_DESC *slice))
Definition: dxva2.c:125
uint64_t_TMPL AV_WL64 unsigned int_TMPL AV_WL32 unsigned int_TMPL AV_WL24 unsigned int_TMPL AV_WL16 uint64_t_TMPL AV_WB64 unsigned int_TMPL AV_RB32
Definition: bytestream.h:87
int profile
Sequence header data for all Profiles TODO: choose between ints, uint8_ts and monobit flags...
Definition: vc1.h:218
#define PICT_BOTTOM_FIELD
Definition: mpegutils.h:38
static int get_bits_count(const GetBitContext *s)
Definition: get_bits.h:212
int refdist_flag
REFDIST syntax element present in II, IP, PI or PP field picture headers.
Definition: vc1.h:204
int mb_height
number of MBs horizontally & vertically
Definition: mpegvideo.h:126
ptrdiff_t size
Definition: opengl_enc.c:101
static int dxva2_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
Definition: dxva2_vc1.c:302
int psf
Progressive Segmented Frame.
Definition: vc1.h:211
int overlap
overlapped transforms in use
Definition: vc1.h:226
in the bitstream is reported as 11b
Definition: vc1.h:151
#define IS_MARKER(state)
Definition: dca_parser.c:45
#define PICT_TOP_FIELD
Definition: mpegutils.h:37
int quarter_sample
1->qpel, 0->half pel ME/MC
Definition: mpegvideo.h:399
GetBitContext gb
Definition: mpegvideo.h:445
int resync_marker
could this stream contain resync markers
Definition: vc1.h:396
int postprocflag
Per-frame processing suggestion flag present.
Definition: vc1.h:199
static void fill_picture_parameters(AVCodecContext *avctx, AVDXVAContext *ctx, const VC1Context *v, DXVA_PictureParameters *pp)
Definition: dxva2_vc1.c:40
const char * name
Name of the hardware accelerated codec.
Definition: avcodec.h:3503
int tfcntrflag
TFCNTR present.
Definition: vc1.h:202
static const chunk_decoder decoder[8]
Definition: dfa.c:327
int width
picture width / height.
Definition: avcodec.h:1711
uint8_t mv_mode
Frame decoding info for all profiles.
Definition: vc1.h:233
Picture * current_picture_ptr
pointer to the current picture
Definition: mpegvideo.h:181
Picture.
Definition: mpegpicture.h:45
void * hwaccel_picture_private
Hardware accelerator private data.
Definition: mpegpicture.h:77
uint8_t lumscale
Luma compensation parameters.
Definition: vc1.h:269
uint8_t range_mapuv_flag
Definition: vc1.h:329
unsigned bitstream_size
Definition: dxva2_h264.c:39
int intcomp
Definition: vc1.h:337
static void fill_slice(AVCodecContext *avctx, DXVA_SliceInfo *slice, unsigned position, unsigned size)
Definition: dxva2_vc1.c:163
int rangered
RANGEREDFRM (range reduction) syntax element present at frame level.
Definition: vc1.h:189
int finterpflag
INTERPFRM present.
Definition: vc1.h:228
int chromaformat
2bits, 2=4:2:0, only defined
Definition: vc1.h:198
enum AVCodecID codec_id
Definition: avcodec.h:1549
unsigned ff_dxva2_get_surface_index(const AVCodecContext *avctx, const AVDXVAContext *ctx, const AVFrame *frame)
Definition: dxva2.c:37
int multires
frame-level RESPIC syntax element present
Definition: vc1.h:186
main external API structure.
Definition: avcodec.h:1532
uint8_t range_mapy
Definition: vc1.h:330
int ff_dxva2_commit_buffer(AVCodecContext *avctx, AVDXVAContext *ctx, DECODER_BUFFER_DESC *dsc, unsigned type, const void *data, unsigned size, unsigned mb_count)
Definition: dxva2.c:52
int extended_dmv
Additional extended dmv range at P/B frame-level.
Definition: vc1.h:205
GLint GLenum type
Definition: opengl_enc.c:105
struct AVFrame * f
Definition: mpegpicture.h:46
static int commit_bitstream_and_slice_buffer(AVCodecContext *avctx, DECODER_BUFFER_DESC *bs, DECODER_BUFFER_DESC *sc)
Definition: dxva2_vc1.c:182
void DECODER_BUFFER_DESC
int quantizer_mode
2bits, quantizer mode used for sequence, see QUANT_*
Definition: vc1.h:227
HW decoding through DXVA2, Picture.data[3] contains a LPDIRECT3DSURFACE9 pointer. ...
Definition: pixfmt.h:149
int max_b_frames
max number of b-frames for encoding
Definition: mpegvideo.h:112
int pict_type
AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ...
Definition: mpegvideo.h:209
static const uint8_t start_code[]
Definition: h264.c:1298
int vstransform
variable-size [48]x[48] transform type + info
Definition: vc1.h:225
uint8_t range_mapuv
Definition: vc1.h:331
#define FAILED(hr)
Definition: windows2linux.h:48
MpegEncContext s
Definition: vc1.h:174
in the bitstream is reported as 10b
Definition: vc1.h:150
MpegEncContext.
Definition: mpegvideo.h:78
static int dxva2_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
Definition: dxva2_vc1.c:281
const uint8_t * bitstream
Definition: dxva2_h264.c:38
uint8_t pq
Definition: vc1.h:238
if(ret< 0)
Definition: vf_mcdeint.c:282
enum FrameCodingMode fcm
Frame decoding info for Advanced profile.
Definition: vc1.h:308
Picture last_picture
copy of the previous picture structure.
Definition: mpegvideo.h:159
uint8_t lumshift
Definition: vc1.h:270
Bi-dir predicted.
Definition: avutil.h:268
void * priv_data
Definition: avcodec.h:1574
#define PICT_FRAME
Definition: mpegutils.h:39
int picture_structure
Definition: mpegvideo.h:457
int rnd
rounding control
Definition: vc1.h:298
static int dxva2_vc1_end_frame(AVCodecContext *avctx)
Definition: dxva2_vc1.c:326
Picture next_picture
copy of the next picture structure.
Definition: mpegvideo.h:165
uint8_t range_mapy_flag
Definition: vc1.h:328
HW decoding through Direct3D11, Picture.data[3] contains a ID3D11VideoDecoderOutputView pointer...
Definition: pixfmt.h:243
int dquant
How qscale varies with MBs, 2bits (not in Simple)
Definition: vc1.h:224
uint8_t mv_mode2
Secondary MV coding mode (B frames)
Definition: vc1.h:234
Predicted.
Definition: avutil.h:267
GLuint buffer
Definition: opengl_enc.c:102
#define av_unused
Definition: attributes.h:126