[FFmpeg-devel] [PATCH V4] avcodec/libvpxenc: add VP8 support for ROI-based encoding
Guo, Yejun
yejun.guo at intel.com
Wed Mar 13 09:27:02 EET 2019
> -----Original Message-----
> From: ffmpeg-devel [mailto:ffmpeg-devel-bounces at ffmpeg.org] On Behalf
> Of James Zern
> Sent: Wednesday, March 13, 2019 7:45 AM
> To: FFmpeg development discussions and patches <ffmpeg-
> devel at ffmpeg.org>
> Subject: Re: [FFmpeg-devel] [PATCH V4] avcodec/libvpxenc: add VP8
> support for ROI-based encoding
>
> On Fri, Mar 8, 2019 at 5:07 AM Guo, Yejun <yejun.guo at intel.com> wrote:
> >
> > Signed-off-by: Guo, Yejun <yejun.guo at 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.
yes, I mis-understood the libvpx API, will send out a new version after Mark T's patches pushed.
> _______________________________________________
> ffmpeg-devel mailing list
> ffmpeg-devel at ffmpeg.org
> https://ffmpeg.org/mailman/listinfo/ffmpeg-devel
More information about the ffmpeg-devel
mailing list