summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Bermond2020-08-04 00:05:27 +0000
committerDaniel Bermond2020-08-04 00:05:27 +0000
commitb1cef38294c451baf2e1ee12bc0cfc58a7f05259 (patch)
tree566b089245ef2055a3e450663033b2a653b5a26c
parent4129da6396bb3dcae6ff602744290ae79b6a729d (diff)
downloadaur-b1cef38294c451baf2e1ee12bc0cfc58a7f05259.tar.gz
Update svt-hevc patches
-rw-r--r--.SRCINFO6
-rw-r--r--020-ffmpeg-add-svt-hevc.patch47
-rw-r--r--PKGBUILD6
3 files changed, 50 insertions, 9 deletions
diff --git a/.SRCINFO b/.SRCINFO
index 7dabad6c4bb6..214552ffc1d4 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,6 +1,6 @@
pkgbase = ffmpeg-full-git
pkgdesc = Complete solution to record, convert and stream audio and video (all possible features including libfdk-aac; git version)
- pkgver = 4.4.r98604.g11a2d05b3f
+ pkgver = 4.4.r98638.g9c0beaf0d3
pkgrel = 1
url = https://www.ffmpeg.org/
arch = x86_64
@@ -133,13 +133,13 @@ pkgbase = ffmpeg-full-git
source = 010-ffmpeg-fix-vmaf-model-path.patch
source = 015-ffmpeg-cuda11-fix.patch
source = 020-ffmpeg-add-svt-hevc.patch
- source = 030-ffmpeg-add-svt-hevc-docs-1.4.3.patch::https://raw.githubusercontent.com/OpenVisualCloud/SVT-HEVC/v1.4.3/ffmpeg_plugin/0002-doc-Add-libsvt_hevc-encoder-docs.patch
+ source = 030-ffmpeg-add-svt-hevc-docs-1.5.0.patch::https://raw.githubusercontent.com/OpenVisualCloud/SVT-HEVC/v1.5.0/ffmpeg_plugin/0002-doc-Add-libsvt_hevc-encoder-docs.patch
source = 040-ffmpeg-add-svt-vp9-0.2.2.patch::https://raw.githubusercontent.com/OpenVisualCloud/SVT-VP9/v0.2.2/ffmpeg_plugin/master-0001-Add-ability-for-ffmpeg-to-run-svt-vp9.patch
source = LICENSE
sha256sums = SKIP
sha256sums = b6fcef2f4cbb1daa47d17245702fbd67ab3289b6b16f090ab99b9c2669453a02
sha256sums = 12cb889fd2ddd03ecc0f5fa2e345c7787ff4b28c4d284a5c694c71d5a590763c
- sha256sums = 65699b95643ac24f57de503da83a8d5ad39be9fde216fa6a502b09a3f5120c64
+ sha256sums = fecb280e4ebb4ad8a3ec0385f6f32fcf90656fea989a6182abcc4104f266bde4
sha256sums = 1499e419dda72b1604dc5e3959668f3843292ff56bfba78734e31510ba576de0
sha256sums = b74be6d805672210e226e7c0b403f88b0ee8a53c732c9bdc873c4b44aeb75c96
sha256sums = 04a7176400907fd7db0d69116b99de49e582a6e176b3bfb36a03e50a4cb26a36
diff --git a/020-ffmpeg-add-svt-hevc.patch b/020-ffmpeg-add-svt-hevc.patch
index dda7b82f3288..26216494d9ef 100644
--- a/020-ffmpeg-add-svt-hevc.patch
+++ b/020-ffmpeg-add-svt-hevc.patch
@@ -34,7 +34,7 @@
enabled libtesseract && require_pkg_config libtesseract tesseract tesseract/capi.h TessBaseAPICreate
--- a/libavcodec/Makefile
+++ b/libavcodec/Makefile
-@@ -1026,6 +1026,7 @@ OBJS-$(CONFIG_LIBRAV1E_ENCODER) += librav1e.o
+@@ -1027,6 +1027,7 @@ OBJS-$(CONFIG_LIBRAV1E_ENCODER) += librav1e.o
OBJS-$(CONFIG_LIBSHINE_ENCODER) += libshine.o
OBJS-$(CONFIG_LIBSPEEX_DECODER) += libspeexdec.o
OBJS-$(CONFIG_LIBSPEEX_ENCODER) += libspeexenc.o
@@ -44,7 +44,7 @@
OBJS-$(CONFIG_LIBTWOLAME_ENCODER) += libtwolame.o
--- a/libavcodec/allcodecs.c
+++ b/libavcodec/allcodecs.c
-@@ -727,6 +727,7 @@ extern AVCodec ff_librsvg_decoder;
+@@ -728,6 +728,7 @@ extern AVCodec ff_librsvg_decoder;
extern AVCodec ff_libshine_encoder;
extern AVCodec ff_libspeex_encoder;
extern AVCodec ff_libspeex_decoder;
@@ -54,7 +54,7 @@
extern AVCodec ff_libtwolame_encoder;
--- /dev/null
+++ b/libavcodec/libsvt_hevc.c
-@@ -0,0 +1,518 @@
+@@ -0,0 +1,559 @@
+/*
+* Scalable Video Technology for HEVC encoder library plugin
+*
@@ -118,6 +118,10 @@
+ int la_depth;
+ int thread_count;
+ int high_dynamic_range;
++ int unrestricted_motion_vector;
++ int tile_row_count;
++ int tile_col_count;
++ int tile_slice_mode;
+} SvtContext;
+
+static int error_mapping(EB_ERRORTYPE svt_ret)
@@ -281,6 +285,33 @@
+
+ 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;
++ }
+ return EB_ErrorNone;
+}
+
@@ -423,6 +454,10 @@
+ *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);
@@ -533,6 +568,12 @@
+ { "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 },
+ {NULL},
+};
+
diff --git a/PKGBUILD b/PKGBUILD
index bc30a223900e..1a619e58436c 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -1,10 +1,10 @@
# Maintainer: Daniel Bermond <dbermond@archlinux.org>
-_svt_hevc_ver='1.4.3'
+_svt_hevc_ver='1.5.0'
_svt_vp9_ver='0.2.2'
pkgname=ffmpeg-full-git
-pkgver=4.4.r98604.g11a2d05b3f
+pkgver=4.4.r98638.g9c0beaf0d3
pkgrel=1
pkgdesc='Complete solution to record, convert and stream audio and video (all possible features including libfdk-aac; git version)'
arch=('x86_64')
@@ -50,7 +50,7 @@ source=('git+https://git.ffmpeg.org/ffmpeg.git'
sha256sums=('SKIP'
'b6fcef2f4cbb1daa47d17245702fbd67ab3289b6b16f090ab99b9c2669453a02'
'12cb889fd2ddd03ecc0f5fa2e345c7787ff4b28c4d284a5c694c71d5a590763c'
- '65699b95643ac24f57de503da83a8d5ad39be9fde216fa6a502b09a3f5120c64'
+ 'fecb280e4ebb4ad8a3ec0385f6f32fcf90656fea989a6182abcc4104f266bde4'
'1499e419dda72b1604dc5e3959668f3843292ff56bfba78734e31510ba576de0'
'b74be6d805672210e226e7c0b403f88b0ee8a53c732c9bdc873c4b44aeb75c96'
'04a7176400907fd7db0d69116b99de49e582a6e176b3bfb36a03e50a4cb26a36')