#if QSV_HAVE_CO3
mfxExtCodingOption3 *co3 = (mfxExtCodingOption3*)coding_opts[2];
#endif
+#if QSV_HAVE_EXT_HEVC_TILES
+ mfxExtHEVCTiles *exthevctiles = (mfxExtHEVCTiles *)coding_opts[3 + QSV_HAVE_CO_VPS];
+#endif
av_log(avctx, AV_LOG_VERBOSE, "profile: %s; level: %"PRIu16"\n",
print_profile(info->CodecProfile), info->CodecLevel);
av_log(avctx, AV_LOG_VERBOSE, "RateDistortionOpt: %s\n",
print_threestate(co->RateDistortionOpt));
+#if QSV_HAVE_EXT_HEVC_TILES
+ if (avctx->codec_id == AV_CODEC_ID_HEVC)
+ av_log(avctx, AV_LOG_VERBOSE, "NumTileColumns: %"PRIu16"; NumTileRows: %"PRIu16"\n",
+ exthevctiles->NumTileColumns, exthevctiles->NumTileRows);
+#endif
+
#if QSV_HAVE_CO2
av_log(avctx, AV_LOG_VERBOSE,
"RecoveryPointSEI: %s IntRefType: %"PRIu16"; IntRefCycleSize: %"PRIu16"; IntRefQPDelta: %"PRId16"\n",
}
#endif
+#if QSV_HAVE_EXT_HEVC_TILES
+ if (avctx->codec_id == AV_CODEC_ID_HEVC) {
+ q->exthevctiles.Header.BufferId = MFX_EXTBUFF_HEVC_TILES;
+ q->exthevctiles.Header.BufferSz = sizeof(q->exthevctiles);
+ q->exthevctiles.NumTileColumns = q->tile_cols;
+ q->exthevctiles.NumTileRows = q->tile_rows;
+ q->extparam_internal[q->nb_extparam_internal++] = (mfxExtBuffer *)&q->exthevctiles;
+ }
+#endif
+
if (!check_enc_param(avctx,q)) {
av_log(avctx, AV_LOG_ERROR,
"some encoding parameters are not supported by the QSV "
};
#endif
- mfxExtBuffer *ext_buffers[2 + QSV_HAVE_CO2 + QSV_HAVE_CO3 + QSV_HAVE_CO_VPS];
+#if QSV_HAVE_EXT_HEVC_TILES
+ mfxExtHEVCTiles hevc_tile_buf = {
+ .Header.BufferId = MFX_EXTBUFF_HEVC_TILES,
+ .Header.BufferSz = sizeof(hevc_tile_buf),
+ };
+#endif
+
+ mfxExtBuffer *ext_buffers[2 + QSV_HAVE_CO2 + QSV_HAVE_CO3 + QSV_HAVE_CO_VPS + QSV_HAVE_EXT_HEVC_TILES];
int need_pps = avctx->codec_id != AV_CODEC_ID_MPEG2VIDEO;
int ret, ext_buf_num = 0, extradata_offset = 0;
if (q->hevc_vps)
ext_buffers[ext_buf_num++] = (mfxExtBuffer*)&extradata_vps;
#endif
+#if QSV_HAVE_EXT_HEVC_TILES
+ if (avctx->codec_id == AV_CODEC_ID_HEVC)
+ ext_buffers[ext_buf_num++] = (mfxExtBuffer*)&hevc_tile_buf;
+#endif
q->param.ExtParam = ext_buffers;
q->param.NumExtParam = ext_buf_num;
#define QSV_HAVE_CO3 QSV_VERSION_ATLEAST(1, 11)
#define QSV_HAVE_CO_VPS QSV_VERSION_ATLEAST(1, 17)
+#define QSV_HAVE_EXT_HEVC_TILES QSV_VERSION_ATLEAST(1, 13)
#define QSV_HAVE_EXT_VP9_PARAM QSV_VERSION_ATLEAST(1, 26)
#define QSV_HAVE_TRELLIS QSV_VERSION_ATLEAST(1, 8)
mfxExtMultiFrameParam extmfp;
mfxExtMultiFrameControl extmfc;
#endif
+#if QSV_HAVE_EXT_HEVC_TILES
+ mfxExtHEVCTiles exthevctiles;
+#endif
#if QSV_HAVE_EXT_VP9_PARAM
mfxExtVP9Param extvp9param;
#endif
int max_frame_size;
int max_slice_size;
+ int tile_cols;
+ int tile_rows;
+
int aud;
int single_sei_nal_unit;
{ "gpb", "1: GPB (generalized P/B frame); 0: regular P frame", OFFSET(qsv.gpb), AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, VE},
+ { "tile_cols", "Number of columns for tiled encoding", OFFSET(qsv.tile_cols), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, UINT16_MAX, VE },
+ { "tile_rows", "Number of rows for tiled encoding", OFFSET(qsv.tile_rows), AV_OPT_TYPE_INT, { .i64 = 0 }, 0, UINT16_MAX, VE },
+
{ NULL },
};