update to 2.3.12.0 [release 2.3.12.0-1mamba;Wed Feb 02 2022]

This commit is contained in:
Silvan Calarco 2024-01-06 08:07:02 +01:00
parent 09c36d4fda
commit e08bab0d57
2 changed files with 115 additions and 22 deletions

View File

@ -0,0 +1,69 @@
From 9b54ad37f0174c1eeebb903cefae7567dee79959 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bernhard=20Rosenkr=C3=A4nzer?= <bero@lindev.ch>
Date: Tue, 18 Jan 2022 02:34:51 +0100
Subject: [PATCH] Port to ffmpeg 5.0
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Port to ffmpeg 5.0 -- av_register_all removed, AVPicture
removed, pkt_pts changed to pts
Signed-off-by: Bernhard Rosenkränzer <bero@lindev.ch>
---
src/ffmpeg.imageio/ffmpeginput.cpp | 11 +++++------
1 file changed, 5 insertions(+), 6 deletions(-)
diff --git a/src/ffmpeg.imageio/ffmpeginput.cpp b/src/ffmpeg.imageio/ffmpeginput.cpp
index b3018903b3..a71c09d9d7 100644
--- a/src/ffmpeg.imageio/ffmpeginput.cpp
+++ b/src/ffmpeg.imageio/ffmpeginput.cpp
@@ -32,7 +32,7 @@ extern "C" { // ffmpeg is a C api
inline int
-avpicture_fill(AVPicture* picture, uint8_t* ptr, enum AVPixelFormat pix_fmt,
+avpicture_fill(AVFrame* picture, uint8_t* ptr, enum AVPixelFormat pix_fmt,
int width, int height)
{
AVFrame* frame = reinterpret_cast<AVFrame*>(picture);
@@ -119,7 +119,7 @@ class FFmpegInput final : public ImageInput {
int64_t m_nsubimages;
AVFormatContext* m_format_context;
AVCodecContext* m_codec_context;
- AVCodec* m_codec;
+ const AVCodec* m_codec;
AVFrame* m_frame;
AVFrame* m_rgb_frame;
size_t m_stride; // scanline width in bytes, a.k.a. scanline stride
@@ -238,7 +238,6 @@ FFmpegInput::open(const std::string& name, ImageSpec& spec)
}
static std::once_flag init_flag;
- std::call_once(init_flag, av_register_all);
const char* file_name = name.c_str();
av_log_set_level(AV_LOG_FATAL);
if (avformat_open_input(&m_format_context, file_name, NULL, NULL) != 0) {
@@ -608,11 +607,11 @@ FFmpegInput::read_frame(int frame)
finished = receive_frame(m_codec_context, m_frame, &pkt);
double pts = 0;
- if (static_cast<int64_t>(m_frame->pkt_pts)
+ if (static_cast<int64_t>(m_frame->pts)
!= int64_t(AV_NOPTS_VALUE)) {
pts = av_q2d(
m_format_context->streams[m_video_stream]->time_base)
- * m_frame->pkt_pts;
+ * m_frame->pts;
}
int current_frame = int((pts - m_start_time) * fps() + 0.5f); //???
@@ -620,7 +619,7 @@ FFmpegInput::read_frame(int frame)
m_last_search_pos = current_frame;
if (current_frame == frame && finished) {
- avpicture_fill(reinterpret_cast<AVPicture*>(m_rgb_frame),
+ avpicture_fill(m_rgb_frame,
&m_rgb_buffer[0], m_dst_pix_format,
m_codec_context->width, m_codec_context->height);
sws_scale(m_sws_rgb_context,

View File

@ -1,5 +1,5 @@
Name: oiio
Version: 2.2.15.1
Version: 2.3.12.0
Release: 1mamba
Summary: Libraries and tools for VFX studios and developers of tools such as renderers, compositors, viewers
Group: Applications/Graphics
@ -7,7 +7,8 @@ Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://www.openimageio.org
Source: https://github.com/OpenImageIO/oiio.git/Release-%{version}/oiio-%{version}.tar.bz2
Source: https://github.com/OpenImageIO/oiio.git/v%{version}/oiio-%{version}.tar.bz2
Patch0: oiio-2.3.12.0-ffmpeg-5.0.patch
License: BSD
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
@ -22,22 +23,26 @@ BuildRequires: libfreetype-devel
BuildRequires: libgcc
BuildRequires: libgif-devel
BuildRequires: libglvnd-devel
BuildRequires: libheif-devel
BuildRequires: libimath-devel
BuildRequires: libjpeg-devel
BuildRequires: libopencolorio-devel
BuildRequires: libopencv-devel
BuildRequires: libopenexr-devel
BuildRequires: libopenjpeg-devel
BuildRequires: libpng-devel
BuildRequires: libqt5-devel
BuildRequires: libpython3-devel
BuildRequires: libraw-devel
BuildRequires: libsquish-devel
BuildRequires: libstdc++6-devel
BuildRequires: libswscale-ffmpeg-devel
BuildRequires: libtiff-devel
BuildRequires: libwebp-devel
BuildRequires: libz-devel
BuildRequires: pugixml-devel
BuildRequires: qt5-qtbase-devel
## AUTOBUILDREQ-END
BuildRequires: libdcmtk-devel >= 3.6.6
BuildRequires: libopencolorio-devel >= 2.1.1
BuildRequires: python-pybind11-devel
BuildRequires: cmake
Requires: lib%{name} = %{?epoch:%epoch:}%{version}-%{release}
@ -65,7 +70,7 @@ This package contains fonts provided by OpenImageIO.
%package -n libopenimageio
Group: System/Libraries
Summary: Shared libraries for OpenImageIO
Requires: ttf-openimageio = %{?epoch:%epoch:}%{version}-%{release}
Obsoletes: ttf-openimageio < 2.3.12.0
%description -n libopenimageio
The primary target audience for OIIO is VFX studios and developers of tools such as renderers, compositors, viewers, and other image-related software you'd find in a production pipeline.
@ -83,10 +88,23 @@ This package contains libraries and header files for developing applications tha
%prep
%setup -q
%patch0 -p1 -b .ffmpeg-5.0
%build
%cmake -d build \
-DPYTHON_VERSION=%{python3_version}
-DCMAKE_CXX_STANDARD=17 \
-DCMAKE_SKIP_RPATH:BOOL=TRUE \
-DPYTHON_VERSION=%{python3_version} \
-DBUILD_DOCS:BOOL=TRUE \
-DOIIO_BUILD_TESTS:BOOL=FALSE \
-DINSTALL_DOCS:BOOL=FALSE \
-DINSTALL_FONTS:BOOL=FALSE \
-DUSE_EXTERNAL_PUGIXML:BOOL=TRUE \
-DSTOP_ON_WARNING:BOOL=FALSE \
-DJPEG_INCLUDE_DIR=%{_includedir} \
-DOPENJPEG_INCLUDE_DIR=$(pkgconf --variable=includedir libopenjp2) \
-DOpenGL_GL_PREFERENCE=GLVND \
-DVERBOSE=TRUE
%make
@ -109,18 +127,18 @@ This package contains libraries and header files for developing applications tha
%{_bindir}/iv
%{_bindir}/maketx
%{_bindir}/oiiotool
%{_mandir}/iconvert.1
%{_mandir}/idiff.1
%{_mandir}/igrep.1
%{_mandir}/iinfo.1
%{_mandir}/iv.1
%{_mandir}/maketx.1
%{_mandir}/oiiotool.1
#%{_mandir}/iconvert.1
#%{_mandir}/idiff.1
#%{_mandir}/igrep.1
#%{_mandir}/iinfo.1
#%{_mandir}/iv.1
#%{_mandir}/maketx.1
#%{_mandir}/oiiotool.1
%files -n ttf-openimageio
%defattr(-,root,root)
%dir %{_datadir}/fonts/OpenImageIO
%{_datadir}/fonts/OpenImageIO/*.ttf
#%files -n ttf-openimageio
#%defattr(-,root,root)
#%dir %{_datadir}/fonts/OpenImageIO
#%{_datadir}/fonts/OpenImageIO/*.ttf
%files -n libopenimageio
%defattr(-,root,root)
@ -137,19 +155,25 @@ This package contains libraries and header files for developing applications tha
%{_includedir}/OpenImageIO/detail/*.h
%dir %{_includedir}/OpenImageIO/detail/fmt
%{_includedir}/OpenImageIO/detail/fmt/*.h
%dir %{_includedir}/OpenImageIO/detail/pugixml
%{_includedir}/OpenImageIO/detail/pugixml/*
#%dir %{_includedir}/OpenImageIO/detail/pugixml
#%{_includedir}/OpenImageIO/detail/pugixml/*
%{_libdir}/libOpenImageIO.so
%{_libdir}/libOpenImageIO_Util.so
%{_libdir}/pkgconfig/OpenImageIO.pc
%dir %{_libdir}/cmake/OpenImageIO
%{_libdir}/cmake/OpenImageIO/OpenImageIO*.cmake
%{_datadir}/cmake/Modules/FindOpenImageIO.cmake
%dir %{_datadir}/doc/OpenImageIO
%{_datadir}/doc/OpenImageIO/*
#%{_datadir}/cmake/Modules/FindOpenImageIO.cmake
#%dir %{_datadir}/doc/OpenImageIO
#%{_datadir}/doc/OpenImageIO/*
%doc README.md
%changelog
* Wed Feb 02 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 2.3.12.0-1mamba
- update to 2.3.12.0
* Wed Feb 02 2022 Silvan Calarco <silvan.calarco@mambasoft.it> 2.2.20.0-1mamba
- update to 2.2.20.0
* Thu Jun 24 2021 Silvan Calarco <silvan.calarco@mambasoft.it> 2.2.15.1-1mamba
- update to 2.2.15.1