From b88101fd9446c949b7db5d8ec880bc08300c1896 Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Thu, 27 Jul 2023 22:19:00 +0800 Subject: [PATCH 1/8] Remove HDR metadata from tonemap_vaapi SDR output Signed-off-by: nyanmisaka --- debian/patches/0017-add-fixes-for-vaapi-tonemap.patch | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/debian/patches/0017-add-fixes-for-vaapi-tonemap.patch b/debian/patches/0017-add-fixes-for-vaapi-tonemap.patch index 8869eb93a0d..8b1cc0e88de 100644 --- a/debian/patches/0017-add-fixes-for-vaapi-tonemap.patch +++ b/debian/patches/0017-add-fixes-for-vaapi-tonemap.patch @@ -223,7 +223,7 @@ Index: jellyfin-ffmpeg/libavfilter/vf_tonemap_vaapi.c err = tonemap_vaapi_set_filter_params(avctx, input_frame); if (err < 0) -@@ -289,6 +408,18 @@ static int tonemap_vaapi_filter_frame(AV +@@ -289,6 +408,21 @@ static int tonemap_vaapi_filter_frame(AV if (ctx->color_matrix != AVCOL_SPC_UNSPECIFIED) output_frame->colorspace = ctx->color_matrix; @@ -237,12 +237,15 @@ Index: jellyfin-ffmpeg/libavfilter/vf_tonemap_vaapi.c + out_hdr_metadata.metadata_size = sizeof(VAHdrMetaDataHDR10); + + params.output_hdr_metadata = &out_hdr_metadata; ++ } else { ++ av_frame_remove_side_data(output_frame, AV_FRAME_DATA_CONTENT_LIGHT_LEVEL); ++ av_frame_remove_side_data(output_frame, AV_FRAME_DATA_MASTERING_DISPLAY_METADATA); + } + err = ff_vaapi_vpp_init_params(avctx, ¶ms, input_frame, output_frame); if (err < 0) -@@ -358,6 +489,60 @@ static av_cold int tonemap_vaapi_init(AV +@@ -358,6 +492,60 @@ static av_cold int tonemap_vaapi_init(AV STRING_OPTION(color_transfer, color_transfer, AVCOL_TRC_UNSPECIFIED); STRING_OPTION(color_matrix, color_space, AVCOL_SPC_UNSPECIFIED); @@ -303,7 +306,7 @@ Index: jellyfin-ffmpeg/libavfilter/vf_tonemap_vaapi.c return 0; } -@@ -383,10 +568,13 @@ static const AVOption tonemap_vaapi_opti +@@ -383,10 +571,13 @@ static const AVOption tonemap_vaapi_opti { "t", "Output color transfer characteristics set", OFFSET(color_transfer_string), AV_OPT_TYPE_STRING, { .str = NULL }, .flags = FLAGS, "transfer" }, From ff6b70c584a7d7c21ae33f4487f41be70637b4bd Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Fri, 28 Jul 2023 02:01:18 +0800 Subject: [PATCH 2/8] Backport QSV fixes from upstream Signed-off-by: nyanmisaka --- debian/patches/0052-backport-upstream-qsvenc-fixes.patch | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/debian/patches/0052-backport-upstream-qsvenc-fixes.patch b/debian/patches/0052-backport-upstream-qsvenc-fixes.patch index b71900b278d..bd8a4e1040a 100644 --- a/debian/patches/0052-backport-upstream-qsvenc-fixes.patch +++ b/debian/patches/0052-backport-upstream-qsvenc-fixes.patch @@ -187,6 +187,15 @@ Index: jellyfin-ffmpeg/libavutil/hwcontext_qsv.c =================================================================== --- jellyfin-ffmpeg.orig/libavutil/hwcontext_qsv.c +++ jellyfin-ffmpeg/libavutil/hwcontext_qsv.c +@@ -1413,7 +1413,7 @@ static int qsv_map_to(AVHWFramesContext + case AV_PIX_FMT_VAAPI: + { + mfxHDLPair *pair = (mfxHDLPair*)hwctx->surfaces[i].Data.MemId; +- if (*(VASurfaceID*)pair->first == (VASurfaceID)src->data[3]) { ++ if (*(VASurfaceID*)pair->first == (VASurfaceID)(uintptr_t)src->data[3]) { + index = i; + break; + } @@ -1689,6 +1689,15 @@ static int qsv_device_derive(AVHWDeviceC AVDictionary *opts, int flags) { From d4268333e452aa396983ffafff8936de15467e3c Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Sun, 30 Jul 2023 01:18:01 +0800 Subject: [PATCH 3/8] Fix VA-API import DRM prime2 planar formats Signed-off-by: nyanmisaka --- ...api-import-drm-prime2-planar-formats.patch | 38 +++++++++++-------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/debian/patches/0053-allow-vaapi-import-drm-prime2-planar-formats.patch b/debian/patches/0053-allow-vaapi-import-drm-prime2-planar-formats.patch index b45820f129f..fe6101edb7e 100644 --- a/debian/patches/0053-allow-vaapi-import-drm-prime2-planar-formats.patch +++ b/debian/patches/0053-allow-vaapi-import-drm-prime2-planar-formats.patch @@ -2,7 +2,15 @@ Index: jellyfin-ffmpeg/libavutil/hwcontext_vaapi.c =================================================================== --- jellyfin-ffmpeg.orig/libavutil/hwcontext_vaapi.c +++ jellyfin-ffmpeg/libavutil/hwcontext_vaapi.c -@@ -1015,6 +1015,7 @@ static const struct { +@@ -154,6 +154,7 @@ static const VAAPIFormatDescriptor vaapi + MAP(XRGB, RGB32, 0RGB, 0), + #ifdef VA_FOURCC_X2R10G10B10 + MAP(X2R10G10B10, RGB32_10, X2RGB10, 0), ++ MAP(X2B10G10R10, RGB32_10, X2BGR10, 0), + #endif + }; + #undef MAP +@@ -1010,6 +1011,7 @@ static const struct { DRM_MAP(NV12, 1, DRM_FORMAT_NV12), #if defined(VA_FOURCC_P010) && defined(DRM_FORMAT_R16) DRM_MAP(P010, 2, DRM_FORMAT_R16, DRM_FORMAT_RG1616), @@ -10,7 +18,18 @@ Index: jellyfin-ffmpeg/libavutil/hwcontext_vaapi.c #endif DRM_MAP(BGRA, 1, DRM_FORMAT_ARGB8888), DRM_MAP(BGRX, 1, DRM_FORMAT_XRGB8888), -@@ -1081,12 +1082,6 @@ static int vaapi_map_from_drm(AVHWFrames +@@ -1021,6 +1023,10 @@ static const struct { + #endif + DRM_MAP(ARGB, 1, DRM_FORMAT_BGRA8888), + DRM_MAP(XRGB, 1, DRM_FORMAT_BGRX8888), ++#ifdef VA_FOURCC_X2R10G10B10 ++ DRM_MAP(X2R10G10B10, 1, DRM_FORMAT_XRGB2101010), ++ DRM_MAP(X2B10G10R10, 1, DRM_FORMAT_XBGR2101010), ++#endif + }; + #undef DRM_MAP + +@@ -1076,12 +1082,6 @@ static int vaapi_map_from_drm(AVHWFrames desc = (AVDRMFrameDescriptor*)src->data[0]; @@ -23,20 +42,7 @@ Index: jellyfin-ffmpeg/libavutil/hwcontext_vaapi.c va_fourcc = 0; for (i = 0; i < FF_ARRAY_ELEMS(vaapi_drm_format_map); i++) { if (desc->nb_layers != vaapi_drm_format_map[i].nb_layer_formats) -@@ -1195,6 +1190,12 @@ static int vaapi_map_from_drm(AVHWFrames - } - }; - -+ if (desc->nb_objects != 1) { -+ av_log(dst_fc, AV_LOG_ERROR, "VAAPI can only map frames " -+ "made from a single DRM object.\n"); -+ return AVERROR(EINVAL); -+ } -+ - buffer_handle = desc->objects[0].fd; - buffer_desc.pixel_format = va_fourcc; - buffer_desc.width = src_fc->width; -@@ -1226,6 +1227,12 @@ static int vaapi_map_from_drm(AVHWFrames +@@ -1221,6 +1221,12 @@ static int vaapi_map_from_drm(AVHWFrames buffer_attrs, FF_ARRAY_ELEMS(buffer_attrs)); } #else From 2c8c13425dc3204a0ca59cc9fa8278b2ef210fb9 Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Sat, 5 Aug 2023 01:17:38 +0800 Subject: [PATCH 4/8] Use contiguous linear Vulkan images for AMD encoder Signed-off-by: nyanmisaka --- ...linear-vulkan-images-for-amd-encoder.patch | 203 ++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 204 insertions(+) create mode 100644 debian/patches/0055-use-contiguous-linear-vulkan-images-for-amd-encoder.patch diff --git a/debian/patches/0055-use-contiguous-linear-vulkan-images-for-amd-encoder.patch b/debian/patches/0055-use-contiguous-linear-vulkan-images-for-amd-encoder.patch new file mode 100644 index 00000000000..882c8f2d626 --- /dev/null +++ b/debian/patches/0055-use-contiguous-linear-vulkan-images-for-amd-encoder.patch @@ -0,0 +1,203 @@ +Index: jellyfin-ffmpeg/libavutil/hwcontext_vulkan.c +=================================================================== +--- jellyfin-ffmpeg.orig/libavutil/hwcontext_vulkan.c ++++ jellyfin-ffmpeg/libavutil/hwcontext_vulkan.c +@@ -111,6 +111,9 @@ typedef struct VulkanDevicePriv { + + /* Intel */ + int dev_is_intel; ++ ++ /* Amd */ ++ int dev_is_amd; + } VulkanDevicePriv; + + typedef struct VulkanFramesPriv { +@@ -227,6 +230,7 @@ static const struct { + { AV_PIX_FMT_BGR32, { VK_FORMAT_A8B8G8R8_UNORM_PACK32 } }, + { AV_PIX_FMT_0BGR32, { VK_FORMAT_A8B8G8R8_UNORM_PACK32 } }, + ++ { AV_PIX_FMT_X2BGR10, { VK_FORMAT_A2B10G10R10_UNORM_PACK32 } }, + { AV_PIX_FMT_X2RGB10, { VK_FORMAT_A2R10G10B10_UNORM_PACK32 } }, + + { AV_PIX_FMT_GBRAP, { VK_FORMAT_R8_UNORM, VK_FORMAT_R8_UNORM, VK_FORMAT_R8_UNORM, VK_FORMAT_R8_UNORM } }, +@@ -1478,6 +1482,13 @@ static int vulkan_device_init(AVHWDevice + + p->dev_is_nvidia = (p->props.properties.vendorID == 0x10de); + p->dev_is_intel = (p->props.properties.vendorID == 0x8086); ++ p->dev_is_amd = (p->props.properties.vendorID == 0x1002); ++ ++#if CONFIG_LIBDRM ++ /* AMD encoder requires contiguous and linear images */ ++ if (p->dev_is_amd) ++ p->use_linear_images = 1; ++#endif + + vk->GetPhysicalDeviceQueueFamilyProperties(hwctx->phys_dev, &queue_num, NULL); + if (!queue_num) { +@@ -2288,7 +2299,7 @@ static int vulkan_frames_init(AVHWFrames + + if (!(hwctx->flags & AV_VK_FRAME_FLAG_NONE)) { + if (p->contiguous_planes == 1 || +- ((p->contiguous_planes == -1) && p->dev_is_intel)) ++ (p->contiguous_planes == -1 && (p->dev_is_intel || p->dev_is_amd))) + hwctx->flags |= AV_VK_FRAME_FLAG_CONTIGUOUS_MEMORY; + } + +@@ -2356,19 +2367,23 @@ static int vulkan_frames_init(AVHWFrames + /* Finally get all modifiers from the device */ + vk->GetPhysicalDeviceFormatProperties2(dev_hwctx->phys_dev, fmt[0], &prop); + +- /* Reject any modifiers that don't match our requirements */ +- for (int i = 0; i < mod_props_list.drmFormatModifierCount; i++) { +- if (!(mod_props[i].drmFormatModifierTilingFeatures & hwctx->usage)) +- continue; +- +- modifiers[modifier_count++] = mod_props[i].drmFormatModifier; +- } ++ if (p->use_linear_images) { ++ has_modifiers = 0; ++ modifiers[modifier_count++] = 0x0; ++ } else { ++ /* Reject any modifiers that don't match our requirements */ ++ for (int i = 0; i < mod_props_list.drmFormatModifierCount; i++) { ++ if (!(mod_props[i].drmFormatModifierTilingFeatures & hwctx->usage)) ++ continue; ++ modifiers[modifier_count++] = mod_props[i].drmFormatModifier; ++ } + +- if (!modifier_count) { +- av_log(hwfc, AV_LOG_ERROR, "None of the given modifiers supports" +- " the usage flags!\n"); +- av_freep(&mod_props); +- return AVERROR(EINVAL); ++ if (!modifier_count) { ++ av_log(hwfc, AV_LOG_ERROR, "None of the given modifiers supports" ++ " the usage flags!\n"); ++ av_freep(&mod_props); ++ return AVERROR(EINVAL); ++ } + } + + modifier_info->drmFormatModifierCount = modifier_count; +@@ -2461,9 +2476,11 @@ static void vulkan_unmap_frame(AVHWFrame + { + VulkanMapping *map = hwmap->priv; + AVVulkanDeviceContext *hwctx = hwfc->device_ctx->hwctx; ++ AVVulkanFramesContext *hwfctx = hwfc->hwctx; + const int planes = av_pix_fmt_count_planes(hwfc->sw_format); + VulkanDevicePriv *p = hwfc->device_ctx->internal->priv; + FFVulkanFunctions *vk = &p->vkfn; ++ int mem_planes = 0; + + /* Check if buffer needs flushing */ + if ((map->flags & AV_HWFRAME_MAP_WRITE) && +@@ -2485,7 +2502,8 @@ static void vulkan_unmap_frame(AVHWFrame + } + } + +- for (int i = 0; i < planes; i++) ++ mem_planes = hwfctx->flags & AV_VK_FRAME_FLAG_CONTIGUOUS_MEMORY ? 1 : planes; ++ for (int i = 0; i < mem_planes; i++) + vk->UnmapMemory(hwctx->act_dev, map->frame->mem[i]); + + av_free(map); +@@ -2634,6 +2652,10 @@ static const struct { + { DRM_FORMAT_XRGB8888, VK_FORMAT_B8G8R8A8_UNORM }, + { DRM_FORMAT_ABGR8888, VK_FORMAT_R8G8B8A8_UNORM }, + { DRM_FORMAT_XBGR8888, VK_FORMAT_R8G8B8A8_UNORM }, ++ { DRM_FORMAT_ARGB2101010, VK_FORMAT_A2R10G10B10_UNORM_PACK32 }, ++ { DRM_FORMAT_XRGB2101010, VK_FORMAT_A2R10G10B10_UNORM_PACK32 }, ++ { DRM_FORMAT_ABGR2101010, VK_FORMAT_A2B10G10R10_UNORM_PACK32 }, ++ { DRM_FORMAT_XBGR2101010, VK_FORMAT_A2B10G10R10_UNORM_PACK32 }, + }; + + static inline VkFormat drm_to_vulkan_fmt(uint32_t drm_fourcc) +@@ -2659,6 +2681,7 @@ static int vulkan_map_from_drm_frame_des + const AVDRMFrameDescriptor *desc = (AVDRMFrameDescriptor *)src->data[0]; + VkBindImageMemoryInfo bind_info[AV_DRM_MAX_PLANES]; + VkBindImagePlaneMemoryInfo plane_info[AV_DRM_MAX_PLANES]; ++ const int has_modifiers = !!(p->extensions & FF_VK_EXT_DRM_MODIFIER_FLAGS); + + for (int i = 0; i < desc->nb_layers; i++) { + if (drm_to_vulkan_fmt(desc->layers[i].format) == VK_FORMAT_UNDEFINED) { +@@ -2668,13 +2691,22 @@ static int vulkan_map_from_drm_frame_des + } + } + ++ if (!has_modifiers && ++ desc->objects[0].format_modifier != DRM_FORMAT_MOD_INVALID && ++ desc->objects[0].format_modifier != DRM_FORMAT_MOD_LINEAR) { ++ av_log(ctx, AV_LOG_ERROR, "The driver can only import DRM frame with invalid/linear modifier!\n"); ++ err = AVERROR_EXTERNAL; ++ goto fail; ++ } ++ + if (!(f = av_vk_frame_alloc())) { + av_log(ctx, AV_LOG_ERROR, "Unable to allocate memory for AVVkFrame!\n"); + err = AVERROR(ENOMEM); + goto fail; + } + +- f->tiling = VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT; ++ f->tiling = has_modifiers ? VK_IMAGE_TILING_DRM_FORMAT_MODIFIER_EXT : ++ VK_IMAGE_TILING_LINEAR; + + for (int i = 0; i < desc->nb_layers; i++) { + const int planes = desc->layers[i].nb_planes; +@@ -2745,7 +2777,7 @@ static int vulkan_map_from_drm_frame_des + }; + VkPhysicalDeviceImageFormatInfo2 fmt_props = { + .sType = VK_STRUCTURE_TYPE_PHYSICAL_DEVICE_IMAGE_FORMAT_INFO_2, +- .pNext = &props_ext, ++ .pNext = has_modifiers ? &props_ext : NULL, + .format = create_info.format, + .type = create_info.imageType, + .tiling = create_info.tiling, +@@ -2763,6 +2795,10 @@ static int vulkan_map_from_drm_frame_des + goto fail; + } + ++ /* Skip checking if the driver has no support for the DRM modifier extension */ ++ if (!has_modifiers && !fmt_props.pNext) ++ fmt_props.pNext = &props_ext; ++ + /* Set the image width/height */ + get_plane_wh(&create_info.extent.width, &create_info.extent.height, + hwfc->sw_format, src->width, src->height, i); +@@ -3315,6 +3351,7 @@ static int vulkan_map_to_drm(AVHWFramesC + AVVulkanDeviceContext *hwctx = hwfc->device_ctx->hwctx; + AVVulkanFramesContext *hwfctx = hwfc->hwctx; + const int planes = av_pix_fmt_count_planes(hwfc->sw_format); ++ const int has_modifiers = !!(p->extensions & FF_VK_EXT_DRM_MODIFIER_FLAGS); + VkImageDrmFormatModifierPropertiesEXT drm_mod = { + .sType = VK_STRUCTURE_TYPE_IMAGE_DRM_FORMAT_MODIFIER_PROPERTIES_EXT, + }; +@@ -3342,10 +3379,16 @@ static int vulkan_map_to_drm(AVHWFramesC + if (err < 0) + goto end; + +- ret = vk->GetImageDrmFormatModifierPropertiesEXT(hwctx->act_dev, f->img[0], ++ if (has_modifiers) { ++ ret = vk->GetImageDrmFormatModifierPropertiesEXT(hwctx->act_dev, f->img[0], + &drm_mod); +- if (ret != VK_SUCCESS) { +- av_log(hwfc, AV_LOG_ERROR, "Failed to retrieve DRM format modifier!\n"); ++ if (ret != VK_SUCCESS) { ++ av_log(hwfc, AV_LOG_ERROR, "Failed to retrieve DRM format modifier!\n"); ++ err = AVERROR_EXTERNAL; ++ goto end; ++ } ++ } else if (f->tiling != VK_IMAGE_TILING_LINEAR) { ++ av_log(hwfc, AV_LOG_ERROR, "The driver can only export linear images to DRM frame!\n"); + err = AVERROR_EXTERNAL; + goto end; + } +@@ -3367,7 +3410,7 @@ static int vulkan_map_to_drm(AVHWFramesC + + drm_desc->nb_objects++; + drm_desc->objects[i].size = f->size[i]; +- drm_desc->objects[i].format_modifier = drm_mod.drmFormatModifier; ++ drm_desc->objects[i].format_modifier = has_modifiers ? drm_mod.drmFormatModifier : 0x0; + } + + drm_desc->nb_layers = planes; diff --git a/debian/patches/series b/debian/patches/series index f04e1ed33c9..6d763b1fa04 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -52,3 +52,4 @@ 0052-backport-upstream-qsvenc-fixes.patch 0053-allow-vaapi-import-drm-prime2-planar-formats.patch 0054-add-vui-info-to-the-seq-header-of-hevc-vaapi-encoder.patch +0055-use-contiguous-linear-vulkan-images-for-amd-encoder.patch From c1c02f08f1470a67a6b20369e34ec4791c544c7e Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Sun, 30 Jul 2023 04:13:05 +0800 Subject: [PATCH 5/8] Fix libplacebo filter build with v6 API Signed-off-by: nyanmisaka --- ...-libplacebo-filter-build-with-v6-api.patch | 37 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 38 insertions(+) create mode 100644 debian/patches/0056-fix-libplacebo-filter-build-with-v6-api.patch diff --git a/debian/patches/0056-fix-libplacebo-filter-build-with-v6-api.patch b/debian/patches/0056-fix-libplacebo-filter-build-with-v6-api.patch new file mode 100644 index 00000000000..0f6767716f8 --- /dev/null +++ b/debian/patches/0056-fix-libplacebo-filter-build-with-v6-api.patch @@ -0,0 +1,37 @@ +Index: jellyfin-ffmpeg/libavfilter/vf_libplacebo.c +=================================================================== +--- jellyfin-ffmpeg.orig/libavfilter/vf_libplacebo.c ++++ jellyfin-ffmpeg/libavfilter/vf_libplacebo.c +@@ -90,7 +90,6 @@ typedef struct LibplaceboContext { + float polar_cutoff; + int disable_linear; + int disable_builtin; +- int force_icc_lut; + int force_dither; + int disable_fbos; + +@@ -130,6 +129,7 @@ typedef struct LibplaceboContext { + float desat_exp; + int gamut_warning; + int gamut_clipping; ++ int force_icc_lut; + + /* pl_dither_params */ + int dithering; +@@ -416,7 +416,6 @@ static int process_frames(AVFilterContex + .polar_cutoff = s->polar_cutoff, + .disable_linear_scaling = s->disable_linear, + .disable_builtin_scalers = s->disable_builtin, +- .force_icc_lut = s->force_icc_lut, + .force_dither = s->force_dither, + .disable_fbos = s->disable_fbos, + }; +@@ -721,7 +720,7 @@ static const AVOption libplacebo_options + { "polar_cutoff", "Polar LUT cutoff", OFFSET(polar_cutoff), AV_OPT_TYPE_FLOAT, {.dbl = 0}, 0.0, 1.0, DYNAMIC }, + { "disable_linear", "Disable linear scaling", OFFSET(disable_linear), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC }, + { "disable_builtin", "Disable built-in scalers", OFFSET(disable_builtin), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC }, +- { "force_icc_lut", "Force the use of a full ICC 3DLUT for color mapping", OFFSET(force_icc_lut), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC }, ++ { "force_icc_lut", "Deprecated, does nothing", OFFSET(force_icc_lut), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC | AV_OPT_FLAG_DEPRECATED }, + { "force_dither", "Force dithering", OFFSET(force_dither), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC }, + { "disable_fbos", "Force-disable FBOs", OFFSET(disable_fbos), AV_OPT_TYPE_BOOL, {.i64 = 0}, 0, 1, DYNAMIC }, + { NULL }, diff --git a/debian/patches/series b/debian/patches/series index 6d763b1fa04..2f431318e19 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -53,3 +53,4 @@ 0053-allow-vaapi-import-drm-prime2-planar-formats.patch 0054-add-vui-info-to-the-seq-header-of-hevc-vaapi-encoder.patch 0055-use-contiguous-linear-vulkan-images-for-amd-encoder.patch +0056-fix-libplacebo-filter-build-with-v6-api.patch From 693fcb179e46c5d1e3d9da66a7dc93eaca516f7c Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Sat, 5 Aug 2023 22:57:39 +0800 Subject: [PATCH 6/8] Fix x86 mathops assembly build with newer binutil Signed-off-by: nyanmisaka --- ...ps-assembly-build-with-newer-binutil.patch | 60 +++++++++++++++++++ debian/patches/series | 1 + 2 files changed, 61 insertions(+) create mode 100644 debian/patches/0057-fix-x86-mathops-assembly-build-with-newer-binutil.patch diff --git a/debian/patches/0057-fix-x86-mathops-assembly-build-with-newer-binutil.patch b/debian/patches/0057-fix-x86-mathops-assembly-build-with-newer-binutil.patch new file mode 100644 index 00000000000..5b1253b8c08 --- /dev/null +++ b/debian/patches/0057-fix-x86-mathops-assembly-build-with-newer-binutil.patch @@ -0,0 +1,60 @@ +Index: jellyfin-ffmpeg/libavcodec/x86/mathops.h +=================================================================== +--- jellyfin-ffmpeg.orig/libavcodec/x86/mathops.h ++++ jellyfin-ffmpeg/libavcodec/x86/mathops.h +@@ -35,12 +35,20 @@ + static av_always_inline av_const int MULL(int a, int b, unsigned shift) + { + int rt, dummy; ++ if (__builtin_constant_p(shift)) + __asm__ ( + "imull %3 \n\t" + "shrdl %4, %%edx, %%eax \n\t" + :"=a"(rt), "=d"(dummy) +- :"a"(a), "rm"(b), "ci"((uint8_t)shift) ++ :"a"(a), "rm"(b), "i"(shift & 0x1F) + ); ++ else ++ __asm__ ( ++ "imull %3 \n\t" ++ "shrdl %4, %%edx, %%eax \n\t" ++ :"=a"(rt), "=d"(dummy) ++ :"a"(a), "rm"(b), "c"((uint8_t)shift) ++ ); + return rt; + } + +@@ -113,19 +121,31 @@ __asm__ volatile(\ + // avoid +32 for shift optimization (gcc should do that ...) + #define NEG_SSR32 NEG_SSR32 + static inline int32_t NEG_SSR32( int32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("sarl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("sarl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } + + #define NEG_USR32 NEG_USR32 + static inline uint32_t NEG_USR32(uint32_t a, int8_t s){ ++ if (__builtin_constant_p(s)) + __asm__ ("shrl %1, %0\n\t" + : "+r" (a) +- : "ic" ((uint8_t)(-s)) ++ : "i" (-s & 0x1F) + ); ++ else ++ __asm__ ("shrl %1, %0\n\t" ++ : "+r" (a) ++ : "c" ((uint8_t)(-s)) ++ ); + return a; + } + diff --git a/debian/patches/series b/debian/patches/series index 2f431318e19..cb7098ffb1d 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -54,3 +54,4 @@ 0054-add-vui-info-to-the-seq-header-of-hevc-vaapi-encoder.patch 0055-use-contiguous-linear-vulkan-images-for-amd-encoder.patch 0056-fix-libplacebo-filter-build-with-v6-api.patch +0057-fix-x86-mathops-assembly-build-with-newer-binutil.patch From 51953535b419168999d1a9d5406a2fad2f03c9c2 Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Sat, 5 Aug 2023 02:10:21 +0800 Subject: [PATCH 7/8] Update dependencies Signed-off-by: nyanmisaka --- builder/scripts.d/10-mingw-std-threads.sh | 2 +- builder/scripts.d/20-libxml2.sh | 2 +- builder/scripts.d/25-fftw3f.sh | 2 +- builder/scripts.d/25-freetype.sh | 2 +- builder/scripts.d/25-gmp.sh | 4 +- builder/scripts.d/25-openssl.sh | 2 +- builder/scripts.d/25-xz.sh | 2 +- builder/scripts.d/35-fontconfig.sh | 2 +- builder/scripts.d/45-harfbuzz.sh | 2 +- builder/scripts.d/45-x11/10-xcbproto.sh | 2 +- builder/scripts.d/45-x11/10-xproto.sh | 2 +- builder/scripts.d/45-x11/20-libxau.sh | 2 +- builder/scripts.d/45-x11/30-libxcb.sh | 2 +- builder/scripts.d/45-x11/40-libx11.sh | 2 +- builder/scripts.d/45-x11/60-libxcursor.sh | 2 +- builder/scripts.d/50-amf.sh | 2 +- builder/scripts.d/50-dav1d.sh | 2 +- builder/scripts.d/50-libass.sh | 2 +- builder/scripts.d/50-libvpx.sh | 2 +- builder/scripts.d/50-libwebp.sh | 2 +- builder/scripts.d/50-onevpl.sh | 2 +- builder/scripts.d/50-openmpt.sh | 2 +- builder/scripts.d/50-srt.sh | 2 +- builder/scripts.d/50-svtav1.sh | 2 +- builder/scripts.d/50-vaapi/30-libpciaccess.sh | 2 +- builder/scripts.d/50-vaapi/40-libdrm.sh | 2 +- builder/scripts.d/50-vaapi/50-libva.sh | 2 +- builder/scripts.d/50-vulkan/45-vulkan.sh | 2 +- builder/scripts.d/50-vulkan/50-shaderc.sh | 2 +- builder/scripts.d/50-vulkan/55-spirv-cross.sh | 2 +- builder/scripts.d/50-x265.sh | 2 +- builder/scripts.d/50-zimg.sh | 2 +- docker-build-win64.sh | 6 +-- docker-build.sh | 40 +++++++++++-------- 34 files changed, 59 insertions(+), 53 deletions(-) diff --git a/builder/scripts.d/10-mingw-std-threads.sh b/builder/scripts.d/10-mingw-std-threads.sh index ad55011c5d2..a45c69e6a31 100755 --- a/builder/scripts.d/10-mingw-std-threads.sh +++ b/builder/scripts.d/10-mingw-std-threads.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/meganz/mingw-std-threads.git" -SCRIPT_COMMIT="6c2061b7da41d6aa1b2162ff4383ec3ece864bc6" +SCRIPT_COMMIT="c931bac289dd431f1dd30fc4a5d1a7be36668073" ffbuild_enabled() { [[ $TARGET == win* ]] || return -1 diff --git a/builder/scripts.d/20-libxml2.sh b/builder/scripts.d/20-libxml2.sh index 81b7bb6c835..986d308e3ae 100755 --- a/builder/scripts.d/20-libxml2.sh +++ b/builder/scripts.d/20-libxml2.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/GNOME/libxml2.git" -SCRIPT_COMMIT="884474477284474e0151280aaa275a18e3d7a036" +SCRIPT_COMMIT="58de9d31da4d0e8cb6bcf7f5e99714f9df2c4411" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/25-fftw3f.sh b/builder/scripts.d/25-fftw3f.sh index e1751e87dc3..c8d9abf25ef 100755 --- a/builder/scripts.d/25-fftw3f.sh +++ b/builder/scripts.d/25-fftw3f.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/FFTW/fftw3.git" -SCRIPT_COMMIT="0842f00ae6b6e1f3aade155bc0edd17a7313fa6a" +SCRIPT_COMMIT="69f6c1a6ebd7ac5af33e7074134fb79fbc729c3d" ffbuild_enabled() { # Dependency of GPL-Only librubberband diff --git a/builder/scripts.d/25-freetype.sh b/builder/scripts.d/25-freetype.sh index bf1d9abcc6d..89f4af8a74b 100755 --- a/builder/scripts.d/25-freetype.sh +++ b/builder/scripts.d/25-freetype.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://gitlab.freedesktop.org/freetype/freetype.git" -SCRIPT_COMMIT="e4586d960f339cf75e2e0b34aee30a0ed8353c0d" +SCRIPT_COMMIT="95a872085e5a79cf710acf6389dbd55b6e728aac" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/25-gmp.sh b/builder/scripts.d/25-gmp.sh index 23bbeb4e9f7..bcdd1d37b67 100755 --- a/builder/scripts.d/25-gmp.sh +++ b/builder/scripts.d/25-gmp.sh @@ -1,7 +1,7 @@ #!/bin/bash -SCRIPT_VERSION="6.2.1" -SCRIPT_SHA512="c99be0950a1d05a0297d65641dd35b75b74466f7bf03c9e8a99895a3b2f9a0856cd17887738fa51cf7499781b65c049769271cbcb77d057d2e9f1ec52e07dd84" +SCRIPT_VERSION="6.3.0" +SCRIPT_SHA512="e85a0dab5195889948a3462189f0e0598d331d3457612e2d3350799dba2e244316d256f8161df5219538eb003e4b5343f989aaa00f96321559063ed8c8f29fd2" SCRIPT_URL="https://ftp.gnu.org/gnu/gmp/gmp-${SCRIPT_VERSION}.tar.xz" ffbuild_enabled() { diff --git a/builder/scripts.d/25-openssl.sh b/builder/scripts.d/25-openssl.sh index 4e02ec113fc..435c5346a83 100755 --- a/builder/scripts.d/25-openssl.sh +++ b/builder/scripts.d/25-openssl.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/openssl/openssl.git" -SCRIPT_COMMIT="OpenSSL_1_1_1u" +SCRIPT_COMMIT="OpenSSL_1_1_1v" SCRIPT_TAGFILTER="OpenSSL_1_1_1*" ffbuild_enabled() { diff --git a/builder/scripts.d/25-xz.sh b/builder/scripts.d/25-xz.sh index f5412c5ddd6..496f79884cc 100755 --- a/builder/scripts.d/25-xz.sh +++ b/builder/scripts.d/25-xz.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/xz-mirror/xz.git" -SCRIPT_COMMIT="dbb3a536ed9873ffa0870321f6873e564c6a9da8" +SCRIPT_COMMIT="16068f6c30b888cdb873f6285af941d00f95741d" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/35-fontconfig.sh b/builder/scripts.d/35-fontconfig.sh index 6d2bdec3ec9..4d0b044a9e8 100755 --- a/builder/scripts.d/35-fontconfig.sh +++ b/builder/scripts.d/35-fontconfig.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://gitlab.freedesktop.org/fontconfig/fontconfig.git" -SCRIPT_COMMIT="7e2a1b2577e8d90ea5be3f14091e809ac7742438" +SCRIPT_COMMIT="2fb3419a92156569bc1ec707401258c922cd0d99" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/45-harfbuzz.sh b/builder/scripts.d/45-harfbuzz.sh index 2832a5aa619..a36c5824bf7 100755 --- a/builder/scripts.d/45-harfbuzz.sh +++ b/builder/scripts.d/45-harfbuzz.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/harfbuzz/harfbuzz.git" -SCRIPT_COMMIT="d4bbe3f48663944385f25f608438e1eb678fc4b7" +SCRIPT_COMMIT="1d665c2b521512cdd56964138fc601debd1f1177" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/45-x11/10-xcbproto.sh b/builder/scripts.d/45-x11/10-xcbproto.sh index 894477d4d81..50330efef03 100755 --- a/builder/scripts.d/45-x11/10-xcbproto.sh +++ b/builder/scripts.d/45-x11/10-xcbproto.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/proto/xcbproto.git" -SCRIPT_COMMIT="cfcc51836c1f2c174b67073cc8bed92e7e9c9569" +SCRIPT_COMMIT="b016df100111b56d7c1a2c63ea6791b2287a83e4" ffbuild_enabled() { [[ $TARGET != linux* ]] && return -1 diff --git a/builder/scripts.d/45-x11/10-xproto.sh b/builder/scripts.d/45-x11/10-xproto.sh index b79c2deaafd..ca041b5bf5f 100755 --- a/builder/scripts.d/45-x11/10-xproto.sh +++ b/builder/scripts.d/45-x11/10-xproto.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/proto/xorgproto.git" -SCRIPT_COMMIT="766967322209f2dcb72e6a8edea0c651f586201d" +SCRIPT_COMMIT="704a75eecdf177a8b18ad7e35813f2f979b0c277" ffbuild_enabled() { [[ $TARGET != linux* ]] && return -1 diff --git a/builder/scripts.d/45-x11/20-libxau.sh b/builder/scripts.d/45-x11/20-libxau.sh index 4c2e8beebbc..ab39b2c95c5 100755 --- a/builder/scripts.d/45-x11/20-libxau.sh +++ b/builder/scripts.d/45-x11/20-libxau.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libxau.git" -SCRIPT_COMMIT="df1bf4fe528a5a9eef420f78efb225e4696ac467" +SCRIPT_COMMIT="68e74d37b99f56bbd1a5f2fb8cb4ad6116f27bd3" ffbuild_enabled() { [[ $TARGET != linux* ]] && return -1 diff --git a/builder/scripts.d/45-x11/30-libxcb.sh b/builder/scripts.d/45-x11/30-libxcb.sh index 726f98f469c..f138fe14136 100755 --- a/builder/scripts.d/45-x11/30-libxcb.sh +++ b/builder/scripts.d/45-x11/30-libxcb.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libxcb.git" -SCRIPT_COMMIT="8935793f1f3751a6aa9d78955c7d6236177986de" +SCRIPT_COMMIT="038636786ad1914f3daf3503ae9611f40dffbb8f" ffbuild_enabled() { [[ $TARGET != linux* ]] && return -1 diff --git a/builder/scripts.d/45-x11/40-libx11.sh b/builder/scripts.d/45-x11/40-libx11.sh index abd0ae4d65d..cb7be7244fe 100755 --- a/builder/scripts.d/45-x11/40-libx11.sh +++ b/builder/scripts.d/45-x11/40-libx11.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libx11.git" -SCRIPT_COMMIT="ab0442d3fa835ce16559b29532ac7f674f8557f4" +SCRIPT_COMMIT="b2c3fb7b4dd4c4c7b9d28c7af7776cccc8e0a98b" ffbuild_enabled() { [[ $TARGET != linux* ]] && return -1 diff --git a/builder/scripts.d/45-x11/60-libxcursor.sh b/builder/scripts.d/45-x11/60-libxcursor.sh index 18e40570083..bf5543515a7 100755 --- a/builder/scripts.d/45-x11/60-libxcursor.sh +++ b/builder/scripts.d/45-x11/60-libxcursor.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libxcursor.git" -SCRIPT_COMMIT="a353f02a7ac4504ad5edb5407278c7a03c507aef" +SCRIPT_COMMIT="9c1b50ed98d354488329c99bc8bf77d1c6df657c" ffbuild_enabled() { [[ $TARGET != linux* ]] && return -1 diff --git a/builder/scripts.d/50-amf.sh b/builder/scripts.d/50-amf.sh index c8dd46f8069..e4933becbff 100755 --- a/builder/scripts.d/50-amf.sh +++ b/builder/scripts.d/50-amf.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/GPUOpen-LibrariesAndSDKs/AMF.git" -SCRIPT_COMMIT="bd5db31d3d8ea1fae7002dd903898599bdb7d97a" +SCRIPT_COMMIT="68f2396f1a55a5b12767f5433411bb4093ea65ed" ffbuild_enabled() { [[ $TARGET == *arm64 ]] && return -1 diff --git a/builder/scripts.d/50-dav1d.sh b/builder/scripts.d/50-dav1d.sh index 319eb393acb..1e8cc359cea 100755 --- a/builder/scripts.d/50-dav1d.sh +++ b/builder/scripts.d/50-dav1d.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://code.videolan.org/videolan/dav1d.git" -SCRIPT_COMMIT="2373fda303d46489c1ec269dc66369a31663cb25" +SCRIPT_COMMIT="e58afe4dd9057591882a01c31382c203e8a61c92" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/50-libass.sh b/builder/scripts.d/50-libass.sh index 07b278b7955..8eafaf6471e 100755 --- a/builder/scripts.d/50-libass.sh +++ b/builder/scripts.d/50-libass.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/libass/libass.git" -SCRIPT_COMMIT="1a599b1db748dfc07df98cd37d8603edb87da2fd" +SCRIPT_COMMIT="91422bdb9497e8484b3248f5ae7eb50d41e2555d" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/50-libvpx.sh b/builder/scripts.d/50-libvpx.sh index 0c13af67d3e..14f941ae57f 100755 --- a/builder/scripts.d/50-libvpx.sh +++ b/builder/scripts.d/50-libvpx.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://chromium.googlesource.com/webm/libvpx" -SCRIPT_COMMIT="14e52008edbf2e91386423fdd53310fe49654991" +SCRIPT_COMMIT="5556ebd894a9a9b07908c3c7fd0a7a87732a7635" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/50-libwebp.sh b/builder/scripts.d/50-libwebp.sh index b0ba227383f..1802af27a7c 100755 --- a/builder/scripts.d/50-libwebp.sh +++ b/builder/scripts.d/50-libwebp.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://chromium.googlesource.com/webm/libwebp" -SCRIPT_COMMIT="08d60d60066eb30ab8e0e3ccfa0cd0b68f8cccc6" +SCRIPT_COMMIT="dd7364c3cefe0f5c0b3c18c3b1887d353f90fc1f" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/50-onevpl.sh b/builder/scripts.d/50-onevpl.sh index afe6ec1f88a..6c76ce00f6a 100755 --- a/builder/scripts.d/50-onevpl.sh +++ b/builder/scripts.d/50-onevpl.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/oneapi-src/oneVPL.git" -SCRIPT_COMMIT="e12ace9761bb52786409e830f619916b86e87fc5" +SCRIPT_COMMIT="ca5bbbb057a6e84b103aca807612afb693ad046c" ffbuild_enabled() { [[ $TARGET == *arm64 ]] && return -1 diff --git a/builder/scripts.d/50-openmpt.sh b/builder/scripts.d/50-openmpt.sh index 6bb161dbd0d..ca33a849328 100755 --- a/builder/scripts.d/50-openmpt.sh +++ b/builder/scripts.d/50-openmpt.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://source.openmpt.org/svn/openmpt/trunk/OpenMPT" -SCRIPT_REV="19439" +SCRIPT_REV="19561" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/50-srt.sh b/builder/scripts.d/50-srt.sh index 9b809d47a63..b1fb85e3e7f 100755 --- a/builder/scripts.d/50-srt.sh +++ b/builder/scripts.d/50-srt.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/Haivision/srt.git" -SCRIPT_COMMIT="9448e26fcd7602098b4bf9cd7fe535136e89e10b" +SCRIPT_COMMIT="88ca9ccca4984dbf61a5e1a06ac551b4dead5304" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/50-svtav1.sh b/builder/scripts.d/50-svtav1.sh index 34d2931e91a..aa566bedab1 100755 --- a/builder/scripts.d/50-svtav1.sh +++ b/builder/scripts.d/50-svtav1.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://gitlab.com/AOMediaCodec/SVT-AV1.git" -SCRIPT_COMMIT="08c18ba0768ed3dbbff0903adc326fb3a7549bd9" +SCRIPT_COMMIT="903ff3add82744d586295c37ec1241dc51dab16e" ffbuild_enabled() { [[ $TARGET == win32 ]] && return -1 diff --git a/builder/scripts.d/50-vaapi/30-libpciaccess.sh b/builder/scripts.d/50-vaapi/30-libpciaccess.sh index ff55e48f670..21014c3acae 100755 --- a/builder/scripts.d/50-vaapi/30-libpciaccess.sh +++ b/builder/scripts.d/50-vaapi/30-libpciaccess.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://gitlab.freedesktop.org/xorg/lib/libpciaccess.git" -SCRIPT_COMMIT="8980a39004b10298a7db1f1b0b711a19e8b73aee" +SCRIPT_COMMIT="03d0b467804bf033c2be259be3f091231f74cff9" ffbuild_enabled() { [[ $TARGET != linux* ]] && return -1 diff --git a/builder/scripts.d/50-vaapi/40-libdrm.sh b/builder/scripts.d/50-vaapi/40-libdrm.sh index 200aed91ed3..ed2ad7f41da 100755 --- a/builder/scripts.d/50-vaapi/40-libdrm.sh +++ b/builder/scripts.d/50-vaapi/40-libdrm.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://gitlab.freedesktop.org/mesa/drm.git" -SCRIPT_COMMIT="98e1db501173303e58ef6a1def94ab7a2d84afc1" +SCRIPT_COMMIT="c6013245ce9ce287bb86d327f9b6420a320a08e6" ffbuild_enabled() { [[ $TARGET != linux* ]] && return -1 diff --git a/builder/scripts.d/50-vaapi/50-libva.sh b/builder/scripts.d/50-vaapi/50-libva.sh index 7de3784c960..a95bf59b259 100755 --- a/builder/scripts.d/50-vaapi/50-libva.sh +++ b/builder/scripts.d/50-vaapi/50-libva.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/intel/libva.git" -SCRIPT_COMMIT="1c58941b93ba5013c68e8370a408efd630275c9c" +SCRIPT_COMMIT="7d6c7d482b9d2330b1f3a8bac13a6a3205f33382" ffbuild_enabled() { [[ $TARGET != linux* ]] && return -1 diff --git a/builder/scripts.d/50-vulkan/45-vulkan.sh b/builder/scripts.d/50-vulkan/45-vulkan.sh index a4bfbc52f83..f0ccd85584d 100755 --- a/builder/scripts.d/50-vulkan/45-vulkan.sh +++ b/builder/scripts.d/50-vulkan/45-vulkan.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/KhronosGroup/Vulkan-Headers.git" -SCRIPT_COMMIT="v1.3.250" +SCRIPT_COMMIT="v1.3.260" SCRIPT_TAGFILTER="v?.*.*" ffbuild_enabled() { diff --git a/builder/scripts.d/50-vulkan/50-shaderc.sh b/builder/scripts.d/50-vulkan/50-shaderc.sh index e254cca3b8a..7213ac961c6 100755 --- a/builder/scripts.d/50-vulkan/50-shaderc.sh +++ b/builder/scripts.d/50-vulkan/50-shaderc.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/google/shaderc.git" -SCRIPT_COMMIT="e31c4c2e41544d63d90be28c46e4a4793a624240" +SCRIPT_COMMIT="4d98dac61ee4857ea0691a2b9a48aee44eb409db" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/50-vulkan/55-spirv-cross.sh b/builder/scripts.d/50-vulkan/55-spirv-cross.sh index 02f8f8d346f..8d027424272 100755 --- a/builder/scripts.d/50-vulkan/55-spirv-cross.sh +++ b/builder/scripts.d/50-vulkan/55-spirv-cross.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/KhronosGroup/SPIRV-Cross.git" -SCRIPT_COMMIT="2d3a152081ca6e6bea7093940d0f81088fe4d01c" +SCRIPT_COMMIT="bccaa94db814af33d8ef05c153e7c34d8bd4d685" ffbuild_enabled() { return 0 diff --git a/builder/scripts.d/50-x265.sh b/builder/scripts.d/50-x265.sh index a5e4b2e4cc9..287ac5b8af8 100755 --- a/builder/scripts.d/50-x265.sh +++ b/builder/scripts.d/50-x265.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://bitbucket.org/multicoreware/x265_git.git" -SCRIPT_COMMIT="34532bda12a3a3141880582aa186a59cd4538ae6" +SCRIPT_COMMIT="8f18e3ad32684eee95e885e718655f93951128c3" ffbuild_enabled() { [[ $VARIANT == lgpl* ]] && return -1 diff --git a/builder/scripts.d/50-zimg.sh b/builder/scripts.d/50-zimg.sh index 6bcfbc07000..c985a5cec07 100755 --- a/builder/scripts.d/50-zimg.sh +++ b/builder/scripts.d/50-zimg.sh @@ -1,7 +1,7 @@ #!/bin/bash SCRIPT_REPO="https://github.com/sekrit-twc/zimg.git" -SCRIPT_COMMIT="939a78cae6a8207ef778375dfcaa75511162a186" +SCRIPT_COMMIT="71431815950664f1e11b9ee4e5d4ba23d6d997f1" ffbuild_enabled() { return 0 diff --git a/docker-build-win64.sh b/docker-build-win64.sh index eaac151e6b4..e482e2df1f7 100755 --- a/docker-build-win64.sh +++ b/docker-build-win64.sh @@ -100,7 +100,7 @@ popd # GMP mkdir gmp pushd gmp -gmp_ver="6.2.1" +gmp_ver="6.3.0" gmp_link="https://ftp.gnu.org/gnu/gmp/gmp-${gmp_ver}.tar.xz" wget ${gmp_link} -O gmp.tar.gz tar xaf gmp.tar.gz @@ -159,7 +159,7 @@ popd popd # LZMA -git clone -b v5.4.3 --depth=1 https://github.com/xz-mirror/xz.git +git clone -b v5.4.4 --depth=1 https://github.com/xz-mirror/xz.git pushd xz ./autogen.sh --no-po4a --no-doxygen ./configure \ @@ -339,7 +339,7 @@ popd popd # LIBWEBP -git clone -b v1.3.0 --depth=1 https://chromium.googlesource.com/webm/libwebp +git clone -b v1.3.1 --depth=1 https://chromium.googlesource.com/webm/libwebp pushd libwebp ./autogen.sh ./configure \ diff --git a/docker-build.sh b/docker-build.sh index 0f3a448bb5f..a7f76ae92e7 100755 --- a/docker-build.sh +++ b/docker-build.sh @@ -201,10 +201,10 @@ prepare_extra_amd64() { # LIBVA pushd ${SOURCE_DIR} - git clone -b 2.18.0 --depth=1 https://github.com/intel/libva.git + git clone -b 2.19.0 --depth=1 https://github.com/intel/libva.git pushd libva - sed -i 's|getenv("LIBVA_DRIVERS_PATH")|"/usr/lib/jellyfin-ffmpeg/lib/dri:/usr/lib/x86_64-linux-gnu/dri:/usr/lib/dri:/usr/local/lib/dri"|g' va/va.c - sed -i 's|getenv("LIBVA_DRIVER_NAME")|getenv("LIBVA_DRIVER_NAME_JELLYFIN")|g' va/va.c + sed -i 's|secure_getenv("LIBVA_DRIVERS_PATH")|"/usr/lib/jellyfin-ffmpeg/lib/dri:/usr/lib/x86_64-linux-gnu/dri:/usr/lib/dri:/usr/local/lib/dri"|g' va/va.c + sed -i 's|secure_getenv("LIBVA_DRIVER_NAME")|secure_getenv("LIBVA_DRIVER_NAME_JELLYFIN")|g' va/va.c ./autogen.sh ./configure \ --prefix=${TARGET_DIR} \ @@ -218,7 +218,7 @@ prepare_extra_amd64() { # LIBVA-UTILS pushd ${SOURCE_DIR} - git clone -b 2.18.2 --depth=1 https://github.com/intel/libva-utils.git + git clone -b 2.19.0 --depth=1 https://github.com/intel/libva-utils.git pushd libva-utils ./autogen.sh ./configure --prefix=${TARGET_DIR} @@ -242,7 +242,7 @@ prepare_extra_amd64() { # GMMLIB pushd ${SOURCE_DIR} - git clone -b intel-gmmlib-22.3.7 --depth=1 https://github.com/intel/gmmlib.git + git clone -b intel-gmmlib-22.3.9 --depth=1 https://github.com/intel/gmmlib.git pushd gmmlib mkdir build && pushd build cmake -DCMAKE_INSTALL_PREFIX=${TARGET_DIR} .. @@ -276,7 +276,7 @@ prepare_extra_amd64() { # Provides VPL runtime (libmfx-gen.so.1.2) for 11th Gen Tiger Lake and newer # Both MSDK and VPL runtime can be loaded by MFX dispatcher (libmfx.so.1) pushd ${SOURCE_DIR} - git clone -b intel-onevpl-23.2.3 --depth=1 https://github.com/oneapi-src/oneVPL-intel-gpu.git + git clone -b intel-onevpl-23.3.0 --depth=1 https://github.com/oneapi-src/oneVPL-intel-gpu.git pushd oneVPL-intel-gpu mkdir build && pushd build cmake -DCMAKE_INSTALL_PREFIX=${TARGET_DIR} \ @@ -296,14 +296,8 @@ prepare_extra_amd64() { # Full Feature Build: ENABLE_KERNELS=ON(Default) ENABLE_NONFREE_KERNELS=ON(Default) # Free Kernel Build: ENABLE_KERNELS=ON ENABLE_NONFREE_KERNELS=OFF pushd ${SOURCE_DIR} - git clone -b intel-media-23.2.3 --depth=1 https://github.com/intel/media-driver.git + git clone -b intel-media-23.3.0 --depth=1 https://github.com/intel/media-driver.git pushd media-driver - # Possible fix for TGLx timeout caused by 'HCP Scalability Decode' under heavy load - wget -q -O - https://github.com/intel/media-driver/commit/cbbd676f.patch | git apply - # Correct AV1 supported tx mode caps for the AV1 VA-API encoder - wget -q -O - https://github.com/intel/media-driver/commit/89201eaa.patch | git apply - # Fix the slow VPP tone-mapping on ADL-S and ADL-N - wget -q -O - https://github.com/intel/media-driver/commit/1097e39b.patch | git apply mkdir build && pushd build cmake -DCMAKE_INSTALL_PREFIX=${TARGET_DIR} \ -DENABLE_KERNELS=ON \ @@ -321,7 +315,11 @@ prepare_extra_amd64() { # Vulkan Headers pushd ${SOURCE_DIR} - git clone -b v1.3.240 --depth=1 https://github.com/KhronosGroup/Vulkan-Headers.git + vk_ver="v1.3.260" + if [[ $( lsb_release -c -s ) == "bionic" ]]; then + vk_ver="v1.3.240" + fi + git clone -b ${vk_ver} --depth=1 https://github.com/KhronosGroup/Vulkan-Headers.git pushd Vulkan-Headers mkdir build && pushd build cmake \ @@ -334,7 +332,11 @@ prepare_extra_amd64() { # Vulkan ICD Loader pushd ${SOURCE_DIR} - git clone -b v1.3.240 --depth=1 https://github.com/KhronosGroup/Vulkan-Loader.git + vk_ver="v1.3.260" + if [[ $( lsb_release -c -s ) == "bionic" ]]; then + vk_ver="v1.3.240" + fi + git clone -b ${vk_ver} --depth=1 https://github.com/KhronosGroup/Vulkan-Loader.git pushd Vulkan-Loader mkdir build && pushd build cmake \ @@ -355,7 +357,7 @@ prepare_extra_amd64() { # SHADERC pushd ${SOURCE_DIR} - git clone -b v2023.3 --depth=1 https://github.com/google/shaderc.git + git clone -b v2023.5 --depth=1 https://github.com/google/shaderc.git pushd shaderc ./utils/git-sync-deps mkdir build && pushd build @@ -433,7 +435,11 @@ prepare_extra_amd64() { # LIBPLACEBO pushd ${SOURCE_DIR} - git clone -b v5.229.2 --recursive --depth=1 https://github.com/haasn/libplacebo.git + pl_ver="v5.264.1" + if [[ $( lsb_release -c -s ) == "bionic" ]]; then + pl_ver="v5.229.2" + fi + git clone -b ${pl_ver} --recursive --depth=1 https://github.com/haasn/libplacebo.git sed -i 's|env: python_env,||g' libplacebo/src/vulkan/meson.build meson setup libplacebo placebo_build \ --prefix=${TARGET_DIR} \ From 2825ec6ceb37d78cd58826bd5c640dd3a4d69cdf Mon Sep 17 00:00:00 2001 From: nyanmisaka Date: Sat, 5 Aug 2023 02:10:34 +0800 Subject: [PATCH 8/8] Bump version to 5.1.3-4 Signed-off-by: nyanmisaka --- build.yaml | 2 +- debian/changelog | 11 +++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/build.yaml b/build.yaml index 8a7ea3d7503..96703f367bd 100644 --- a/build.yaml +++ b/build.yaml @@ -1,7 +1,7 @@ --- # We just wrap `build` so this is really it name: "jellyfin-ffmpeg" -version: "5.1.3-3" +version: "5.1.3-4" packages: - buster-amd64 - buster-armhf diff --git a/debian/changelog b/debian/changelog index d4e3bb82813..681dcd21fbb 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,14 @@ +jellyfin-ffmpeg (5.1.3-4) unstable; urgency=medium + + * Add VUI info to the seq header of HEVC VA-API encoder + * Remove HDR metadata from tonemap_vaapi SDR output + * Backport QSV fixes from upstream + * Fix VA-API import DRM prime2 planar formats + * Use contiguous linear Vulkan images for AMD encoder + * Update dependencies + + -- nyanmisaka Thu, 27 Jul 2023 21:54:12 +0800 + jellyfin-ffmpeg (5.1.3-3) unstable; urgency=medium * Allow VA-API import DRM prime2 planar formats