On Fri, Mar 8, 2019 at 5:07 AM Guo, Yejun <yejun....@intel.com> wrote:
>
> Signed-off-by: Guo, Yejun <yejun....@intel.com>
> ---
>  libavcodec/libvpxenc.c | 150 
> +++++++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 150 insertions(+)
>
> [...]
> +    active_map.active_map = av_malloc(active_map.rows * active_map.cols);
> +    if (!active_map.active_map) {
> +        av_log(avctx, AV_LOG_ERROR, "active_map alloc failed.\n");
> +        ret = AVERROR(ENOMEM);
> +        goto fail;
> +    }
> +    /* set 1 to enable the corresponding element of vpx_roi_map_t.roi_map. */
> +    memset(active_map.active_map, 1, active_map.rows * active_map.cols);
>

ROI is independent of active map, you don't need it for ROI to work.
In this case you're setting the entire frame as active which may not
be what you want. For this patch maybe we should focus on only setting
the ROI.
_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to