Update dependencies
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
name: opencv
|
||||
description: Open Source Computer Vision Library
|
||||
version: 5.0.0
|
||||
revision: 2
|
||||
revision: 3
|
||||
url: https://opencv.org/
|
||||
license: Apache-2.0
|
||||
maintainers:
|
||||
@@ -9,7 +9,7 @@ maintainers:
|
||||
architecture: any
|
||||
type: source
|
||||
depends:
|
||||
- abseil-cpp=20260526.*
|
||||
- abseil-cpp=20260817.*
|
||||
- ffmpeg
|
||||
- freetype2
|
||||
- gcc-libs
|
||||
@@ -26,7 +26,7 @@ depends:
|
||||
- libwebp
|
||||
- openexr
|
||||
- openjpeg
|
||||
- protobuf-compiler=35.1
|
||||
- protobuf-compiler=36.0
|
||||
- zlib
|
||||
make_depends:
|
||||
- cmake
|
||||
|
||||
@@ -2,6 +2,13 @@
|
||||
# BPM Expects the source code to be extracted into the automatically created 'source' directory which can be accessed using $BPM_SOURCE
|
||||
# BPM Expects the output files to be present in the automatically created 'output' directory which can be accessed using $BPM_OUTPUT
|
||||
|
||||
# The prepare function is executed in the root of the temp directory
|
||||
# This function is used for putting downloaded files to the correct location or applying patches
|
||||
prepare() {
|
||||
cd "$BPM_SOURCE"
|
||||
patch -Np1 -i "$BPM_WORKDIR"/ffmpeg-9.patch
|
||||
}
|
||||
|
||||
# The build function is executed in the source directory
|
||||
# This function is used to compile the source code
|
||||
build() {
|
||||
|
||||
@@ -0,0 +1,37 @@
|
||||
diff --git a/modules/videoio/src/cap_ffmpeg_hw.hpp b/modules/videoio/src/cap_ffmpeg_hw.hpp
|
||||
index 65045a2bc7..3ed33d32a3 100644
|
||||
--- a/modules/videoio/src/cap_ffmpeg_hw.hpp
|
||||
+++ b/modules/videoio/src/cap_ffmpeg_hw.hpp
|
||||
@@ -757,9 +757,12 @@ AVCodec *hw_find_codec(AVCodecID id, AVHWDeviceType hw_type, int (*check_categor
|
||||
#endif
|
||||
if (hw_type == AV_HWDEVICE_TYPE_CUDA) // CUDA encoders don't support avcodec_get_hw_config()
|
||||
hw_native_fmt = AV_PIX_FMT_CUDA;
|
||||
- if (av_codec_is_encoder(c) && hw_native_fmt != AV_PIX_FMT_NONE && c->pix_fmts) {
|
||||
- for (int i = 0; c->pix_fmts[i] != AV_PIX_FMT_NONE; i++) {
|
||||
- if (c->pix_fmts[i] == hw_native_fmt) {
|
||||
+ const AVPixelFormat* c_pix_fmts = nullptr;
|
||||
+ avcodec_get_supported_config(nullptr, c, AV_CODEC_CONFIG_PIX_FORMAT, 0,
|
||||
+ (const void**)&c_pix_fmts, nullptr);
|
||||
+ if (av_codec_is_encoder(c) && hw_native_fmt != AV_PIX_FMT_NONE && c_pix_fmts) {
|
||||
+ for (int i = 0; c_pix_fmts[i] != AV_PIX_FMT_NONE; i++) {
|
||||
+ if (c_pix_fmts[i] == hw_native_fmt) {
|
||||
*hw_pix_fmt = hw_native_fmt;
|
||||
if (hw_check_codec(c, hw_type, disabled_codecs))
|
||||
return c;
|
||||
diff --git a/modules/videoio/src/cap_ffmpeg_impl.hpp b/modules/videoio/src/cap_ffmpeg_impl.hpp
|
||||
index 3dd42ecfd1..005d048d95 100644
|
||||
--- a/modules/videoio/src/cap_ffmpeg_impl.hpp
|
||||
+++ b/modules/videoio/src/cap_ffmpeg_impl.hpp
|
||||
@@ -2629,8 +2629,10 @@ static AVCodecContext * icv_configure_video_stream_FFMPEG(AVFormatContext *oc,
|
||||
c->time_base.den = frame_rate;
|
||||
c->time_base.num = frame_rate_base;
|
||||
/* adjust time base for supported framerates */
|
||||
- if(codec && codec->supported_framerates){
|
||||
- const AVRational *p= codec->supported_framerates;
|
||||
+ const AVRational *p = nullptr;
|
||||
+ avcodec_get_supported_config(nullptr, codec, AV_CODEC_CONFIG_FRAME_RATE, 0,
|
||||
+ (const void**)&p, nullptr);
|
||||
+ if(codec && p){
|
||||
AVRational req = {frame_rate, frame_rate_base};
|
||||
const AVRational *best=NULL;
|
||||
AVRational best_error= {INT_MAX, 1};
|
||||
Reference in New Issue
Block a user