#endif
) {
av_log(avctx, AV_LOG_VERBOSE,
- "InitialDelayInKB: %"PRIu16"; TargetKbps: %"PRIu16"; MaxKbps: %"PRIu16"\n",
- info->InitialDelayInKB, info->TargetKbps, info->MaxKbps);
+ "BufferSizeInKB: %"PRIu16"; InitialDelayInKB: %"PRIu16"; TargetKbps: %"PRIu16"; MaxKbps: %"PRIu16"\n",
+ info->BufferSizeInKB, info->InitialDelayInKB, info->TargetKbps, info->MaxKbps);
} else if (info->RateControlMethod == MFX_RATECONTROL_CQP) {
av_log(avctx, AV_LOG_VERBOSE, "QPI: %"PRIu16"; QPP: %"PRIu16"; QPB: %"PRIu16"\n",
info->QPI, info->QPP, info->QPB);
q->extco2.AdaptiveB = q->adaptive_b ? MFX_CODINGOPTION_ON : MFX_CODINGOPTION_OFF;
#endif
+#if QSV_VERSION_ATLEAST(1, 9)
+ if (avctx->qmin >= 0 && avctx->qmax >= 0 && avctx->qmin > avctx->qmax) {
+ av_log(avctx, AV_LOG_ERROR, "qmin and or qmax are set but invalid, please make sure min <= max\n");
+ return AVERROR(EINVAL);
+ }
+ if (avctx->qmin >= 0) {
+ q->extco2.MinQPI = avctx->qmin > 51 ? 51 : avctx->qmin;
+ q->extco2.MinQPP = q->extco2.MinQPB = q->extco2.MinQPI;
+ }
+ if (avctx->qmax >= 0) {
+ q->extco2.MaxQPI = avctx->qmax > 51 ? 51 : avctx->qmax;
+ q->extco2.MaxQPP = q->extco2.MaxQPB = q->extco2.MaxQPI;
+ }
+#endif
q->extparam_internal[q->nb_extparam_internal++] = (mfxExtBuffer *)&q->extco2;
}
#endif
while (cur) {
if (cur->used && !cur->surface.Data.Locked) {
free_encoder_ctrl_payloads(&cur->enc_ctrl);
+ if (cur->frame->format == AV_PIX_FMT_QSV) {
+ av_frame_unref(cur->frame);
+ }
cur->used = 0;
}
cur = cur->next;
q->param.mfx.CodecLevel > MFX_LEVEL_AVC_41)
av_log(avctx, AV_LOG_WARNING,
"Interlaced coding is supported"
- " at Main/High Profile Level 2.1-4.1\n");
+ " at Main/High Profile Level 2.2-4.0\n");
}
}