[FFmpeg-devel] [PATCH v3 4/5] vaapi_encode: Add ROI support
Guo, Yejun
yejun.guo at intel.com
Tue Jun 25 11:07:05 EEST 2019
> -----Original Message-----
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf Of
> Mark Thompson
> Sent: Tuesday, June 04, 2019 7:19 AM
> To: ffmpeg-devel at ffmpeg.org
> Subject: [FFmpeg-devel] [PATCH v3 4/5] vaapi_encode: Add ROI support
>
> + // For overlapping regions, the first in the array takes priority.
> + for (i = 0; i < nb_roi; i++) {
> + roi = (const AVRegionOfInterest*)(sd->data + roi_size * i);
> +
> + av_assert0(roi->qoffset.den != 0);
> + v = roi->qoffset.num * ctx->roi_quant_range / roi->qoffset.den;
> + av_log(avctx, AV_LOG_DEBUG, "ROI: (%d,%d)-(%d,%d)
> -> %+d.\n",
> + roi->top, roi->left, roi->bottom, roi->right, v);
> +
> + pic->roi[i] = (VAEncROI) {
> + .roi_rectangle = {
> + .x = roi->top,
> + .y = roi->left,
it is typo, the correct is:
.x = roi->left,
.y = roi->top,
> + .width = roi->right - roi->left,
> + .height = roi->bottom - roi->top,
> + },
> + .roi_value = av_clip_c(v, INT8_MIN, INT8_MAX),
> + };
> + }
> +
More information about the ffmpeg-devel
mailing list