From 230eebe0b61bef4d2633f10841c57adfec70fa5b Mon Sep 17 00:00:00 2001 From: Raven Date: Thu, 18 Jul 2024 14:19:42 +0600 Subject: [PATCH] compat-ffmpeg6: initial compat package --- ...-Drop-openh264-runtime-version-check.patch | 109 + ...hevc-add-libsvt-hevc-encoder-wrapper.patch | 674 ++++++ .../0001-revert-librsvg-bump.patch | 162 ++ ...002-doc-Add-libsvt_hevc-encoder-docs.patch | 201 ++ .../030-ffmpeg-add-svt-vp9.patch | 788 +++++++ ...av_stream_get_first_dts-for-chromium.patch | 29 + .../ffmpeg-CVE-2023-49528.patch | 54 + .../ffmpeg-allow-fdk-aac-free.patch | 26 + multimedia/compat-ffmpeg6/ffmpeg-c99.patch | 67 + .../compat-ffmpeg6/ffmpeg-codec-choice.patch | 57 + .../ffmpeg-dlopen-openh264.patch | 363 ++++ multimedia/compat-ffmpeg6/ffmpeg-vulkan.patch | 99 + multimedia/compat-ffmpeg6/ffmpeg.spec | 1884 +++++++++++++++++ 13 files changed, 4513 insertions(+) create mode 100644 multimedia/compat-ffmpeg6/0001-lavc-libopenh264-Drop-openh264-runtime-version-check.patch create mode 100644 multimedia/compat-ffmpeg6/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch create mode 100644 multimedia/compat-ffmpeg6/0001-revert-librsvg-bump.patch create mode 100644 multimedia/compat-ffmpeg6/0002-doc-Add-libsvt_hevc-encoder-docs.patch create mode 100644 multimedia/compat-ffmpeg6/030-ffmpeg-add-svt-vp9.patch create mode 100644 multimedia/compat-ffmpeg6/040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch create mode 100644 multimedia/compat-ffmpeg6/ffmpeg-CVE-2023-49528.patch create mode 100644 multimedia/compat-ffmpeg6/ffmpeg-allow-fdk-aac-free.patch create mode 100644 multimedia/compat-ffmpeg6/ffmpeg-c99.patch create mode 100644 multimedia/compat-ffmpeg6/ffmpeg-codec-choice.patch create mode 100644 multimedia/compat-ffmpeg6/ffmpeg-dlopen-openh264.patch create mode 100644 multimedia/compat-ffmpeg6/ffmpeg-vulkan.patch create mode 100644 multimedia/compat-ffmpeg6/ffmpeg.spec diff --git a/multimedia/compat-ffmpeg6/0001-lavc-libopenh264-Drop-openh264-runtime-version-check.patch b/multimedia/compat-ffmpeg6/0001-lavc-libopenh264-Drop-openh264-runtime-version-check.patch new file mode 100644 index 0000000..7066f16 --- /dev/null +++ b/multimedia/compat-ffmpeg6/0001-lavc-libopenh264-Drop-openh264-runtime-version-check.patch @@ -0,0 +1,109 @@ +From a641e629591d68bd3edd99bddec623dc31295f6b Mon Sep 17 00:00:00 2001 +From: Kalev Lember +Date: Wed, 6 Dec 2023 14:37:34 +0100 +Subject: [PATCH] lavc/libopenh264: Drop openh264 runtime version checks + +Years ago, openh264 releases often changed their ABI without changing +the library soname. To avoid running into ABI issues, a version check +was added to lavc libopenh264 code to error out at runtime in case the +build time and runtime openh264 versions don't match. + +This should no longer be an issue with newer openh264 releases and we +can drop the runtime version check and rely on upstream doing the right +thing and bump the library soname if the ABI changes, similar to how +other libraries are consumed in ffmpeg. + +Almost all major distributions now include openh264 and this means there +are more eyes on ABI changes and issues are discovered and reported +quickly. See e.g. https://github.com/cisco/openh264/issues/3564 where an +ABI issue was quickly discovered and fixed. + +Relaxing the check allows downstream distributions to build ffmpeg +against e.g. openh264 2.3.1 and ship an update to ABI-compatible +openh264 2.4.0, without needing to coordinate a lock step update between +ffmpeg and openh264 (which can be difficult if openh264 is distributed +by Cisco and ffmpeg comes from the distro, such as is the case for +Fedora). + +Signed-off-by: Kalev Lember +--- + libavcodec/libopenh264.c | 15 --------------- + libavcodec/libopenh264.h | 2 -- + libavcodec/libopenh264dec.c | 4 ---- + libavcodec/libopenh264enc.c | 4 ---- + 4 files changed, 25 deletions(-) + +diff --git a/libavcodec/libopenh264.c b/libavcodec/libopenh264.c +index 0f6d28ed88..c80c85ea8b 100644 +--- a/libavcodec/libopenh264.c ++++ b/libavcodec/libopenh264.c +@@ -46,18 +46,3 @@ void ff_libopenh264_trace_callback(void *ctx, int level, const char *msg) + int equiv_ffmpeg_log_level = libopenh264_to_ffmpeg_log_level(level); + av_log(ctx, equiv_ffmpeg_log_level, "%s\n", msg); + } +- +-int ff_libopenh264_check_version(void *logctx) +-{ +- // Mingw GCC < 4.7 on x86_32 uses an incorrect/buggy ABI for the WelsGetCodecVersion +- // function (for functions returning larger structs), thus skip the check in those +- // configurations. +-#if !defined(_WIN32) || !defined(__GNUC__) || !ARCH_X86_32 || AV_GCC_VERSION_AT_LEAST(4, 7) +- OpenH264Version libver = WelsGetCodecVersion(); +- if (memcmp(&libver, &g_stCodecVersion, sizeof(libver))) { +- av_log(logctx, AV_LOG_ERROR, "Incorrect library version loaded\n"); +- return AVERROR(EINVAL); +- } +-#endif +- return 0; +-} +diff --git a/libavcodec/libopenh264.h b/libavcodec/libopenh264.h +index dbb9c5d429..0b462d6fdc 100644 +--- a/libavcodec/libopenh264.h ++++ b/libavcodec/libopenh264.h +@@ -34,6 +34,4 @@ + + void ff_libopenh264_trace_callback(void *ctx, int level, const char *msg); + +-int ff_libopenh264_check_version(void *logctx); +- + #endif /* AVCODEC_LIBOPENH264_H */ +diff --git a/libavcodec/libopenh264dec.c b/libavcodec/libopenh264dec.c +index 7d650ae03e..b6a9bba2dc 100644 +--- a/libavcodec/libopenh264dec.c ++++ b/libavcodec/libopenh264dec.c +@@ -52,13 +52,9 @@ static av_cold int svc_decode_init(AVCodecContext *avctx) + { + SVCContext *s = avctx->priv_data; + SDecodingParam param = { 0 }; +- int err; + int log_level; + WelsTraceCallback callback_function; + +- if ((err = ff_libopenh264_check_version(avctx)) < 0) +- return AVERROR_DECODER_NOT_FOUND; +- + if (WelsCreateDecoder(&s->decoder)) { + av_log(avctx, AV_LOG_ERROR, "Unable to create decoder\n"); + return AVERROR_UNKNOWN; +diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c +index f518d0894e..6f231d22b2 100644 +--- a/libavcodec/libopenh264enc.c ++++ b/libavcodec/libopenh264enc.c +@@ -110,14 +110,10 @@ static av_cold int svc_encode_init(AVCodecContext *avctx) + { + SVCContext *s = avctx->priv_data; + SEncParamExt param = { 0 }; +- int err; + int log_level; + WelsTraceCallback callback_function; + AVCPBProperties *props; + +- if ((err = ff_libopenh264_check_version(avctx)) < 0) +- return AVERROR_ENCODER_NOT_FOUND; +- + if (WelsCreateSVCEncoder(&s->encoder)) { + av_log(avctx, AV_LOG_ERROR, "Unable to create encoder\n"); + return AVERROR_UNKNOWN; +-- +2.43.0 + diff --git a/multimedia/compat-ffmpeg6/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch b/multimedia/compat-ffmpeg6/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch new file mode 100644 index 0000000..3215162 --- /dev/null +++ b/multimedia/compat-ffmpeg6/0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch @@ -0,0 +1,674 @@ +From be059eaeefdc49e93066a8b618d5635e9a2c696a Mon Sep 17 00:00:00 2001 +From: Jing Sun +Date: Wed, 21 Nov 2018 11:33:04 +0800 +Subject: [PATCH] lavc/svt_hevc: add libsvt hevc encoder wrapper + +Signed-off-by: Zhengxu Huang +Signed-off-by: Hassene Tmar +Signed-off-by: Jun Zhao +Signed-off-by: Jing Sun +Signed-off-by: Austin Hu +Signed-off-by: Christopher Degawa +Signed-off-by: Guo Jiansheng +--- + configure | 4 + + libavcodec/Makefile | 1 + + libavcodec/allcodecs.c | 1 + + libavcodec/libsvt_hevc.c | 585 +++++++++++++++++++++++++++++++++++++++ + 4 files changed, 591 insertions(+) + create mode 100644 libavcodec/libsvt_hevc.c + +diff --git a/configure b/configure +index c8ae0a061d..9cc741d2a7 100755 +--- a/configure ++++ b/configure +@@ -330,6 +330,7 @@ External library support: + --enable-vapoursynth enable VapourSynth demuxer [no] + --disable-xlib disable xlib [autodetect] + --disable-zlib disable zlib [autodetect] ++ --enable-libsvthevc enable HEVC encoding via svt [no] + + The following libraries provide various hardware acceleration features: + --disable-amf disable AMF video encoding code [autodetect] +@@ -1898,6 +1899,7 @@ EXTERNAL_LIBRARY_LIST=" + libsrt + libssh + libsvtav1 ++ libsvthevc + libtensorflow + libtesseract + libtheora +@@ -3495,6 +3497,7 @@ vapoursynth_demuxer_deps="vapoursynth" + videotoolbox_suggest="coreservices" + videotoolbox_deps="corefoundation coremedia corevideo" + videotoolbox_encoder_deps="videotoolbox VTCompressionSessionPrepareToEncodeFrames" ++libsvt_hevc_encoder_deps="libsvthevc" + + # demuxers / muxers + ac3_demuxer_select="ac3_parser" +@@ -6868,6 +6871,7 @@ enabled libssh && require_pkg_config libssh "libssh >= 0.6.0" libssh/ + enabled libspeex && require_pkg_config libspeex speex speex/speex.h speex_decoder_init + enabled libsrt && require_pkg_config libsrt "srt >= 1.3.0" srt/srt.h srt_socket + enabled libsvtav1 && require_pkg_config libsvtav1 "SvtAv1Enc >= 0.9.0" EbSvtAv1Enc.h svt_av1_enc_init_handle ++enabled libsvthevc && require_pkg_config libsvthevc SvtHevcEnc EbApi.h EbInitHandle + enabled libtensorflow && require libtensorflow tensorflow/c/c_api.h TF_Version -ltensorflow + enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate + enabled libtheora && require libtheora theora/theoraenc.h th_info_init -ltheoraenc -ltheoradec -logg +diff --git a/libavcodec/Makefile b/libavcodec/Makefile +index bb42095165..08ebc58d7d 100644 +--- a/libavcodec/Makefile ++++ b/libavcodec/Makefile +@@ -1143,6 +1143,7 @@ + OBJS-$(CONFIG_LIBX262_ENCODER) += libx264.o + OBJS-$(CONFIG_LIBX264_ENCODER) += libx264.o + OBJS-$(CONFIG_LIBX265_ENCODER) += libx265.o ++OBJS-$(CONFIG_LIBSVT_HEVC_ENCODER) += libsvt_hevc.o + OBJS-$(CONFIG_LIBXAVS_ENCODER) += libxavs.o + OBJS-$(CONFIG_LIBXAVS2_ENCODER) += libxavs2.o + OBJS-$(CONFIG_LIBXVID_ENCODER) += libxvid.o +diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c +index 93ce8e3224..b709c7d551 100644 +--- a/libavcodec/allcodecs.c ++++ b/libavcodec/allcodecs.c +@@ -829,6 +829,7 @@ extern const FFCodec ff_libxavs_encoder; + extern const FFCodec ff_libxavs2_encoder; + extern const FFCodec ff_libxvid_encoder; + extern const FFCodec ff_libzvbi_teletext_decoder; ++extern const FFCodec ff_libsvt_hevc_encoder; + + /* text */ + extern const FFCodec ff_bintext_decoder; +diff --git a/libavcodec/libsvt_hevc.c b/libavcodec/libsvt_hevc.c +new file mode 100644 +index 0000000000..80b53a2157 +--- /dev/null ++++ b/libavcodec/libsvt_hevc.c +@@ -0,0 +1,585 @@ ++/* ++* Scalable Video Technology for HEVC encoder library plugin ++* ++* Copyright (c) 2019 Intel Corporation ++* ++* This file is part of FFmpeg. ++* ++* FFmpeg is free software; you can redistribute it and/or ++* modify it under the terms of the GNU Lesser General Public ++* License as published by the Free Software Foundation; either ++* version 2.1 of the License, or (at your option) any later version. ++* ++* FFmpeg is distributed in the hope that it will be useful, ++* but WITHOUT ANY WARRANTY; without even the implied warranty of ++* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++* Lesser General Public License for more details. ++* ++* You should have received a copy of the GNU Lesser General Public ++* License along with this program; if not, write to the Free Software ++* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++*/ ++ ++#include "EbApi.h" ++ ++#include "libavutil/common.h" ++#include "libavutil/frame.h" ++#include "libavutil/opt.h" ++ ++#include "codec_internal.h" ++#include "internal.h" ++#include "avcodec.h" ++#include "encode.h" ++ ++typedef enum eos_status { ++ EOS_NOT_REACHED = 0, ++ EOS_SENT, ++ EOS_RECEIVED ++}EOS_STATUS; ++ ++typedef struct SvtContext { ++ AVClass *class; ++ ++ EB_H265_ENC_CONFIGURATION enc_params; ++ EB_COMPONENTTYPE *svt_handle; ++ EB_BUFFERHEADERTYPE in_buf; ++ uint8_t *in_data; ++ EOS_STATUS eos_flag; ++ ++ // User options. ++ int profile; ++ int hierarchical_level; ++ int enc_mode; ++ int tier; ++ int level; ++ int rc_mode; ++ int scd; ++ int tune; ++ int base_layer_switch_mode; ++ int qp; ++ int aud; ++ int asm_type; ++ int forced_idr; ++ int la_depth; ++ int thread_count; ++ int target_socket; ++ int high_dynamic_range; ++ int unrestricted_motion_vector; ++ int tile_row_count; ++ int tile_col_count; ++ int tile_slice_mode; ++ int pred_struct; ++ int vid_info; ++} SvtContext; ++ ++static int error_mapping(EB_ERRORTYPE svt_ret) ++{ ++ switch (svt_ret) { ++ case EB_ErrorInsufficientResources: ++ return AVERROR(ENOMEM); ++ ++ case EB_ErrorUndefined: ++ case EB_ErrorInvalidComponent: ++ case EB_ErrorBadParameter: ++ return AVERROR(EINVAL); ++ ++ case EB_ErrorDestroyThreadFailed: ++ case EB_ErrorSemaphoreUnresponsive: ++ case EB_ErrorDestroySemaphoreFailed: ++ case EB_ErrorCreateMutexFailed: ++ case EB_ErrorMutexUnresponsive: ++ case EB_ErrorDestroyMutexFailed: ++ return AVERROR_EXTERNAL; ++ ++ case EB_NoErrorEmptyQueue: ++ return AVERROR(EAGAIN); ++ ++ case EB_ErrorNone: ++ return 0; ++ ++ default: ++ return AVERROR_UNKNOWN; ++ } ++} ++ ++static void free_buffer(SvtContext *svt_enc) ++{ ++ if (svt_enc && svt_enc->in_data) { ++ av_freep(&svt_enc->in_data); ++ svt_enc->in_data = NULL; ++ } ++} ++ ++static EB_ERRORTYPE alloc_buffer(SvtContext *svt_enc) ++{ ++ EB_BUFFERHEADERTYPE *in_buf = &svt_enc->in_buf; ++ EB_H265_ENC_INPUT *in_data = NULL; ++ ++ memset(in_buf, 0, sizeof(*in_buf)); ++ in_buf->nSize = sizeof(*in_buf); ++ in_buf->sliceType = EB_INVALID_PICTURE; ++ ++ in_data = (EB_H265_ENC_INPUT *)av_mallocz(sizeof(*in_data)); ++ if (in_data) { ++ svt_enc->in_data = in_buf->pBuffer = (uint8_t *)in_data; ++ return EB_ErrorNone; ++ } else { ++ return EB_ErrorInsufficientResources; ++ } ++} ++ ++static int config_enc_params(EB_H265_ENC_CONFIGURATION *param, ++ AVCodecContext *avctx) ++{ ++ SvtContext *svt_enc = avctx->priv_data; ++ ++ param->sourceWidth = avctx->width; ++ param->sourceHeight = avctx->height; ++ ++ if ((avctx->pix_fmt == AV_PIX_FMT_YUV420P10) || ++ (avctx->pix_fmt == AV_PIX_FMT_YUV422P10) || ++ (avctx->pix_fmt == AV_PIX_FMT_YUV444P10)) { ++ av_log(avctx, AV_LOG_DEBUG, "Set 10 bits depth input\n"); ++ param->encoderBitDepth = 10; ++ } else { ++ av_log(avctx, AV_LOG_DEBUG, "Set 8 bits depth input\n"); ++ param->encoderBitDepth = 8; ++ } ++ ++ if ((avctx->pix_fmt == AV_PIX_FMT_YUV420P) || ++ (avctx->pix_fmt == AV_PIX_FMT_YUV420P10)) ++ param->encoderColorFormat = EB_YUV420; ++ else if ((avctx->pix_fmt == AV_PIX_FMT_YUV422P) || ++ (avctx->pix_fmt == AV_PIX_FMT_YUV422P10)) ++ param->encoderColorFormat = EB_YUV422; ++ else ++ param->encoderColorFormat = EB_YUV444; ++ ++ param->profile = svt_enc->profile; ++ ++ if (FF_PROFILE_HEVC_MAIN_STILL_PICTURE == param->profile) { ++ av_log(avctx, AV_LOG_ERROR, "Main Still Picture Profile not supported\n"); ++ return EB_ErrorBadParameter; ++ } ++ ++ if ((param->encoderColorFormat >= EB_YUV422) && ++ (param->profile != FF_PROFILE_HEVC_REXT)) { ++ av_log(avctx, AV_LOG_WARNING, "Rext Profile forced for 422 or 444\n"); ++ param->profile = FF_PROFILE_HEVC_REXT; ++ } ++ ++ if ((FF_PROFILE_HEVC_MAIN == param->profile) && ++ (param->encoderBitDepth > 8)) { ++ av_log(avctx, AV_LOG_WARNING, "Main10 Profile forced for 10 bits\n"); ++ param->profile = FF_PROFILE_HEVC_MAIN_10; ++ } ++ ++ param->targetBitRate = avctx->bit_rate; ++ param->vbvMaxrate = avctx->rc_max_rate; ++ param->vbvBufsize = avctx->rc_buffer_size; ++ ++ if (avctx->gop_size > 0) ++ param->intraPeriodLength = avctx->gop_size - 1; ++ ++ if ((avctx->framerate.num > 0) && (avctx->framerate.den > 0)) { ++ param->frameRateNumerator = avctx->framerate.num; ++ param->frameRateDenominator = ++ avctx->framerate.den * avctx->ticks_per_frame; ++ } else { ++ param->frameRateNumerator = avctx->time_base.den; ++ param->frameRateDenominator = ++ avctx->time_base.num * avctx->ticks_per_frame; ++ } ++ ++ param->hierarchicalLevels = svt_enc->hierarchical_level; ++ param->encMode = svt_enc->enc_mode; ++ param->tier = svt_enc->tier; ++ param->level = svt_enc->level; ++ param->rateControlMode = svt_enc->rc_mode; ++ param->sceneChangeDetection = svt_enc->scd; ++ param->tune = svt_enc->tune; ++ param->baseLayerSwitchMode = svt_enc->base_layer_switch_mode; ++ param->qp = svt_enc->qp; ++ param->accessUnitDelimiter = svt_enc->aud; ++ param->asmType = svt_enc->asm_type; ++ param->intraRefreshType = svt_enc->forced_idr; ++ param->highDynamicRangeInput = svt_enc->high_dynamic_range; ++ param->targetSocket = svt_enc->target_socket; ++ if (param->rateControlMode) { ++ param->maxQpAllowed = avctx->qmax; ++ param->minQpAllowed = avctx->qmin; ++ } ++ ++ if (svt_enc->la_depth != -1) ++ param->lookAheadDistance = svt_enc->la_depth; ++ ++ if ((svt_enc->thread_count > 0) && ++ (svt_enc->thread_count < (EB_THREAD_COUNT_MIN_CORE * EB_THREAD_COUNT_FACTOR))) { ++ param->threadCount = EB_THREAD_COUNT_MIN_CORE * EB_THREAD_COUNT_FACTOR; ++ av_log(avctx, AV_LOG_WARNING, "Thread count is set too small, forced to %"PRId32"\n", ++ param->threadCount); ++ } else if (svt_enc->thread_count % EB_THREAD_COUNT_MIN_CORE) { ++ param->threadCount = (svt_enc->thread_count + EB_THREAD_COUNT_MIN_CORE - 1) ++ / EB_THREAD_COUNT_MIN_CORE * EB_THREAD_COUNT_MIN_CORE; ++ av_log(avctx, AV_LOG_DEBUG, "Thread count is rounded to %"PRId32"\n", ++ param->threadCount); ++ } else { ++ param->threadCount = svt_enc->thread_count; ++ } ++ ++ if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) ++ param->codeVpsSpsPps = 0; ++ else ++ param->codeVpsSpsPps = 1; ++ ++ param->codeEosNal = 1; ++ ++ if (svt_enc->unrestricted_motion_vector == 0 || svt_enc->unrestricted_motion_vector == 1) { ++ param->unrestrictedMotionVector = svt_enc->unrestricted_motion_vector; ++ } else { ++ av_log(avctx, AV_LOG_ERROR, "Unrestricted Motion Vector should be set 0 or 1\n"); ++ return EB_ErrorBadParameter; ++ } ++ ++ if(svt_enc->tile_row_count >= 1 && svt_enc->tile_row_count <= 16) { ++ param->tileRowCount = svt_enc->tile_row_count; ++ } else { ++ av_log(avctx, AV_LOG_ERROR, "Tile Row Count should between 1-16\n"); ++ return EB_ErrorBadParameter; ++ } ++ ++ if(svt_enc->tile_col_count >= 1 && svt_enc->tile_col_count <= 16) { ++ param->tileColumnCount = svt_enc->tile_col_count; ++ } else { ++ av_log(avctx, AV_LOG_ERROR, "Tile Column Count should between 1-16\n"); ++ return EB_ErrorBadParameter; ++ } ++ ++ if(svt_enc->tile_slice_mode == 0 || svt_enc->tile_slice_mode == 1) { ++ param->tileSliceMode = svt_enc->tile_slice_mode; ++ } else { ++ av_log(avctx, AV_LOG_ERROR, "Tile Slice Mode should be set 0 or 1\n"); ++ return EB_ErrorBadParameter; ++ } ++ ++ if(svt_enc->pred_struct >= 0 && svt_enc->pred_struct <= 2) { ++ param->predStructure = svt_enc->pred_struct; ++ } else { ++ av_log(avctx, AV_LOG_ERROR, "Pred Structure should between 0-2\n"); ++ return EB_ErrorBadParameter; ++ } ++ ++ if(svt_enc->vid_info == 0 || svt_enc->vid_info == 1) { ++ param->videoUsabilityInfo = svt_enc->vid_info; ++ } else { ++ av_log(avctx, AV_LOG_ERROR, "Video Usability Info should be set 0 or 1\n"); ++ return EB_ErrorBadParameter; ++ } ++ return EB_ErrorNone; ++} ++ ++static void read_in_data(EB_H265_ENC_CONFIGURATION *config, ++ const AVFrame *frame, ++ EB_BUFFERHEADERTYPE *header_ptr) ++{ ++ uint8_t is16bit; ++ uint64_t frame_size; ++ EB_H265_ENC_INPUT *in_data = (EB_H265_ENC_INPUT *)header_ptr->pBuffer; ++ ++ is16bit = config->encoderBitDepth > 8; ++ frame_size = (uint64_t)(config->sourceWidth * config->sourceHeight) << is16bit; ++ ++ in_data->luma = frame->data[0]; ++ in_data->cb = frame->data[1]; ++ in_data->cr = frame->data[2]; ++ ++ in_data->yStride = frame->linesize[0] >> is16bit; ++ in_data->cbStride = frame->linesize[1] >> is16bit; ++ in_data->crStride = frame->linesize[2] >> is16bit; ++ ++ if (config->encoderColorFormat == EB_YUV420) ++ frame_size *= 3/2u; ++ else if (config->encoderColorFormat == EB_YUV422) ++ frame_size *= 2u; ++ else ++ frame_size *= 3u; ++ ++ header_ptr->nFilledLen += frame_size; ++} ++ ++static av_cold int eb_enc_init(AVCodecContext *avctx) ++{ ++ SvtContext *svt_enc = avctx->priv_data; ++ EB_ERRORTYPE svt_ret; ++ ++ svt_enc->eos_flag = EOS_NOT_REACHED; ++ ++ svt_ret = EbInitHandle(&svt_enc->svt_handle, svt_enc, &svt_enc->enc_params); ++ if (svt_ret != EB_ErrorNone) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to init handle\n"); ++ return error_mapping(svt_ret); ++ } ++ ++ svt_ret = config_enc_params(&svt_enc->enc_params, avctx); ++ if (svt_ret != EB_ErrorNone) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to config parameters\n"); ++ goto failed_init_handle; ++ } ++ ++ svt_ret = EbH265EncSetParameter(svt_enc->svt_handle, &svt_enc->enc_params); ++ if (svt_ret != EB_ErrorNone) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to set parameters\n"); ++ goto failed_init_handle; ++ } ++ ++ svt_ret = EbInitEncoder(svt_enc->svt_handle); ++ if (svt_ret != EB_ErrorNone) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to init encoder\n"); ++ goto failed_init_handle; ++ } ++ ++ if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) { ++ EB_BUFFERHEADERTYPE *header_ptr = NULL; ++ ++ svt_ret = EbH265EncStreamHeader(svt_enc->svt_handle, &header_ptr); ++ if (svt_ret != EB_ErrorNone) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to build stream header\n"); ++ goto failed_init_encoder; ++ } ++ ++ avctx->extradata_size = header_ptr->nFilledLen; ++ avctx->extradata = av_malloc(avctx->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE); ++ if (!avctx->extradata) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to allocate extradata\n"); ++ svt_ret = EB_ErrorInsufficientResources; ++ goto failed_init_encoder; ++ } ++ memcpy(avctx->extradata, header_ptr->pBuffer, avctx->extradata_size); ++ memset(avctx->extradata+avctx->extradata_size, 0, AV_INPUT_BUFFER_PADDING_SIZE); ++ } ++ ++ svt_ret = alloc_buffer(svt_enc); ++ if (svt_ret != EB_ErrorNone) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to alloc data buffer\n"); ++ goto failed_init_encoder; ++ } ++ return 0; ++ ++failed_init_encoder: ++ EbDeinitEncoder(svt_enc->svt_handle); ++failed_init_handle: ++ EbDeinitHandle(svt_enc->svt_handle); ++ svt_enc->svt_handle = NULL; ++ svt_enc = NULL; ++ return error_mapping(svt_ret); ++} ++ ++static int eb_encode_frame(AVCodecContext *avctx, AVPacket *pkt, ++ const AVFrame *frame, int *got_packet) ++{ ++ SvtContext *svt_enc = avctx->priv_data; ++ EB_BUFFERHEADERTYPE *header_ptr = &svt_enc->in_buf; ++ EB_ERRORTYPE svt_ret; ++ int av_ret; ++ ++ if (EOS_RECEIVED == svt_enc->eos_flag) { ++ *got_packet = 0; ++ return 0; ++ } ++ ++ if (!frame) { ++ if (!svt_enc->eos_flag) { ++ svt_enc->eos_flag = EOS_SENT; ++ ++ header_ptr->nAllocLen = 0; ++ header_ptr->nFilledLen = 0; ++ header_ptr->nTickCount = 0; ++ header_ptr->nFlags = EB_BUFFERFLAG_EOS; ++ header_ptr->pBuffer = NULL; ++ ++ EbH265EncSendPicture(svt_enc->svt_handle, header_ptr); ++ ++ av_log(avctx, AV_LOG_DEBUG, "Sent EOS\n"); ++ } ++ } else { ++ read_in_data(&svt_enc->enc_params, frame, header_ptr); ++ header_ptr->pts = frame->pts; ++ ++ EbH265EncSendPicture(svt_enc->svt_handle, header_ptr); ++ ++ av_log(avctx, AV_LOG_DEBUG, "Sent PTS %"PRId64"\n", header_ptr->pts); ++ } ++ ++ header_ptr = NULL; ++ svt_ret = EbH265GetPacket(svt_enc->svt_handle, &header_ptr, svt_enc->eos_flag); ++ ++ if (svt_ret == EB_NoErrorEmptyQueue) { ++ *got_packet = 0; ++ av_log(avctx, AV_LOG_DEBUG, "Received none\n"); ++ return 0; ++ } else if (svt_ret == EB_ErrorMax) { ++ *got_packet = 0; ++ av_log(avctx, AV_LOG_ERROR, "Received NULL packet with error code 0x%X\n", header_ptr->nFlags); ++ return AVERROR_INVALIDDATA; ++ } ++ ++ av_log(avctx, AV_LOG_DEBUG, "Received PTS %"PRId64" packet\n", header_ptr->pts); ++ ++ av_ret = ff_alloc_packet(avctx, pkt, header_ptr->nFilledLen); ++ if (av_ret) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to allocate a packet\n"); ++ EbH265ReleaseOutBuffer(&header_ptr); ++ return av_ret; ++ } ++ ++ memcpy(pkt->data, header_ptr->pBuffer, header_ptr->nFilledLen); ++ pkt->size = header_ptr->nFilledLen; ++ pkt->pts = header_ptr->pts; ++ pkt->dts = header_ptr->dts; ++ ++ if ((header_ptr->sliceType == EB_IDR_PICTURE) || ++ (header_ptr->sliceType == EB_I_PICTURE)) ++ pkt->flags |= AV_PKT_FLAG_KEY; ++ if (header_ptr->sliceType == EB_NON_REF_PICTURE) ++ pkt->flags |= AV_PKT_FLAG_DISPOSABLE; ++ ++ EbH265ReleaseOutBuffer(&header_ptr); ++ ++ *got_packet = 1; ++ ++ if (EB_BUFFERFLAG_EOS == header_ptr->nFlags) ++ svt_enc->eos_flag = EOS_RECEIVED; ++ ++ return 0; ++} ++ ++static av_cold int eb_enc_close(AVCodecContext *avctx) ++{ ++ SvtContext *svt_enc = avctx->priv_data; ++ ++ if (svt_enc) { ++ free_buffer(svt_enc); ++ ++ if (svt_enc->svt_handle) { ++ EbDeinitEncoder(svt_enc->svt_handle); ++ EbDeinitHandle(svt_enc->svt_handle); ++ svt_enc->svt_handle = NULL; ++ } ++ } ++ ++ return 0; ++} ++ ++#define OFFSET(x) offsetof(SvtContext, x) ++#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM ++static const AVOption options[] = { ++ { "asm_type", "Assembly instruction set type [0: C Only, 1: Auto]", OFFSET(asm_type), ++ AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, VE }, ++ ++ { "aud", "Include Access Unit Delimiter", OFFSET(aud), ++ AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, ++ ++ { "bl_mode", "Random Access Prediction Structure type setting", OFFSET(base_layer_switch_mode), ++ AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, ++ ++ { "forced-idr", "If forcing keyframes, force them as IDR frames.", OFFSET(forced_idr), ++ AV_OPT_TYPE_INT, { .i64 = -1 }, -1, INT_MAX, VE }, ++ ++ { "hielevel", "Hierarchical prediction levels setting", OFFSET(hierarchical_level), ++ AV_OPT_TYPE_INT, { .i64 = 3 }, 0, 3, VE , "hielevel"}, ++ { "flat", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "hielevel" }, ++ { "1 level", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, INT_MIN, INT_MAX, VE, "hielevel" }, ++ { "2 level", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 2 }, INT_MIN, INT_MAX, VE, "hielevel" }, ++ { "3 level", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 3 }, INT_MIN, INT_MAX, VE, "hielevel" }, ++ ++ { "la_depth", "Look ahead distance [0, 256]", OFFSET(la_depth), ++ AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 256, VE }, ++ ++ { "level", "Set level (level_idc)", OFFSET(level), ++ AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 0xff, VE, "level" }, ++ ++ { "preset", "Encoding preset [0, 12]", ++ OFFSET(enc_mode), AV_OPT_TYPE_INT, { .i64 = 7 }, 0, 12, VE }, ++ ++ { "profile", "Profile setting, Main Still Picture Profile not supported", OFFSET(profile), ++ AV_OPT_TYPE_INT, { .i64 = FF_PROFILE_HEVC_MAIN }, FF_PROFILE_HEVC_MAIN, FF_PROFILE_HEVC_REXT, VE, "profile"}, ++ ++ { "qp", "QP value for intra frames", OFFSET(qp), ++ AV_OPT_TYPE_INT, { .i64 = 32 }, 0, 51, VE }, ++ ++ { "rc", "Bit rate control mode", OFFSET(rc_mode), ++ AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE , "rc"}, ++ { "cqp", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "rc" }, ++ { "vbr", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, INT_MIN, INT_MAX, VE, "rc" }, ++ ++ { "sc_detection", "Scene change detection", OFFSET(scd), ++ AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, VE }, ++ ++ { "socket", "Target CPU socket to use. -1 use all available", OFFSET(target_socket), ++ AV_OPT_TYPE_INT, {.i64 = -1 }, -1, 1, VE }, ++ ++ { "thread_count", "Number of threads [0: Auto, 96: Min]", OFFSET(thread_count), ++ AV_OPT_TYPE_INT, {.i64 = 0}, 0, INT_MAX, VE }, ++ ++ { "tier", "Set tier (general_tier_flag)", OFFSET(tier), ++ AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 1, VE, "tier" }, ++ { "main", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, 0, 0, VE, "tier" }, ++ { "high", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, 0, 0, VE, "tier" }, ++ ++ { "tune", "Quality tuning mode", OFFSET(tune), AV_OPT_TYPE_INT, { .i64 = 1 }, 0, 2, VE, "tune" }, ++ { "sq", "Visually optimized mode", 0, ++ AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "tune" }, ++ { "oq", "PSNR / SSIM optimized mode", 0, ++ AV_OPT_TYPE_CONST, { .i64 = 1 }, INT_MIN, INT_MAX, VE, "tune" }, ++ { "vmaf", "VMAF optimized mode", 0, ++ AV_OPT_TYPE_CONST, { .i64 = 2 }, INT_MIN, INT_MAX, VE, "tune" }, ++ { "hdr", "High dynamic range input (HDR10)", OFFSET(high_dynamic_range), AV_OPT_TYPE_INT, { .i64 = 0}, 0, 1, VE, "hdr" }, ++ { "umv", "Enables or disables unrestricted motion vectors", OFFSET(unrestricted_motion_vector), ++ AV_OPT_TYPE_BOOL, { .i64 = 1 }, 0, 1, VE }, ++ { "tile_row_cnt", "tile count in the row", OFFSET(tile_row_count), AV_OPT_TYPE_INT, { .i64 = 1 }, 1, 16, VE }, ++ { "tile_col_cnt", "tile count in the column", OFFSET(tile_col_count), AV_OPT_TYPE_INT, { .i64 = 1 }, 1, 16, VE }, ++ { "tile_slice_mode", "per slice per tile, only valid for multi-tile", OFFSET(tile_slice_mode), ++ AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, ++ { "pred_struct", "The prediction structure", OFFSET(pred_struct), AV_OPT_TYPE_INT, { .i64 = 2 }, 0, 2, VE }, ++ { "vid_info", "Enables or disables sending a vui structure in the HEVC Elementary bitstream.", OFFSET(vid_info), ++ AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, ++ {NULL}, ++}; ++ ++static const AVClass class = { ++ .class_name = "libsvt_hevc", ++ .item_name = av_default_item_name, ++ .option = options, ++ .version = LIBAVUTIL_VERSION_INT, ++}; ++ ++static const FFCodecDefault eb_enc_defaults[] = { ++ { "b", "7M" }, ++ { "qmin", "10" }, ++ { "qmax", "48" }, ++ { "g", "-2" }, ++ { NULL }, ++}; ++ ++const FFCodec ff_libsvt_hevc_encoder = { ++ .p.name = "libsvt_hevc", ++ .p.long_name = NULL_IF_CONFIG_SMALL("SVT-HEVC(Scalable Video Technology for HEVC) encoder"), ++ .priv_data_size = sizeof(SvtContext), ++ .p.type = AVMEDIA_TYPE_VIDEO, ++ .p.id = AV_CODEC_ID_HEVC, ++ .init = eb_enc_init, ++ FF_CODEC_ENCODE_CB(eb_encode_frame), ++ .close = eb_enc_close, ++ .p.capabilities = AV_CODEC_CAP_DELAY, ++ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, ++ AV_PIX_FMT_YUV420P10, ++ AV_PIX_FMT_YUV422P, ++ AV_PIX_FMT_YUV422P10, ++ AV_PIX_FMT_YUV444P, ++ AV_PIX_FMT_YUV444P10, ++ AV_PIX_FMT_NONE }, ++ .p.priv_class = &class, ++ .defaults = eb_enc_defaults, ++ .caps_internal = FF_CODEC_CAP_INIT_CLEANUP, ++ .p.wrapper_name = "libsvt_hevc", ++}; +-- +2.43.0 + diff --git a/multimedia/compat-ffmpeg6/0001-revert-librsvg-bump.patch b/multimedia/compat-ffmpeg6/0001-revert-librsvg-bump.patch new file mode 100644 index 0000000..5f9158b --- /dev/null +++ b/multimedia/compat-ffmpeg6/0001-revert-librsvg-bump.patch @@ -0,0 +1,162 @@ +From: Martin Storsjö +Date: Tue, 17 Oct 2023 11:27:17 +0000 (+0300) +Subject: aarch64: Reindent all assembly to 8/24 column indentation +X-Git-Tag: n6.1~77 +X-Git-Url: http://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/a76b409dd030a461b0c5dd1ead8b22d1be560afd?hp=86ed68420d3b60439d0b7767c53d0fdc1deb7277 + +aarch64: Reindent all assembly to 8/24 column indentation + +libavcodec/aarch64/vc1dsp_neon.S is skipped here, as it intentionally +uses a layered indentation style to visually show how different +unrolled/interleaved phases fit together. + +Signed-off-by: Martin Storsjö +--- + +diff --git a/configure b/configure +index edbd8bf021..953104150f 100755 +--- a/configure ++++ b/configure +@@ -6786,7 +6786,7 @@ enabled libpulse && require_pkg_config libpulse libpulse pulse/pulseaud + enabled librabbitmq && require_pkg_config librabbitmq "librabbitmq >= 0.7.1" amqp.h amqp_new_connection + enabled librav1e && require_pkg_config librav1e "rav1e >= 0.5.0" rav1e.h rav1e_context_new + enabled librist && require_pkg_config librist "librist >= 0.2.7" librist/librist.h rist_receiver_create +-enabled librsvg && require_pkg_config librsvg librsvg-2.0 librsvg-2.0/librsvg/rsvg.h rsvg_handle_new_from_data ++enabled librsvg && require_pkg_config librsvg librsvg-2.0 librsvg-2.0/librsvg/rsvg.h rsvg_handle_render_cairo + enabled librtmp && require_pkg_config librtmp librtmp librtmp/rtmp.h RTMP_Socket + enabled librubberband && require_pkg_config librubberband "rubberband >= 1.8.1" rubberband/rubberband-c.h rubberband_new -lstdc++ && append librubberband_extralibs "-lstdc++" + enabled libshaderc && require_pkg_config spirv_compiler "shaderc >= 2019.1" shaderc/shaderc.h shaderc_compiler_initialize +diff --git a/libavcodec/librsvgdec.c b/libavcodec/librsvgdec.c +index c328fbc774..2f160edcdf 100644 +--- a/libavcodec/librsvgdec.c ++++ b/libavcodec/librsvgdec.c +@@ -38,75 +38,48 @@ static int librsvg_decode_frame(AVCodecContext *avctx, AVFrame *frame, + { + int ret; + LibRSVGContext *s = avctx->priv_data; +- RsvgHandle *handle = NULL; +- RsvgDimensionData dimensions; +-#if LIBRSVG_MAJOR_VERSION > 2 || LIBRSVG_MAJOR_VERSION == 2 && LIBRSVG_MINOR_VERSION >= 52 +- RsvgRectangle viewport = { 0 }; +-#else +- RsvgDimensionData unscaled_dimensions; +-#endif +- cairo_surface_t *image = NULL; ++ ++ RsvgHandle *handle; ++ RsvgDimensionData unscaled_dimensions, dimensions; ++ cairo_surface_t *image; + cairo_t *crender = NULL; + GError *error = NULL; +- gboolean gret; + + *got_frame = 0; + + handle = rsvg_handle_new_from_data(pkt->data, pkt->size, &error); + if (error) { +- av_log(avctx, AV_LOG_ERROR, "Error parsing svg: %s\n", error->message); +- ret = AVERROR_INVALIDDATA; +- goto end; ++ av_log(avctx, AV_LOG_ERROR, "Error parsing svg!\n"); ++ g_error_free(error); ++ return AVERROR_INVALIDDATA; + } + +-#if LIBRSVG_MAJOR_VERSION > 2 || LIBRSVG_MAJOR_VERSION == 2 && LIBRSVG_MINOR_VERSION >= 52 +- gret = rsvg_handle_get_intrinsic_size_in_pixels(handle, &viewport.width, &viewport.height); +- if (!gret) { +- viewport.width = s->width ? s->width : 100; +- viewport.height = s->height ? s->height : 100; +- } +- dimensions.width = (int)viewport.width; +- dimensions.height = (int)viewport.height; +-#else + rsvg_handle_get_dimensions(handle, &dimensions); + rsvg_handle_get_dimensions(handle, &unscaled_dimensions); +-#endif + dimensions.width = s->width ? s->width : dimensions.width; + dimensions.height = s->height ? s->height : dimensions.height; + if (s->keep_ar && (s->width || s->height)) { +-#if LIBRSVG_MAJOR_VERSION > 2 || LIBRSVG_MAJOR_VERSION == 2 && LIBRSVG_MINOR_VERSION >= 52 +- double default_ar = viewport.width / viewport.height; +-#else + double default_ar = unscaled_dimensions.width/(double)unscaled_dimensions.height; +-#endif + if (!s->width) + dimensions.width = lrintf(dimensions.height * default_ar); + else + dimensions.height = lrintf(dimensions.width / default_ar); + } + +- ret = ff_set_dimensions(avctx, dimensions.width, dimensions.height); +- if (ret < 0) +- goto end; +- ++ if ((ret = ff_set_dimensions(avctx, dimensions.width, dimensions.height))) ++ return ret; + avctx->pix_fmt = AV_PIX_FMT_RGB32; +- viewport.width = dimensions.width; +- viewport.height = dimensions.height; +- +- ret = ff_get_buffer(avctx, frame, 0); +- if (ret < 0) +- goto end; + ++ if ((ret = ff_get_buffer(avctx, frame, 0))) ++ return ret; + frame->pict_type = AV_PICTURE_TYPE_I; + frame->flags |= AV_FRAME_FLAG_KEY; + + image = cairo_image_surface_create_for_data(frame->data[0], CAIRO_FORMAT_ARGB32, + frame->width, frame->height, + frame->linesize[0]); +- if (cairo_surface_status(image) != CAIRO_STATUS_SUCCESS) { +- ret = AVERROR_EXTERNAL; +- goto end; +- } ++ if (cairo_surface_status(image) != CAIRO_STATUS_SUCCESS) ++ return AVERROR_INVALIDDATA; + + crender = cairo_create(image); + +@@ -115,34 +88,18 @@ static int librsvg_decode_frame(AVCodecContext *avctx, AVFrame *frame, + cairo_paint(crender); + cairo_restore(crender); + +-#if LIBRSVG_MAJOR_VERSION > 2 || LIBRSVG_MAJOR_VERSION == 2 && LIBRSVG_MINOR_VERSION >= 52 +- gret = rsvg_handle_render_document(handle, crender, &viewport, &error); +-#else + cairo_scale(crender, dimensions.width / (double)unscaled_dimensions.width, + dimensions.height / (double)unscaled_dimensions.height); +- gret = rsvg_handle_render_cairo(handle, crender); +-#endif + +- if (!gret) { +- av_log(avctx, AV_LOG_ERROR, "Error rendering svg: %s\n", error ? error->message : "unknown error"); +- ret = AVERROR_EXTERNAL; +- goto end; +- } ++ rsvg_handle_render_cairo(handle, crender); ++ ++ cairo_destroy(crender); ++ cairo_surface_destroy(image); ++ g_object_unref(handle); + + *got_frame = 1; +- ret = 0; + +-end: +- if (error) +- g_error_free(error); +- if (handle) +- g_object_unref(handle); +- if (crender) +- cairo_destroy(crender); +- if (image) +- cairo_surface_destroy(image); +- +- return ret; ++ return 0; + } + + #define OFFSET(x) offsetof(LibRSVGContext, x) diff --git a/multimedia/compat-ffmpeg6/0002-doc-Add-libsvt_hevc-encoder-docs.patch b/multimedia/compat-ffmpeg6/0002-doc-Add-libsvt_hevc-encoder-docs.patch new file mode 100644 index 0000000..0fd2b4a --- /dev/null +++ b/multimedia/compat-ffmpeg6/0002-doc-Add-libsvt_hevc-encoder-docs.patch @@ -0,0 +1,201 @@ +From 6b0a4fd63454e3c2185efe741e50e80df5c9a4a4 Mon Sep 17 00:00:00 2001 +From: Jing Sun +Date: Tue, 5 Mar 2019 15:04:58 +0800 +Subject: [PATCH 2/2] doc: Add libsvt_hevc encoder docs + +Add docs for libsvt_hevc encoder in encoders.texi and general.texi + +Signed-off-by: Jun Zhao +Signed-off-by: Zhengxu Huang +Signed-off-by: Hassene Tmar +Signed-off-by: Jing Sun +--- + doc/encoders.texi | 152 ++++++++++++++++++++++++++++++++++++++ + doc/general_contents.texi | 8 ++ + 2 files changed, 160 insertions(+) + +diff --git a/doc/encoders.texi b/doc/encoders.texi +index a92eb0eb2f..535e15764b 100644 +--- a/doc/encoders.texi ++++ b/doc/encoders.texi +@@ -1884,6 +1884,158 @@ Set maximum NAL size in bytes. + Allow skipping frames to hit the target bitrate if set to 1. + @end table + ++@section libsvt_hevc ++ ++Scalable Video Technology for HEVC (SVT-HEVC) encoder wrapper. ++ ++This encoder requires the presence of the headers and ++library during configuration. You need to explicitly configure the ++build with @code{--enable-libsvthevc}. The library is detected using ++@command{pkg-config}. ++ ++For more information about the library see ++@url{https://github.com/intel/SVT-HEVC.git}. ++ ++@subsection Options ++ ++The following FFmpeg global options affect the configurations of the ++libsvt_hevc encoder: ++ ++@table @option ++@item b (@emph{bitrate}) ++Set the bitrate (as a number of bits per second). Default is 7M. ++ ++@item g / @option{gop_size} ++Set the GOP size. Default is -2 (unspecified). ++ ++@item flags +cgop ++Enable closed GOP. ++ ++@item qmin (@emph{min-q}) ++Default is 10 ++ ++@item qmax (@emph{max-q}) ++Default is 48 ++ ++Set minimum/maximum quantisation values. Valid range is from 0 to 51 ++(Only used when bit rate control mode @option{rc} is set to 1(vbr) mode. ++It is required that qmax >= qmin). ++ ++@item profile (@emph{profile}) ++Set profile restrictions. Can assume one of the following possible values: ++ ++@table @samp ++@item main ++main profile ++@item main10 ++main10 profile ++@item rext ++rext profile ++@end table ++ ++Default is 1 (main). ++ ++@item level (@emph{level}) ++ ++@option{level} sets the value of @emph{level}. ++Set level (level_idc). Default is 0 (to be determined by the encoder). ++ ++@end table ++ ++The encoder also has its own specific options: ++ ++@table @option ++@item aud (@emph{aud}) ++Enable use of access unit delimiters when set to 1. Default is 0 (Off). ++ ++@item hielevel ++Set hierarchical levels. Can assume one of the following possible values: ++ ++@table @samp ++@item flat ++flat more ++@item 1 level ++Minigop size is 2^1 ++@item 2 level ++Minigop size is 2^2 ++@item 3 level ++Minigop size is 2^3 ++@end table ++ ++Default is 3 level. ++ ++@item la_depth ++Set look-ahead depth, depending on @option{rc}: for @var{vbr}, it's recommended ++to unset it and use the default value (the intra period); for @var{cqp}, better ++specify the look-ahead depth. ++ ++The range is @var{-1-256}. Default is -1 (unset and the default value to be used). ++ ++@item preset ++Set the quality vs density tradeoff point at which the encoding is to be performed. ++Higher perset value, higher density and lower quality. ++ ++The range is @var{0-12}. Default is 9. ++ ++@item tier ++Set @emph{general_tier_flag}. This may affect the level chosen for the stream ++if it is not explicitly specified. Can assume one of the following possible values: ++ ++@item socket ++Target CPU socket to use. 0 or 1 are supported. -1 use all available (default) ++ ++@table @samp ++@item main ++main tier ++@item high ++high tier ++@end table ++ ++Default is 1 (main). ++ ++@item rc ++Set bit rate control mode. Can assume one of the following possible values: ++ ++@table @samp ++@item cqp ++Constant QP (CQP) mode ++@item vbr ++Variable Bit Rate (VBR) mode ++@end table ++ ++Default is 0 (cqp). ++ ++@item forced_idr ++Force keyframes to be IDR if set to >=0 (the value sets headers insertion interval). Default is -1 (CRA). ++ ++@item asm_type ++Auto select highest supported asm if set to 1 or C only if 0. Default is 1. ++ ++@item qp ++Initial quantization parameter for the intra pictures used when ++@option{rc} is cqp mode. The range is from @var{0-51}. Default is 32. ++ ++@item sc_detection ++Enables or disables the scene change detection algorithm. Default is 0 (disabled). ++ ++@item tune ++Set quality tuning mode. Can assume one of the following possible values: ++ ++@table @samp ++@item sq ++Visually optimized mode ++@item oq ++PSNR / SSIM optimized mode ++@item vmaf ++VMAF optimized mode ++@end table ++ ++Default is 1 (oq). ++ ++@item bl_mode ++Enables or disables Random Access Prediction. Default is 0 (disabled). ++@end table ++ + @section libtheora + + libtheora Theora encoder wrapper. +diff --git a/doc/general_contents.texi b/doc/general_contents.texi +index 33ece6e884..cd46332fc4 100644 +--- a/doc/general_contents.texi ++++ b/doc/general_contents.texi +@@ -267,6 +267,14 @@ Go to @url{https://github.com/OpenVisualCloud/SVT-AV1/} and follow the instructi + for installing the library. Then pass @code{--enable-libsvtav1} to configure to + enable it. + ++@section Scalable Video Technology for HEVC ++ ++FFmpeg can make use of the SVT-HEVC library for HEVC encoding. ++ ++Go to @url{https://github.com/intel/SVT-HEVC.git} and follow the instructions ++for installing the library. Pass @code{--enable-libsvthevc} to configure to ++enable it. ++ + @section TwoLAME + + FFmpeg can make use of the TwoLAME library for MP2 encoding. +-- +1.8.3.1 + diff --git a/multimedia/compat-ffmpeg6/030-ffmpeg-add-svt-vp9.patch b/multimedia/compat-ffmpeg6/030-ffmpeg-add-svt-vp9.patch new file mode 100644 index 0000000..2b11490 --- /dev/null +++ b/multimedia/compat-ffmpeg6/030-ffmpeg-add-svt-vp9.patch @@ -0,0 +1,788 @@ +From add426a72d980a3037333c43cf91b46d8616436e Mon Sep 17 00:00:00 2001 +From: hassene +Date: Sun, 21 May 2023 17:54:03 -0400 +Subject: [PATCH] Add ability for ffmpeg to run svt vp9 + +Signed-off-by: hassene +Signed-off-by: Jing Sun +Signed-off-by: Austin Hu +Signed-off-by: Andrei Bich +Signed-off-by: Guo Jiansheng +Co-Authored-By: Fredrick R. Brennan +--- + configure | 4 + + libavcodec/Makefile | 1 + + libavcodec/allcodecs.c | 1 + + libavcodec/libsvt_vp9.c | 700 ++++++++++++++++++++++++++++++++++++++++ + 4 files changed, 706 insertions(+) + create mode 100644 libavcodec/libsvt_vp9.c + +diff --git a/configure b/configure +index a54398c57f..dd7607731f 100755 +--- a/configure ++++ b/configure +@@ -289,6 +289,7 @@ External library support: + --enable-libvorbis enable Vorbis en/decoding via libvorbis, + native implementation exists [no] + --enable-libvpx enable VP8 and VP9 de/encoding via libvpx [no] ++ --enable-libsvtvp9 enable VP9 encoding via svt [no] + --enable-libwebp enable WebP encoding via libwebp [no] + --enable-libx264 enable H.264 encoding via x264 [no] + --enable-libx265 enable HEVC encoding via x265 [no] +@@ -1848,6 +1849,7 @@ EXTERNAL_LIBRARY_LIST=" + libshaderc + libshine + libsmbclient ++ libsvtvp9 + libsnappy + libsoxr + libspeex +@@ -3390,6 +3392,7 @@ libvpx_vp8_decoder_deps="libvpx" + libvpx_vp8_encoder_deps="libvpx" + libvpx_vp9_decoder_deps="libvpx" + libvpx_vp9_encoder_deps="libvpx" ++libsvt_vp9_encoder_deps="libsvtvp9" + libwebp_encoder_deps="libwebp" + libwebp_anim_encoder_deps="libwebp" + libx262_encoder_deps="libx262" +@@ -6727,6 +6730,7 @@ enabled libvpx && { + fi + } + ++enabled libsvtvp9 && require_pkg_config libsvtvp9 SvtVp9Enc EbSvtVp9Enc.h eb_vp9_svt_init_handle + enabled libwebp && { + enabled libwebp_encoder && require_pkg_config libwebp "libwebp >= 0.2.0" webp/encode.h WebPGetEncoderVersion + enabled libwebp_anim_encoder && check_pkg_config libwebp_anim_encoder "libwebpmux >= 0.4.0" webp/mux.h WebPAnimEncoderOptionsInit; } +diff --git a/libavcodec/Makefile b/libavcodec/Makefile +index 9c38240025..1984cb970c 100644 +--- a/libavcodec/Makefile ++++ b/libavcodec/Makefile +@@ -1128,6 +1128,7 @@ OBJS-$(CONFIG_LIBVPX_VP8_DECODER) += libvpxdec.o + OBJS-$(CONFIG_LIBVPX_VP8_ENCODER) += libvpxenc.o + OBJS-$(CONFIG_LIBVPX_VP9_DECODER) += libvpxdec.o + OBJS-$(CONFIG_LIBVPX_VP9_ENCODER) += libvpxenc.o ++OBJS-$(CONFIG_LIBSVT_VP9_ENCODER) += libsvt_vp9.o + OBJS-$(CONFIG_LIBWEBP_ENCODER) += libwebpenc_common.o libwebpenc.o + OBJS-$(CONFIG_LIBWEBP_ANIM_ENCODER) += libwebpenc_common.o libwebpenc_animencoder.o + OBJS-$(CONFIG_LIBX262_ENCODER) += libx264.o +diff --git a/libavcodec/allcodecs.c b/libavcodec/allcodecs.c +index 184bb8521f..bda526f755 100644 +--- a/libavcodec/allcodecs.c ++++ b/libavcodec/allcodecs.c +@@ -801,6 +801,7 @@ extern const FFCodec ff_libvpx_vp8_encoder; + extern const FFCodec ff_libvpx_vp8_decoder; + extern FFCodec ff_libvpx_vp9_encoder; + extern const FFCodec ff_libvpx_vp9_decoder; ++extern const FFCodec ff_libsvt_vp9_encoder; + /* preferred over libwebp */ + extern const FFCodec ff_libwebp_anim_encoder; + extern const FFCodec ff_libwebp_encoder; +diff --git a/libavcodec/libsvt_vp9.c b/libavcodec/libsvt_vp9.c +new file mode 100644 +index 0000000000..5f99367924 +--- /dev/null ++++ b/libavcodec/libsvt_vp9.c +@@ -0,0 +1,700 @@ ++/* ++* Scalable Video Technology for VP9 encoder library plugin ++* ++* Copyright (c) 2018 Intel Corporation ++* ++* This file is part of FFmpeg. ++* ++* FFmpeg is free software; you can redistribute it and/or ++* modify it under the terms of the GNU Lesser General Public ++* License as published by the Free Software Foundation; either ++* version 2.1 of the License, or (at your option) any later version. ++* ++* FFmpeg is distributed in the hope that it will be useful, ++* but WITHOUT ANY WARRANTY; without even the implied warranty of ++* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++* Lesser General Public License for more details. ++* ++* You should have received a copy of the GNU Lesser General Public ++* License along with this program; if not, write to the Free Software ++* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++*/ ++ ++#include ++#include "EbSvtVp9ErrorCodes.h" ++#include "EbSvtVp9Enc.h" ++ ++#include "libavutil/common.h" ++#include "libavutil/frame.h" ++#include "libavutil/opt.h" ++#include "libavcodec/get_bits.h" ++ ++#include "codec_internal.h" ++#include "internal.h" ++#include "encode.h" ++#include "avcodec.h" ++ ++#define SUPERFRAME_INDEX_MAX_SIZE 128 ++ ++#define RECIVED_FRAMES_MAX_SIZE 32 ++#define MAX_VP9_SUPERFRAME_SIZE 8 ++ ++typedef enum eos_status { ++ EOS_NOT_REACHED = 0, ++ EOS_REACHED, ++ EOS_TOTRIGGER ++}EOS_STATUS; ++ ++typedef struct SvtReceivedFrameStruct { ++ // fields for AVPacket ++ AVBufferRef *buf; ++ int64_t pts; ++ int64_t dts; ++ int size; ++ int flags; ++ ++ // svt fields: ++ int ready_flag; // frame or superframe in data is visible ++ int frames_count; ++ int frames_sizes[MAX_VP9_SUPERFRAME_SIZE]; ++} SvtReceivedFrameStruct; ++ ++typedef struct SvtContext { ++ AVClass *class; ++ ++ EbSvtVp9EncConfiguration enc_params; ++ EbComponentType *svt_handle; ++ ++ EbBufferHeaderType *in_buf; ++ int raw_size; ++ ++ AVFrame *frame; ++ ++ AVBufferPool* pool; ++ ++ EOS_STATUS eos_flag; ++ ++ // User options. ++ int enc_mode; ++ int rc_mode; ++ int tune; ++ int qp; ++ ++ int target_socket; ++ ++ int forced_idr; ++ ++ int level; ++ ++ int base_layer_switch_mode; ++ ++ ++ int64_t last_ready_dts; ++ SvtReceivedFrameStruct received_frames[RECIVED_FRAMES_MAX_SIZE]; ++ int received_frames_size; ++} SvtContext; ++ ++static int error_mapping(EbErrorType svt_ret) ++{ ++ int err; ++ ++ switch (svt_ret) { ++ case EB_ErrorInsufficientResources: ++ err = AVERROR(ENOMEM); ++ break; ++ ++ case EB_ErrorUndefined: ++ case EB_ErrorInvalidComponent: ++ case EB_ErrorBadParameter: ++ err = AVERROR(EINVAL); ++ break; ++ ++ case EB_ErrorDestroyThreadFailed: ++ case EB_ErrorSemaphoreUnresponsive: ++ case EB_ErrorDestroySemaphoreFailed: ++ case EB_ErrorCreateMutexFailed: ++ case EB_ErrorMutexUnresponsive: ++ case EB_ErrorDestroyMutexFailed: ++ err = AVERROR_EXTERNAL; ++ break; ++ ++ case EB_NoErrorEmptyQueue: ++ err = AVERROR(EAGAIN); ++ ++ case EB_ErrorNone: ++ err = 0; ++ break; ++ ++ default: ++ err = AVERROR_UNKNOWN; ++ } ++ ++ return err; ++} ++ ++static void free_buffer(SvtContext *svt_enc) ++{ ++ if (svt_enc->in_buf) { ++ EbSvtEncInput *in_data = (EbSvtEncInput *)svt_enc->in_buf->p_buffer; ++ av_freep(&in_data); ++ av_freep(&svt_enc->in_buf); ++ } ++ av_buffer_pool_uninit(&svt_enc->pool); ++} ++ ++static int alloc_buffer(EbSvtVp9EncConfiguration *config, SvtContext *svt_enc) ++{ ++ const size_t luma_size_8bit = ++ config->source_width * config->source_height; ++ const size_t luma_size_10bit = ++ (config->encoder_bit_depth > 8) ? luma_size_8bit : 0; ++ ++ EbSvtEncInput *in_data; ++ ++ svt_enc->raw_size = ((luma_size_8bit + luma_size_10bit) * 3 / 2) * MAX_VP9_SUPERFRAME_SIZE + SUPERFRAME_INDEX_MAX_SIZE; ++ ++ // allocate buffer for in and out ++ svt_enc->in_buf = av_mallocz(sizeof(*svt_enc->in_buf)); ++ if (!svt_enc->in_buf) ++ goto failed; ++ ++ ++ svt_enc->in_buf->p_buffer = (unsigned char *)av_mallocz(sizeof(*in_data)); ++ if (!svt_enc->in_buf->p_buffer) ++ goto failed; ++ ++ svt_enc->in_buf->size = sizeof(*svt_enc->in_buf); ++ svt_enc->in_buf->p_app_private = NULL; ++ ++ svt_enc->pool = av_buffer_pool_init(svt_enc->raw_size, NULL); ++ if (!svt_enc->pool) ++ goto failed; ++ ++ svt_enc->received_frames_size = 0; ++ svt_enc->last_ready_dts = -1e9; ++ ++ return 0; ++ ++failed: ++ free_buffer(svt_enc); ++ return AVERROR(ENOMEM); ++} ++ ++static int config_enc_params(EbSvtVp9EncConfiguration *param, ++ AVCodecContext *avctx) ++{ ++ SvtContext *svt_enc = avctx->priv_data; ++ int ret; ++ int ten_bits = 0; ++ ++ param->source_width = avctx->width; ++ param->source_height = avctx->height; ++ ++ if (avctx->pix_fmt == AV_PIX_FMT_YUV420P10LE) { ++ av_log(avctx, AV_LOG_DEBUG , "Encoder 10 bits depth input\n"); ++ // Disable Compressed 10-bit format default ++ ten_bits = 1; ++ } ++ ++ // Update param from options ++ param->enc_mode = svt_enc->enc_mode; ++ param->level = svt_enc->level; ++ param->rate_control_mode = svt_enc->rc_mode; ++ param->tune = svt_enc->tune; ++ param->base_layer_switch_mode = svt_enc->base_layer_switch_mode; ++ param->qp = svt_enc->qp; ++ param->target_socket = svt_enc->target_socket; ++ param->target_bit_rate = avctx->bit_rate; ++ if (avctx->gop_size > 0) ++ param->intra_period = avctx->gop_size - 1; ++ ++ if (avctx->framerate.num > 0 && avctx->framerate.den > 0) { ++ param->frame_rate_numerator = avctx->framerate.num; ++ param->frame_rate_denominator = avctx->framerate.den * avctx->ticks_per_frame; ++ } else { ++ param->frame_rate_numerator = avctx->time_base.den; ++ param->frame_rate_denominator = avctx->time_base.num * avctx->ticks_per_frame; ++ } ++ ++ if (param->rate_control_mode) { ++ param->max_qp_allowed = avctx->qmax; ++ param->min_qp_allowed = avctx->qmin; ++ } ++ ++ if (ten_bits) { ++ param->encoder_bit_depth = 10; ++ } ++ ++ ret = alloc_buffer(param, svt_enc); ++ ++ return ret; ++} ++ ++static void read_in_data(EbSvtVp9EncConfiguration *config, ++ const AVFrame *frame, ++ EbBufferHeaderType *headerPtr) ++{ ++ uint8_t is16bit = config->encoder_bit_depth > 8; ++ uint64_t luma_size = ++ (uint64_t)config->source_width * config->source_height<< is16bit; ++ EbSvtEncInput *in_data = (EbSvtEncInput *)headerPtr->p_buffer; ++ ++ // support yuv420p and yuv420p010 ++ in_data->luma = frame->data[0]; ++ in_data->cb = frame->data[1]; ++ in_data->cr = frame->data[2]; ++ ++ // stride info ++ in_data->y_stride = frame->linesize[0] >> is16bit; ++ in_data->cb_stride = frame->linesize[1] >> is16bit; ++ in_data->cr_stride = frame->linesize[2] >> is16bit; ++ ++ headerPtr->n_filled_len += luma_size * 3/2u; ++} ++ ++static av_cold int eb_enc_init(AVCodecContext *avctx) ++{ ++ SvtContext *svt_enc = avctx->priv_data; ++ EbErrorType svt_ret; ++ ++ svt_enc->eos_flag = EOS_NOT_REACHED; ++ ++ svt_ret = eb_vp9_svt_init_handle(&svt_enc->svt_handle, svt_enc, &svt_enc->enc_params); ++ if (svt_ret != EB_ErrorNone) { ++ av_log(avctx, AV_LOG_ERROR, "Error init encoder handle\n"); ++ goto failed; ++ } ++ ++ svt_ret = config_enc_params(&svt_enc->enc_params, avctx); ++ if (svt_ret != EB_ErrorNone) { ++ av_log(avctx, AV_LOG_ERROR, "Error configure encoder parameters\n"); ++ goto failed_init_handle; ++ } ++ ++ svt_ret = eb_vp9_svt_enc_set_parameter(svt_enc->svt_handle, &svt_enc->enc_params); ++ if (svt_ret != EB_ErrorNone) { ++ av_log(avctx, AV_LOG_ERROR, "Error setting encoder parameters\n"); ++ goto failed_init_handle; ++ } ++ ++ svt_ret = eb_vp9_init_encoder(svt_enc->svt_handle); ++ if (svt_ret != EB_ErrorNone) { ++ av_log(avctx, AV_LOG_ERROR, "Error init encoder\n"); ++ goto failed_init_handle; ++ } ++ ++ svt_enc->frame = av_frame_alloc(); ++ if (!svt_enc->frame) ++ return AVERROR(ENOMEM); ++ ++ // if (avctx->flags & AV_CODEC_FLAG_GLOBAL_HEADER) { ++ // EbBufferHeaderType* headerPtr; ++ // headerPtr->size = sizeof(headerPtr); ++ // headerPtr->n_filled_len = 0; /* in/out */ ++ // headerPtr->p_buffer = av_malloc(10 * 1024 * 1024); ++ // headerPtr->n_alloc_len = (10 * 1024 * 1024); ++ // ++ // if (!headerPtr->p_buffer) { ++ // av_log(avctx, AV_LOG_ERROR, ++ // "Cannot allocate buffer size %d.\n", headerPtr->n_alloc_len); ++ // svt_ret = EB_ErrorInsufficientResources; ++ // goto failed_init_enc; ++ // } ++ // ++ // svt_ret = eb_svt_enc_stream_header(svt_enc->svt_handle, &headerPtr); ++ // if (svt_ret != EB_ErrorNone) { ++ // av_log(avctx, AV_LOG_ERROR, "Error when build stream header.\n"); ++ // av_freep(&headerPtr->p_buffer); ++ // goto failed_init_enc; ++ // } ++ // ++ // avctx->extradata_size = headerPtr->n_filled_len; ++ // avctx->extradata = av_mallocz(avctx->extradata_size + AV_INPUT_BUFFER_PADDING_SIZE); ++ // if (!avctx->extradata) { ++ // av_log(avctx, AV_LOG_ERROR, ++ // "Cannot allocate VP9 header of size %d.\n", avctx->extradata_size); ++ // av_freep(&headerPtr->p_buffer); ++ // svt_ret = EB_ErrorInsufficientResources; ++ // goto failed_init_enc; ++ // } ++ // memcpy(avctx->extradata, headerPtr->p_buffer, avctx->extradata_size); ++ // ++ // av_freep(&headerPtr->p_buffer); ++ // } ++ return 0; ++ ++//failed_init_enc: ++// eb_deinit_encoder(svt_enc->svt_handle); ++failed_init_handle: ++ eb_vp9_deinit_handle(svt_enc->svt_handle); ++failed: ++ free_buffer(svt_enc); ++ return error_mapping(svt_ret); ++} ++ ++static int eb_send_frame(AVCodecContext *avctx, const AVFrame *frame) ++{ ++ SvtContext *svt_enc = avctx->priv_data; ++ EbBufferHeaderType *headerPtr = svt_enc->in_buf; ++ ++ if (!frame) { ++ if (svt_enc->eos_flag == EOS_REACHED) ++ return 0; ++ ++ EbBufferHeaderType headerPtrLast; ++ headerPtrLast.n_alloc_len = 0; ++ headerPtrLast.n_filled_len = 0; ++ headerPtrLast.n_tick_count = 0; ++ headerPtrLast.p_app_private = NULL; ++ headerPtrLast.p_buffer = NULL; ++ headerPtrLast.flags = EB_BUFFERFLAG_EOS; ++ ++ eb_vp9_svt_enc_send_picture(svt_enc->svt_handle, &headerPtrLast); ++ svt_enc->eos_flag = EOS_REACHED; ++ av_log(avctx, AV_LOG_DEBUG, "Finish sending frames!!!\n"); ++ return 0; ++ } ++ ++ read_in_data(&svt_enc->enc_params, frame, headerPtr); ++ ++ headerPtr->flags = 0; ++ headerPtr->p_app_private = NULL; ++ headerPtr->pts = frame->pts; ++ switch (frame->pict_type) { ++ case AV_PICTURE_TYPE_I: ++ headerPtr->pic_type = svt_enc->forced_idr > 0 ? EB_IDR_PICTURE : EB_I_PICTURE; ++ break; ++ case AV_PICTURE_TYPE_P: ++ headerPtr->pic_type = EB_P_PICTURE; ++ break; ++ case AV_PICTURE_TYPE_B: ++ headerPtr->pic_type = EB_B_PICTURE; ++ break; ++ default: ++ headerPtr->pic_type = EB_INVALID_PICTURE; ++ break; ++ } ++ eb_vp9_svt_enc_send_picture(svt_enc->svt_handle, headerPtr); ++ ++ return 0; ++} ++ ++static int is_frame_visible(uint8_t const* ptr, int size) { ++ GetBitContext gb; ++ int ret, visible, profile; ++ if ((ret = init_get_bits8(&gb, ptr, size)) < 0) { ++ return ret; ++ } ++ ++ // frame marker ++ get_bits(&gb, 2); ++ profile = get_bits1(&gb); ++ profile |= get_bits1(&gb) << 1; ++ ++ // reserved_zero ++ if (profile == 3) profile += get_bits1(&gb); // reserved_zero ++ ++ // read show_existing_frame ++ if (get_bits1(&gb)) { ++ // show_existing_frame == 1 ++ visible = 1; ++ } else { ++ // show_existing_frame == 0 ++ // keyframe (frame_type actually) ++ get_bits1(&gb); ++ // read show_frame ++ visible = get_bits1(&gb) ? 2 : 0; ++ } ++ ++ return visible; ++} ++ ++static int get_received_frame(SvtContext *svt_enc, AVPacket *pkt) { ++ SvtReceivedFrameStruct* rfs = &svt_enc->received_frames[0]; ++ ++ if (svt_enc->received_frames_size == 0 || !rfs->ready_flag) { ++ return AVERROR(EAGAIN); ++ } ++ ++ pkt->buf = rfs->buf; ++ pkt->data = rfs->buf->data; ++ pkt->dts = rfs->dts; ++ pkt->pts = rfs->pts; ++ pkt->flags = rfs->flags; ++ pkt->size = rfs->size; ++ ++ --svt_enc->received_frames_size; ++ for (int i = 0; i < svt_enc->received_frames_size; ++i) { ++ svt_enc->received_frames[i] = svt_enc->received_frames[i + 1]; ++ } ++ ++ return 0; ++} ++ ++static int put_received_frame(AVCodecContext *avctx, uint8_t* data, int size, int keyframe, int64_t dts, int64_t pts) { ++ SvtContext *svt_enc = avctx->priv_data; ++ SvtReceivedFrameStruct* rfs; ++ ++ if (svt_enc->received_frames_size == 0 || svt_enc->received_frames[svt_enc->received_frames_size - 1].ready_flag) { ++ ++svt_enc->received_frames_size; ++ if (svt_enc->received_frames_size > RECIVED_FRAMES_MAX_SIZE) { ++ av_log(avctx, AV_LOG_ERROR, "Fail: svt_enc->received_frames_size > RECIVED_FRAMES_MAX_SIZE \n"); ++ return AVERROR_BUG; ++ } ++ ++ rfs = &svt_enc->received_frames[svt_enc->received_frames_size - 1]; ++ ++ rfs->buf = av_buffer_pool_get(svt_enc->pool); ++ if (!rfs->buf) { ++ av_log(avctx, AV_LOG_ERROR, "Failed to allocate output packet.\n"); ++ return AVERROR(ENOMEM); ++ } ++ ++ rfs->size = 0; ++ rfs->flags = 0; ++ rfs->ready_flag = 0; ++ rfs->frames_count = 0; ++ } else { ++ rfs = &svt_enc->received_frames[svt_enc->received_frames_size - 1]; ++ } ++ ++ rfs->pts = pts; ++ rfs->dts = dts; ++ rfs->flags = (keyframe ? AV_PKT_FLAG_KEY : 0); ++ ++ ++rfs->frames_count; ++ if (rfs->frames_count > MAX_VP9_SUPERFRAME_SIZE) { ++ av_log(avctx, AV_LOG_ERROR, "Fail: rfs->frames_count > MAX_VP9_SUPERFRAME_SIZE \n"); ++ return AVERROR_BUG; ++ } ++ ++ rfs->frames_sizes[rfs->frames_count - 1] = size; ++ ++ memcpy(rfs->buf->data + rfs->size, data, size); ++ rfs->size += size; ++ ++ int visible = is_frame_visible(data, size); ++ if (visible < 0) { ++ av_log(avctx, AV_LOG_ERROR, "Fail: is_frame_visible \n"); ++ return visible; ++ } ++ ++ ++ rfs->ready_flag = visible; ++ ++ if (rfs->ready_flag) { ++ if (rfs->dts <= svt_enc->last_ready_dts) { ++ rfs->dts = svt_enc->last_ready_dts + 1; ++ } ++ svt_enc->last_ready_dts = rfs->dts; ++ ++ } ++ ++ // add superframe_index if needed ++ if (rfs->ready_flag && rfs->frames_count > 1) { ++ // superframe_header: ++ // 110 - superframe_marker ++ // 11 = 3 = bytes_per_framesize_minus_1 - use 4-bytes size ++ // xxx = frames_in_superframe_minus_1 ++ uint8_t header = 0b11011000; ++ header |= (rfs->frames_count - 1) & 0b111; ++ ++ uint8_t* ptr = rfs->buf->data + rfs->size; ++ ++ ptr[0] = header; ++ ++ptr; ++ ++ for (int i = 0; i < rfs->frames_count; ++i) { ++ ptr[0] = (rfs->frames_sizes[i] >> 0) & 0xff; ++ ptr[1] = (rfs->frames_sizes[i] >> 8) & 0xff; ++ ptr[2] = (rfs->frames_sizes[i] >> 16) & 0xff; ++ ptr[3] = (rfs->frames_sizes[i] >> 24) & 0xff; ++ ++ ptr += 4; ++ } ++ ++ ptr[0] = header; ++ ++ptr; ++ ++ rfs->size = ptr - rfs->buf->data; ++ } ++ ++ return 0; ++} ++ ++static int eb_receive_packet(AVCodecContext *avctx, AVPacket *pkt) ++{ ++ SvtContext *svt_enc = avctx->priv_data; ++ EbBufferHeaderType *headerPtr; ++ EbErrorType svt_ret; ++ AVBufferRef *ref; ++ int ret = 0; ++ ++ if (get_received_frame(svt_enc, pkt) == 0) { ++ return 0; ++ } ++ ++ if (EOS_TOTRIGGER == svt_enc->eos_flag) { ++ pkt = NULL; ++ return AVERROR_EOF; ++ } ++ ++ AVFrame *frame = svt_enc->frame; ++ ret = ff_encode_get_frame(avctx, frame); ++ if (ret < 0 && ret != AVERROR_EOF) { ++ return ret; ++ } ++ if (ret == AVERROR_EOF) ++ frame = NULL; ++ ++ ret = eb_send_frame(avctx, frame); ++ if (ret < 0) ++ return ret; ++ av_frame_unref(svt_enc->frame); ++ ++ for (;;) { ++ svt_ret = eb_vp9_svt_get_packet(svt_enc->svt_handle, &headerPtr, svt_enc->eos_flag); ++ if (svt_ret == EB_NoErrorEmptyQueue) { ++ return AVERROR(EAGAIN); ++ } ++ ++ if (EB_BUFFERFLAG_EOS & headerPtr->flags) ++ svt_enc->eos_flag = EOS_TOTRIGGER; ++ ++ ret = 0; ++ ++ // ignore headerPtr->dts on purpose ++ ++ if (headerPtr->flags & EB_BUFFERFLAG_SHOW_EXT) { ++ ret = put_received_frame(avctx, headerPtr->p_buffer, headerPtr->n_filled_len - 4, 0, headerPtr->pts - 3, headerPtr->pts - 3); ++ if (ret != 0) goto end; ++ ret = put_received_frame(avctx, headerPtr->p_buffer + headerPtr->n_filled_len - 4, 1, 0, headerPtr->pts - 2, headerPtr->pts - 2); ++ if (ret != 0) goto end; ++ ret = put_received_frame(avctx, headerPtr->p_buffer + headerPtr->n_filled_len - 3, 1, 0, headerPtr->pts - 1, headerPtr->pts - 1); ++ if (ret != 0) goto end; ++ ret = put_received_frame(avctx, headerPtr->p_buffer + headerPtr->n_filled_len - 2, 1, 0, headerPtr->pts + 0, headerPtr->pts + 0); ++ if (ret != 0) goto end; ++ ret = put_received_frame(avctx, headerPtr->p_buffer + headerPtr->n_filled_len - 1, 1, 0, headerPtr->pts + 1, headerPtr->pts + 1); ++ if (ret != 0) goto end; ++ } else { ++ ret = put_received_frame(avctx, headerPtr->p_buffer, headerPtr->n_filled_len, headerPtr->pic_type == EB_IDR_PICTURE, headerPtr->pts, headerPtr->pts); ++ if (ret != 0) goto end; ++ } ++ ++ ret = get_received_frame(svt_enc, pkt); ++ ++ end: ++ eb_vp9_svt_release_out_buffer(&headerPtr); ++ ++ if (ret == AVERROR(EAGAIN)) { ++ continue; ++ } ++ ++ break; ++ } ++ ++ ++ ++ return ret; ++} ++ ++static av_cold int eb_enc_close(AVCodecContext *avctx) ++{ ++ SvtContext *svt_enc = avctx->priv_data; ++ ++ eb_vp9_deinit_encoder(svt_enc->svt_handle); ++ eb_vp9_deinit_handle(svt_enc->svt_handle); ++ ++ av_frame_free(&svt_enc->frame); ++ ++ free_buffer(svt_enc); ++ ++ return 0; ++} ++ ++#define OFFSET(x) offsetof(SvtContext, x) ++#define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM ++static const AVOption options[] = { ++ { "preset", "Encoding preset [1, 1]", ++ OFFSET(enc_mode), AV_OPT_TYPE_INT, { .i64 = 9 }, 0, 9, VE }, ++ ++ { "level", "Set level (level_idc)", OFFSET(level), ++ AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 0xff, VE, "level" }, ++ ++#define LEVEL(name, value) name, NULL, 0, AV_OPT_TYPE_CONST, \ ++ { .i64 = value }, 0, 0, VE, "level" ++ { LEVEL("1", 10) }, ++ { LEVEL("2", 20) }, ++ { LEVEL("2.1", 21) }, ++ { LEVEL("3", 30) }, ++ { LEVEL("3.1", 31) }, ++ { LEVEL("4", 40) }, ++ { LEVEL("4.1", 41) }, ++ { LEVEL("5", 50) }, ++ { LEVEL("5.1", 51) }, ++ { LEVEL("5.2", 52) }, ++ { LEVEL("6", 60) }, ++ { LEVEL("6.1", 61) }, ++ { LEVEL("6.2", 62) }, ++#undef LEVEL ++ ++ { "tune", "Tune mode", OFFSET(tune), ++ AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 2, VE , "tune"}, ++ { "vq", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "tune" }, ++ { "ssim", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, INT_MIN, INT_MAX, VE, "tune" }, ++ { "vmaf", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 2 }, INT_MIN, INT_MAX, VE, "tune" }, ++ ++ { "rc", "Bit rate control mode", OFFSET(rc_mode), ++ AV_OPT_TYPE_INT, { .i64 = 0 }, 0, 2, VE , "rc"}, ++ { "cqp", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 0 }, INT_MIN, INT_MAX, VE, "rc" }, ++ { "vbr", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 1 }, INT_MIN, INT_MAX, VE, "rc" }, ++ { "cbr", NULL, 0, AV_OPT_TYPE_CONST, { .i64 = 2 }, INT_MIN, INT_MAX, VE, "rc" }, ++ ++ { "qp", "QP value for intra frames", OFFSET(qp), ++ AV_OPT_TYPE_INT, { .i64 = 32 }, 0, 51, VE }, ++ ++ { "socket", "Target CPU socket to use. -1 use all available", OFFSET(target_socket), ++ AV_OPT_TYPE_INT, { .i64 = -1 }, -1, 1, VE }, ++ ++ { "bl_mode", "Random Access Prediction Structure type setting", OFFSET(base_layer_switch_mode), ++ AV_OPT_TYPE_BOOL, { .i64 = 0 }, 0, 1, VE }, ++ ++ { "forced-idr", "If forcing keyframes, force them as IDR frames.", OFFSET(forced_idr), ++ AV_OPT_TYPE_BOOL, { .i64 = 0 }, -1, 1, VE }, ++ ++ {NULL}, ++}; ++ ++static const AVClass class = { ++ .class_name = "libsvt_vp9", ++ .item_name = av_default_item_name, ++ .option = options, ++ .version = LIBAVUTIL_VERSION_INT, ++}; ++ ++static const FFCodecDefault eb_enc_defaults[] = { ++ { "b", "7M" }, ++ { "flags", "-cgop" }, ++ { "qmin", "10" }, ++ { "qmax", "48" }, ++ { NULL }, ++}; ++ ++FFCodec ff_libsvt_vp9_encoder = { ++ .p.name = "libsvt_vp9", ++ .p.long_name = NULL_IF_CONFIG_SMALL("SVT-VP9(Scalable Video Technology for VP9) encoder"), ++ .priv_data_size = sizeof(SvtContext), ++ .p.type = AVMEDIA_TYPE_VIDEO, ++ .p.id = AV_CODEC_ID_VP9, ++ .init = eb_enc_init, ++ FF_CODEC_RECEIVE_PACKET_CB(eb_receive_packet), ++ .close = eb_enc_close, ++ .p.capabilities = AV_CODEC_CAP_DELAY | AV_CODEC_CAP_OTHER_THREADS, ++ .caps_internal = FF_CODEC_CAP_NOT_INIT_THREADSAFE | ++ FF_CODEC_CAP_AUTO_THREADS | FF_CODEC_CAP_INIT_CLEANUP, ++ .p.pix_fmts = (const enum AVPixelFormat[]){ AV_PIX_FMT_YUV420P, ++ AV_PIX_FMT_NONE }, ++ .p.priv_class = &class, ++ .defaults = eb_enc_defaults, ++ .p.wrapper_name = "libsvt_vp9", ++}; +-- +2.40.1 + diff --git a/multimedia/compat-ffmpeg6/040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch b/multimedia/compat-ffmpeg6/040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch new file mode 100644 index 0000000..3f4605d --- /dev/null +++ b/multimedia/compat-ffmpeg6/040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch @@ -0,0 +1,29 @@ +--- a/libavformat/avformat.h ++++ b/libavformat/avformat.h +@@ -1020,6 +1020,10 @@ attribute_deprecated + int64_t av_stream_get_end_pts(const AVStream *st); + #endif + ++// Chromium: We use the internal field first_dts vvv ++int64_t av_stream_get_first_dts(const AVStream *st); ++// Chromium: We use the internal field first_dts ^^^ ++ + #define AV_PROGRAM_RUNNING 1 + + /** +--- a/libavformat/utils.c ++++ b/libavformat/utils.c +@@ -56,6 +56,13 @@ int ff_unlock_avformat(void) + return ff_mutex_unlock(&avformat_mutex) ? -1 : 0; + } + ++// Chromium: We use the internal field first_dts vvv ++int64_t av_stream_get_first_dts(const AVStream *st) ++{ ++ return ffstream(st)->first_dts; ++} ++// Chromium: We use the internal field first_dts ^^^ ++ + /* an arbitrarily chosen "sane" max packet size -- 50M */ + #define SANE_CHUNK_SIZE (50000000) + diff --git a/multimedia/compat-ffmpeg6/ffmpeg-CVE-2023-49528.patch b/multimedia/compat-ffmpeg6/ffmpeg-CVE-2023-49528.patch new file mode 100644 index 0000000..c42275c --- /dev/null +++ b/multimedia/compat-ffmpeg6/ffmpeg-CVE-2023-49528.patch @@ -0,0 +1,54 @@ +From 2d9ed64859c9887d0504cd71dbd5b2c15e14251a Mon Sep 17 00:00:00 2001 +From: Paul B Mahol +Date: Sat, 25 Nov 2023 12:54:28 +0100 +Subject: [PATCH] avfilter/af_dialoguenhance: fix overreads + +--- + libavfilter/af_dialoguenhance.c | 17 +++++++++-------- + 1 file changed, 9 insertions(+), 8 deletions(-) + +diff --git a/libavfilter/af_dialoguenhance.c b/libavfilter/af_dialoguenhance.c +index 1762ea7cde..29c8ab10a7 100644 +--- a/libavfilter/af_dialoguenhance.c ++++ b/libavfilter/af_dialoguenhance.c +@@ -96,12 +96,12 @@ static int config_input(AVFilterLink *inlink) + if (!s->window) + return AVERROR(ENOMEM); + +- s->in_frame = ff_get_audio_buffer(inlink, s->fft_size * 4); +- s->center_frame = ff_get_audio_buffer(inlink, s->fft_size * 4); +- s->out_dist_frame = ff_get_audio_buffer(inlink, s->fft_size * 4); +- s->windowed_frame = ff_get_audio_buffer(inlink, s->fft_size * 4); +- s->windowed_out = ff_get_audio_buffer(inlink, s->fft_size * 4); +- s->windowed_prev = ff_get_audio_buffer(inlink, s->fft_size * 4); ++ s->in_frame = ff_get_audio_buffer(inlink, (s->fft_size + 2) * 2); ++ s->center_frame = ff_get_audio_buffer(inlink, (s->fft_size + 2) * 2); ++ s->out_dist_frame = ff_get_audio_buffer(inlink, (s->fft_size + 2) * 2); ++ s->windowed_frame = ff_get_audio_buffer(inlink, (s->fft_size + 2) * 2); ++ s->windowed_out = ff_get_audio_buffer(inlink, (s->fft_size + 2) * 2); ++ s->windowed_prev = ff_get_audio_buffer(inlink, (s->fft_size + 2) * 2); + if (!s->in_frame || !s->windowed_out || !s->windowed_prev || + !s->out_dist_frame || !s->windowed_frame || !s->center_frame) + return AVERROR(ENOMEM); +@@ -250,6 +250,7 @@ static int de_stereo(AVFilterContext *ctx, AVFrame *out) + float *right_osamples = (float *)out->extended_data[1]; + float *center_osamples = (float *)out->extended_data[2]; + const int offset = s->fft_size - s->overlap; ++ const int nb_samples = FFMIN(s->overlap, s->in->nb_samples); + float vad; + + // shift in/out buffers +@@ -258,8 +259,8 @@ static int de_stereo(AVFilterContext *ctx, AVFrame *out) + memmove(left_out, &left_out[s->overlap], offset * sizeof(float)); + memmove(right_out, &right_out[s->overlap], offset * sizeof(float)); + +- memcpy(&left_in[offset], left_samples, s->overlap * sizeof(float)); +- memcpy(&right_in[offset], right_samples, s->overlap * sizeof(float)); ++ memcpy(&left_in[offset], left_samples, nb_samples * sizeof(float)); ++ memcpy(&right_in[offset], right_samples, nb_samples * sizeof(float)); + memset(&left_out[offset], 0, s->overlap * sizeof(float)); + memset(&right_out[offset], 0, s->overlap * sizeof(float)); + +-- +2.25.1 + diff --git a/multimedia/compat-ffmpeg6/ffmpeg-allow-fdk-aac-free.patch b/multimedia/compat-ffmpeg6/ffmpeg-allow-fdk-aac-free.patch new file mode 100644 index 0000000..3b87cce --- /dev/null +++ b/multimedia/compat-ffmpeg6/ffmpeg-allow-fdk-aac-free.patch @@ -0,0 +1,26 @@ +From: Andreas Schneider + +fdk-aac-free-devel is GPL compatible + +See https://bugzilla.redhat.com/show_bug.cgi?id=1501522#c112 + +Index: ffmpeg-5.0/configure +=================================================================== +--- ffmpeg-5.0.orig/configure 2022-02-09 20:07:49.490888877 +0100 ++++ ffmpeg-5.0/configure 2022-02-09 20:08:30.102854308 +0100 +@@ -1783,7 +1783,6 @@ EXTERNAL_LIBRARY_GPL_LIST=" + + EXTERNAL_LIBRARY_NONFREE_LIST=" + decklink +- libfdk_aac + libtls + " + +@@ -1822,6 +1821,7 @@ EXTERNAL_LIBRARY_LIST=" + libdav1d + libdc1394 + libdrm ++ libfdk_aac + libflite + libfontconfig + libfreetype diff --git a/multimedia/compat-ffmpeg6/ffmpeg-c99.patch b/multimedia/compat-ffmpeg6/ffmpeg-c99.patch new file mode 100644 index 0000000..0ae4d8a --- /dev/null +++ b/multimedia/compat-ffmpeg6/ffmpeg-c99.patch @@ -0,0 +1,67 @@ +From 42982b5a5d461530a792e69b3e8abdd9d6d67052 Mon Sep 17 00:00:00 2001 +From: Frank Plowman +Date: Fri, 22 Dec 2023 12:00:01 +0000 +Subject: [PATCH] avformat/ffrtmpcrypt: Fix int-conversion warning +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit +Content-type: text/plain + +The gcrypt definition of `bn_new` used to use the return statement +on errors, with an AVERROR return value, regardless of the signature +of the function where the macro is used - it is called in +`dh_generate_key` and `ff_dh_init` which return pointers. As a result, +compiling with gcrypt and the ffrtmpcrypt protocol resulted in an +int-conversion warning. GCC 14 may upgrade these to errors [1]. + +This patch fixes the problem by changing the macro to remove `AVERROR` +and instead set `bn` to null if the allocation fails. This is the +behaviour of all the other `bn_new` implementations and so the result is +already checked at all the callsites. AFAICT, this should be the only +change needed to get ffmpeg off Fedora's naughty list of projects with +warnings which may be upgraded to errors in GCC 14 [2]. + +[1]: https://gcc.gnu.org/pipermail/gcc/2023-May/241264.html +[2]: https://www.mail-archive.com/devel@lists.fedoraproject.org/msg196024.html + +Signed-off-by: Frank Plowman +Signed-off-by: Martin Storsjö +--- + libavformat/rtmpdh.c | 21 ++++++++++++--------- + 1 file changed, 12 insertions(+), 9 deletions(-) + +diff --git a/libavformat/rtmpdh.c b/libavformat/rtmpdh.c +index 5ddae537a1..6a6c2ccd87 100644 +--- a/libavformat/rtmpdh.c ++++ b/libavformat/rtmpdh.c +@@ -113,15 +113,18 @@ static int bn_modexp(FFBigNum bn, FFBigNum y, FFBigNum q, FFBigNum p) + return 0; + } + #elif CONFIG_GCRYPT +-#define bn_new(bn) \ +- do { \ +- if (!gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) { \ +- if (!gcry_check_version("1.5.4")) \ +- return AVERROR(EINVAL); \ +- gcry_control(GCRYCTL_DISABLE_SECMEM, 0); \ +- gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); \ +- } \ +- bn = gcry_mpi_new(1); \ ++#define bn_new(bn) \ ++ do { \ ++ if (!gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) { \ ++ if (gcry_check_version("1.5.4")) { \ ++ gcry_control(GCRYCTL_DISABLE_SECMEM, 0); \ ++ gcry_control(GCRYCTL_INITIALIZATION_FINISHED, 0); \ ++ } \ ++ } \ ++ if (gcry_control(GCRYCTL_INITIALIZATION_FINISHED_P)) \ ++ bn = gcry_mpi_new(1); \ ++ else \ ++ bn = NULL; \ + } while (0) + #define bn_free(bn) gcry_mpi_release(bn) + #define bn_set_word(bn, w) gcry_mpi_set_ui(bn, w) +-- +2.43.0 + diff --git a/multimedia/compat-ffmpeg6/ffmpeg-codec-choice.patch b/multimedia/compat-ffmpeg6/ffmpeg-codec-choice.patch new file mode 100644 index 0000000..221b4f6 --- /dev/null +++ b/multimedia/compat-ffmpeg6/ffmpeg-codec-choice.patch @@ -0,0 +1,57 @@ +From: Jan Engelhardt + +Edit the default codec selection such that + + ffmpeg -i youtube.blah.webm foobar.mkv + +without any further arguments can produce a result even on a +reduced codec selection list. + +--- + libavformat/matroskaenc.c | 20 ++++++++++++++------ + 1 file changed, 14 insertions(+), 6 deletions(-) + +Index: ffmpeg-6.0/libavformat/matroskaenc.c +=================================================================== +--- ffmpeg-6.0.orig/libavformat/matroskaenc.c ++++ ffmpeg-6.0/libavformat/matroskaenc.c +@@ -3321,16 +3321,25 @@ static int mkv_query_codec(enum AVCodecI + return 0; + } + ++#define PREFAUDIO \ ++ CONFIG_LIBOPUS_ENCODER ? AV_CODEC_ID_OPUS : \ ++ CONFIG_AAC_ENCODER ? AV_CODEC_ID_AAC : \ ++ CONFIG_VORBIS_ENCODER ? AV_CODEC_ID_VORBIS : \ ++ AV_CODEC_ID_AC3 ++ + const FFOutputFormat ff_matroska_muxer = { + .p.name = "matroska", + .p.long_name = NULL_IF_CONFIG_SMALL("Matroska"), + .p.mime_type = "video/x-matroska", + .p.extensions = "mkv", + .priv_data_size = sizeof(MatroskaMuxContext), +- .p.audio_codec = CONFIG_LIBVORBIS_ENCODER ? +- AV_CODEC_ID_VORBIS : AV_CODEC_ID_AC3, +- .p.video_codec = CONFIG_LIBX264_ENCODER ? +- AV_CODEC_ID_H264 : AV_CODEC_ID_MPEG4, ++ .p.audio_codec = PREFAUDIO, ++ .p.video_codec = ++ CONFIG_LIBVPX_VP9_ENCODER ? AV_CODEC_ID_VP9 : \ ++ CONFIG_LIBX264_ENCODER ? AV_CODEC_ID_H264 : \ ++ CONFIG_LIBVPX_VP8_ENCODER ? AV_CODEC_ID_VP8 : \ ++ CONFIG_MPEG4_ENCODER ? AV_CODEC_ID_MPEG4 : \ ++ AV_CODEC_ID_THEORA, + .init = mkv_init, + .deinit = mkv_deinit, + .write_header = mkv_write_header, +@@ -3388,8 +3397,7 @@ const FFOutputFormat ff_matroska_audio_m + .p.mime_type = "audio/x-matroska", + .p.extensions = "mka", + .priv_data_size = sizeof(MatroskaMuxContext), +- .p.audio_codec = CONFIG_LIBVORBIS_ENCODER ? +- AV_CODEC_ID_VORBIS : AV_CODEC_ID_AC3, ++ .p.audio_codec = PREFAUDIO, + .p.video_codec = AV_CODEC_ID_NONE, + .init = mkv_init, + .deinit = mkv_deinit, diff --git a/multimedia/compat-ffmpeg6/ffmpeg-dlopen-openh264.patch b/multimedia/compat-ffmpeg6/ffmpeg-dlopen-openh264.patch new file mode 100644 index 0000000..329606b --- /dev/null +++ b/multimedia/compat-ffmpeg6/ffmpeg-dlopen-openh264.patch @@ -0,0 +1,363 @@ +From 3daa49cae0bfc3de434dd28c3a23ae877f0639db Mon Sep 17 00:00:00 2001 +From: Neal Gompa +Date: Thu, 4 Jan 2024 10:21:17 -0500 +Subject: [PATCH] lavc/openh264: Add the ability to dlopen() OpenH264 + +We can't directly depend on OpenH264, but we can weakly link to it +and gracefully expose the capability. + +Co-authored-by: Andreas Schneider +Co-authored-by: Neal Gompa + +Signed-off-by: Andreas Schneider +Signed-off-by: Neal Gompa +--- + configure | 3 + + libavcodec/Makefile | 1 + + libavcodec/libopenh264.c | 5 ++ + libavcodec/libopenh264_dlopen.c | 147 ++++++++++++++++++++++++++++++++ + libavcodec/libopenh264_dlopen.h | 58 +++++++++++++ + libavcodec/libopenh264dec.c | 10 +++ + libavcodec/libopenh264enc.c | 10 +++ + 7 files changed, 234 insertions(+) + create mode 100644 libavcodec/libopenh264_dlopen.c + create mode 100644 libavcodec/libopenh264_dlopen.h + +diff --git a/configure b/configure +index 1f0b9497cb..97fa4a5d6a 100755 +--- a/configure ++++ b/configure +@@ -249,6 +249,7 @@ External library support: + --enable-libopencore-amrwb enable AMR-WB decoding via libopencore-amrwb [no] + --enable-libopencv enable video filtering via libopencv [no] + --enable-libopenh264 enable H.264 encoding via OpenH264 [no] ++ --enable-libopenh264-dlopen enable H.264 encoding via dlopen()'ed OpenH264 [no] + --enable-libopenjpeg enable JPEG 2000 de/encoding via OpenJPEG [no] + --enable-libopenmpt enable decoding tracked files via libopenmpt [no] + --enable-libopenvino enable OpenVINO as a DNN module backend +@@ -1871,6 +1872,7 @@ EXTERNAL_LIBRARY_LIST=" + libmysofa + libopencv + libopenh264 ++ libopenh264_dlopen + libopenjpeg + libopenmpt + libopenvino +@@ -6765,6 +6767,7 @@ enabled libopencv && { check_headers opencv2/core/core_c.h && + require libopencv opencv2/core/core_c.h cvCreateImageHeader -lopencv_core -lopencv_imgproc; } || + require_pkg_config libopencv opencv opencv/cxcore.h cvCreateImageHeader; } + enabled libopenh264 && require_pkg_config libopenh264 openh264 wels/codec_api.h WelsGetCodecVersion ++enabled libopenh264_dlopen && enable libopenh264 && add_cppflags "-I$(dirname `readlink -f $0`)/ffdlopenhdrs/include -DCONFIG_LIBOPENH264_DLOPEN=1" + enabled libopenjpeg && { check_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version || + { require_pkg_config libopenjpeg "libopenjp2 >= 2.1.0" openjpeg.h opj_version -DOPJ_STATIC && add_cppflags -DOPJ_STATIC; } } + enabled libopenmpt && require_pkg_config libopenmpt "libopenmpt >= 0.2.6557" libopenmpt/libopenmpt.h openmpt_module_create -lstdc++ && append libopenmpt_extralibs "-lstdc++" +diff --git a/libavcodec/Makefile b/libavcodec/Makefile +index 580a8d6b54..c27d229f6d 100644 +--- a/libavcodec/Makefile ++++ b/libavcodec/Makefile +@@ -1115,6 +1115,7 @@ OBJS-$(CONFIG_LIBMP3LAME_ENCODER) += libmp3lame.o + OBJS-$(CONFIG_LIBOPENCORE_AMRNB_DECODER) += libopencore-amr.o + OBJS-$(CONFIG_LIBOPENCORE_AMRNB_ENCODER) += libopencore-amr.o + OBJS-$(CONFIG_LIBOPENCORE_AMRWB_DECODER) += libopencore-amr.o ++OBJS-$(CONFIG_LIBOPENH264_DLOPEN) += libopenh264_dlopen.o + OBJS-$(CONFIG_LIBOPENH264_DECODER) += libopenh264dec.o libopenh264.o + OBJS-$(CONFIG_LIBOPENH264_ENCODER) += libopenh264enc.o libopenh264.o + OBJS-$(CONFIG_LIBOPENJPEG_ENCODER) += libopenjpegenc.o +diff --git a/libavcodec/libopenh264.c b/libavcodec/libopenh264.c +index c80c85ea8b..128c3d9846 100644 +--- a/libavcodec/libopenh264.c ++++ b/libavcodec/libopenh264.c +@@ -20,8 +20,13 @@ + */ + + #include ++ ++#ifdef CONFIG_LIBOPENH264_DLOPEN ++#include "libopenh264_dlopen.h" ++#else + #include + #include ++#endif + + #include "libavutil/error.h" + #include "libavutil/log.h" +diff --git a/libavcodec/libopenh264_dlopen.c b/libavcodec/libopenh264_dlopen.c +new file mode 100644 +index 0000000000..49ea8ff44f +--- /dev/null ++++ b/libavcodec/libopenh264_dlopen.c +@@ -0,0 +1,147 @@ ++/* ++ * OpenH264 dlopen code ++ * ++ * Copyright (C) 2022 Andreas Schneider ++ * ++ * This file is part of FFmpeg. ++ * ++ * FFmpeg is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * FFmpeg is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with FFmpeg; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ */ ++ ++#include ++ ++#include "libopenh264_dlopen.h" ++ ++/* ++ * The symbol binding makes sure we do not run into strict aliasing issues which ++ * can lead into segfaults. ++ */ ++typedef int (*__oh264_WelsCreateSVCEncoder)(ISVCEncoder **); ++typedef void (*__oh264_WelsDestroySVCEncoder)(ISVCEncoder *); ++typedef int (*__oh264_WelsGetDecoderCapability)(SDecoderCapability *); ++typedef long (*__oh264_WelsCreateDecoder)(ISVCDecoder **); ++typedef void (*__oh264_WelsDestroyDecoder)(ISVCDecoder *); ++typedef OpenH264Version (*__oh264_WelsGetCodecVersion)(void); ++typedef void (*__oh264_WelsGetCodecVersionEx)(OpenH264Version *); ++ ++#define OH264_SYMBOL_ENTRY(i) \ ++ union { \ ++ __oh264_##i f; \ ++ void *obj; \ ++ } _oh264_##i ++ ++struct oh264_symbols { ++ OH264_SYMBOL_ENTRY(WelsCreateSVCEncoder); ++ OH264_SYMBOL_ENTRY(WelsDestroySVCEncoder); ++ OH264_SYMBOL_ENTRY(WelsGetDecoderCapability); ++ OH264_SYMBOL_ENTRY(WelsCreateDecoder); ++ OH264_SYMBOL_ENTRY(WelsDestroyDecoder); ++ OH264_SYMBOL_ENTRY(WelsGetCodecVersion); ++ OH264_SYMBOL_ENTRY(WelsGetCodecVersionEx); ++}; ++ ++/* Symbols are bound by loadLibOpenH264() */ ++static struct oh264_symbols openh264_symbols; ++ ++int oh264_WelsCreateSVCEncoder(ISVCEncoder **ppEncoder) { ++ return openh264_symbols._oh264_WelsCreateSVCEncoder.f(ppEncoder); ++} ++ ++void oh264_WelsDestroySVCEncoder(ISVCEncoder *pEncoder) { ++ return openh264_symbols._oh264_WelsDestroySVCEncoder.f(pEncoder); ++} ++ ++int oh264_WelsGetDecoderCapability(SDecoderCapability *pDecCapability) { ++ return openh264_symbols._oh264_WelsGetDecoderCapability.f(pDecCapability); ++} ++ ++long oh264_WelsCreateDecoder(ISVCDecoder **ppDecoder) { ++ return openh264_symbols._oh264_WelsCreateDecoder.f(ppDecoder); ++} ++ ++void oh264_WelsDestroyDecoder(ISVCDecoder *pDecoder) { ++ return openh264_symbols._oh264_WelsDestroyDecoder.f(pDecoder); ++} ++ ++OpenH264Version oh264_WelsGetCodecVersion(void) { ++ return openh264_symbols._oh264_WelsGetCodecVersion.f(); ++} ++ ++void oh264_WelsGetCodecVersionEx(OpenH264Version *pVersion) { ++ openh264_symbols._oh264_WelsGetCodecVersionEx.f(pVersion); ++} ++ ++static void *_oh264_bind_symbol(AVCodecContext *avctx, ++ void *handle, ++ const char *sym_name) { ++ void *sym = NULL; ++ ++ sym = dlsym(handle, sym_name); ++ if (sym == NULL) { ++ const char *err = dlerror(); ++ av_log(avctx, ++ AV_LOG_WARNING, ++ "%s: Failed to bind %s\n", ++ err, ++ sym_name); ++ return NULL; ++ } ++ ++ return sym; ++} ++ ++#define oh264_bind_symbol(avctx, handle, sym_name) \ ++ if (openh264_symbols._oh264_##sym_name.obj == NULL) { \ ++ openh264_symbols._oh264_##sym_name.obj = _oh264_bind_symbol(avctx, handle, #sym_name); \ ++ if (openh264_symbols._oh264_##sym_name.obj == NULL) { \ ++ return 1; \ ++ } \ ++ } ++ ++int loadLibOpenH264(AVCodecContext *avctx) { ++ static bool initialized = false; ++ void *libopenh264 = NULL; ++ const char *err = NULL; ++ ++ if (initialized) { ++ return 0; ++ } ++ ++#define OPENH264_LIB "libopenh264.so.7" ++ libopenh264 = dlopen(OPENH264_LIB, RTLD_LAZY); ++ err = dlerror(); ++ if (err != NULL) { ++ av_log(avctx, AV_LOG_WARNING, ++ "%s: %s is missing, openh264 support will be disabled\n", err, ++ OPENH264_LIB); ++ ++ if (libopenh264 != NULL) { ++ dlclose(libopenh264); ++ } ++ return 1; ++ } ++ ++ oh264_bind_symbol(avctx, libopenh264, WelsCreateSVCEncoder); ++ oh264_bind_symbol(avctx, libopenh264, WelsDestroySVCEncoder); ++ oh264_bind_symbol(avctx, libopenh264, WelsGetDecoderCapability); ++ oh264_bind_symbol(avctx, libopenh264, WelsCreateDecoder); ++ oh264_bind_symbol(avctx, libopenh264, WelsDestroyDecoder); ++ oh264_bind_symbol(avctx, libopenh264, WelsGetCodecVersion); ++ oh264_bind_symbol(avctx, libopenh264, WelsGetCodecVersionEx); ++ ++ initialized = true; ++ ++ return 0; ++} +diff --git a/libavcodec/libopenh264_dlopen.h b/libavcodec/libopenh264_dlopen.h +new file mode 100644 +index 0000000000..d7d8bb7cad +--- /dev/null ++++ b/libavcodec/libopenh264_dlopen.h +@@ -0,0 +1,58 @@ ++/* ++ * OpenH264 dlopen code ++ * ++ * Copyright (C) 2022 Andreas Schneider ++ * ++ * This file is part of FFmpeg. ++ * ++ * FFmpeg is free software; you can redistribute it and/or ++ * modify it under the terms of the GNU Lesser General Public ++ * License as published by the Free Software Foundation; either ++ * version 2.1 of the License, or (at your option) any later version. ++ * ++ * FFmpeg is distributed in the hope that it will be useful, ++ * but WITHOUT ANY WARRANTY; without even the implied warranty of ++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++ * Lesser General Public License for more details. ++ * ++ * You should have received a copy of the GNU Lesser General Public ++ * License along with FFmpeg; if not, write to the Free Software ++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA ++ */ ++ ++#ifndef HAVE_LIBOPENH264_DLOPEN_H ++#define HAVE_LIBOPENH264_DLOPEN_H ++ ++#ifdef CONFIG_LIBOPENH264_DLOPEN ++ ++#include ++#include ++ ++#include "avcodec.h" ++ ++int oh264_WelsCreateSVCEncoder(ISVCEncoder **ppEncoder); ++#define WelsCreateSVCEncoder oh264_WelsCreateSVCEncoder ++ ++void oh264_WelsDestroySVCEncoder(ISVCEncoder *pEncoder); ++#define WelsDestroySVCEncoder oh264_WelsDestroySVCEncoder ++ ++int oh264_WelsGetDecoderCapability(SDecoderCapability *pDecCapability); ++#define WelsGetDecoderCapability oh264_WelsGetDecoderCapability ++ ++long oh264_WelsCreateDecoder(ISVCDecoder **ppDecoder); ++#define WelsCreateDecoder oh264_WelsCreateDecoder ++ ++void oh264_WelsDestroyDecoder(ISVCDecoder *pDecoder); ++#define WelsDestroyDecoder oh264_WelsDestroyDecoder ++ ++OpenH264Version oh264_WelsGetCodecVersion(void); ++#define WelsGetCodecVersion oh264_WelsGetCodecVersion ++ ++void oh264_WelsGetCodecVersionEx(OpenH264Version *pVersion); ++#define WelsGetCodecVersionEx oh264_WelsGetCodecVersionEx ++ ++int loadLibOpenH264(AVCodecContext *avctx); ++ ++#endif /* CONFIG_LIBOPENH264_DLOPEN */ ++ ++#endif /* HAVE_LIBOPENH264_DLOPEN_H */ +diff --git a/libavcodec/libopenh264dec.c b/libavcodec/libopenh264dec.c +index b6a9bba2dc..e042189161 100644 +--- a/libavcodec/libopenh264dec.c ++++ b/libavcodec/libopenh264dec.c +@@ -19,8 +19,12 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + ++#ifdef CONFIG_LIBOPENH264_DLOPEN ++#include "libopenh264_dlopen.h" ++#else + #include + #include ++#endif + + #include "libavutil/common.h" + #include "libavutil/fifo.h" +@@ -55,6 +59,12 @@ static av_cold int svc_decode_init(AVCodecContext *avctx) + int log_level; + WelsTraceCallback callback_function; + ++#ifdef CONFIG_LIBOPENH264_DLOPEN ++ if (loadLibOpenH264(avctx)) { ++ return AVERROR_DECODER_NOT_FOUND; ++ } ++#endif ++ + if (WelsCreateDecoder(&s->decoder)) { + av_log(avctx, AV_LOG_ERROR, "Unable to create decoder\n"); + return AVERROR_UNKNOWN; +diff --git a/libavcodec/libopenh264enc.c b/libavcodec/libopenh264enc.c +index 6f231d22b2..3f0e990d80 100644 +--- a/libavcodec/libopenh264enc.c ++++ b/libavcodec/libopenh264enc.c +@@ -19,8 +19,12 @@ + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + ++#ifdef CONFIG_LIBOPENH264_DLOPEN ++#include "libopenh264_dlopen.h" ++#else + #include + #include ++#endif + + #include "libavutil/attributes.h" + #include "libavutil/common.h" +@@ -114,6 +118,12 @@ static av_cold int svc_encode_init(AVCodecContext *avctx) + WelsTraceCallback callback_function; + AVCPBProperties *props; + ++#ifdef CONFIG_LIBOPENH264_DLOPEN ++ if (loadLibOpenH264(avctx)) { ++ return AVERROR_ENCODER_NOT_FOUND; ++ } ++#endif ++ + if (WelsCreateSVCEncoder(&s->encoder)) { + av_log(avctx, AV_LOG_ERROR, "Unable to create encoder\n"); + return AVERROR_UNKNOWN; +-- +2.43.0 + diff --git a/multimedia/compat-ffmpeg6/ffmpeg-vulkan.patch b/multimedia/compat-ffmpeg6/ffmpeg-vulkan.patch new file mode 100644 index 0000000..18a6bf3 --- /dev/null +++ b/multimedia/compat-ffmpeg6/ffmpeg-vulkan.patch @@ -0,0 +1,99 @@ +From: Jan Ekström +Date: Wed, 14 Feb 2024 20:40:54 +0000 (+0200) +Subject: {avcodec,tests}: rename the bundled Mesa AV1 vulkan video headers +X-Git-Url: http://git.ffmpeg.org/gitweb/ffmpeg.git/commitdiff_plain/fef22c87ada4517441701e6e61e062c9f4399c8e + +{avcodec,tests}: rename the bundled Mesa AV1 vulkan video headers + +This together with adjusting the inclusion define allows for the +build to not fail with latest Vulkan-Headers that contain the +stabilized Vulkan AV1 decoding definitions. + +Compilation fails currently as the AV1 header is getting included +via hwcontext_vulkan.h -> -> vulkan_core.h, which +finally includes vk_video/vulkan_video_codec_av1std.h and the decode +header, leading to the bundled header to never defining anything +due to the inclusion define being the same. + +This fix is imperfect, as it leads to additional re-definition +warnings for things such as +VK_STD_VULKAN_VIDEO_CODEC_AV1_DECODE_SPEC_VERSION. , but it is +not clear how to otherwise have the bundled version trump the +actually standardized one for a short-term compilation fix. + +(cherry picked from commit e06ce6d2b45edac4a2df04f304e18d4727417d24) +--- + +diff --git a/libavcodec/Makefile b/libavcodec/Makefile +index ec57e53e30..eb25707ef5 100644 +--- a/libavcodec/Makefile ++++ b/libavcodec/Makefile +@@ -1284,7 +1284,7 @@ SKIPHEADERS += %_tablegen.h \ + aacenc_quantization.h \ + aacenc_quantization_misc.h \ + bitstream_template.h \ +- vulkan_video_codec_av1std.h \ ++ vulkan_video_codec_av1std_mesa.h \ + $(ARCH)/vpx_arith.h \ + + SKIPHEADERS-$(CONFIG_AMF) += amfenc.h +@@ -1306,7 +1306,7 @@ SKIPHEADERS-$(CONFIG_XVMC) += xvmc.h + SKIPHEADERS-$(CONFIG_VAAPI) += vaapi_decode.h vaapi_hevc.h vaapi_encode.h + SKIPHEADERS-$(CONFIG_VDPAU) += vdpau.h vdpau_internal.h + SKIPHEADERS-$(CONFIG_VIDEOTOOLBOX) += videotoolbox.h vt_internal.h +-SKIPHEADERS-$(CONFIG_VULKAN) += vulkan.h vulkan_video.h vulkan_decode.h vulkan_video_codec_av1std_decode.h ++SKIPHEADERS-$(CONFIG_VULKAN) += vulkan.h vulkan_video.h vulkan_decode.h vulkan_video_codec_av1std_decode_mesa.h + SKIPHEADERS-$(CONFIG_V4L2_M2M) += v4l2_buffers.h v4l2_context.h v4l2_m2m.h + SKIPHEADERS-$(CONFIG_ZLIB) += zlib_wrapper.h + +diff --git a/libavcodec/vulkan_video.h b/libavcodec/vulkan_video.h +index b28e3fe0bd..51f44dd543 100644 +--- a/libavcodec/vulkan_video.h ++++ b/libavcodec/vulkan_video.h +@@ -23,8 +23,8 @@ + #include "vulkan.h" + + #include +-#include "vulkan_video_codec_av1std.h" +-#include "vulkan_video_codec_av1std_decode.h" ++#include "vulkan_video_codec_av1std_mesa.h" ++#include "vulkan_video_codec_av1std_decode_mesa.h" + + #define CODEC_VER_MAJ(ver) (ver >> 22) + #define CODEC_VER_MIN(ver) ((ver >> 12) & ((1 << 10) - 1)) +diff --git a/libavcodec/vulkan_video_codec_av1std_decode.h b/libavcodec/vulkan_video_codec_av1std_decode_mesa.h +similarity index 89% +rename from libavcodec/vulkan_video_codec_av1std_decode.h +rename to libavcodec/vulkan_video_codec_av1std_decode_mesa.h +index a697c00593..e2f37b4e6e 100644 +--- a/libavcodec/vulkan_video_codec_av1std_decode.h ++++ b/libavcodec/vulkan_video_codec_av1std_decode_mesa.h +@@ -14,8 +14,8 @@ + * limitations under the License. + */ + +-#ifndef VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_ +-#define VULKAN_VIDEO_CODEC_AV1STD_DECODE_H_ 1 ++#ifndef VULKAN_VIDEO_CODEC_AV1STD_DECODE_MESA_H_ ++#define VULKAN_VIDEO_CODEC_AV1STD_DECODE_MESA_H_ 1 + + /* + ** This header is NOT YET generated from the Khronos Vulkan XML API Registry. +diff --git a/libavcodec/vulkan_video_codec_av1std.h b/libavcodec/vulkan_video_codec_av1std_mesa.h +similarity index 99% +rename from libavcodec/vulkan_video_codec_av1std.h +rename to libavcodec/vulkan_video_codec_av1std_mesa.h +index c46236c457..c91589eee2 100644 +--- a/libavcodec/vulkan_video_codec_av1std.h ++++ b/libavcodec/vulkan_video_codec_av1std_mesa.h +@@ -14,8 +14,8 @@ + * limitations under the License. + */ + +-#ifndef VULKAN_VIDEO_CODEC_AV1STD_H_ +-#define VULKAN_VIDEO_CODEC_AV1STD_H_ 1 ++#ifndef VULKAN_VIDEO_CODEC_AV1STD_MESA_H_ ++#define VULKAN_VIDEO_CODEC_AV1STD_MESA_H_ 1 + + /* + ** This header is NOT YET generated from the Khronos Vulkan XML API Registry. diff --git a/multimedia/compat-ffmpeg6/ffmpeg.spec b/multimedia/compat-ffmpeg6/ffmpeg.spec new file mode 100644 index 0000000..eeae775 --- /dev/null +++ b/multimedia/compat-ffmpeg6/ffmpeg.spec @@ -0,0 +1,1884 @@ +# TODO: add make test to %%check section + +%global realname ffmpeg +%global flavor 6 + +#global branch oldabi- +#global date 20230221 +#global commit 691d01989936d4b0681aa226aea8a19f06c04cea +#global rel %(c=%{commit}; echo ${c:0:7}) + +%if 0%{?fedora} >= 37 || 0%{?rhel} >= 9 +%bcond_without libavcodec_freeworld +%else +%bcond_with libavcodec_freeworld +%endif +%bcond_with cuda + +%undefine _package_note_file + +%ifarch %{ix86} +# Fails due to asm issue +%global _lto_cflags %{nil} +%endif + +# Cuda and others are only available on some arches +%global cuda_arches x86_64 + +%ifarch %{cuda_arches} +# Requires nvidia cuda repo (--enablerepo=cuda) +%if %{with cuda} +%global _with_cuda 1 +%endif +%endif + +# Disable because of gcc issue +%global _without_lensfun 1 +%if 0%{?fedora} +%global _with_placebo 1 +%endif +%ifnarch i686 +%global _with_bs2b 1 +%global _with_chromaprint 1 +%global _with_ilbc 1 +%global _with_rubberband 1 +%global _with_smb 1 +%global _with_snappy 1 +%global _with_svtav1 1 +%global _with_svtvp9 1 +%global _with_svthevc 1 +%global _with_tesseract 1 +%global _with_twolame 1 +%global _with_wavpack 1 +%global _with_webp 1 +%global _with_zmq 1 +%else +%global _without_vulkan 1 +%endif +%ifarch x86_64 +%global _with_vpl 1 +%global _with_vapoursynth 1 +%global _with_vmaf 1 +%global _with_openh264 1 +%endif + +# flavor nonfree +%if 0%{?_with_cuda:1} +%global debug_package %{nil} +%global flavor -cuda +%global progs_suffix -cuda +#global build_suffix -lgpl +%ifarch %{cuda_arches} +%global _with_cuvid 1 +%global _with_libnpp 1 +%endif +%global _with_fdk_aac 1 +%global _without_cdio 1 +%global _without_frei0r 1 +%global _without_gpl 1 +%global _without_vidstab 1 +%global _without_x264 1 +%global _without_x265 1 +%global _without_xvid 1 +%undefine _with_smb +%endif + +# Disable nvenc when not relevant +%ifnarch %{cuda_arches} aarch64 +%global _without_nvenc 1 +%endif + +# extras flags +%if 0%{!?_cuda_version:1} +%global _cuda_version 12.3 +%endif +%global _cuda_version_rpm %(echo %{_cuda_version} | sed -e 's/\\./-/') +%global _cuda_bindir %{_cuda_prefix}/bin +%if 0%{?_with_cuda:1} +%global cuda_cflags $(pkg-config --cflags cuda-%{_cuda_version}) +%global cuda_ldflags $(pkg-config --libs cuda-%{_cuda_version}) +%endif + +%if 0%{?_with_libnpp:1} +%global libnpp_cflags $(pkg-config --cflags nppi-%{_cuda_version} nppc-%{_cuda_version}) +%global libnpp_ldlags $(pkg-config --libs-only-L nppi-%{_cuda_version} nppc-%{_cuda_version}) +%endif + +%if 0%{?_with_rpi:1} +%global _with_omx 1 +%global _with_omx_rpi 1 +%global _with_mmal 1 +ExclusiveArch: armv7hnl +%endif + +%if 0%{?_without_gpl} +%global lesser L +%endif + +%if 0%{!?_without_amr} || 0%{?_with_gmp} || 0%{?_with_smb} || 0%{?_with_vmaf} +%global ffmpeg_license %{?lesser}GPLv3+ +%else +%global ffmpeg_license %{?lesser}GPLv2+ +%endif + +%if 0%{?rhel} >= 8 +%global _with_rav1e 1 +%endif + +Summary: Digital VCR and streaming server +Name: compat-ffmpeg%{?flavor} +Version: 6.1.1 +Release: 3%{?date:.%{?date}%{?date:git}%{?rel}}%{?dist} +License: %{ffmpeg_license} +URL: https://ffmpeg.org/ +%if 0%{?date} +Source0: ffmpeg-%{?branch}%{date}.tar.bz2 +%else +Source0: https://ffmpeg.org/releases/ffmpeg-%{version}.tar.xz +Source1: https://ffmpeg.org/releases/ffmpeg-%{version}.tar.xz.asc +Source2: https://ffmpeg.org/ffmpeg-devel.asc +%endif + +Patch0: 0001-revert-librsvg-bump.patch +# lavc/svt_hevc: add libsvt hevc encoder wrapper +Patch1: 0001-lavc-svt_hevc-add-libsvt-hevc-encoder-wrapper.patch +# Add libsvt_hevc encoder docs +Patch2: 0002-doc-Add-libsvt_hevc-encoder-docs.patch +# Add ability for ffmpeg to run svt vp9 +Patch3: 030-ffmpeg-add-svt-vp9.patch +# Compatibility fix for chromium +Patch4: 040-ffmpeg-add-av_stream_get_first_dts-for-chromium.patch + +# Fedora patches +Patch5: 0001-lavc-libopenh264-Drop-openh264-runtime-version-check.patch +Patch6: ffmpeg-allow-fdk-aac-free.patch +Patch7: ffmpeg-c99.patch +Patch8: ffmpeg-codec-choice.patch +%{!?_with_openh264:Patch9: ffmpeg-dlopen-openh264.patch} + +# Fix build with Vulkan headers >= 1.3.280.0 +Patch10: ffmpeg-vulkan.patch +# Backport fix for CVE-2023-49528 +Patch11: ffmpeg-CVE-2023-49528.patch + +Conflicts: %{name}-free +Requires: %{name}-libs%{?_isa} = %{version}-%{release} +%{?_with_cuda:BuildRequires: cuda-minimal-build-%{_cuda_version_rpm} cuda-driver-devel-%{_cuda_version_rpm}} +%{?_with_cuda:%{?!_with_cuda_nvcc:BuildRequires: clang}} +%{?_with_libnpp:BuildRequires: cuda-toolkit-%{_cuda_version_rpm}} +BuildRequires: alsa-lib-devel +BuildRequires: AMF-devel +BuildRequires: bzip2-devel +%{?_with_faac:BuildRequires: faac-devel} +%{?_with_fdk_aac:BuildRequires: pkgconfig(fdk-aac)} +%{?_with_flite:BuildRequires: flite-devel} +BuildRequires: fontconfig-devel +BuildRequires: freetype-devel +BuildRequires: fribidi-devel +%{!?_without_frei0r:BuildRequires: frei0r-devel} +%{?_with_gme:BuildRequires: game-music-emu-devel} +BuildRequires: gnupg2 +BuildRequires: gnutls-devel +BuildRequires: gsm-devel +%{?_with_ilbc:BuildRequires: ilbc-devel} +BuildRequires: lame-devel >= 3.98.3 +%{!?_without_jack:BuildRequires: jack-audio-connection-kit-devel} +%{!?_without_jxl:BuildRequires: libjxl-devel} +%{!?_without_ladspa:BuildRequires: ladspa-devel} +%{!?_without_aom:BuildRequires: libaom-devel} +%{!?_without_dav1d:BuildRequires: libdav1d-devel} +%{!?_without_ass:BuildRequires: libass-devel} +%{!?_without_bluray:BuildRequires: libbluray-devel} +%{?_with_bs2b:BuildRequires: libbs2b-devel} +%{?_with_caca:BuildRequires: libcaca-devel} +%{!?_without_cdio:BuildRequires: libcdio-paranoia-devel} +%{?_with_chromaprint:BuildRequires: libchromaprint-devel} +%{?_with_crystalhd:BuildRequires: libcrystalhd-devel} +%{!?_without_lensfun:BuildRequires: lensfun-devel} +%if 0%{?_with_ieee1394} +BuildRequires: libavc1394-devel +BuildRequires: libdc1394-devel +BuildRequires: libiec61883-devel +%endif +BuildRequires: libdrm-devel +BuildRequires: libgcrypt-devel +BuildRequires: libGL-devel +BuildRequires: libmodplug-devel +BuildRequires: libmysofa-devel +BuildRequires: libopenmpt-devel +%{?_with_placebo:BuildRequires: libplacebo-devel >= 4.192.0} +BuildRequires: librsvg2-devel +# Disable rtmp because of rfbz: 6441 & 2399 +%{?_with_rtmp:BuildRequires: librtmp-devel} +%{?_with_smb:BuildRequires: libsmbclient-devel} +BuildRequires: libssh-devel +BuildRequires: libtheora-devel +BuildRequires: libv4l-devel +%{?!_without_vaapi:BuildRequires: libva-devel >= 0.31.0} +BuildRequires: libvdpau-devel +BuildRequires: libvorbis-devel +%{?_with_vapoursynth:BuildRequires: vapoursynth-devel} +%{?!_without_vpx:BuildRequires: libvpx-devel >= 1.4.0} +%{?_with_mfx:BuildRequires: pkgconfig(libmfx) >= 1.28} +%ifarch %{ix86} x86_64 +BuildRequires: nasm +%endif +%{?_with_webp:BuildRequires: libwebp-devel} +%{?_with_netcdf:BuildRequires: netcdf-devel} +%{?_with_rpi:BuildRequires: raspberrypi-vc-devel} +%{!?_without_nvenc:BuildRequires: pkgconfig(ffnvcodec) >= 12.0} +%{!?_without_amr:BuildRequires: opencore-amr-devel vo-amrwbenc-devel} +%{?_with_omx:BuildRequires: libomxil-bellagio-devel} +BuildRequires: libxcb-devel +BuildRequires: libxml2-devel +%{!?_without_lv2:BuildRequires: lilv-devel lv2-devel} +%{!?_without_openal:BuildRequires: openal-soft-devel} +%if 0%{!?_without_opencl:1} +BuildRequires: opencl-headers ocl-icd-devel +%{?fedora:Recommends: opencl-icd} +%endif +%{?_with_opencv:BuildRequires: opencv-devel} +BuildRequires: openjpeg2-devel +%{!?_without_opus:BuildRequires: opus-devel >= 1.1.3} +%{!?_without_pulse:BuildRequires: pulseaudio-libs-devel} +BuildRequires: perl(Pod::Man) +%{?_with_rav1e:BuildRequires: pkgconfig(rav1e)} +%{?_with_rubberband:BuildRequires: rubberband-devel} +%{!?_without_tools:BuildRequires: SDL2-devel} +%{?_with_snappy:BuildRequires: snappy-devel} +BuildRequires: soxr-devel +BuildRequires: speex-devel +BuildRequires: pkgconfig(srt) +%{?_with_svtav1:BuildRequires: svt-av1-devel >= 1.1.0} +%{?_with_svtvp9:BuildRequires: svt-vp9-devel} +%{?_with_svthevc:BuildRequires: svt-hevc-devel} +%{?_with_tesseract:BuildRequires: tesseract-devel} +%{?_with_openh264:BuildRequires: openh264-devel} +#BuildRequires: texi2html +BuildRequires: texinfo +%{?_with_twolame:BuildRequires: twolame-devel} +%{?_with_vmaf:BuildRequires: libvmaf-devel >= 1.5.2} +%{?_with_vpl:BuildRequires: pkgconfig(vpl) >= 2.6} +%{?_with_wavpack:BuildRequires: wavpack-devel} +%{!?_without_vidstab:BuildRequires: vid.stab-devel} +%{!?_without_vulkan:BuildRequires: vulkan-loader-devel >= 1.3.255, pkgconfig(shaderc)} +%{!?_without_x264:BuildRequires: x264-devel >= 0.0.0-0.31} +%{!?_without_x265:BuildRequires: x265-devel} +%{!?_without_xvid:BuildRequires: xvidcore-devel} +%{!?_without_zimg:BuildRequires: zimg-devel >= 2.7.0} +BuildRequires: zlib-devel +%{?_with_zmq:BuildRequires: zeromq-devel} +%{!?_without_zvbi:BuildRequires: zvbi-devel} + +%description +FFmpeg is a complete and free Internet live audio and video +broadcasting solution for Linux/Unix. It also includes a digital +VCR. It can encode in real time in many formats including MPEG1 audio +and video, MPEG4, h263, ac3, asf, avi, real, mjpeg, and flash. + +%package libs +Summary: Libraries for %{name} +Conflicts: libavcodec-free = %{version} +Conflicts: libavfilter-free = %{version} +Conflicts: libavformat-free = %{version} +Conflicts: libavutil-free = %{version} +Conflicts: libpostproc-free = %{version} +Conflicts: libswresample-free = %{version} +Conflicts: libswscale-free = %{version} +Conflicts: %{realname}-libs = %{version} +%{?_with_vmaf:Recommends: vmaf-models} +%{!?_with_openh264:Recommends: openh264} + +%description libs +FFmpeg is a complete and free Internet live audio and video +broadcasting solution for Linux/Unix. It also includes a digital +VCR. It can encode in real time in many formats including MPEG1 audio +and video, MPEG4, h263, ac3, asf, avi, real, mjpeg, and flash. +This package contains the libraries for %{name} + +%package -n libavdevice%{?flavor} +Summary: Special devices muxing/demuxing library +Conflicts: libavdevice-free < 7.0 +Conflicts: libavdevice = %{version} +Requires: %{name}-libs%{_isa} = %{version}-%{release} + +%description -n libavdevice%{?flavor} +Libavdevice is a complementary library to libavf "libavformat". It provides +various "special" platform-specific muxers and demuxers, e.g. for grabbing +devices, audio capture and playback etc. + +%package devel +Summary: Development package for %{name} +Conflicts: %{realname}-free-devel +Conflicts: %{realname}-devel +Provides: %{realname}-devel = %{version}-%{release} +Requires: %{name}-libs%{_isa} = %{version}-%{release} +Requires: libavdevice%{?flavor}%{_isa} = %{version}-%{release} +Requires: pkgconfig + +%description devel +FFmpeg is a complete and free Internet live audio and video +broadcasting solution for Linux/Unix. It also includes a digital +VCR. It can encode in real time in many formats including MPEG1 audio +and video, MPEG4, h263, ac3, asf, avi, real, mjpeg, and flash. +This package contains development files for %{name} + +%if %{with libavcodec_freeworld} +%package -n libavcodec%{?flavor}-freeworld +Conflicts: libavcodec-freeworld = %{version} +Summary: Freeworld libavcodec to complement the distro counterparts +# Supplements doesn't work well yet - we can rely on comps for now +#Supplements: libavcodec-free >= %%{version} + +%description -n libavcodec%{?flavor}-freeworld +Freeworld libavcodec to complement the distro counterparts +%endif + + +# Don't use the %%configure macro as this is not an autotool script +%global ff_configure \ +./configure \\\ + --prefix=%{_prefix} \\\ + --bindir=%{_bindir} \\\ + --datadir=%{_datadir}/%{name} \\\ + --docdir=%{_docdir}/%{name} \\\ + --incdir=%{_includedir}/%{name} \\\ + --libdir=%{_libdir} \\\ + --mandir=%{_mandir} \\\ + --arch=%{_target_cpu} \\\ + --optflags="%{optflags}" \\\ + --extra-ldflags="%{?__global_ldflags} %{?cuda_ldflags} %{?libnpp_ldlags}" \\\ + --extra-cflags="%{?cuda_cflags} %{?libnpp_cflags} -I%{_includedir}/rav1e" \\\ + %{?flavor:--disable-manpages} \\\ + %{?progs_suffix:--progs-suffix=%{progs_suffix}} \\\ + %{?build_suffix:--build-suffix=%{build_suffix}} \\\ + %{!?_without_amr:--enable-libopencore-amrnb --enable-libopencore-amrwb --enable-libvo-amrwbenc --enable-version3} \\\ + --enable-bzlib \\\ + %{?_with_chromaprint:--enable-chromaprint} \\\ + %{!?_with_crystalhd:--disable-crystalhd} \\\ + --enable-fontconfig \\\ + %{!?_without_frei0r:--enable-frei0r} \\\ + --enable-gcrypt \\\ + %{?_with_gmp:--enable-gmp --enable-version3} \\\ + --enable-gnutls \\\ + %{!?_without_ladspa:--enable-ladspa} \\\ + %{!?_without_aom:--enable-libaom} \\\ + %{!?_without_dav1d:--enable-libdav1d} \\\ + %{!?_without_ass:--enable-libass} \\\ + %{!?_without_bluray:--enable-libbluray} \\\ + %{?_with_bs2b:--enable-libbs2b} \\\ + %{?_with_caca:--enable-libcaca} \\\ + %{?_with_cuda_nvcc:--enable-cuda-nvcc --enable-nonfree} \\\ + %{?_with_cuvid:--enable-cuvid --enable-nonfree} \\\ + %{!?_without_cdio:--enable-libcdio} \\\ + %{?_with_ieee1394:--enable-libdc1394 --enable-libiec61883} \\\ + --enable-libdrm \\\ + %{?_with_faac:--enable-libfaac --enable-nonfree} \\\ + %{?_with_fdk_aac:--enable-libfdk-aac --enable-nonfree} \\\ + %{?_with_flite:--enable-libflite} \\\ + %{!?_without_jack:--enable-libjack} \\\ + %{!?_without_jxl:--enable-libjxl} \\\ + --enable-libfreetype \\\ + %{!?_without_fribidi:--enable-libfribidi} \\\ + %{?_with_gme:--enable-libgme} \\\ + --enable-libgsm \\\ + %{?_with_ilbc:--enable-libilbc} \\\ + %{!?_without_lensfun:--enable-liblensfun} \\\ + %{?_with_libnpp:--enable-libnpp --enable-nonfree} \\\ + --enable-libmp3lame \\\ + --enable-libmysofa \\\ + %{?_with_netcdf:--enable-netcdf} \\\ + %{?_with_mmal:--enable-mmal} \\\ + %{!?_without_nvenc:--enable-nvenc} \\\ + %{?_with_omx:--enable-omx} \\\ + %{?_with_omx_rpi:--enable-omx-rpi} \\\ + %{!?_without_openal:--enable-openal} \\\ + %{!?_without_opencl:--enable-opencl} \\\ + %{?_with_opencv:--enable-libopencv} \\\ + %{!?_without_opengl:--enable-opengl} \\\ + --enable-libopenjpeg \\\ + --enable-libopenmpt \\\ + %{!?_without_opus:--enable-libopus} \\\ + %{!?_without_pulse:--enable-libpulse} \\\ + %{?_with_placebo:--enable-libplacebo} \\\ + --enable-librsvg \\\ + %{?_with_rav1e:--enable-librav1e} \\\ + %{?_with_rtmp:--enable-librtmp} \\\ + %{?_with_rubberband:--enable-librubberband} \\\ + %{?_with_smb:--enable-libsmbclient --enable-version3} \\\ + %{?_with_snappy:--enable-libsnappy} \\\ + --enable-libsoxr \\\ + --enable-libspeex \\\ + --enable-libsrt \\\ + --enable-libssh \\\ + %{?_with_svtav1:--enable-libsvtav1} \\\ + %{?_with_svtvp9:--enable-libsvtvp9} \\\ + %{?_with_svthevc:--enable-libsvthevc} \\\ + %{?_with_tesseract:--enable-libtesseract} \\\ + %{?_with_openh264:--enable-libopenh264} \\\ + %{!?_with_openh264-dlopen:--enable-libopenh264} \\\ + --enable-libtheora \\\ + %{?_with_twolame:--enable-libtwolame} \\\ + --enable-libvorbis \\\ + --enable-libv4l2 \\\ + %{!?_without_vidstab:--enable-libvidstab} \\\ + %{?_with_vmaf:--enable-libvmaf --enable-version3} \\\ + %{?_with_vapoursynth:--enable-vapoursynth} \\\ + %{!?_without_vpx:--enable-libvpx} \\\ + %{!?_without_vulkan:--enable-vulkan --enable-libshaderc} \\\ + %{?_with_webp:--enable-libwebp} \\\ + %{!?_without_x264:--enable-libx264} \\\ + %{!?_without_x265:--enable-libx265} \\\ + %{!?_without_xvid:--enable-libxvid} \\\ + --enable-libxml2 \\\ + %{!?_without_zimg:--enable-libzimg} \\\ + %{?_with_zmq:--enable-libzmq} \\\ + %{!?_without_zvbi:--enable-libzvbi} \\\ + %{!?_without_lv2:--enable-lv2} \\\ + --enable-avfilter \\\ + --enable-libmodplug \\\ + --enable-postproc \\\ + --enable-pthreads \\\ + --disable-static \\\ + --enable-shared \\\ + %{!?_without_gpl:--enable-gpl} \\\ + --disable-debug \\\ + --disable-stripping + + +%prep +%if 0%{?date} +%autosetup -p1 -n ffmpeg-%{?branch}%{date} +echo "git-snapshot-%{?branch}%{date}-rpmfusion" > VERSION +%else +%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}' +%autosetup -p1 -n ffmpeg-%{version} +%endif +# fix -O3 -g in host_cflags +sed -i "s|check_host_cflags -O3|check_host_cflags %{optflags}|" configure +mkdir -p _doc/examples +cp -pr doc/examples/{*.c,Makefile,README} _doc/examples/ + +%build +%{?_with_cuda:export PATH=${PATH}:%{_cuda_bindir}} +%{ff_configure}\ + --shlibdir=%{_libdir} \ +%if 0%{?_without_tools:1} + --disable-doc \ + --disable-ffmpeg --disable-ffplay --disable-ffprobe \ +%endif +%ifnarch %{ix86} + --enable-lto \ +%endif +%ifarch %{ix86} + --cpu=%{_target_cpu} \ +%endif + %{?_with_mfx:--enable-libmfx} \ + %{?_with_vpl:--enable-libvpl} \ +%ifarch %{ix86} x86_64 %{power64} + --enable-runtime-cpudetect \ +%endif +%ifarch %{power64} +%ifarch ppc64 + --cpu=g5 \ +%endif +%ifarch ppc64p7 + --cpu=power7 \ +%endif +%ifarch ppc64le + --cpu=power8 \ +%endif + --enable-pic \ +%endif +%ifarch %{arm} + --disable-runtime-cpudetect --arch=arm \ +%ifarch armv6hl + --cpu=armv6 \ +%endif +%ifarch armv7hl armv7hnl + --cpu=armv7-a \ + --enable-vfpv3 \ + --enable-thumb \ +%endif +%ifarch armv7hl + --disable-neon \ +%endif +%ifarch armv7hnl + --enable-neon \ +%endif +%endif + || cat ffbuild/config.log + +%make_build V=1 +make documentation V=1 +make alltools V=1 + +%install +%make_install V=1 +%if 0%{!?flavor:1} +rm -r %{buildroot}%{_datadir}/%{name}/examples +%endif +%if 0%{!?progs_suffix:1} +install -pm755 tools/qt-faststart %{buildroot}%{_bindir} +%endif + +%if %{with libavcodec_freeworld} +# Install the libavcodec freeworld counterpart +mkdir -p %{buildroot}%{_sysconfdir}/ld.so.conf.d/ +mkdir -p %{buildroot}%{_libdir}/%{name} +echo -e "%{_libdir}/%{name}\n" > %{buildroot}%{_sysconfdir}/ld.so.conf.d/%{name}-%{_lib}.conf +cp -pa %{buildroot}%{_libdir}/libavcodec.so.* \ + %{buildroot}%{_libdir}/%{name} +# Strip to prevent debuginfo duplication +strip %{buildroot}%{_libdir}/%{name}/libavcodec.so.* +%endif + +%ldconfig_scriptlets libs +%ldconfig_scriptlets -n libavdevice%{?flavor} + +%if 0%{!?_without_tools:1} +%files +%{_bindir}/ffmpeg%{?progs_suffix} +%{_bindir}/ffplay%{?progs_suffix} +%{_bindir}/ffprobe%{?progs_suffix} +%{!?progs_suffix:%{_bindir}/qt-faststart} +%{!?flavor: +%{_mandir}/man1/ffmpeg*.1* +%{_mandir}/man1/ffplay*.1* +%{_mandir}/man1/ffprobe*.1* +} +%{_datadir}/%{name} +%endif + +%files libs +%doc CREDITS README.md +%license COPYING.* +%{_libdir}/lib*.so.* +%exclude %{_libdir}/libavdevice%{?build_suffix}.so.* +%{!?flavor:%{_mandir}/man3/lib*.3.* +%exclude %{_mandir}/man3/libavdevice.3* +} + +%files -n libavdevice%{?flavor} +%{_libdir}/libavdevice%{?build_suffix}.so.6* +%{!?flavor:%{_mandir}/man3/libavdevice.3*} + +%files devel +%doc MAINTAINERS doc/APIchanges doc/*.txt +%doc _doc/examples +%doc %{_docdir}/%{name}/*.{css,html} +%{_includedir}/%{name} +%{_libdir}/pkgconfig/lib*.pc +%{_libdir}/lib*.so + +%if %{with libavcodec_freeworld} +%files -n libavcodec%{?flavor}-freeworld +%{_sysconfdir}/ld.so.conf.d/%{name}-%{_lib}.conf +%{_libdir}/%{name}/libavcodec.so.6* +%endif + + +%changelog +* Tue May 28 2024 Raven - 6.1.1-3 +- build as a compat-* package due to the upcoming + ffmpeg 7 + +* Wed Mar 6 2024 Raven - 6.1.1-2 +- fix for chromium +- add openh264 support + +* Wed Jan 3 2024 Raven - 6.1.1-1 +- Update to 6.1.1 release + +* Mon Nov 13 2023 Raven - 6.1-1 +- Update to 6.1 release + +* Fri Mar 24 2023 Leigh Scott - 6.0-7 +- rebuilt + +* Wed Mar 22 2023 Nicolas Chauvet - 6.0-6 +- Rebuilt + +* Sat Mar 18 2023 Todd Zullinger - 6.0-5 +- verify upstream source signature + +* Sun Mar 12 2023 Leigh Scott - 6.0-4 +- Rebuild against new nvcodec-headers + +* Sun Mar 12 2023 Leigh Scott - 6.0-3 +- Enable chromaprint +- Enable svt-av1 on all arches + +* Tue Feb 28 2023 Leigh Scott - 6.0-2 +- Disable chromaprint + +* Tue Feb 21 2023 Leigh Scott - 6.0-1 +- Update to 6.0 release + +* Sun Jan 08 2023 Leigh Scott - 5.1.2-9 +- Enable libplacebo (rfbz#6549) + +* Fri Dec 23 2022 Nicolas Chauvet - 5.1.2-8 +- rebuild + +* Mon Nov 21 2022 Nicolas Chauvet - 5.1.2-6 +- Enable libjxl +- Enable svt-av1 on el9 x86_64 + +* Thu Nov 17 2022 Nicolas Chauvet - 5.1.2-5 +- Rework el9 cases + +* Mon Oct 17 2022 Leigh Scott - 5.1.2-3 +- Disable rtmp because of rfbz: 6441 & 2399 + +* Wed Sep 28 2022 Nicolas Chauvet - 5.1.2-2 +- Implement libavcodec-freeworld + +* Sun Sep 25 2022 Leigh Scott - 5.1.2-1 +- Update to 5.1.2 release + +* Mon Sep 05 2022 Leigh Scott - 5.1.1-3 +- Switch from glslang to shaderc + +* Sun Sep 04 2022 Leigh Scott - 5.1.1-2 +- move libs to a subdirectory to allow parallel installation with ffmpeg-free + +* Thu Sep 01 2022 Leigh Scott - 5.1.1-1 +- Update to 5.1.1 release + +* Sun Aug 07 2022 RPM Fusion Release Engineering - 5.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild and ffmpeg + 5.1 + +* Fri Jul 22 2022 Leigh Scott - 5.1-1 +- Update to 5.1 release + +* Mon Jul 11 2022 Leigh Scott - 5.0.1-10 +- rebuilt + +* Thu Jun 23 2022 Robert-André Mauchin - 5.0.1-9 +- Rebuilt for new AOM, dav1d, rav1e and svt-av1 + +* Fri Jun 17 2022 Nicolas Chauvet - 5.0.1-8 +- Rebuilt + +* Sun Jun 12 2022 Sérgio Basto - 5.0.1-7 +- unbootstrap + +* Sun Jun 12 2022 Sérgio Basto - 5.0.1-6 +- Mass rebuild for x264-0.164 +- Bootstrap build without chromaprint + +* Fri May 27 2022 Leigh Scott - 5.0.1-5 +- rebuilt + +* Fri May 27 2022 Leigh Scott - 5.0.1-4 +- rebuilt + +* Fri Apr 29 2022 Leigh Scott - 5.0.1-3 +- Fix zimg + +* Tue Apr 05 2022 Leigh Scott - 5.0.1-2 +- Add conflicts + +* Tue Apr 05 2022 Leigh Scott - 5.0.1-1 +- Update to 5.0.1 release + +* Sun Mar 13 2022 Leigh Scott - 5.0-7 +- Rebuilt + +* Fri Mar 11 2022 Leigh Scott - 5.0-6 +- Enable AMF support + +* Thu Mar 03 2022 Leigh Scott - 5.0-5 +- Rebuild + +* Sat Feb 26 2022 Leigh Scott - 5.0-4 +- Drop patch for chrome + +* Fri Feb 11 2022 Leigh Scott - 5.0-3 +- Add patch for chrome + +* Fri Feb 04 2022 Leigh Scott - 5.0-2 +- rebuilt + +* Sat Jan 15 2022 Leigh Scott - 5.0-1 +- Update to 5.0 release + +* Tue Jan 04 2022 Leigh Scott - 5.0-0.1.20220104git311ea9c +- Update to 5.0-0.1.20220104git311ea9c + +* Sun Dec 19 2021 Leigh Scott - 4.5-0.3.20211108git45dc668 +- rebuilt + +* Thu Dec 16 2021 Nicolas Chauvet - 4.5-0.2.20211108git45dc668 +- Rebuilt + +* Mon Nov 08 2021 Leigh Scott - 4.5-0.1.20211108git45dc668 +- Update to 4.5-0.1.20211108git45dc668 + +* Mon Oct 25 2021 Leigh Scott - 4.4.1-1 +- Update to 4.4.1 release + +* Mon Aug 02 2021 RPM Fusion Release Engineering - 4.4-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild + +* Wed Jul 28 2021 Leigh Scott - 4.4-6 +- Enable libwebp support + +* Sat Jul 10 2021 Sérgio Basto - 4.4-5 +- Mass rebuild for x264-0.163 + +* Sun Jun 13 2021 Leigh Scott - 4.4-4 +- Rebuild for aom bump + +* Mon May 10 2021 Leigh Scott - 4.4-3 +- rebuilt + +* Wed Apr 14 2021 Leigh Scott - 4.4-2 +- Rebuild for new x265 + +* Fri Apr 09 2021 Leigh Scott - 4.4-1 +- Update to 4.4 release + +* Thu Apr 08 2021 Leigh Scott - 4.4-0.8.20210408git25e794a +- Update to 4.4-0.8.20210408git25e794a + +* Wed Mar 24 2021 Leigh Scott - 4.4-0.7.20210323git0be265e +- rebuilt + +* Tue Mar 23 2021 Leigh Scott - 4.4-0.6.20210323git0be265e +- Update to 4.4-0.6.20210323git0be265e +- Switch to release/4.4 branch + +* Fri Mar 12 2021 Leigh Scott - 4.4-0.5.20210312git5136726 +- Update to 20210312git5136726 + +* Thu Feb 18 2021 Leigh Scott - 4.4-0.4.20210218gitc2bf1dc +- Update to 20210218gitc2bf1dc + +* Wed Feb 03 2021 RPM Fusion Release Engineering - 4.4-0.3.20210125gitc7016e3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild + +* Mon Jan 25 2021 Leigh Scott - 4.4-0.2.20210125gitc7016e3 +- Update to 20210125gitc7016e3 + +* Thu Dec 31 2020 Leigh Scott - 4.4-0.1.20201231git477dd2d +- Update to 20201231git477dd2d + +* Thu Dec 24 2020 Leigh Scott - 4.3.1-15 +- Enable dash demuxer (rfbz#5876) +- Enable lv2 support (rfbz#5863) + +* Mon Dec 14 2020 Leigh Scott - 4.3.1-14 +- Actually do the dav1d rebuild + +* Mon Dec 14 2020 Robert-André Mauchin - 4.3.1-13 +- Rebuild for dav1d SONAME bump + +* Fri Nov 27 2020 Sérgio Basto - 4.3.1-12 +- Mass rebuild for x264-0.161 + +* Sat Oct 10 2020 Leigh Scott - 4.3.1-11 +- Revert last commit + +* Sat Oct 10 2020 Leigh Scott - 4.3.1-10 +- Add VP9 10/12 Bit support for VDPAU + +* Tue Aug 18 2020 Leigh Scott - 4.3.1-9 +- Disable vulkan on i686 + +* Mon Aug 17 2020 RPM Fusion Release Engineering - 4.3.1-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild + +* Sun Aug 16 2020 Leigh Scott - 4.3.1-7 +- Disable rav1e support as rust packaging is rawhide only + +* Sun Aug 09 2020 Leigh Scott - 4.3.1-6 +- Enable LTO for x86 +- Add glslang patches and bump version for build requires +- Add upstream patches to suppress asm warnings + +* Mon Aug 03 2020 Leigh Scott - 4.3.1-5 +- Disable LTO for x86 + +* Mon Aug 03 2020 Leigh Scott - 4.3.1-4 +- Add patch to fix x86_64 LTO build issue + +* Wed Jul 15 2020 Leigh Scott - 4.3.1-3 +- Enabled libopenmpt + +* Tue Jul 14 2020 Leigh Scott - 4.3.1-2 +- Enable libmysofa + +* Sat Jul 11 2020 Leigh Scott - 4.3.1-1 +- Update to 4.3.1 release + +* Wed Jul 08 2020 Leigh Scott - 4.3-5 +- Rebuilt + +* Tue Jul 07 2020 Sérgio Basto - 4.3-4 +- Mass rebuild for x264 + +* Wed Jul 01 2020 Leigh Scott - 4.3-3 +- Rebuilt + +* Wed Jun 24 2020 Leigh Scott - 4.3-2 +- Enable vapoursynth + +* Mon Jun 15 2020 Leigh Scott - 4.3-1 +- Update to 4.3 release + +* Sat Jun 06 2020 Leigh Scott - 4.3-0.23.20200606git +- Update to 20200606git + +* Sun May 31 2020 Leigh Scott - 4.3-0.22.20200531git +- Update to 20200531git + +* Mon May 25 2020 Leigh Scott - 4.3-0.21.20200524git +- Enable lensfun + +* Sun May 24 2020 Leigh Scott - 4.3-0.20.20200524git +- Rebuild for dav1d SONAME bump + +* Sat May 23 2020 Leigh Scott - 4.3-0.19.20200523git +- Update to 20200523git + +* Sat May 16 2020 Leigh Scott - 4.3-0.18.20200516git +- Update to 20200516git + +* Fri May 08 2020 Leigh Scott - 4.3-0.17.20200508git +- Update to 20200508git + +* Fri May 01 2020 Leigh Scott - 4.3-0.16.20200501git +- Update to 20200501git + +* Thu Apr 23 2020 Leigh Scott - 4.3-0.15.20200423git +- Update to 20200423git +- Enable nvdec for aarch64 + +* Sun Apr 19 2020 Leigh Scott - 4.3-0.14.20200419git +- Update to 20200419git + +* Sun Apr 12 2020 Leigh Scott - 4.3-0.13.20200412git +- Update to 20200412git + +* Wed Apr 08 2020 Nicolas Chauvet - 4.3-0.12.20200401git +- Enable srt + +* Wed Apr 01 2020 Leigh Scott - 4.3-0.11.20200401git +- Update snapshot, fixes rfbz#5537 + +* Wed Apr 01 2020 leigh123linux - 4.3-0.10.20200401git +- Update to 20200401git + +* Sat Mar 21 2020 Leigh Scott - 4.3-0.9.20200321git +- Update to 20200321git + +* Fri Mar 13 2020 leigh123linux - 4.3-0.8.20200313git +- Update to 20200313git + +* Wed Mar 11 2020 Leigh Scott - 4.3-0.7.20200305git +- Rebuilt for i686 + +* Mon Mar 09 2020 leigh123linux - 4.3-0.6.20200305git +- Enable rav1e support + +* Thu Mar 05 2020 Leigh Scott - 4.3-0.5.20200305git +- Update to 20200305git + +* Tue Feb 25 2020 Leigh Scott - 4.3-0.4.20200225git +- Update to 20200225git + +* Sun Feb 23 2020 Leigh Scott - 4.3-0.3.20200222git +- Rebuild for x265 + +* Sun Feb 23 2020 Leigh Scott - 4.3-0.2.20200222git +- Enable vulkan support + +* Sat Feb 22 2020 Leigh Scott - 4.3-0.1.20200222git +- Update to 20200222git + +* Tue Feb 04 2020 RPM Fusion Release Engineering - 4.2.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild + +* Wed Jan 01 2020 Leigh Scott - 4.2.2-1 +- Update to 4.2.2 release + +* Tue Dec 17 2019 Sérgio Monteiro Basto - 4.2.1-5 +- Mass rebuild for x264 + +* Thu Nov 28 2019 Leigh Scott - 4.2.1-4 +- Rebuilt for x265 + +* Thu Oct 24 2019 Leigh Scott - 4.2.1-3 +- Rebuild for dav1d SONAME bump + +* Sat Sep 07 2019 Leigh Scott - 4.2.1-2 +- Enable libjack (rfbz #5346) + +* Sat Sep 07 2019 Leigh Scott - 4.2.1-1 +- Update to 4.2.1 release + +* Mon Aug 26 2019 Leigh Scott - 4.2-4 +- Rebuild for el8 + +* Tue Aug 20 2019 Leigh Scott - 4.2-3 +- Rebuild for dav1d and aom SONAME bump +- Drop XvMC support (rfbz #5328) + +* Fri Aug 09 2019 RPM Fusion Release Engineering - 4.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild + +* Mon Aug 05 2019 Leigh Scott - 4.2-1 +- Update to 4.2 release +- Enable dav1d support + +* Sat Jul 27 2019 Nicolas Chauvet - 4.1.4-2 +- Add patch for set_default_priority + +* Tue Jul 09 2019 Leigh Scott - 4.1.4-1 +- Update to 4.1.4 release + +* Fri Jun 28 2019 Nicolas Chauvet - 4.1.3-3 +- Rebuilt for x265 + +* Sat Apr 06 2019 Nicolas Chauvet - 4.1.3-2 +- Backport avutil/mem: Fix invalid use of av_alloc_size - rfbz#5149 + +* Mon Apr 01 2019 Leigh Scott - 4.1.3-1 +- Update to 4.1.3 release + +* Sat Mar 23 2019 Leigh Scott - 4.1.2-1 +- Update to 4.1.2 release + +* Tue Mar 12 2019 Sérgio Basto - 4.1.1-4 +- Mass rebuild for x264 + +* Mon Mar 04 2019 RPM Fusion Release Engineering - 4.1.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Thu Feb 28 2019 Leigh Scott - 4.1.1-2 +- Rebuild for new x265 + +* Sun Feb 10 2019 Leigh Scott - 4.1.1-1 +- Update to 4.1.1 release + +* Fri Jan 25 2019 Dominik Mierzejewski - 4.1-7 +- Enable libssh support by default (rfbz#5135) + +* Thu Jan 24 2019 Nicolas Chauvet - 4.1-6 +- Drop opencv by default + OpenCV 3.X has an overlinking issue - unsuitable for core libraries + Reported as https://github.com/opencv/opencv/issues/7001 + +* Fri Dec 21 2018 Nicolas Chauvet - 4.1-5 +- Add omx/omx_rpi + +* Sun Nov 18 2018 Leigh Scott - 4.1-4 +- Rebuild for new x265 + +* Fri Nov 09 2018 Nicolas Chauvet - 4.1-3 +- Fix for cuda enabled repo + +* Thu Nov 08 2018 Nicolas Chauvet - 4.1-2 +- Add support for rpi +- Enable libvmaf for x86_64 + +* Tue Nov 06 2018 Leigh Scott - 4.1-1 +- Update to 4.1 release + +* Sat Nov 03 2018 Leigh Scott - 4.0.3-1 +- Update to 4.0.3 release + +* Thu Oct 04 2018 Leigh Scott - 4.0.2-8 +- Add upstream commit to fix aom build failure + +* Thu Oct 04 2018 Sérgio Basto - 4.0.2-7 +- Mass rebuild for x264 and/or x265 + +* Fri Sep 14 2018 Leigh Scott - 4.0.2-6 +- Change BuildRequires: aom-devel to libaom-devel + +* Tue Sep 11 2018 Robert-André Mauchin - 4.0.2-5 +- Add support for libaom (rfbz#5016) + +* Wed Sep 05 2018 Nicolas Chauvet - 4.0.2-4 +- Add without_opus +- Add disable opus and mfx for rhel +- Enable nvenc for rhel + +* Sun Jul 29 2018 Julian Sikorski - 4.0.2-3 +- Add spec fixes from rfbz #4964 + +* Thu Jul 26 2018 RPM Fusion Release Engineering - 4.0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Wed Jul 18 2018 Leigh Scott - 4.0.2-1 +- Update to 4.0.2 release + +* Fri Jul 06 2018 Leigh Scott - 4.0.1-2 +- enable libzvbi by default (rfbz#4956) + +* Sat Jun 16 2018 Leigh Scott - 4.0.1-1 +- Update to 4.0.1 release + +* Sat Jun 16 2018 Leigh Scott - 4.0-2 +- Rebuild for new libass version + +* Fri Apr 20 2018 Leigh Scott - 4.0-1 +- Update to 4.0 release + +* Thu Apr 19 2018 Leigh Scott - 4.0-0.1.20180419git +- Update to 20180419 (release/4.0 branch) + +* Mon Mar 05 2018 Leigh Scott - 3.5-0.6.20180305git +- Update to 20180305 +- Change build requires for nvenc + +* Wed Feb 28 2018 Leigh Scott - 3.5-0.5.20180211git +- Rebuilt for x265 + +* Tue Feb 27 2018 Nicolas Chauvet - 3.5-0.4.20180211git +- Rebuilt for x265 + +* Sun Feb 11 2018 Leigh Scott - 3.5-0.3.20180211git +- Update to 20180211git + +* Fri Jan 26 2018 Leigh Scott - 3.5-0.2.20180116git +- Rebuild for new libcdio and libvpx versions + +* Tue Jan 16 2018 Leigh Scott - 3.5-0.1.20180116git +- Update to 20180116git +- Remove ffserver parts from spec +- Add requires ffmpeg-libs to libavdevice (rfbz#4768) + +* Mon Jan 15 2018 Nicolas Chauvet - 3.4.1-5 +- Update to libva 2.0.0 + +* Sat Dec 30 2017 Sérgio Basto - 3.4.1-4 +- Mass rebuild for x264 and x265 + +* Sun Dec 17 2017 Nicolas Chauvet - 3.4.1-3 +- Add _cuda_version rpm macro + +* Mon Dec 11 2017 Nicolas Chauvet - 3.4.1-2 +- Backport patch for arm neon rfbz#4727 + +* Mon Dec 11 2017 Leigh Scott - 3.4.1-1 +- Updated to 3.4.1 + +* Tue Nov 28 2017 Dominik Mierzejewski - 3.4-6 +- enable support for vid.stab (rfbz#4713) +- rebuild against new libmfx (rhbz#1471768) + +* Wed Oct 25 2017 Dominik Mierzejewski - 3.4-5 +- drop support for building on ppc (32bit) +- explicitly support ppc64p7 and ppc64le +- set correct CPU options on armv7hl +- show config.log in case of configure failure +- enable VAAPI support on all arches, it's not x86-specific anymore + +* Wed Oct 25 2017 Leigh Scott - 3.4-4 +- Switch from yasm to nasm + +* Wed Oct 25 2017 Leigh Scott - 3.4-3 +- Add SVG rasterization and KMS screengrabber support + +* Mon Oct 16 2017 Leigh Scott - 3.4-2 +- rebuild for x265 + +* Sun Oct 15 2017 Leigh Scott - 3.4-1 +- Updated to 3.4 +- Remove build requires schroedinger-devel (wrapper was removed) + +* Thu Oct 12 2017 Dominik Mierzejewski - 3.3.4-2 +- add support for OpenJPEG v2.3 + +* Tue Sep 12 2017 Leigh Scott - 3.3.4-1 +- Updated to 3.3.4 + +* Thu Aug 31 2017 Leigh Scott - 3.3.3-4 +- Add support for LibOpenJPEG v2.2 + +* Thu Aug 31 2017 RPM Fusion Release Engineering - 3.3.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Thu Aug 31 2017 RPM Fusion Release Engineering - 3.3.3-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Sat Jul 29 2017 Leigh Scott - 3.3.3-1 +- Updated to 3.3.3 + +* Wed Jun 07 2017 Leigh Scott - 3.3.2-1 +- Updated to 3.3.2 + +* Mon May 15 2017 Leigh Scott - 3.3.1-1 +- Updated to 3.3.1 + +* Wed Apr 19 2017 Leigh Scott - 3.3-1 +- Updated to 3.3 +- Make nvenc x86 only +- Remove obsolete x11grab configure option + +* Sun Mar 19 2017 RPM Fusion Release Engineering - 3.2.4-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Sat Feb 11 2017 Leigh Scott - 3.2.4-1 +- Updated to 3.2.4 + +* Mon Feb 06 2017 Leigh Scott - 3.2.3-1 +- Updated to 3.2.3 + +* Tue Jan 03 2017 Dominik Mierzejewski - 3.2.2-3 +- rebuild for x265 + +* Mon Jan 02 2017 Dominik Mierzejewski - 3.2.2-2 +- enable optional nonfree build with cuda, cuvid, npp and fdk-aac + (most credit for this goes to Nicolas Chauvet) +- allow disabling x11grab (conflicts with nonfree builds) +- use Recommends only on Fedora (patch by Nicolas Chauvet) +- enable AMR codecs by default (rfbz#4367, patch by Nicolas Chauvet) + +* Tue Dec 06 2016 Julian Sikorski - 3.2.2-1 +- Updated to 3.2.2 + +* Sat Nov 26 2016 Julian Sikorski - 3.2.1-1 +- Updated to 3.2.1 + +* Wed Nov 16 2016 Adrian Reber - 3.2-3 +- Rebuild for libcdio-0.94 + +* Tue Nov 08 2016 Sérgio Basto - 3.2-2 +- Rebuild for x265-2.1 + +* Sat Oct 29 2016 Julian Sikorski - 3.2-1 +- Updated to 3.2 +- Dropped openjpeg2 patch +- Updated BuildRequires to SDL2-devel +- Incorporated some cleanups from RF #4243 + +* Tue Oct 25 2016 Julian Sikorski - 3.1.5-1 +- Updated to 3.1.5 + +* Sat Oct 01 2016 Leigh Scott - 3.1.4-2 +- Fix missing libxvid (rfbz#4274) + +* Sat Oct 01 2016 Julian Sikorski - 3.1.4-1 +- Updated to 3.1.4 + +* Thu Sep 08 2016 Nicolas Chauvet - 3.1.3-3 +- Disable OpenCV for Fedora >= 25 + +* Sat Sep 03 2016 Dominik Mierzejewski - 3.1.3-2 +- enable QSV support by default, since libmfx is in Fedora now +- QSV is x86 only +- put x86-specific BRs in one place + +* Sat Aug 27 2016 Julian Sikorski - 3.1.3-1 +- Updated to 3.1.3 + +* Thu Aug 25 2016 Leigh Scott - 3.1.2-2 +- enable support for nvenc + +* Wed Aug 10 2016 Julian Sikorski - 3.1.2-1 +- Updated to 3.1.2 + +* Wed Jul 27 2016 Julian Sikorski - 3.1.1-1 +- Updated to 3.1.1 +- Dropped included patch +- Added $RPM_LD_FLAGS to %%configure +- Switched to openjpeg2 +- Fixed build with openjpeg2-2.1.1 (patch by Sandro Mani) + +* Sat Jul 23 2016 Igor Gnatenko - 3.0.2-5 +- Rebuild for libvpx soname bump + +* Sun Jul 10 2016 Dominik Mierzejewski - 3.0.2-4 +- enable jack by default (rfbz#2156) +- re-enable opencl by default (rfbz#3640 was fixed) +- add conditional support for QSV via libmfx (rfbz#4043) +- drop libcelt support (celt 0.11 no longer available in Fedora) +- drop libdirac support (unsupported by FFmpeg) +- make xvidcore support optional +- add missing ldconfig calls for libavdevice package +- move libavdevice manpage to its subpackage +- move examples from main package to -devel as docs +- add support for libiec61883 and make DV (IEEE 1394) support optional +- enable optional support for many external libraries (rfbz#4109) + +* Thu Jul 07 2016 Julian Sikorski - 3.0.2-3 +- Fixed build failure on rawhide due to newer opencv using a patch from upstream + git + +* Sun Jun 12 2016 Leigh Scott - 3.0.2-2 +- rebuilt + +* Sat May 14 2016 Michael Kuhn - 3.0.2-1 +- Update to 3.0.2. + +* Mon May 02 2016 Julian Sikorski - 2.8.7-1 +- Updated to 2.8.7 + +* Mon Feb 01 2016 Julian Sikorski - 2.8.6-1 +- Updated to 2.8.6 + +* Sat Jan 16 2016 Julian Sikorski - 2.8.5-1 +- Updated to 2.8.5 + +* Wed Dec 23 2015 Julian Sikorski - 2.8.4-1 +- Updated to 2.8.4 +- Fixed Fraunhofer FDK AAC conditional build (RF # 3898) + +* Sun Nov 29 2015 Julian Sikorski - 2.8.3-1 +- Updated to 2.8.3 + +* Sat Nov 14 2015 Nicolas Chauvet - 2.8.2-1 +- Update to 2.8.2 + +* Sat Oct 24 2015 Nicolas Chauvet - 2.8.1-1 +- Update to 2.8.1 + +* Sat Jul 25 2015 Julian Sikorski - 2.6.4-1 +- Updated to 2.6.4 + +* Wed May 27 2015 Julian Sikorski - 2.6.3-1 +- Updated to 2.6.3 + +* Sat May 16 2015 Nicolas Chauvet - 2.6.2-3 +- Rebuilt for x265 + +* Mon May 11 2015 Nicolas Chauvet - 2.6.2-2 +- Disable opencl by default - rfbz#3640 +- Add with condition for nvenc,fdk_aac + +* Tue May 05 2015 Julian Sikorski - 2.6.2-1 +- Updated to 2.6.2 + +* Tue Apr 28 2015 Julian Sikorski - 2.4.9-1 +- Updated to 2.4.9 + +* Wed Apr 15 2015 Dominik Mierzejewski - 2.4.8-3 +- rebuilt for new x265 + +* Mon Apr 13 2015 Nicolas Chauvet - 2.4.8-2 +- Fix sed for f22 where cflags contains a directory path + +* Mon Mar 30 2015 Julian Sikorski - 2.4.8-1 +- Updated to 2.4.8 + +* Sun Feb 15 2015 Julian Sikorski - 2.4.7-1 +- Updated to 2.4.7 + +* Sun Feb 01 2015 Dominik Mierzejewski - 2.4.6-3 +- enable LADSPA support (rfbz#3134) + +* Sun Feb 01 2015 Dominik Mierzejewski - 2.4.6-2 +- enable OpenCL support +- BR texinfo instead of texi2html to reduce BRs by half +- drop support for building on SPARC (no longer a Fedora Secondary Arch) +- move libavdevice to a subpackage (rfbz#3075) + +* Wed Jan 14 2015 Julian Sikorski - 2.4.6-1 +- Updated to 2.4.6 + +* Sun Dec 21 2014 Julian Sikorski - 2.4.5-1 +- Updated to 2.4.5 + +* Thu Dec 18 2014 Dominik Mierzejewski - 2.4.4-2 +- enable support for libx265 by default (rfbz#3421, patch by Nerijus Baliūnas) + +* Mon Dec 01 2014 Julian Sikorski - 2.4.4-1 +- Updated to 2.4.4 + +* Tue Nov 04 2014 Nicolas Chauvet - 2.4.3-2 +- Rebuilt for vaapi 0.36 + +* Sun Nov 02 2014 Julian Sikorski - 2.4.3-1 +- Updated to 2.4.3 + +* Sun Oct 19 2014 Sérgio Basto - 2.4.2-1 +- Update to ffmpeg-2.4.2 + +* Fri Oct 03 2014 Julian Sikorski - 2.3.4-1 +- Updated to 2.3.4 + +* Sat Sep 27 2014 kwizart - 2.3.3-3 +- Rebuild back to ffmpeg 2.3x + +* Sat Sep 13 2014 Nicolas Chauvet - 2.3.3-2 +- Disable libcelt by default - rfbz#3359 + +* Tue Sep 02 2014 Julian Sikorski - 2.3.3-1 +- Updated to 2.3.3 + +* Tue Aug 12 2014 Julian Sikorski - 2.3.2-1 +- Updated to 2.3.2 + +* Sun Aug 03 2014 Julian Sikorski - 2.3.1-1 +- Updated to 2.3.1 +- README → README.md + +* Tue Jul 15 2014 Julian Sikorski - 2.2.5-1 +- Updated to 2.2.5 + +* Tue Jul 08 2014 Julian Sikorski - 2.2.4-1 +- Updated to 2.2.4 + +* Wed Jun 04 2014 Julian Sikorski - 2.2.3-1 +- Updated to 2.2.3 + +* Mon May 05 2014 Julian Sikorski - 2.2.2-1 +- Updated to 2.2.2 + +* Fri Apr 18 2014 Nicolas Chauvet - 2.2.1-1 +- Update to 2.2.1 + +* Mon Mar 24 2014 Julian Sikorski - 2.2-1 +- Updated to 2.2 + +* Fri Mar 21 2014 Julian Sikorski - 2.1.4-4 +- Rebuilt for libass-0.10.2 + +* Tue Mar 18 2014 Julian Sikorski - 2.1.4-3 +- Rebuilt for x264 + +* Thu Mar 06 2014 Nicolas Chauvet - 2.1.4-2 +- Rebuilt for x264 + +* Tue Feb 25 2014 Julian Sikorski - 2.1.4-1 +- Updated to 2.1.4 + +* Thu Jan 16 2014 Julian Sikorski - 2.1.3-1 +- Updated to 2.1.3 + +* Wed Nov 20 2013 Nicolas Chauvet - 2.1.1-1 +- Update to 2.1.1 + +* Tue Oct 29 2013 Julian Sikorski - 2.1-1 +- Updated to 2.1 + +* Tue Oct 22 2013 Nicolas Chauvet - 2.0.2-2 +- Rebuilt for x264 + +* Wed Oct 09 2013 Julian Sikorski - 2.0.2-1 +- Updated to 2.0.2 + +* Mon Sep 30 2013 Nicolas Chauvet - 2.0.1-3 +- Rebuilt + +* Tue Aug 27 2013 Nicolas Chauvet - 2.0.1-2 +- Enable avresample as noticed by Xavier Bachelot + +* Tue Aug 13 2013 Nicolas Chauvet - 2.0.1-1 +- Update to 2.0.1 + +* Thu Aug 01 2013 Julian Sikorski - 2.0-1 +- Updated to 2.0 +- Dropped the no longer needed bogus man dir work-around + +* Thu Aug 01 2013 Julian Sikorski - 1.2.2-1 +- Updated to 1.2.2 + +* Sat Jul 20 2013 Nicolas Chauvet - 1.2.1-7 +- Rebuilt for x264 + +* Tue Jul 02 2013 Dominik Mierzejewski - 1.2.1-6 +- fix building with libcdio + +* Mon Jul 01 2013 Dominik Mierzejewski - 1.2.1-5 +- build with soxr support enabled (rfbz#2853) + +* Thu Jun 27 2013 Nicolas Chauvet - 1.2.1-4 +- Reverse the logic for neon on arm + +* Wed Jun 19 2013 Nicolas Chauvet - 1.2.1-3 +- Enable neon on armv7hnl +- Enable thumb on all arm but armv6hl + +* Tue May 14 2013 Julian Sikorski - 1.2.1-1 +- Updated to 1.2.1 + +* Sun May 05 2013 Julian Sikorski - 1.2-2 +- Rebuilt for x264-0.130 + +* Mon Mar 18 2013 Julian Sikorski - 1.2-1 +- Updated to 1.2 + +* Mon Mar 18 2013 Julian Sikorski - 1.1.4-1 +- Updated to 1.1.4 + +* Sun Mar 10 2013 Nicolas Chauvet - 1.1.3-1 +- Update to 1.1.3 + +* Sun Jan 20 2013 Nicolas Chauvet - 1.1.1-1 +- Update to 1.1.1 +- Disable libcdio with fedora 19 + +* Mon Jan 07 2013 Julian Sikorski - 1.1-1 +- Updated to 1.1 +- Added new man pages + +* Tue Dec 04 2012 Julian Sikorski - 1.0.1-1 +- Updated to 1.0.1 + +* Fri Nov 23 2012 Julian Sikorski - 1.0-5 +- Rebuilt for x264-0.128 + +* Sat Nov 03 2012 Julian Sikorski - 1.0-4 +- Fixed -O3 -g in host_cflags +- Made the installation verbose too + +* Sat Nov 03 2012 Julian Sikorski - 1.0-3 +- Use Fedora %%{optflags} +- Made the build process verbose + +* Thu Nov 01 2012 Nicolas Chauvet - 1.0-2 +- Add opus +- Enable opencv frei0r by default +- Disable librmtp - use builtin implementation rfbz#2399 + +* Thu Oct 04 2012 Julian Sikorski - 1.0-1 +- Updated to 1.0 +- Dropped obsolete Group, Buildroot, %%clean and %%defattr +- Dropped the included patch + +* Wed Sep 05 2012 Nicolas Chauvet - 0.11.1-3 +- Rebuilt for x264 ABI 125 + +* Sat Jul 21 2012 Nicolas Chauvet - 0.11.1-2 +- Backport fix rfbz#2423 + +* Thu Jun 14 2012 Julian Sikorski - 0.11.1-1 +- Updated to 0.11.1 + +* Wed Jun 13 2012 Julian Sikorski - 0.10.4-1 +- Updated to 0.10.4 + +* Mon May 07 2012 Julian Sikorski - 0.10.3-1 +- Updated to 0.10.3 + +* Tue May 01 2012 Nicolas Chauvet - 0.10.2-3 +- Sync with ffmpeg-compat and EL +- Add BR libmodplug-devel +- Enable libass openal-soft + +* Tue Apr 10 2012 Nicolas Chauvet - 0.10.2-2 +- Explicitely disable neon unless armv7hnl + +* Sun Mar 18 2012 Julian Sikorski - 0.10.2-1 +- Updated to 0.10.2 + +* Mon Mar 12 2012 root - 0.10-2 +- Rebuilt for x264 ABI 0.120 + +* Sun Feb 19 2012 Nicolas Chauvet - 0.10-1 +- Update to 0.10 +- Disable dirac by default - rfbz#1946 +- Enabled by default: libv4l2 gnutls +- New RPM Conditionals: + --with crystalhd dirac jack frei0r openal opencv + --without celt cdio pulse + +* Wed Feb 01 2012 Nicolas Chauvet - 0.8.9-1 +- Update to 0.8.9 +- Add BR libass-devel +- Rebuilt for libvpx + +* Mon Jan 09 2012 Nicolas Chauvet - 0.8.8-1 +- Update to 0.8.8 + +* Wed Dec 21 2011 Nicolas Chauvet - 0.8.7-1 +- Update to 0.8.7 + +* Fri Oct 28 2011 Nicolas Chauvet - 0.8.5-2 +- Fix for glibc bug rhbz#747377 + +* Sun Oct 23 2011 Dominik Mierzejewski - 0.8.5-1 +- update to 0.8.5 + +* Fri Sep 23 2011 Dominik Mierzejewski - 0.8.4-1 +- update to 0.8.4 +- fix FFmpeg name spelling + +* Mon Aug 22 2011 Dominik Mierzejewski - 0.8.2-1 +- update to 0.8.2 +- enable CELT decoding via libcelt +- support AMR WB encoding via libvo-amrwbenc (optional) +- enable FreeType support + +* Thu Jul 14 2011 Nicolas Chauvet - 0.7.1-1 +- Update to 0.7.1 + +* Fri Jul 01 2011 Nicolas Chauvet - 0.7-0.3.20110612git +- Add XvMC in ffmpeg + +* Sun Jun 12 2011 Nicolas Chauvet - 0.7-0.2.20110612git +- Update to 20110612git from oldabi branch + +* Sun Jun 12 2011 Nicolas Chauvet - 0.7-0.1.rc1 +- Update to 7.0-rc1 +- Remove upstreamed patch +- Fix flv - rfbz#1743 +- New RPM build conditional --without x264. + +* Tue Apr 12 2011 Dominik Mierzejewski - 0.6.90-0.2.rc0 +- fixed missing av_parser_parse symbol (upstream patch) + +* Mon Apr 04 2011 Dominik Mierzejewski - 0.6.90-0.1.rc0 +- updated to 0.6.90-rc0 release +- ensure main package is version-locked to the -libs subpackage + +* Sun Feb 27 2011 Dominik Mierzejewski - 0.6.1-1.20110227git +- 20110227 snapshot +- bump version to post-0.6.1 to allow stable 0.6.1 update in older branches +- drop --with amr->opencore_amr indirection +- add qt-faststart tool (bug #1259) +- build PIC objects on PPC (bug #1457) +- provide custom version string +- require latest x264 build + +* Fri Jan 21 2011 Hans de Goede - 0.6-5.20100704svn +- Rebuild for new openjpeg + +* Wed Jul 21 2010 Nicolas Chauvet - 0.6-4.20100704svn +- Enable libva +- Restore compatibility --with amr + +* Mon Jul 05 2010 Nicolas Chauvet - 0.6-3.20100704svn +- Fix build using --define ffmpegsuffix 'foo' +- Disable FFmpeg binaries when built with suffix. + +* Sun Jul 04 2010 Dominik Mierzejewski - 0.6-2.20100704svn +- 20100703 snapshot +- enable libvpx (WebM/VP8) support (rfbz#1250) +- drop faad2 support (dropped upstream) +- drop old Obsoletes: +- enable librtmp support + +* Sat Jun 19 2010 Dominik Mierzejewski - 0.6-1.20100619svn +- 20100619 snapshot + +* Thu Apr 29 2010 Dominik Mierzejewski - 0.6-0.3.20100429svn +- 20100429 snapshot +- dropped unnecessary imlib2-devel BR + +* Sat Mar 20 2010 Dominik Mierzejewski - 0.6-0.2.20100320svn +- bump for rebuild + +* Sat Mar 20 2010 Dominik Mierzejewski - 0.6-0.1.20100320svn +- 20100320 snapshot +- drop upstream'd patch +- bumped version to pre-0.6 +- added ffprobe to file list + +* Sat Jan 16 2010 Dominik Mierzejewski - 0.5-6.20100116svn +- 20100116 snapshot, requires recent x264 +- fix textrels on x86_64 in a different way (patch by Reimar Döffinger) +- use -mlongcall instead of -fPIC to fix rfbz#804, it's faster + +* Sat Nov 7 2009 Hans de Goede - 0.5-5.20091026svn +- Add -fPIC -dPIC when compiling on ppc (rf804) + +* Thu Oct 22 2009 Dominik Mierzejewski - 0.5-4.20091026svn +- 20091026 snapshot, requires recent x264 +- dropped support for old amr libs (not supported upstream since July) +- don't disable yasm for generic builds +- fixed opencore amr support +- dropped workaround for non-standard openjpeg headers location +- dropped separate SIMDified libs for x86 and ppc(64), + runtime CPU detection should be enough + +* Thu Oct 15 2009 kwizart - 0.5-3.svn20091007 +- Update to svn snapshot 20091007 +- Add BR dirac vdpau. +- Use --with nonfree as a separate conditional for amr and faac. +- Use --with gplv3 as a separate conditional for opencore-amr. +- Don't build faac by default because it's nonfree. +- Allow to --define 'ffmpegsuffix custom' for special SONAME. + +* Fri Mar 27 2009 Dominik Mierzejewski - 0.5-2 +- rebuild for new faad2 and x264 + +* Tue Mar 10 2009 Dominik Mierzejewski - 0.5-1 +- 0.5 release +- enable yasm on x86_64, fix resulting textrels +- add missing obsoletes for ffmpeg-compat-devel (really fix bug #173) +- disable yasm and certain asm optimizations for generic ix86 builds +- %%{_bindir} is now usable +- include more docs +- specfile cleanups +- add JPEG2000 decoding support via openjpeg + +* Sat Jan 31 2009 Dominik Mierzejewski - 0.4.9-0.58.20090131 +- 20090131 snapshot + +* Wed Dec 17 2008 Dominik Mierzejewski - 0.4.9-0.57.20081217 +- 20081217 snapshot +- fix pkgconfig files again (broken in 0.4.9-0.55.20081214) + +* Mon Dec 15 2008 Dominik Mierzejewski - 0.4.9-0.56.20081214 +- drop libdirac support for now + +* Sun Dec 14 2008 Dominik Mierzejewski - 0.4.9-0.55.20081214 +- 20081214 snapshot +- change the lib split on x86, it doesn't work right for P3/AthlonXP +- specfile cleanups +- enable bzlib, dirac and speex support via external libs +- sort BR list alphabetically +- drop upstream'd patch + +* Thu Dec 11 2008 Dominik Mierzejewski - 0.4.9-0.54.20081202 +- fix pkgconfig file generation + +* Thu Dec 04 2008 Dominik Mierzejewski - 0.4.9-0.53.20081202 +- 20081202 snapshot +- drop upstreamed/obsolete patches + +* Thu Nov 20 2008 Dominik Mierzejewski - 0.4.9-0.52.20080908 +- add obsoletes for -compat package (RPMFusion bug #173) + +* Sat Nov 01 2008 Dominik Mierzejewski - 0.4.9-0.51.20080908 +- reworked build system +- build optimized versions where it makes sense +- specfile cleanups +- enable yasm for optimized asm routines on x86_32 +- add obsoletes for Freshrpms' libpostproc subpackage + +* Thu Sep 18 2008 Dominik Mierzejewski - 0.4.9-0.50.20080908 +- 20080908 snapshot (r25261), last before ABI change + +* Fri Sep 05 2008 Dominik Mierzejewski - 0.4.9-0.49.20080905 +- 20080905 snapshot +- fix build --with amr +- update snapshot.sh +- drop liba52 support, native ac3 decoder is better in every way + +* Mon Aug 25 2008 Dominik Mierzejewski - 0.4.9-0.48.20080825 +- 20080825 snapshot +- use CFLAGS more similar to upstream +- enable X11 grabbing input +- enable libavfilter + +* Sun Aug 03 2008 Thorsten Leemhuis - 0.4.9-0.46.20080614 +- 20080614 snapshot +- no need to conditionalize swscaler anymore +- dropped obsolete pkgconfig patch +- BR latest x264 + +* Mon Mar 03 2008 Dominik Mierzejewski - 0.4.9-0.45.20080113 +- rebuild for new x264 + +* Sun Jan 13 2008 Dominik Mierzejewski - 0.4.9-0.44.20080113 +- 20080113 snapshot +- drop unnecessary patch +- enable libdc1394 support +- enable swscaler + +* Mon Nov 12 2007 Dominik Mierzejewski - 0.4.9-0.43.20071111 +- ensure that we use the correct faad2 version + +* Sun Nov 11 2007 Dominik Mierzejewski - 0.4.9-0.42.20071111 +- 20071111 snapshot +- current faad2 is good again + +* Thu Oct 18 2007 Dominik Mierzejewski - 0.4.9-0.41.20071011 +- fix BRs and Requires for faad2 + +* Thu Oct 11 2007 Dominik Mierzejewski - 0.4.9-0.40.20071011 +- 20071011 snapshot +- don't link against faad2-2.5, it makes GPL'd binary non-distributable +- go back to normal linking instead of dlopen() of liba52 + +* Sun Sep 23 2007 Dominik Mierzejewski - 0.4.9-0.39.20070923 +- 20070923 snapshot +- use faad2 2.5 +- optional AMR support +- dropped obsolete patch + +* Thu Jun 07 2007 Dominik Mierzejewski - 0.4.9-0.38.20070607 +- 20070607 snapshot +- libdca BR dropped (no longer supported) +- drop gsm.h path hack, gsm in Fedora now provides a compatibility symlink +- remove arch hacks, ffmpeg's configure is smart enough +- enable cmov on x86_64 + +* Thu May 03 2007 Dominik Mierzejewski - 0.4.9-0.37.20070503 +- require older faad2 to prevent bugreports like #1388 +- prepare for libdc1394 support +- enable pthreads +- 20070503 snapshot + +* Thu Feb 08 2007 Dominik Mierzejewski - 0.4.9-0.35.20070204 +- libswscale.pc is necessary regardless of --enable-swscaler + +* Sun Feb 4 2007 Ville Skyttä - 0.4.9-0.34.20070204 +- 2007-02-04 snapshot, enable libtheora. +- Make swscaler optional, disabled again by default (#1379). + +* Fri Jan 05 2007 Dominik Mierzejewski - 0.4.9-0.34.20061214 +- move vhooks to -libs + +* Wed Jan 03 2007 Dominik Mierzejewski - 0.4.9-0.33.20061214 +- split -libs subpackage for multilib installs + +* Tue Dec 26 2006 Dominik Mierzejewski - 0.4.9-0.32.20061214 +- new kino works with swscaler, re-enabled + +* Tue Dec 19 2006 Dominik Mierzejewski - 0.4.9-0.31.20061214 +- disable swscaler, it breaks kino + +* Sun Dec 17 2006 Ville Skyttä - 0.4.9-0.30.20061214 +- fix pkgconfig patch + +* Sat Dec 16 2006 Dominik Mierzejewski - 0.4.9-0.29.20061214 +- liba52 change broke build on 64bit +- resurrect lost URL changes + +* Fri Dec 15 2006 Dominik Mierzejewski - 0.4.9-0.28.20061214 +- fixed build on x86 +- change liba52 file-based dependency to provides-based +- resurrect and update pkgconfig patch + +* Thu Dec 14 2006 Dominik Mierzejewski - 0.4.9-0.27.20061214 +- new snapshot URL +- new URL + +* Thu Dec 14 2006 Dominik Mierzejewski - 0.4.9-0.26.20061214 +- 2006-12-14 snapshot +- added libdca support +- enabled swscaler +- dropped obsolete patches + +* Mon Oct 30 2006 Ville Skyttä - 0.4.9-0.25.20061030 +- 2006-10-30 snapshot, fixes x86_64 build. +- Apply a less intrusive workaround for LAME detection issues. + +* Sat Oct 28 2006 Ville Skyttä - 0.4.9-0.25.20061028 +- 2006-10-28 snapshot, build with x264. +- Clean up some pre-FC4 compat build dependency cruft. +- Quick and dirty workarounds for ./configure's libmp3lame test and asm + register issues on ix86. + +* Fri Oct 06 2006 Thorsten Leemhuis 0.4.9-25 +- rebuilt for unwind info generation, broken in gcc-4.1.1-21 + +* Tue Sep 26 2006 Ville Skyttä - 0.4.9-0.24.20060817 +- Drop SELinux fcontext settings, they're supposedly fixed upstream again. + +* Thu Aug 17 2006 Ville Skyttä - 0.4.9-0.23.20060817 +- 2006-08-17 snapshot. +- Fix svn rev in "ffmpeg -version" etc. + +* Wed Aug 9 2006 Ville Skyttä - 0.4.9-0.23.20060804 +- Reintroduce SELinux fcontext settings on ix86 (not needed on x86_64, ppc), + they're not completely taken care of upstream (#1120). +- Split svn snapshot creator into a separate script. + +* Fri Aug 4 2006 Ville Skyttä - 0.4.9-0.22.20060804 +- 2006-08-04 snapshot. +- Drop bogus version from SDL-devel build dependency. +- Drop no longer relevant libpostproc obsoletion. +- Prune pre-2005 changelog entries. +- Specfile cleanup. + +* Sat Jun 17 2006 Ville Skyttä - 0.4.9-0.22.20060617 +- 2006-06-17 snapshot. + +* Mon Jun 12 2006 Ville Skyttä - 0.4.9-0.22.20060612 +- 2006-06-12 snapshot, rgb.txt patch applied upstream. +- Patch to force linking vhook modules with their dependencies, --as-needed + seems to drop needed things for some reason for drawtext and imlib2. +- Revert to dlopen()'ing liba52 and add file based dependency on it, it's + easier this way again due to --as-needed linkage. + +* Wed May 17 2006 Ville Skyttä - 0.4.9-0.22.20060517 +- 2006-05-17 snapshot. +- Link with faad2, don't dlopen() it. + +* Sat May 13 2006 Ville Skyttä - 0.4.9-0.22.20060513 +- 2006-05-13 snapshot. +- Drop SELinux fixups, they're part of upstream policy now. + +* Sat Apr 15 2006 Ville Skyttä - 0.4.9-0.22.20060407 +- SELinux file context fixups (mplayer, vdr-dxr3 etc) while waiting for #188358 + +* Sat Apr 8 2006 Ville Skyttä - 0.4.9-0.21.20060407 +- 2006-04-07 CVS snapshot. +- Move *.so to -devel, hopefully nothing needs them any more. + +* Fri Mar 31 2006 Ville Skyttä - 0.4.9-0.21.20051228 +- Remove superfluous dependencies from pkgconfig files (#747). +- Re-enable MMX on x86_64. + +* Thu Mar 09 2006 Andreas Bierfert +- switch to new release field + +* Tue Feb 28 2006 Andreas Bierfert +- add dist + +* Wed Dec 28 2005 Ville Skyttä - 0.4.9-0.lvn.0.20.20051228 +- 2005-12-28 CVS snapshot. +- Let upstream configure take care of PIC settings (patched for ppc). +- Own shared lib symlinks. + +* Fri Dec 23 2005 Ville Skyttä - 0.4.9-0.lvn.0.20.20050801 +- Apply upstream fix for CVE-2005-4048. +- Patch to find rgb.txt in FC5 too. + +* Thu Sep 29 2005 Ville Skyttä - 0:0.4.9-0.lvn.0.19.20050801 +- Clean up obsolete pre-FC3 stuff (FAAC is now unconditionally enabled). +- Drop zero Epochs. + +* Tue Aug 16 2005 Ville Skyttä - 0:0.4.9-0.lvn.0.18.20050801 +- Apply some upstream and some mine (libdir) fixes to pkgconfig files. +- Add pkgconfig dependency to -devel. +- Include gsm support. + +* Thu Aug 4 2005 David Woodhouse - 0:0.4.9-0.lvn.0.17.20050801 +- Update to 20050801 snapshot to make xine-lib happy +- Enable Altivec support by using --cpu=powerpc (not 'ppc') +- Enable theora +- Add pkgconfig files +- Undefine various things which might be macros before redefining them + +* Sat Jul 23 2005 Dams - 0:0.4.9-0.lvn.0.17.20050427 +- Added patch from Marc Deslauriers to fix wmv2 distorsion + +* Sun Jul 10 2005 Ville Skyttä - 0:0.4.9-0.lvn.0.16.20050427 +- Enable faac by default, rebuild with "--without faac" to disable. +- Clean up obsolete pre-FC2 and other stuff. + +* Sun May 22 2005 Ville Skyttä - 0:0.4.9-0.lvn.0.15.20050427 +- PPC needs -fPIC too. + +* Sat May 21 2005 Thorsten Leemhuis - 0:0.4.9-0.lvn.0.14.20050427 +- disable mmx for now on x86_64 to fix build + +* Sat Apr 30 2005 Dams - 0:0.4.9-0.lvn.0.13.20050427 +- Removed bogus devel requires +- Re-added conditionnal a52dec buildreq + +* Fri Apr 29 2005 Ville Skyttä - 0:0.4.9-0.lvn.0.12.20050427 +- Link avcodec with a52 when building with a52bin, remove unnecessary + hardcoded liba52.so.0 dependency. + +* Fri Apr 29 2005 Dams - 0:0.4.9-0.lvn.0.11.20050427 +- Fixed devel package deps + +* Fri Apr 29 2005 Dams - 0:0.4.9-0.lvn.0.10.20050427 +- texi2html replaces tetex as build dependency (FC4 compliance) +- re-added man pages + +* Thu Apr 28 2005 Dams - 0:0.4.9-0.lvn.0.9.20050427 +- Patch from Enrico to fix build on gcc4 +- Missing BuildReq a52dec-devel when a52bin is defined +- Patch to fix a52 build + +* Wed Apr 27 2005 Dams - 0:0.4.9-0.lvn.0.8.20050427 +- Updated tarball to cvs 20050427 snapshot +- Enabled libogg, xvid, a52bin +- Dropped Patch[0-3]