You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

528 lines
20KB

  1. /*
  2. * VC-1 HW decode acceleration through VA API
  3. *
  4. * Copyright (C) 2008-2009 Splitted-Desktop Systems
  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. #include "hwaccel.h"
  23. #include "internal.h"
  24. #include "vaapi_decode.h"
  25. #include "vc1.h"
  26. #include "vc1data.h"
  27. /** Translate FFmpeg MV modes to VA API */
  28. static int get_VAMvModeVC1(enum MVModes mv_mode)
  29. {
  30. switch (mv_mode) {
  31. case MV_PMODE_1MV_HPEL_BILIN: return VAMvMode1MvHalfPelBilinear;
  32. case MV_PMODE_1MV: return VAMvMode1Mv;
  33. case MV_PMODE_1MV_HPEL: return VAMvMode1MvHalfPel;
  34. case MV_PMODE_MIXED_MV: return VAMvModeMixedMv;
  35. case MV_PMODE_INTENSITY_COMP: return VAMvModeIntensityCompensation;
  36. }
  37. return 0;
  38. }
  39. /** Check whether the MVTYPEMB bitplane is present */
  40. static inline int vc1_has_MVTYPEMB_bitplane(const VC1Context *v)
  41. {
  42. if (v->mv_type_is_raw)
  43. return 0;
  44. return v->fcm == PROGRESSIVE &&
  45. (v->s.pict_type == AV_PICTURE_TYPE_P && !v->p_frame_skipped) &&
  46. (v->mv_mode == MV_PMODE_MIXED_MV ||
  47. (v->mv_mode == MV_PMODE_INTENSITY_COMP &&
  48. v->mv_mode2 == MV_PMODE_MIXED_MV));
  49. }
  50. /** Check whether the SKIPMB bitplane is present */
  51. static inline int vc1_has_SKIPMB_bitplane(const VC1Context *v)
  52. {
  53. if (v->skip_is_raw)
  54. return 0;
  55. return (v->fcm == PROGRESSIVE || v->fcm == ILACE_FRAME) &&
  56. ((v->s.pict_type == AV_PICTURE_TYPE_P && !v->p_frame_skipped) ||
  57. (v->s.pict_type == AV_PICTURE_TYPE_B && !v->bi_type));
  58. }
  59. /** Check whether the DIRECTMB bitplane is present */
  60. static inline int vc1_has_DIRECTMB_bitplane(const VC1Context *v)
  61. {
  62. if (v->dmb_is_raw)
  63. return 0;
  64. return (v->fcm == PROGRESSIVE || v->fcm == ILACE_FRAME) &&
  65. (v->s.pict_type == AV_PICTURE_TYPE_B && !v->bi_type);
  66. }
  67. /** Check whether the ACPRED bitplane is present */
  68. static inline int vc1_has_ACPRED_bitplane(const VC1Context *v)
  69. {
  70. if (v->acpred_is_raw)
  71. return 0;
  72. return v->profile == PROFILE_ADVANCED &&
  73. (v->s.pict_type == AV_PICTURE_TYPE_I ||
  74. (v->s.pict_type == AV_PICTURE_TYPE_B && v->bi_type));
  75. }
  76. /** Check whether the OVERFLAGS bitplane is present */
  77. static inline int vc1_has_OVERFLAGS_bitplane(const VC1Context *v)
  78. {
  79. if (v->overflg_is_raw)
  80. return 0;
  81. return v->profile == PROFILE_ADVANCED &&
  82. (v->s.pict_type == AV_PICTURE_TYPE_I ||
  83. (v->s.pict_type == AV_PICTURE_TYPE_B && v->bi_type)) &&
  84. (v->overlap && v->pq <= 8) &&
  85. v->condover == CONDOVER_SELECT;
  86. }
  87. /** Check whether the FIELDTX bitplane is present */
  88. static inline int vc1_has_FIELDTX_bitplane(const VC1Context *v)
  89. {
  90. if (v->fieldtx_is_raw)
  91. return 0;
  92. return v->fcm == ILACE_FRAME &&
  93. (v->s.pict_type == AV_PICTURE_TYPE_I ||
  94. (v->s.pict_type == AV_PICTURE_TYPE_B && v->bi_type));
  95. }
  96. /** Check whether the FORWARDMB bitplane is present */
  97. static inline int vc1_has_FORWARDMB_bitplane(const VC1Context *v)
  98. {
  99. if (v->fmb_is_raw)
  100. return 0;
  101. return v->fcm == ILACE_FIELD &&
  102. (v->s.pict_type == AV_PICTURE_TYPE_B && !v->bi_type);
  103. }
  104. /** Reconstruct bitstream PTYPE (7.1.1.4, index into Table-35) */
  105. static int vc1_get_PTYPE(const VC1Context *v)
  106. {
  107. const MpegEncContext *s = &v->s;
  108. switch (s->pict_type) {
  109. case AV_PICTURE_TYPE_I: return 0;
  110. case AV_PICTURE_TYPE_P: return v->p_frame_skipped ? 4 : 1;
  111. case AV_PICTURE_TYPE_B: return v->bi_type ? 3 : 2;
  112. }
  113. return 0;
  114. }
  115. /** Reconstruct bitstream FPTYPE (9.1.1.42, index into Table-105) */
  116. static int vc1_get_FPTYPE(const VC1Context *v)
  117. {
  118. const MpegEncContext *s = &v->s;
  119. switch (s->pict_type) {
  120. case AV_PICTURE_TYPE_I: return 0;
  121. case AV_PICTURE_TYPE_P: return 3;
  122. case AV_PICTURE_TYPE_B: return v->bi_type ? 7 : 4;
  123. }
  124. return 0;
  125. }
  126. /** Reconstruct bitstream MVMODE (7.1.1.32) */
  127. static inline VAMvModeVC1 vc1_get_MVMODE(const VC1Context *v)
  128. {
  129. if ((v->s.pict_type == AV_PICTURE_TYPE_P && !v->p_frame_skipped) ||
  130. (v->s.pict_type == AV_PICTURE_TYPE_B && !v->bi_type))
  131. return get_VAMvModeVC1(v->mv_mode);
  132. return 0;
  133. }
  134. /** Reconstruct bitstream MVMODE2 (7.1.1.33) */
  135. static inline VAMvModeVC1 vc1_get_MVMODE2(const VC1Context *v)
  136. {
  137. if ((v->s.pict_type == AV_PICTURE_TYPE_P && !v->p_frame_skipped) &&
  138. v->mv_mode == MV_PMODE_INTENSITY_COMP)
  139. return get_VAMvModeVC1(v->mv_mode2);
  140. return 0;
  141. }
  142. av_unused static inline int vc1_get_INTCOMPFIELD(const VC1Context *v)
  143. {
  144. if ((v->s.pict_type == AV_PICTURE_TYPE_P && !v->p_frame_skipped) &&
  145. v->fcm == ILACE_FIELD &&
  146. v->mv_mode == MV_PMODE_INTENSITY_COMP)
  147. switch (v->intcompfield) {
  148. case 1: return 1;
  149. case 2: return 2;
  150. case 3: return 0;
  151. }
  152. return 0;
  153. }
  154. static inline int vc1_get_LUMSCALE(const VC1Context *v)
  155. {
  156. if (v->s.pict_type == AV_PICTURE_TYPE_P && !v->p_frame_skipped) {
  157. if ((v->fcm == PROGRESSIVE && v->mv_mode == MV_PMODE_INTENSITY_COMP) ||
  158. (v->fcm == ILACE_FRAME && v->intcomp))
  159. return v->lumscale;
  160. else if (v->fcm == ILACE_FIELD && v->mv_mode == MV_PMODE_INTENSITY_COMP)
  161. switch (v->intcompfield) {
  162. case 1: return v->lumscale;
  163. case 2: return v->lumscale2;
  164. case 3: return v->lumscale;
  165. }
  166. }
  167. return 0;
  168. }
  169. static inline int vc1_get_LUMSHIFT(const VC1Context *v)
  170. {
  171. if (v->s.pict_type == AV_PICTURE_TYPE_P && !v->p_frame_skipped) {
  172. if ((v->fcm == PROGRESSIVE && v->mv_mode == MV_PMODE_INTENSITY_COMP) ||
  173. (v->fcm == ILACE_FRAME && v->intcomp))
  174. return v->lumshift;
  175. else if (v->fcm == ILACE_FIELD && v->mv_mode == MV_PMODE_INTENSITY_COMP)
  176. switch (v->intcompfield) {
  177. case 1: return v->lumshift;
  178. case 2: return v->lumshift2;
  179. case 3: return v->lumshift;
  180. }
  181. }
  182. return 0;
  183. }
  184. av_unused static inline int vc1_get_LUMSCALE2(const VC1Context *v)
  185. {
  186. if ((v->s.pict_type == AV_PICTURE_TYPE_P && !v->p_frame_skipped) &&
  187. v->fcm == ILACE_FIELD &&
  188. v->mv_mode == MV_PMODE_INTENSITY_COMP &&
  189. v->intcompfield == 3)
  190. return v->lumscale2;
  191. return 0;
  192. }
  193. av_unused static inline int vc1_get_LUMSHIFT2(const VC1Context *v)
  194. {
  195. if ((v->s.pict_type == AV_PICTURE_TYPE_P && !v->p_frame_skipped) &&
  196. v->fcm == ILACE_FIELD &&
  197. v->mv_mode == MV_PMODE_INTENSITY_COMP &&
  198. v->intcompfield == 3)
  199. return v->lumshift2;
  200. return 0;
  201. }
  202. /** Reconstruct bitstream TTFRM (7.1.1.41, Table-53) */
  203. static inline int vc1_get_TTFRM(const VC1Context *v)
  204. {
  205. switch (v->ttfrm) {
  206. case TT_8X8: return 0;
  207. case TT_8X4: return 1;
  208. case TT_4X8: return 2;
  209. case TT_4X4: return 3;
  210. }
  211. return 0;
  212. }
  213. /** Pack FFmpeg bitplanes into a VABitPlaneBuffer element */
  214. static inline void vc1_pack_bitplanes(uint8_t *bitplane, int n, const uint8_t *ff_bp[3], int x, int y, int stride)
  215. {
  216. const int bitplane_index = n / 2;
  217. const int ff_bp_index = y * stride + x;
  218. uint8_t v = 0;
  219. if (ff_bp[0])
  220. v = ff_bp[0][ff_bp_index];
  221. if (ff_bp[1])
  222. v |= ff_bp[1][ff_bp_index] << 1;
  223. if (ff_bp[2])
  224. v |= ff_bp[2][ff_bp_index] << 2;
  225. bitplane[bitplane_index] = (bitplane[bitplane_index] << 4) | v;
  226. }
  227. static int vaapi_vc1_start_frame(AVCodecContext *avctx, av_unused const uint8_t *buffer, av_unused uint32_t size)
  228. {
  229. const VC1Context *v = avctx->priv_data;
  230. const MpegEncContext *s = &v->s;
  231. VAAPIDecodePicture *pic = s->current_picture_ptr->hwaccel_picture_private;
  232. VAPictureParameterBufferVC1 pic_param;
  233. int err;
  234. pic->output_surface = ff_vaapi_get_surface_id(s->current_picture_ptr->f);
  235. pic_param = (VAPictureParameterBufferVC1) {
  236. .forward_reference_picture = VA_INVALID_ID,
  237. .backward_reference_picture = VA_INVALID_ID,
  238. .inloop_decoded_picture = VA_INVALID_ID,
  239. .sequence_fields.bits = {
  240. .pulldown = v->broadcast,
  241. .interlace = v->interlace,
  242. .tfcntrflag = v->tfcntrflag,
  243. .finterpflag = v->finterpflag,
  244. .psf = v->psf,
  245. .multires = v->multires,
  246. .overlap = v->overlap,
  247. .syncmarker = v->resync_marker,
  248. .rangered = v->rangered,
  249. .max_b_frames = s->avctx->max_b_frames,
  250. .profile = v->profile,
  251. },
  252. .coded_width = s->avctx->coded_width,
  253. .coded_height = s->avctx->coded_height,
  254. .entrypoint_fields.bits = {
  255. .broken_link = v->broken_link,
  256. .closed_entry = v->closed_entry,
  257. .panscan_flag = v->panscanflag,
  258. .loopfilter = s->loop_filter,
  259. },
  260. .conditional_overlap_flag = v->condover,
  261. .fast_uvmc_flag = v->fastuvmc,
  262. .range_mapping_fields.bits = {
  263. .luma_flag = v->range_mapy_flag,
  264. .luma = v->range_mapy,
  265. .chroma_flag = v->range_mapuv_flag,
  266. .chroma = v->range_mapuv,
  267. },
  268. .b_picture_fraction = v->bfraction_lut_index,
  269. .cbp_table = (v->fcm == PROGRESSIVE ? v->cbptab : v->icbptab),
  270. .mb_mode_table = v->mbmodetab,
  271. .range_reduction_frame = v->rangeredfrm,
  272. .rounding_control = v->rnd,
  273. .post_processing = v->postproc,
  274. .picture_resolution_index = v->respic,
  275. .picture_fields.bits = {
  276. .picture_type = (v->fcm == ILACE_FIELD ? vc1_get_FPTYPE(v) : vc1_get_PTYPE(v)),
  277. .frame_coding_mode = v->fcm,
  278. .top_field_first = v->tff,
  279. .is_first_field = !v->second_field,
  280. .intensity_compensation = v->intcomp,
  281. },
  282. .luma_scale = vc1_get_LUMSCALE(v),
  283. .luma_shift = vc1_get_LUMSHIFT(v),
  284. #if VA_CHECK_VERSION(1, 1, 0)
  285. .luma_scale2 = vc1_get_LUMSCALE2(v),
  286. .luma_shift2 = vc1_get_LUMSHIFT2(v),
  287. .intensity_compensation_field = vc1_get_INTCOMPFIELD(v),
  288. #endif
  289. .raw_coding.flags = {
  290. .mv_type_mb = v->mv_type_is_raw,
  291. .direct_mb = v->dmb_is_raw,
  292. .skip_mb = v->skip_is_raw,
  293. .field_tx = v->fieldtx_is_raw,
  294. .forward_mb = v->fmb_is_raw,
  295. .ac_pred = v->acpred_is_raw,
  296. .overflags = v->overflg_is_raw,
  297. },
  298. .bitplane_present.flags = {
  299. .bp_mv_type_mb = vc1_has_MVTYPEMB_bitplane(v),
  300. .bp_direct_mb = vc1_has_DIRECTMB_bitplane(v),
  301. .bp_skip_mb = vc1_has_SKIPMB_bitplane(v),
  302. .bp_field_tx = vc1_has_FIELDTX_bitplane(v),
  303. .bp_forward_mb = vc1_has_FORWARDMB_bitplane(v),
  304. .bp_ac_pred = vc1_has_ACPRED_bitplane(v),
  305. .bp_overflags = vc1_has_OVERFLAGS_bitplane(v),
  306. },
  307. .reference_fields.bits = {
  308. .reference_distance_flag = v->refdist_flag,
  309. .reference_distance = v->refdist,
  310. .num_reference_pictures = v->numref,
  311. .reference_field_pic_indicator = v->reffield,
  312. },
  313. .mv_fields.bits = {
  314. .mv_mode = vc1_get_MVMODE(v),
  315. .mv_mode2 = vc1_get_MVMODE2(v),
  316. .mv_table = (v->fcm == PROGRESSIVE ? s->mv_table_index : v->imvtab),
  317. .two_mv_block_pattern_table = v->twomvbptab,
  318. .four_mv_switch = v->fourmvswitch,
  319. .four_mv_block_pattern_table = v->fourmvbptab,
  320. .extended_mv_flag = v->extended_mv,
  321. .extended_mv_range = v->mvrange,
  322. .extended_dmv_flag = v->extended_dmv,
  323. .extended_dmv_range = v->dmvrange,
  324. },
  325. .pic_quantizer_fields.bits = {
  326. .dquant = v->dquant,
  327. .quantizer = v->quantizer_mode,
  328. .half_qp = v->halfpq,
  329. .pic_quantizer_scale = v->pq,
  330. .pic_quantizer_type = v->pquantizer,
  331. .dq_frame = v->dquantfrm,
  332. .dq_profile = v->dqprofile,
  333. .dq_sb_edge = v->dqprofile == DQPROFILE_SINGLE_EDGE ? v->dqsbedge : 0,
  334. .dq_db_edge = v->dqprofile == DQPROFILE_DOUBLE_EDGES ? v->dqsbedge : 0,
  335. .dq_binary_level = v->dqbilevel,
  336. .alt_pic_quantizer = v->altpq,
  337. },
  338. .transform_fields.bits = {
  339. .variable_sized_transform_flag = v->vstransform,
  340. .mb_level_transform_type_flag = v->ttmbf,
  341. .frame_level_transform_type = vc1_get_TTFRM(v),
  342. .transform_ac_codingset_idx1 = v->c_ac_table_index,
  343. .transform_ac_codingset_idx2 = v->y_ac_table_index,
  344. .intra_transform_dc_table = v->s.dc_table_index,
  345. },
  346. };
  347. switch (s->pict_type) {
  348. case AV_PICTURE_TYPE_B:
  349. pic_param.backward_reference_picture = ff_vaapi_get_surface_id(s->next_picture.f);
  350. // fall-through
  351. case AV_PICTURE_TYPE_P:
  352. pic_param.forward_reference_picture = ff_vaapi_get_surface_id(s->last_picture.f);
  353. break;
  354. }
  355. err = ff_vaapi_decode_make_param_buffer(avctx, pic,
  356. VAPictureParameterBufferType,
  357. &pic_param, sizeof(pic_param));
  358. if (err)
  359. goto fail;
  360. if (pic_param.bitplane_present.value) {
  361. uint8_t *bitplane;
  362. const uint8_t *ff_bp[3];
  363. int x, y, n;
  364. size_t size = (s->mb_width * s->mb_height + 1) / 2;
  365. bitplane = av_mallocz(size);
  366. if (!bitplane) {
  367. err = AVERROR(ENOMEM);
  368. goto fail;
  369. }
  370. switch (s->pict_type) {
  371. case AV_PICTURE_TYPE_P:
  372. ff_bp[0] = pic_param.bitplane_present.flags.bp_direct_mb ? v->direct_mb_plane : NULL;
  373. ff_bp[1] = pic_param.bitplane_present.flags.bp_skip_mb ? s->mbskip_table : NULL;
  374. ff_bp[2] = pic_param.bitplane_present.flags.bp_mv_type_mb ? v->mv_type_mb_plane : NULL;
  375. break;
  376. case AV_PICTURE_TYPE_B:
  377. if (!v->bi_type) {
  378. ff_bp[0] = pic_param.bitplane_present.flags.bp_direct_mb ? v->direct_mb_plane : NULL;
  379. ff_bp[1] = pic_param.bitplane_present.flags.bp_skip_mb ? s->mbskip_table : NULL;
  380. ff_bp[2] = pic_param.bitplane_present.flags.bp_forward_mb ? v->forward_mb_plane : NULL;
  381. break;
  382. }
  383. /* fall-through (BI-type) */
  384. case AV_PICTURE_TYPE_I:
  385. ff_bp[0] = pic_param.bitplane_present.flags.bp_field_tx ? v->fieldtx_plane : NULL;
  386. ff_bp[1] = pic_param.bitplane_present.flags.bp_ac_pred ? v->acpred_plane : NULL;
  387. ff_bp[2] = pic_param.bitplane_present.flags.bp_overflags ? v->over_flags_plane : NULL;
  388. break;
  389. default:
  390. ff_bp[0] = NULL;
  391. ff_bp[1] = NULL;
  392. ff_bp[2] = NULL;
  393. break;
  394. }
  395. n = 0;
  396. for (y = 0; y < s->mb_height; y++)
  397. for (x = 0; x < s->mb_width; x++, n++)
  398. vc1_pack_bitplanes(bitplane, n, ff_bp, x, y, s->mb_stride);
  399. if (n & 1) /* move last nibble to the high order */
  400. bitplane[n/2] <<= 4;
  401. err = ff_vaapi_decode_make_param_buffer(avctx, pic,
  402. VABitPlaneBufferType,
  403. bitplane, size);
  404. av_free(bitplane);
  405. if (err)
  406. goto fail;
  407. }
  408. return 0;
  409. fail:
  410. ff_vaapi_decode_cancel(avctx, pic);
  411. return err;
  412. }
  413. static int vaapi_vc1_end_frame(AVCodecContext *avctx)
  414. {
  415. VC1Context *v = avctx->priv_data;
  416. MpegEncContext *s = &v->s;
  417. VAAPIDecodePicture *pic = s->current_picture_ptr->hwaccel_picture_private;
  418. int ret;
  419. ret = ff_vaapi_decode_issue(avctx, pic);
  420. if (ret < 0)
  421. goto fail;
  422. ff_mpeg_draw_horiz_band(s, 0, s->avctx->height);
  423. fail:
  424. return ret;
  425. }
  426. static int vaapi_vc1_decode_slice(AVCodecContext *avctx, const uint8_t *buffer, uint32_t size)
  427. {
  428. const VC1Context *v = avctx->priv_data;
  429. const MpegEncContext *s = &v->s;
  430. VAAPIDecodePicture *pic = s->current_picture_ptr->hwaccel_picture_private;
  431. VASliceParameterBufferVC1 slice_param;
  432. int err;
  433. /* Current bit buffer is beyond any marker for VC-1, so skip it */
  434. if (avctx->codec_id == AV_CODEC_ID_VC1 && IS_MARKER(AV_RB32(buffer))) {
  435. buffer += 4;
  436. size -= 4;
  437. }
  438. slice_param = (VASliceParameterBufferVC1) {
  439. .slice_data_size = size,
  440. .slice_data_offset = 0,
  441. .slice_data_flag = VA_SLICE_DATA_FLAG_ALL,
  442. .macroblock_offset = get_bits_count(&s->gb),
  443. .slice_vertical_position = s->mb_y,
  444. };
  445. err = ff_vaapi_decode_make_slice_buffer(avctx, pic,
  446. &slice_param, sizeof(slice_param),
  447. buffer, size);
  448. if (err < 0) {
  449. ff_vaapi_decode_cancel(avctx, pic);
  450. return err;
  451. }
  452. return 0;
  453. }
  454. #if CONFIG_WMV3_VAAPI_HWACCEL
  455. const AVHWAccel ff_wmv3_vaapi_hwaccel = {
  456. .name = "wmv3_vaapi",
  457. .type = AVMEDIA_TYPE_VIDEO,
  458. .id = AV_CODEC_ID_WMV3,
  459. .pix_fmt = AV_PIX_FMT_VAAPI,
  460. .start_frame = &vaapi_vc1_start_frame,
  461. .end_frame = &vaapi_vc1_end_frame,
  462. .decode_slice = &vaapi_vc1_decode_slice,
  463. .frame_priv_data_size = sizeof(VAAPIDecodePicture),
  464. .init = &ff_vaapi_decode_init,
  465. .uninit = &ff_vaapi_decode_uninit,
  466. .frame_params = &ff_vaapi_common_frame_params,
  467. .priv_data_size = sizeof(VAAPIDecodeContext),
  468. .caps_internal = HWACCEL_CAP_ASYNC_SAFE,
  469. };
  470. #endif
  471. const AVHWAccel ff_vc1_vaapi_hwaccel = {
  472. .name = "vc1_vaapi",
  473. .type = AVMEDIA_TYPE_VIDEO,
  474. .id = AV_CODEC_ID_VC1,
  475. .pix_fmt = AV_PIX_FMT_VAAPI,
  476. .start_frame = &vaapi_vc1_start_frame,
  477. .end_frame = &vaapi_vc1_end_frame,
  478. .decode_slice = &vaapi_vc1_decode_slice,
  479. .frame_priv_data_size = sizeof(VAAPIDecodePicture),
  480. .init = &ff_vaapi_decode_init,
  481. .uninit = &ff_vaapi_decode_uninit,
  482. .frame_params = &ff_vaapi_common_frame_params,
  483. .priv_data_size = sizeof(VAAPIDecodeContext),
  484. .caps_internal = HWACCEL_CAP_ASYNC_SAFE,
  485. };