From: Tae-Young Chung Date: Thu, 22 Feb 2024 03:38:02 +0000 (+0900) Subject: Remove redundant codes X-Git-Tag: accepted/tizen/8.0/unified/20240227.172314~1 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=35ea58b601724d3b2f4ee88bd3259dbc54f558bc;p=platform%2Fupstream%2Fopencv.git Remove redundant codes [Version] : 4.7.0-6 [Issue type] : clean up A part of a patch with commit ``` commit 60e0136b5538352bc176c94591339b098d2d8d27 (tag: accepted/tizen/unified/20221221.165303) Author: hj kim Date: Wed Dec 14 18:32:39 2022 +0900 Fix build error due to upgrade to ffmpeg 5.1.2 [Version] 4.5.3-5 [Issue type] Build error fix videoio.hpp, cap_ffmpeg_impl.hpp : Get all code from opencv 4.6.0(official release, https://opencv.org/releases/) Change-Id: Ib6338e21017ae7404cf82e2b6b707a736ffa43a7 ``` is remained after updating to version 4.7.0 so that it is duplicated with the updated 4.7.0 code. Instead of reverting the patch, it is just manually removed. Change-Id: Ic908a00addbd83e8048b214d50f923309a696ac3 Signed-off-by: Tae-Young Chung --- diff --git a/modules/videoio/src/cap_ffmpeg_impl.hpp b/modules/videoio/src/cap_ffmpeg_impl.hpp index bf2e0bb..dfa2726 100644 --- a/modules/videoio/src/cap_ffmpeg_impl.hpp +++ b/modules/videoio/src/cap_ffmpeg_impl.hpp @@ -157,62 +157,6 @@ inline static AVRational av_make_q(int num, int den) -// https://github.com/FFmpeg/FFmpeg/blob/b6af56c034759b81985f8ea094e41cbd5f7fecfb/doc/APIchanges#L602-L605 -#if LIBAVFORMAT_BUILD < CALC_FFMPEG_VERSION(58, 9, 100) -# define CV_FFMPEG_REGISTER -#endif - -// https://github.com/FFmpeg/FFmpeg/blob/b6af56c034759b81985f8ea094e41cbd5f7fecfb/doc/APIchanges#L654-L657 -#if LIBAVCODEC_BUILD < CALC_FFMPEG_VERSION(58, 9, 100) -# define CV_FFMPEG_LOCKMGR -#endif - -// https://github.com/FFmpeg/FFmpeg/blob/b6af56c034759b81985f8ea094e41cbd5f7fecfb/doc/APIchanges#L390-L392 -#if LIBAVCODEC_BUILD >= CALC_FFMPEG_VERSION(58, 87, 100) -#include -#endif - -// https://github.com/FFmpeg/FFmpeg/blob/b6af56c034759b81985f8ea094e41cbd5f7fecfb/doc/APIchanges#L208-L210 -#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(59, 0, 100) -# define CV_FFMPEG_FMT_CONST const -#else -# define CV_FFMPEG_FMT_CONST -#endif - -// https://github.com/FFmpeg/FFmpeg/blob/b6af56c034759b81985f8ea094e41cbd5f7fecfb/doc/APIchanges#L623-L624 -#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(58, 7, 100) -# define CV_FFMPEG_URL -#endif - -// AVStream.codec deprecated in favor of AVStream.codecpar -// https://github.com/FFmpeg/FFmpeg/blob/b6af56c034759b81985f8ea094e41cbd5f7fecfb/doc/APIchanges#L1039-L1040 -#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(59, 16, 100) -//#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(57, 33, 100) -# define CV_FFMPEG_CODECPAR -# define CV_FFMPEG_CODEC_FIELD codecpar -#else -# define CV_FFMPEG_CODEC_FIELD codec -#endif - -#if LIBAVFORMAT_BUILD >= CALC_FFMPEG_VERSION(59, 16, 100) -# define CV_FFMPEG_PTS_FIELD pts -#else -# define CV_FFMPEG_PTS_FIELD pkt_pts -#endif - -// https://github.com/FFmpeg/FFmpeg/blob/b6af56c034759b81985f8ea094e41cbd5f7fecfb/doc/APIchanges#L1757-L1758 -#if LIBAVUTIL_BUILD < CALC_FFMPEG_VERSION(52, 63, 100) -inline static AVRational av_make_q(int num, int den) -{ - AVRational res; - res.num = num; - res.den = den; - return res; -} -#endif - - - #ifdef __cplusplus } #endif diff --git a/packaging/opencv.spec b/packaging/opencv.spec index 26f2839..887d337 100644 --- a/packaging/opencv.spec +++ b/packaging/opencv.spec @@ -7,7 +7,7 @@ Name: opencv Summary: OpenCV library Version: 4.7.0 -Release: 5 +Release: 6 Group: Development/Libraries License: Apache-2.0 Source0: %{name}-%{version}.tar.gz