> -----Original Message----- > From: James Zern [mailto:jz...@google.com] > Sent: Wednesday, August 14, 2019 7:32 AM > To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org> > Cc: Guo, Yejun <yejun....@intel.com> > Subject: Re: [FFmpeg-devel] [PATCH V2] avcodec/libvpxenc: add ROI-based > encoding support for VP8/VP9 support > > Hi, > > On Tue, Aug 13, 2019 at 1:18 AM Guo, Yejun <yejun....@intel.com> wrote: > > > > example command line to verify it: > > ./ffmpeg -i input.stream -vf addroi=0:0:iw/3:ih/3:-0.8 -c:v libvpx -b:v 2M > tmp.webm > > > > Signed-off-by: Guo, Yejun <yejun....@intel.com> > > --- > > configure | 7 ++ > > libavcodec/libvpxenc.c | 197 > +++++++++++++++++++++++++++++++++++++++++++++++++ > > 2 files changed, 204 insertions(+) > > > > diff --git a/configure b/configure > > index 3fb8f35..e549e26 100755 > > --- a/configure > > +++ b/configure > > @@ -6300,6 +6300,13 @@ enabled libvpx && { > > check_pkg_config libvpx_vp9_encoder "vpx >= 1.4.0" > "vpx/vpx_encoder.h vpx/vp8cx.h" vpx_codec_vp9_cx || > > check_lib libvpx_vp9_encoder "vpx/vpx_encoder.h > vpx/vp8cx.h" "vpx_codec_vp9_cx VPX_IMG_FMT_HIGHBITDEPTH" "-lvpx > $libm_extralibs $pthreads_extralibs" > > } > > + enabled libvpx_vp9_encoder && { > > + test_cc <<EOF && add_cflags -DSUPPORT_LIBVPX_VP9_ROI > > +#include <vpx/vp8cx.h> > > +void foo(void){ int i = VP9E_SET_ROI_MAP; } > > +EOF > > + } > > + > > This can be removed after addressing the comment below. > > > [...]. > > + > > +static int vp9_encode_set_roi(AVCodecContext *avctx, int frame_width, int > frame_height, const AVFrameSideData *sd) > > +{ > > + int roi_supported = 0; > > + VPxContext *ctx = avctx->priv_data; > > + > > +#ifdef SUPPORT_LIBVPX_VP9_ROI > > You can use VPX_CTRL_VP9E_SET_ROI_MAP to check availability. All > controls have a corresponding VPX_CTRL_<control> define (see the > bottom of vpx/vp8cx.h).
thanks, will use this one, and remove the change in configure. _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".