vdpau.c
Go to the documentation of this file.
1 /*
2  * Video Decode and Presentation API for UNIX (VDPAU) is used for
3  * HW decode acceleration for MPEG-1/2, MPEG-4 ASP, H.264 and VC-1.
4  *
5  * Copyright (c) 2008 NVIDIA
6  *
7  * This file is part of Libav.
8  *
9  * Libav is free software; you can redistribute it and/or
10  * modify it under the terms of the GNU Lesser General Public
11  * License as published by the Free Software Foundation; either
12  * version 2.1 of the License, or (at your option) any later version.
13  *
14  * Libav is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17  * Lesser General Public License for more details.
18  *
19  * You should have received a copy of the GNU Lesser General Public
20  * License along with Libav; if not, write to the Free Software
21  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
22  */
23 
24 #include <limits.h>
25 #include "avcodec.h"
26 #include "h264.h"
27 #include "vc1.h"
28 
29 #undef NDEBUG
30 #include <assert.h>
31 
32 #include "vdpau.h"
33 #include "vdpau_internal.h"
34 
42 {
43  struct vdpau_render_state *render, *render_ref;
44  VdpReferenceFrameH264 *rf, *rf2;
45  Picture *pic;
46  int i, list, pic_frame_idx;
47 
48  render = (struct vdpau_render_state *)h->cur_pic_ptr->f.data[0];
49  assert(render);
50 
51  rf = &render->info.h264.referenceFrames[0];
52 #define H264_RF_COUNT FF_ARRAY_ELEMS(render->info.h264.referenceFrames)
53 
54  for (list = 0; list < 2; ++list) {
55  Picture **lp = list ? h->long_ref : h->short_ref;
56  int ls = list ? 16 : h->short_ref_count;
57 
58  for (i = 0; i < ls; ++i) {
59  pic = lp[i];
60  if (!pic || !pic->f.reference)
61  continue;
62  pic_frame_idx = pic->long_ref ? pic->pic_id : pic->frame_num;
63 
64  render_ref = (struct vdpau_render_state *)pic->f.data[0];
65  assert(render_ref);
66 
67  rf2 = &render->info.h264.referenceFrames[0];
68  while (rf2 != rf) {
69  if (
70  (rf2->surface == render_ref->surface)
71  && (rf2->is_long_term == pic->long_ref)
72  && (rf2->frame_idx == pic_frame_idx)
73  )
74  break;
75  ++rf2;
76  }
77  if (rf2 != rf) {
78  rf2->top_is_reference |= (pic->f.reference & PICT_TOP_FIELD) ? VDP_TRUE : VDP_FALSE;
79  rf2->bottom_is_reference |= (pic->f.reference & PICT_BOTTOM_FIELD) ? VDP_TRUE : VDP_FALSE;
80  continue;
81  }
82 
83  if (rf >= &render->info.h264.referenceFrames[H264_RF_COUNT])
84  continue;
85 
86  rf->surface = render_ref->surface;
87  rf->is_long_term = pic->long_ref;
88  rf->top_is_reference = (pic->f.reference & PICT_TOP_FIELD) ? VDP_TRUE : VDP_FALSE;
89  rf->bottom_is_reference = (pic->f.reference & PICT_BOTTOM_FIELD) ? VDP_TRUE : VDP_FALSE;
90  rf->field_order_cnt[0] = pic->field_poc[0];
91  rf->field_order_cnt[1] = pic->field_poc[1];
92  rf->frame_idx = pic_frame_idx;
93 
94  ++rf;
95  }
96  }
97 
98  for (; rf < &render->info.h264.referenceFrames[H264_RF_COUNT]; ++rf) {
99  rf->surface = VDP_INVALID_HANDLE;
100  rf->is_long_term = 0;
101  rf->top_is_reference = 0;
102  rf->bottom_is_reference = 0;
103  rf->field_order_cnt[0] = 0;
104  rf->field_order_cnt[1] = 0;
105  rf->frame_idx = 0;
106  }
107 }
108 
109 void ff_vdpau_add_data_chunk(uint8_t *data, const uint8_t *buf, int buf_size)
110 {
111  struct vdpau_render_state *render = (struct vdpau_render_state*)data;
112  assert(render);
113 
115  render->bitstream_buffers,
117  sizeof(*render->bitstream_buffers)*(render->bitstream_buffers_used + 1)
118  );
119 
120  render->bitstream_buffers[render->bitstream_buffers_used].struct_version = VDP_BITSTREAM_BUFFER_VERSION;
121  render->bitstream_buffers[render->bitstream_buffers_used].bitstream = buf;
122  render->bitstream_buffers[render->bitstream_buffers_used].bitstream_bytes = buf_size;
123  render->bitstream_buffers_used++;
124 }
125 
127 {
128  struct vdpau_render_state *render;
129  int i;
130 
131  render = (struct vdpau_render_state *)h->cur_pic_ptr->f.data[0];
132  assert(render);
133 
134  for (i = 0; i < 2; ++i) {
135  int foc = h->cur_pic_ptr->field_poc[i];
136  if (foc == INT_MAX)
137  foc = 0;
138  render->info.h264.field_order_cnt[i] = foc;
139  }
140 
141  render->info.h264.frame_num = h->frame_num;
142 }
143 
145 {
146  struct vdpau_render_state *render;
147 
148  render = (struct vdpau_render_state *)h->cur_pic_ptr->f.data[0];
149  assert(render);
150 
151  render->info.h264.slice_count = h->slice_num;
152  if (render->info.h264.slice_count < 1)
153  return;
154 
155  render->info.h264.is_reference = (h->cur_pic_ptr->f.reference & 3) ? VDP_TRUE : VDP_FALSE;
156  render->info.h264.field_pic_flag = h->picture_structure != PICT_FRAME;
157  render->info.h264.bottom_field_flag = h->picture_structure == PICT_BOTTOM_FIELD;
158  render->info.h264.num_ref_frames = h->sps.ref_frame_count;
159  render->info.h264.mb_adaptive_frame_field_flag = h->sps.mb_aff && !render->info.h264.field_pic_flag;
160  render->info.h264.constrained_intra_pred_flag = h->pps.constrained_intra_pred;
161  render->info.h264.weighted_pred_flag = h->pps.weighted_pred;
162  render->info.h264.weighted_bipred_idc = h->pps.weighted_bipred_idc;
163  render->info.h264.frame_mbs_only_flag = h->sps.frame_mbs_only_flag;
164  render->info.h264.transform_8x8_mode_flag = h->pps.transform_8x8_mode;
165  render->info.h264.chroma_qp_index_offset = h->pps.chroma_qp_index_offset[0];
166  render->info.h264.second_chroma_qp_index_offset = h->pps.chroma_qp_index_offset[1];
167  render->info.h264.pic_init_qp_minus26 = h->pps.init_qp - 26;
168  render->info.h264.num_ref_idx_l0_active_minus1 = h->pps.ref_count[0] - 1;
169  render->info.h264.num_ref_idx_l1_active_minus1 = h->pps.ref_count[1] - 1;
170  render->info.h264.log2_max_frame_num_minus4 = h->sps.log2_max_frame_num - 4;
171  render->info.h264.pic_order_cnt_type = h->sps.poc_type;
172  render->info.h264.log2_max_pic_order_cnt_lsb_minus4 = h->sps.poc_type ? 0 : h->sps.log2_max_poc_lsb - 4;
173  render->info.h264.delta_pic_order_always_zero_flag = h->sps.delta_pic_order_always_zero_flag;
174  render->info.h264.direct_8x8_inference_flag = h->sps.direct_8x8_inference_flag;
175  render->info.h264.entropy_coding_mode_flag = h->pps.cabac;
176  render->info.h264.pic_order_present_flag = h->pps.pic_order_present;
177  render->info.h264.deblocking_filter_control_present_flag = h->pps.deblocking_filter_parameters_present;
178  render->info.h264.redundant_pic_cnt_present_flag = h->pps.redundant_pic_cnt_present;
179  memcpy(render->info.h264.scaling_lists_4x4, h->pps.scaling_matrix4, sizeof(render->info.h264.scaling_lists_4x4));
180  memcpy(render->info.h264.scaling_lists_8x8[0], h->pps.scaling_matrix8[0], sizeof(render->info.h264.scaling_lists_8x8[0]));
181  memcpy(render->info.h264.scaling_lists_8x8[1], h->pps.scaling_matrix8[3], sizeof(render->info.h264.scaling_lists_8x8[0]));
182 
184  render->bitstream_buffers_used = 0;
185 }
186 
188  int buf_size, int slice_count)
189 {
190  struct vdpau_render_state *render, *last, *next;
191  int i;
192 
193  if (!s->current_picture_ptr) return;
194 
195  render = (struct vdpau_render_state *)s->current_picture_ptr->f.data[0];
196  assert(render);
197 
198  /* fill VdpPictureInfoMPEG1Or2 struct */
199  render->info.mpeg.picture_structure = s->picture_structure;
200  render->info.mpeg.picture_coding_type = s->pict_type;
201  render->info.mpeg.intra_dc_precision = s->intra_dc_precision;
202  render->info.mpeg.frame_pred_frame_dct = s->frame_pred_frame_dct;
203  render->info.mpeg.concealment_motion_vectors = s->concealment_motion_vectors;
204  render->info.mpeg.intra_vlc_format = s->intra_vlc_format;
205  render->info.mpeg.alternate_scan = s->alternate_scan;
206  render->info.mpeg.q_scale_type = s->q_scale_type;
207  render->info.mpeg.top_field_first = s->top_field_first;
208  render->info.mpeg.full_pel_forward_vector = s->full_pel[0]; // MPEG-1 only. Set 0 for MPEG-2
209  render->info.mpeg.full_pel_backward_vector = s->full_pel[1]; // MPEG-1 only. Set 0 for MPEG-2
210  render->info.mpeg.f_code[0][0] = s->mpeg_f_code[0][0]; // For MPEG-1 fill both horiz. & vert.
211  render->info.mpeg.f_code[0][1] = s->mpeg_f_code[0][1];
212  render->info.mpeg.f_code[1][0] = s->mpeg_f_code[1][0];
213  render->info.mpeg.f_code[1][1] = s->mpeg_f_code[1][1];
214  for (i = 0; i < 64; ++i) {
215  render->info.mpeg.intra_quantizer_matrix[i] = s->intra_matrix[i];
216  render->info.mpeg.non_intra_quantizer_matrix[i] = s->inter_matrix[i];
217  }
218 
219  render->info.mpeg.forward_reference = VDP_INVALID_HANDLE;
220  render->info.mpeg.backward_reference = VDP_INVALID_HANDLE;
221 
222  switch(s->pict_type){
223  case AV_PICTURE_TYPE_B:
224  next = (struct vdpau_render_state *)s->next_picture.f.data[0];
225  assert(next);
226  render->info.mpeg.backward_reference = next->surface;
227  // no return here, going to set forward prediction
228  case AV_PICTURE_TYPE_P:
229  last = (struct vdpau_render_state *)s->last_picture.f.data[0];
230  if (!last) // FIXME: Does this test make sense?
231  last = render; // predict second field from the first
232  render->info.mpeg.forward_reference = last->surface;
233  }
234 
235  ff_vdpau_add_data_chunk(s->current_picture_ptr->f.data[0], buf, buf_size);
236 
237  render->info.mpeg.slice_count = slice_count;
238 
239  if (slice_count)
241  render->bitstream_buffers_used = 0;
242 }
243 
245  int buf_size)
246 {
247  VC1Context *v = s->avctx->priv_data;
248  struct vdpau_render_state *render, *last, *next;
249 
250  render = (struct vdpau_render_state *)s->current_picture.f.data[0];
251  assert(render);
252 
253  /* fill LvPictureInfoVC1 struct */
254  render->info.vc1.frame_coding_mode = v->fcm;
255  render->info.vc1.postprocflag = v->postprocflag;
256  render->info.vc1.pulldown = v->broadcast;
257  render->info.vc1.interlace = v->interlace;
258  render->info.vc1.tfcntrflag = v->tfcntrflag;
259  render->info.vc1.finterpflag = v->finterpflag;
260  render->info.vc1.psf = v->psf;
261  render->info.vc1.dquant = v->dquant;
262  render->info.vc1.panscan_flag = v->panscanflag;
263  render->info.vc1.refdist_flag = v->refdist_flag;
264  render->info.vc1.quantizer = v->quantizer_mode;
265  render->info.vc1.extended_mv = v->extended_mv;
266  render->info.vc1.extended_dmv = v->extended_dmv;
267  render->info.vc1.overlap = v->overlap;
268  render->info.vc1.vstransform = v->vstransform;
269  render->info.vc1.loopfilter = v->s.loop_filter;
270  render->info.vc1.fastuvmc = v->fastuvmc;
271  render->info.vc1.range_mapy_flag = v->range_mapy_flag;
272  render->info.vc1.range_mapy = v->range_mapy;
273  render->info.vc1.range_mapuv_flag = v->range_mapuv_flag;
274  render->info.vc1.range_mapuv = v->range_mapuv;
275  /* Specific to simple/main profile only */
276  render->info.vc1.multires = v->multires;
277  render->info.vc1.syncmarker = v->s.resync_marker;
278  render->info.vc1.rangered = v->rangered | (v->rangeredfrm << 1);
279  render->info.vc1.maxbframes = v->s.max_b_frames;
280 
281  render->info.vc1.deblockEnable = v->postprocflag & 1;
282  render->info.vc1.pquant = v->pq;
283 
284  render->info.vc1.forward_reference = VDP_INVALID_HANDLE;
285  render->info.vc1.backward_reference = VDP_INVALID_HANDLE;
286 
287  if (v->bi_type)
288  render->info.vc1.picture_type = 4;
289  else
290  render->info.vc1.picture_type = s->pict_type - 1 + s->pict_type / 3;
291 
292  switch(s->pict_type){
293  case AV_PICTURE_TYPE_B:
294  next = (struct vdpau_render_state *)s->next_picture.f.data[0];
295  assert(next);
296  render->info.vc1.backward_reference = next->surface;
297  // no break here, going to set forward prediction
298  case AV_PICTURE_TYPE_P:
299  last = (struct vdpau_render_state *)s->last_picture.f.data[0];
300  if (!last) // FIXME: Does this test make sense?
301  last = render; // predict second field from the first
302  render->info.vc1.forward_reference = last->surface;
303  }
304 
305  ff_vdpau_add_data_chunk(s->current_picture_ptr->f.data[0], buf, buf_size);
306 
307  render->info.vc1.slice_count = 1;
308 
310  render->bitstream_buffers_used = 0;
311 }
312 
314  int buf_size)
315 {
316  struct vdpau_render_state *render, *last, *next;
317  int i;
318 
319  if (!s->current_picture_ptr) return;
320 
321  render = (struct vdpau_render_state *)s->current_picture_ptr->f.data[0];
322  assert(render);
323 
324  /* fill VdpPictureInfoMPEG4Part2 struct */
325  render->info.mpeg4.trd[0] = s->pp_time;
326  render->info.mpeg4.trb[0] = s->pb_time;
327  render->info.mpeg4.trd[1] = s->pp_field_time >> 1;
328  render->info.mpeg4.trb[1] = s->pb_field_time >> 1;
329  render->info.mpeg4.vop_time_increment_resolution = s->avctx->time_base.den;
330  render->info.mpeg4.vop_coding_type = 0;
331  render->info.mpeg4.vop_fcode_forward = s->f_code;
332  render->info.mpeg4.vop_fcode_backward = s->b_code;
333  render->info.mpeg4.resync_marker_disable = !s->resync_marker;
334  render->info.mpeg4.interlaced = !s->progressive_sequence;
335  render->info.mpeg4.quant_type = s->mpeg_quant;
336  render->info.mpeg4.quarter_sample = s->quarter_sample;
337  render->info.mpeg4.short_video_header = s->avctx->codec->id == AV_CODEC_ID_H263;
338  render->info.mpeg4.rounding_control = s->no_rounding;
339  render->info.mpeg4.alternate_vertical_scan_flag = s->alternate_scan;
340  render->info.mpeg4.top_field_first = s->top_field_first;
341  for (i = 0; i < 64; ++i) {
342  render->info.mpeg4.intra_quantizer_matrix[i] = s->intra_matrix[i];
343  render->info.mpeg4.non_intra_quantizer_matrix[i] = s->inter_matrix[i];
344  }
345  render->info.mpeg4.forward_reference = VDP_INVALID_HANDLE;
346  render->info.mpeg4.backward_reference = VDP_INVALID_HANDLE;
347 
348  switch (s->pict_type) {
349  case AV_PICTURE_TYPE_B:
350  next = (struct vdpau_render_state *)s->next_picture.f.data[0];
351  assert(next);
352  render->info.mpeg4.backward_reference = next->surface;
353  render->info.mpeg4.vop_coding_type = 2;
354  // no break here, going to set forward prediction
355  case AV_PICTURE_TYPE_P:
356  last = (struct vdpau_render_state *)s->last_picture.f.data[0];
357  assert(last);
358  render->info.mpeg4.forward_reference = last->surface;
359  }
360 
361  ff_vdpau_add_data_chunk(s->current_picture_ptr->f.data[0], buf, buf_size);
362 
364  render->bitstream_buffers_used = 0;
365 }
366 
367 /* @}*/
#define PICT_BOTTOM_FIELD
Definition: mpegvideo.h:628
const struct AVCodec * codec
Definition: avcodec.h:1348
#define PICT_TOP_FIELD
Definition: mpegvideo.h:627
The VC1 Context.
Definition: vc1.h:181
int weighted_bipred_idc
Definition: h264.h:213
int chroma_qp_index_offset[2]
Definition: h264.h:216
int extended_mv
Ext MV in P/B (not in Simple)
Definition: vc1.h:229
int broadcast
TFF/RFF present.
Definition: vc1.h:207
unsigned int ref_count[2]
num_ref_idx_l0/1_active_minus1 + 1
Definition: h264.h:211
uint8_t rangeredfrm
Frame decoding info for S/M profiles only.
Definition: vc1.h:305
int frame_mbs_only_flag
Definition: h264.h:161
void ff_vdpau_mpeg4_decode_picture(MpegEncContext *s, const uint8_t *buf, int buf_size)
Definition: vdpau.c:313
H264Context.
Definition: h264.h:252
Public libavcodec VDPAU header.
int fastuvmc
Rounding of qpel vector to hpel ? (not in Simple)
Definition: vc1.h:228
int picture_structure
Definition: h264.h:376
AVRational time_base
This is the fundamental unit of time (in seconds) in terms of which frame timestamps are represented...
Definition: avcodec.h:1465
int long_ref
1->long term reference 0->short term reference
Definition: mpegvideo.h:136
void ff_mpeg_draw_horiz_band(MpegEncContext *s, int y, int h)
Definition: mpegvideo.c:2534
uint8_t scaling_matrix4[6][16]
Definition: h264.h:221
int deblocking_filter_parameters_present
deblocking_filter_parameters_present_flag
Definition: h264.h:217
int bi_type
Definition: vc1.h:385
uint8_t
#define PICT_FRAME
Definition: mpegvideo.h:629
int panscanflag
NUMPANSCANWIN, TOPLEFT{X,Y}, BOTRIGHT{X,Y} present.
Definition: vc1.h:210
VdpPictureInfoH264 h264
Definition: vdpau.h:78
int interlace
Progressive/interlaced (RPTFTM syntax element)
Definition: vc1.h:208
int cabac
entropy_coding_mode_flag
Definition: h264.h:207
int no_rounding
apply no rounding to motion compensation (MPEG4, msmpeg4, ...) for b-frames rounding mode is always 0...
Definition: mpegvideo.h:408
int full_pel[2]
Definition: mpegvideo.h:648
int resync_marker
could this stream contain resync markers
Definition: mpegvideo.h:557
Picture current_picture
copy of the current picture structure.
Definition: mpegvideo.h:314
int intra_dc_precision
Definition: mpegvideo.h:631
const char data[16]
Definition: mxf.c:66
int refdist_flag
REFDIST syntax element present in II, IP, PI or PP field picture headers.
Definition: vc1.h:211
int redundant_pic_cnt_present
redundant_pic_cnt_present_flag
Definition: h264.h:219
uint16_t pp_time
time distance between the last 2 p,s,i frames
Definition: mpegvideo.h:526
int psf
Progressive Segmented Frame.
Definition: vc1.h:218
H.264 / AVC / MPEG4 part10 codec.
int frame_num
Definition: h264.h:500
enum AVCodecID id
Definition: avcodec.h:2974
int mb_aff
mb_adaptive_frame_field_flag
Definition: h264.h:162
VdpBitstreamBuffer * bitstream_buffers
The user is responsible for freeing this buffer using av_freep().
Definition: vdpau.h:89
int overlap
overlapped transforms in use
Definition: vc1.h:232
int poc_type
pic_order_cnt_type
Definition: h264.h:151
void * av_fast_realloc(void *ptr, unsigned int *size, size_t min_size)
Reallocate the given block if it is not large enough, otherwise do nothing.
Definition: utils.c:53
int constrained_intra_pred
constrained_intra_pred_flag
Definition: h264.h:218
int reference
is this picture used as reference The values for this are the same as the MpegEncContext.picture_structure variable, that is 1->top field, 2->bottom field, 3->frame/both fields.
Definition: avcodec.h:1132
PPS pps
current pps
Definition: h264.h:359
int weighted_pred
weighted_pred_flag
Definition: h264.h:212
int quarter_sample
1->qpel, 0->half pel ME/MC
Definition: mpegvideo.h:545
int postprocflag
Per-frame processing suggestion flag present.
Definition: vc1.h:206
int delta_pic_order_always_zero_flag
Definition: h264.h:153
uint8_t scaling_matrix8[6][64]
Definition: h264.h:222
int intra_vlc_format
Definition: mpegvideo.h:636
int ref_frame_count
num_ref_frames
Definition: h264.h:157
Picture * long_ref[32]
Definition: h264.h:520
int top_field_first
Definition: mpegvideo.h:633
void ff_vdpau_h264_picture_complete(H264Context *h)
Definition: vdpau.c:144
int tfcntrflag
TFCNTR present.
Definition: vc1.h:209
Picture * current_picture_ptr
pointer to the current picture
Definition: mpegvideo.h:318
Picture.
Definition: mpegvideo.h:95
int alternate_scan
Definition: mpegvideo.h:637
SPS sps
current sps
Definition: h264.h:354
VdpPictureInfoMPEG4Part2 mpeg4
Definition: vdpau.h:81
int init_qp
pic_init_qp_minus26 + 26
Definition: h264.h:214
int frame_num
h264 frame_num (raw frame_num from slice header)
Definition: mpegvideo.h:132
int direct_8x8_inference_flag
Definition: h264.h:163
uint8_t range_mapuv_flag
Definition: vc1.h:332
int mpeg_f_code[2][2]
Definition: mpegvideo.h:624
int pic_order_present
pic_order_present_flag
Definition: h264.h:208
int rangered
RANGEREDFRM (range reduction) syntax element present at frame level.
Definition: vc1.h:196
int frame_pred_frame_dct
Definition: mpegvideo.h:632
int finterpflag
INTERPFRM present.
Definition: vc1.h:234
uint16_t inter_matrix[64]
Definition: mpegvideo.h:443
AVCodecContext * avctx
Definition: h264.h:253
int concealment_motion_vectors
Definition: mpegvideo.h:634
external API header
void ff_vdpau_add_data_chunk(uint8_t *data, const uint8_t *buf, int buf_size)
Definition: vdpau.c:109
int multires
frame-level RESPIC syntax element present
Definition: vc1.h:193
int bitstream_buffers_used
Definition: vdpau.h:87
uint8_t range_mapy
Definition: vc1.h:333
int extended_dmv
Additional extended dmv range at P/B frame-level.
Definition: vc1.h:212
int progressive_sequence
Definition: mpegvideo.h:623
Picture * short_ref[32]
Definition: h264.h:519
int bitstream_buffers_allocated
Describe size/location of the compressed video data.
Definition: vdpau.h:86
void ff_vdpau_h264_set_reference_frames(H264Context *h)
Definition: vdpau.c:41
int quantizer_mode
2bits, quantizer mode used for sequence, see QUANT_*
Definition: vc1.h:233
int f_code
forward MV resolution
Definition: mpegvideo.h:364
int log2_max_poc_lsb
log2_max_pic_order_cnt_lsb_minus4
Definition: h264.h:152
int max_b_frames
max number of b-frames for encoding
Definition: mpegvideo.h:233
int pict_type
AV_PICTURE_TYPE_I, AV_PICTURE_TYPE_P, AV_PICTURE_TYPE_B, ...
Definition: mpegvideo.h:350
int vstransform
variable-size [48]x[48] transform type + info
Definition: vc1.h:231
void ff_h264_draw_horiz_band(H264Context *h, int y, int height)
Definition: h264.c:102
int field_poc[2]
h264 top/bottom POC
Definition: mpegvideo.h:130
int transform_8x8_mode
transform_8x8_mode_flag
Definition: h264.h:220
uint8_t range_mapuv
Definition: vc1.h:334
uint16_t pb_field_time
like above, just for interlaced
Definition: mpegvideo.h:529
uint8_t * data[AV_NUM_DATA_POINTERS]
pointer to the picture/channel planes.
Definition: avcodec.h:997
MpegEncContext s
Definition: vc1.h:182
MpegEncContext.
Definition: mpegvideo.h:212
struct AVCodecContext * avctx
Definition: mpegvideo.h:214
uint16_t pp_field_time
Definition: mpegvideo.h:528
uint8_t pq
Definition: vc1.h:244
VdpPictureInfoMPEG1Or2 mpeg
Definition: vdpau.h:79
VdpPictureInfoVC1 vc1
Definition: vdpau.h:80
This structure is used as a callback between the Libav decoder (vd_) and presentation (vo_) module...
Definition: vdpau.h:71
enum FrameCodingMode fcm
Frame decoding info for Advanced profile.
Definition: vc1.h:311
int log2_max_frame_num
log2_max_frame_num_minus4 + 4
Definition: h264.h:150
void ff_vdpau_h264_picture_start(H264Context *h)
Definition: vdpau.c:126
void ff_vdpau_mpeg_picture_complete(MpegEncContext *s, const uint8_t *buf, int buf_size, int slice_count)
Definition: vdpau.c:187
Picture last_picture
copy of the previous picture structure.
Definition: mpegvideo.h:296
Bi-dir predicted.
Definition: avutil.h:247
int den
denominator
Definition: rational.h:45
void * priv_data
Definition: avcodec.h:1382
int picture_structure
Definition: mpegvideo.h:625
Picture * cur_pic_ptr
Definition: h264.h:263
void ff_vdpau_vc1_decode_picture(MpegEncContext *s, const uint8_t *buf, int buf_size)
Definition: vdpau.c:244
int pic_id
h264 pic_num (short -> no wrap version of pic_num, pic_num & max_pic_num; long -> long_pic_num) ...
Definition: mpegvideo.h:134
union vdpau_render_state::VdpPictureInfo info
Picture next_picture
copy of the next picture structure.
Definition: mpegvideo.h:302
struct AVFrame f
Definition: mpegvideo.h:96
uint8_t range_mapy_flag
Definition: vc1.h:331
uint16_t intra_matrix[64]
matrix transmitted in the bitstream
Definition: mpegvideo.h:441
int dquant
How qscale varies with MBs, 2bits (not in Simple)
Definition: vc1.h:230
#define H264_RF_COUNT
int b_code
backward MV resolution for B Frames (mpeg4)
Definition: mpegvideo.h:365
int slice_num
Definition: h264.h:366
VdpVideoSurface surface
Used as rendered surface, never changed.
Definition: vdpau.h:72
Predicted.
Definition: avutil.h:246
uint16_t pb_time
time distance between the last b and p,s,i frame
Definition: mpegvideo.h:527
int short_ref_count
number of actual short term references
Definition: h264.h:536
if(!(ptr_align%ac->ptr_align)&&samples_align >=aligned_len)