For some cases, the regions of interest do not change, it is not convenient to always prepare the roi data for every frame. So, add use_last_roi to show it uses the same roi data as last frame.
Since a new flag is added into AVFrame, the major version number of lavu is changed. Signed-off-by: Guo, Yejun <yejun....@intel.com> --- doc/APIchanges | 3 +++ libavutil/frame.h | 8 ++++++++ libavutil/version.h | 20 ++++++++++---------- 3 files changed, 21 insertions(+), 10 deletions(-) diff --git a/doc/APIchanges b/doc/APIchanges index 761f37f..eec0f2f 100644 --- a/doc/APIchanges +++ b/doc/APIchanges @@ -15,6 +15,9 @@ libavutil: 2017-10-21 API changes, most recent first: +2020-02-14 - xxxxxxxxxx - lavu 57.0.100 - frame.h + Add use_last_roi in AVFrame. + 2020-02-13 - xxxxxxxxxx - lavu 56.41.100 - tx.h Add AV_TX_INT32_FFT and AV_TX_INT32_MDCT diff --git a/libavutil/frame.h b/libavutil/frame.h index b5afb58..2c786f4 100644 --- a/libavutil/frame.h +++ b/libavutil/frame.h @@ -634,6 +634,14 @@ typedef struct AVFrame { AVBufferRef *hw_frames_ctx; /** + * It is set if the RegionOfInterest info is the same as last frame, + * so, we don't need to prepare the same thing in side_data. + * If there is roi info in side_data and this variable is also set, + * use the info in side_data. + */ + int8_t use_last_roi; + + /** * AVBufferRef for free use by the API user. FFmpeg will never check the * contents of the buffer ref. FFmpeg calls av_buffer_unref() on it when * the frame is unreferenced. av_frame_copy_props() calls create a new diff --git a/libavutil/version.h b/libavutil/version.h index 90cc55b..aade19b 100644 --- a/libavutil/version.h +++ b/libavutil/version.h @@ -78,8 +78,8 @@ * @{ */ -#define LIBAVUTIL_VERSION_MAJOR 56 -#define LIBAVUTIL_VERSION_MINOR 41 +#define LIBAVUTIL_VERSION_MAJOR 57 +#define LIBAVUTIL_VERSION_MINOR 0 #define LIBAVUTIL_VERSION_MICRO 100 #define LIBAVUTIL_VERSION_INT AV_VERSION_INT(LIBAVUTIL_VERSION_MAJOR, \ @@ -106,28 +106,28 @@ */ #ifndef FF_API_VAAPI -#define FF_API_VAAPI (LIBAVUTIL_VERSION_MAJOR < 57) +#define FF_API_VAAPI (LIBAVUTIL_VERSION_MAJOR < 58) #endif #ifndef FF_API_FRAME_QP -#define FF_API_FRAME_QP (LIBAVUTIL_VERSION_MAJOR < 57) +#define FF_API_FRAME_QP (LIBAVUTIL_VERSION_MAJOR < 58) #endif #ifndef FF_API_PLUS1_MINUS1 -#define FF_API_PLUS1_MINUS1 (LIBAVUTIL_VERSION_MAJOR < 57) +#define FF_API_PLUS1_MINUS1 (LIBAVUTIL_VERSION_MAJOR < 58) #endif #ifndef FF_API_ERROR_FRAME -#define FF_API_ERROR_FRAME (LIBAVUTIL_VERSION_MAJOR < 57) +#define FF_API_ERROR_FRAME (LIBAVUTIL_VERSION_MAJOR < 58) #endif #ifndef FF_API_PKT_PTS -#define FF_API_PKT_PTS (LIBAVUTIL_VERSION_MAJOR < 57) +#define FF_API_PKT_PTS (LIBAVUTIL_VERSION_MAJOR < 58) #endif #ifndef FF_API_CRYPTO_SIZE_T -#define FF_API_CRYPTO_SIZE_T (LIBAVUTIL_VERSION_MAJOR < 57) +#define FF_API_CRYPTO_SIZE_T (LIBAVUTIL_VERSION_MAJOR < 58) #endif #ifndef FF_API_FRAME_GET_SET -#define FF_API_FRAME_GET_SET (LIBAVUTIL_VERSION_MAJOR < 57) +#define FF_API_FRAME_GET_SET (LIBAVUTIL_VERSION_MAJOR < 58) #endif #ifndef FF_API_PSEUDOPAL -#define FF_API_PSEUDOPAL (LIBAVUTIL_VERSION_MAJOR < 57) +#define FF_API_PSEUDOPAL (LIBAVUTIL_VERSION_MAJOR < 58) #endif -- 2.7.4 _______________________________________________ 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".