Skip to content

Commit

Permalink
Merge pull request #393 from nyanmisaka/next
Browse files Browse the repository at this point in the history
Add DOVI descriptor support in mpegtsenc
  • Loading branch information
nyanmisaka authored May 25, 2024
2 parents 796d25e + c3aaa69 commit 7d10d6d
Show file tree
Hide file tree
Showing 42 changed files with 535 additions and 261 deletions.
2 changes: 1 addition & 1 deletion build.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
---
# We just wrap `build` so this is really it
name: "jellyfin-ffmpeg"
version: "6.0.1-6"
version: "6.0.1-7"
packages:
- buster-amd64
- buster-armhf
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/10-mingw.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://git.code.sf.net/p/mingw-w64/mingw-w64.git"
SCRIPT_COMMIT="93059a6ae05d8e0b42bec5039818003a9f6329b1"
SCRIPT_COMMIT="cff4b8fda1b577b99144020fb81b27f5bc633a5e"

ffbuild_enabled() {
[[ $TARGET == win* ]] || return -1
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/10-xorg-macros.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/util/macros.git"
SCRIPT_COMMIT="1031f8cc5c7a170e278372ccdf2e70151b096ef7"
SCRIPT_COMMIT="7ed2b3798c030bd1729b699b446b43aba2ec606e"

ffbuild_enabled() {
[[ $TARGET != linux* ]] && return -1
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/20-libxml2.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://github.com/GNOME/libxml2.git"
SCRIPT_COMMIT="20b0bd9800ae83cbd70f4407ce67058164e16227"
SCRIPT_COMMIT="1371d0bda20f5e909e94054f6f49d0a967ac5291"

ffbuild_enabled() {
return 0
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/25-fftw3f.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://github.com/FFTW/fftw3.git"
SCRIPT_COMMIT="394fa85ab5f8914b82b3404844444c53f5c7f095"
SCRIPT_COMMIT="cab901fe465324cb46bd4953e18ddc610ade29b9"

ffbuild_enabled() {
# Dependency of GPL-Only librubberband
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/25-freetype.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://gitlab.freedesktop.org/freetype/freetype.git"
SCRIPT_COMMIT="f42ce25563b73fed0123d18a2556b9ba01d2c76b"
SCRIPT_COMMIT="39f2fbf80c5ab9ad7b380080395c987f4922a038"

ffbuild_enabled() {
return 0
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/25-fribidi.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://github.com/fribidi/fribidi.git"
SCRIPT_COMMIT="bfb0385ef862cd40af7d5d33648fbb4bfe8eee65"
SCRIPT_COMMIT="bca04dc3cd3af85a9d9220c430737333634d622a"

ffbuild_enabled() {
return 0
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/35-fontconfig.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://gitlab.freedesktop.org/fontconfig/fontconfig.git"
SCRIPT_COMMIT="5a6fef681bfd27e6b733a48f3c43a5da042745a8"
SCRIPT_COMMIT="3b4641ae7a7bf961221cd7b55cc0e25d9d1a6365"

ffbuild_enabled() {
return 0
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/45-harfbuzz.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://github.com/harfbuzz/harfbuzz.git"
SCRIPT_COMMIT="c053e8f29257814e11ad61493dbbe29f27656de4"
SCRIPT_COMMIT="bc90b29b37fe3809f9e48aa7be08fbf2208e481a"

ffbuild_enabled() {
return 0
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/45-x11/10-xcbproto.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/proto/xcbproto.git"
SCRIPT_COMMIT="1388374c7149114888a6a5cd6e9bf6ad4b42adf8"
SCRIPT_COMMIT="77d7fc04da729ddc5ed4aacf30253726fac24dca"

ffbuild_enabled() {
[[ $TARGET != linux* ]] && return -1
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/45-x11/30-libxcb.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libxcb.git"
SCRIPT_COMMIT="389f22d1cb53e47337e96d9f78a3ef0001e8e588"
SCRIPT_COMMIT="622152ee42a310876f10602601206954b8d0613e"

ffbuild_enabled() {
[[ $TARGET != linux* ]] && return -1
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/45-x11/40-libx11.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libx11.git"
SCRIPT_COMMIT="a465588218c1643eedc35b3c24409cb775454eee"
SCRIPT_COMMIT="97fb5bda3d0777380cd4b964f48771a82ef3f2a7"

ffbuild_enabled() {
[[ $TARGET != linux* ]] && return -1
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/45-x11/50-libxi.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libxi.git"
SCRIPT_COMMIT="57ce2e8ba4c1f1bc5792e14bc7082f3ebd0915be"
SCRIPT_COMMIT="56b11459f833df8f324587847534a548b070da94"

ffbuild_enabled() {
[[ $TARGET != linux* ]] && return -1
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/45-x11/60-libglvnd.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://gitlab.freedesktop.org/glvnd/libglvnd.git"
SCRIPT_COMMIT="908086d22dc307d17d0eb35c522c35fd190718cc"
SCRIPT_COMMIT="606f6627cf481ee6dcb32387edc010c502cdf38b"

ffbuild_enabled() {
[[ $TARGET != linux* ]] && return -1
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/50-dav1d.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://code.videolan.org/videolan/dav1d.git"
SCRIPT_COMMIT="dc9490134f8a3665843f287f721dc587e7c48ea2"
SCRIPT_COMMIT="3623543c4117f413110b27b5c20c6ae1638a22f9"

ffbuild_enabled() {
return 0
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/50-libass.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://github.com/libass/libass.git"
SCRIPT_COMMIT="6eaa67daabdba10248fd13692403691effec0d8e"
SCRIPT_COMMIT="cbb48cc4f2f076300004b8b06a86bec55281d0c2"

ffbuild_enabled() {
return 0
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/50-libopus.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://github.com/xiph/opus.git"
SCRIPT_COMMIT="ddbe48383984d56acd9e1ab6a090c54ca6b735a6"
SCRIPT_COMMIT="eb39efaa154fab96bf12b5cab932418cd3807eb2"

ffbuild_enabled() {
return 0
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/50-libvpl.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://github.com/intel/libvpl.git"
SCRIPT_COMMIT="383b5caac6df614e76ade5a07c4f53be702e9176"
SCRIPT_COMMIT="18b63f421a016ea34d2fcfc6c63e16dba13b71f1"

ffbuild_enabled() {
[[ $TARGET == mac* ]] && return -1
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/50-libvpx.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://chromium.googlesource.com/webm/libvpx"
SCRIPT_COMMIT="3dbab0e66479e1b5368d4b7a069051dba85843cf"
SCRIPT_COMMIT="602e2e8979d111b02c959470da5322797dd96a19"

ffbuild_enabled() {
return 0
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/50-libwebp.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://chromium.googlesource.com/webm/libwebp"
SCRIPT_COMMIT="b3d1b2cbf7e6286832876cc720dee96cd1945aec"
SCRIPT_COMMIT="845d5476a866141ba35ac133f856fa62f0b7445f"

ffbuild_enabled() {
return 0
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/50-openmpt.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://source.openmpt.org/svn/openmpt/trunk/OpenMPT"
SCRIPT_REV="20563"
SCRIPT_REV="20832"

ffbuild_enabled() {
return 0
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/50-srt.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://github.com/Haivision/srt.git"
SCRIPT_COMMIT="c156dab75b83c12bb8dbbda77dab569db22b3b78"
SCRIPT_COMMIT="38a3a165a1af92f6423de8c97646de07cba5e120"

ffbuild_enabled() {
return 0
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/50-svtav1.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://gitlab.com/AOMediaCodec/SVT-AV1.git"
SCRIPT_COMMIT="bd9e31f16afb43a176a9ba39e9b04e0a9a12c907"
SCRIPT_COMMIT="bbcff785881b320f7e1b1f77a2f5ed025f8bfd75"

ffbuild_enabled() {
[[ $TARGET == win32 ]] && return -1
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/50-vaapi/30-libpciaccess.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libpciaccess.git"
SCRIPT_COMMIT="2ec2576cabefef1eaa5dd9307c97de2e887fc347"
SCRIPT_COMMIT="f73f4ca720ccb2e9939545177b54f2be099e3b54"

ffbuild_enabled() {
[[ $TARGET != linux* ]] && return -1
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/50-vulkan/45-vulkan.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://github.com/KhronosGroup/Vulkan-Headers.git"
SCRIPT_COMMIT="v1.3.283"
SCRIPT_COMMIT="v1.3.285"
SCRIPT_TAGFILTER="v?.*.*"

ffbuild_enabled() {
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/50-vulkan/55-spirv-cross.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://github.com/KhronosGroup/SPIRV-Cross.git"
SCRIPT_COMMIT="06407561ece7d7e78544112189f3eee13adf9959"
SCRIPT_COMMIT="1f68d0f420730ccdde6ec9d0b36f56ffed014193"

ffbuild_enabled() {
[[ $TARGET == mac* ]] && return -1
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/50-x264.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://code.videolan.org/videolan/x264.git"
SCRIPT_COMMIT="7ed753b10a61d0be95f683289dfb925b800b0676"
SCRIPT_COMMIT="4613ac3c15fd75cebc4b9f65b7fb95e70a3acce1"

ffbuild_enabled() {
[[ $VARIANT == lgpl* ]] && return -1
Expand Down
2 changes: 1 addition & 1 deletion builder/scripts.d/50-x265.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/bin/bash

SCRIPT_REPO="https://bitbucket.org/multicoreware/x265_git.git"
SCRIPT_COMMIT="dd1ef69b25ec26cc80be0fc8d9afeeef6563762b"
SCRIPT_COMMIT="f3c5fbaffaf54b5f79aa8983d59f1b0232d5eccf"

ffbuild_enabled() {
[[ $VARIANT == lgpl* ]] && return -1
Expand Down
10 changes: 10 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -1,3 +1,13 @@
jellyfin-ffmpeg (6.0.1-7) unstable; urgency=medium

* Add DOVI descriptor support in mpegtsenc
* Sync RKMPP fixes from ffmpeg-rockchip
* Fix a typo in the CUDA/OpenCL transpose filter
* Fix some warnings-as-errors in GCC 14
* Update dependencies

-- nyanmisaka <[email protected]> Tue, 21 May 2024 17:09:43 +0800

jellyfin-ffmpeg (6.0.1-6) unstable; urgency=medium

* Fix Noble builds and update dependencies
Expand Down
29 changes: 13 additions & 16 deletions debian/patches/0005-add-cuda-tonemap-impl.patch
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ Index: jellyfin-ffmpeg/libavfilter/colorspace.c
void ff_matrix_mul_3x3(double dst[3][3],
const double src1[3][3], const double src2[3][3])
{
@@ -191,3 +203,157 @@ void ff_update_hdr_metadata(AVFrame *in,
@@ -191,3 +203,155 @@ void ff_update_hdr_metadata(AVFrame *in,
metadata->max_luminance = av_d2q(peak * REFERENCE_WHITE, 10000);
}
}
Expand Down Expand Up @@ -183,8 +183,7 @@ Index: jellyfin-ffmpeg/libavfilter/colorspace.c
+// linearizer for PQ/ST2084
+float eotf_st2084_common(float x)
+{
+ x = FFMAX(x, 0.0f);
+ float xpow = powf(x, 1.0f / ST2084_M2);
+ float xpow = powf(FFMAX(x, 0.0f), 1.0f / ST2084_M2);
+ float num = FFMAX(xpow - ST2084_C1, 0.0f);
+ float den = FFMAX(ST2084_C2 - ST2084_C3 * xpow, FLOAT_EPS);
+ x = powf(num / den, 1.0f / ST2084_M1);
Expand All @@ -199,8 +198,7 @@ Index: jellyfin-ffmpeg/libavfilter/colorspace.c
+// delinearizer for PQ/ST2084
+float inverse_eotf_st2084_common(float x)
+{
+ x = FFMAX(x, 0.0f);
+ float xpow = powf(x, ST2084_M1);
+ float xpow = powf(FFMAX(x, 0.0f), ST2084_M1);
+#if 0
+ // Original formulation from SMPTE ST 2084:2014 publication.
+ float num = ST2084_C1 + ST2084_C2 * xpow;
Expand Down Expand Up @@ -599,7 +597,7 @@ Index: jellyfin-ffmpeg/libavfilter/cuda/host_util.c
===================================================================
--- /dev/null
+++ jellyfin-ffmpeg/libavfilter/cuda/host_util.c
@@ -0,0 +1,78 @@
@@ -0,0 +1,77 @@
+/*
+ * This file is part of FFmpeg.
+ *
Expand Down Expand Up @@ -637,15 +635,14 @@ Index: jellyfin-ffmpeg/libavfilter/cuda/host_util.c
+ dst->data[i] = src->data[i];
+ dst->linesize[i] = src->linesize[i];
+ dst->tex[i] = 0;
+ }
+
+ if (!make_cuTex)
+ continue;
+
+ for (i = 0; make_cuTex && (i < dst->planes); i++) {
+#ifndef CU_TRSF_NORMALIZED_COORDINATES
+ #define CU_TRSF_NORMALIZED_COORDINATES 2
+#endif
+ CUDA_TEXTURE_DESC tex_desc = {
+ .addressMode = CU_TR_ADDRESS_MODE_CLAMP,
+ .addressMode = { CU_TR_ADDRESS_MODE_CLAMP },
+ .filterMode = i == 0 ? CU_TR_FILTER_MODE_POINT : CU_TR_FILTER_MODE_LINEAR,
+ .flags = i == 0 ? 0 : CU_TRSF_NORMALIZED_COORDINATES,
+ };
Expand Down Expand Up @@ -1688,7 +1685,7 @@ Index: jellyfin-ffmpeg/libavfilter/vf_tonemap_cuda.c
+ return AVERROR(ENOMEM);
+
+ s->dovi = NULL;
+ s->doviBuffer = NULL;
+ s->doviBuffer = 0;
+
+ return 0;
+}
Expand Down Expand Up @@ -1786,7 +1783,7 @@ Index: jellyfin-ffmpeg/libavfilter/vf_tonemap_cuda.c
+ #define CU_TRSF_NORMALIZED_COORDINATES 2
+#endif
+ CUDA_TEXTURE_DESC tex_desc = {
+ .addressMode = CU_TR_ADDRESS_MODE_WRAP,
+ .addressMode = { CU_TR_ADDRESS_MODE_WRAP },
+ .filterMode = CU_TR_FILTER_MODE_POINT,
+ .flags = CU_TRSF_NORMALIZED_COORDINATES,
+ };
Expand Down Expand Up @@ -2270,13 +2267,13 @@ Index: jellyfin-ffmpeg/libavfilter/vf_tonemap_cuda.c
+ if (ret < 0)
+ goto fail;
+
+ ret = CHECK_CU(cu->cuLinkAddData(link_state, CU_JIT_INPUT_PTX, constants.str,
+ constants.len, "constants", 0, NULL, NULL));
+ ret = CHECK_CU(cu->cuLinkAddData(link_state, CU_JIT_INPUT_PTX, (void *)constants.str,
+ (size_t)constants.len, "constants", 0, NULL, NULL));
+ if (ret < 0)
+ goto fail2;
+
+ ret = CHECK_CU(cu->cuLinkAddData(link_state, CU_JIT_INPUT_PTX, ff_tonemap_ptx_data,
+ ff_tonemap_ptx_len, "ff_tonemap_ptx_data", 0, NULL, NULL));
+ ret = CHECK_CU(cu->cuLinkAddData(link_state, CU_JIT_INPUT_PTX, (void *)ff_tonemap_ptx_data,
+ (size_t)ff_tonemap_ptx_len, "ff_tonemap_ptx_data", 0, NULL, NULL));
+ if (ret < 0)
+ goto fail2;
+
Expand Down
Loading

0 comments on commit 7d10d6d

Please sign in to comment.