[FFmpeg-devel] [PATCH 1/3] avutil/frame: add use_last_roi

Ronald S. Bultje rsbultje at gmail.com
Fri Feb 14 17:01:56 EET 2020


Hi,

On Thu, Feb 13, 2020 at 10:41 PM Guo, Yejun <yejun.guo at intel.com> wrote:

> For some cases, the regions of interest do not change, it is not
> convenient to always prepare the roi data for every frame.


Since side-data is refcounted, can't you just keep the "last" one in memory
and refcount it? That way, if you wanted to know if it's the same, you can
compare pointers, or if you want to access the ROI data directly, you can
do that, but it doesn't require a copy.

Ronald


More information about the ffmpeg-devel mailing list