R3S3t9999 / DoVi_Scripts

User-friendly / drag & drop scripts to process any HDR / Dolby Vision files and more...
144 stars 6 forks source link

libplacebo tonemap error #32

Closed kliffgomel closed 2 months ago

kliffgomel commented 2 months ago

Test conversion of a video file from DV p.5 to DV p.8.1. Script version 3.0, mode 8.1. An error occurs in the vpy script when using the libplacebo library.

c:_out>"D:\SOFT\DoVi_Scripts\tools\VapourSynth\VSPipe.exe" "d:_out\temp.folder31\script.vpy" - --container y4m | "d:\ffmpeg_autobuild_suite\local64\bin-video\x265.exe" --frames 1044 --crf 14 --preset slow --aq-mode 2 --profile main10 --level-idc 5.1 --output-depth 10 --range limited --hdr10 --colorprim bt2020 --colormatrix bt2020nc --transfer smpte2084 --hdr10-opt --repeat-headers --hrd --aud --deblock -3:-3 --max-luma 1023 --no-sao --chromaloc 2 --vbv-maxrate 160000 --vbv-bufsize 160000 --sar 1 --no-open-gop --master-display "G(13250,34500)B(7500,3000)R(34000,16000)WP(15635,16450)L(40000000,50)" --max-cll "3406,184" --dolby-vision-profile 8.1 --dolby-vision-rpu "d:_out\temp.folder31\P8.RPU.bin" --y4m --output "c:_out\palette_DV_p05.06_encoded.hevc" - Warning: FunctionExists not implemented Warning: Avisynth Compat: requested frame 0 not prefetched, using slow method Validation failed: !params->renderable || fmt_caps & PL_FMT_CAP_RENDERABLE (../../../../../src_packages/libplacebo/src/gpu.c:234) for texture: ../../../../../src_packages/vs-placebo/src/tonemap.c:114 y4m [info]: 3840x2160 fps 24000/1001 i420p10 sar 1:1 unknown frame count Warning: Avisynth Compat: requested frame 1 not prefetched, using slow method raw [info]: output file: c:_out\palette_DV_p05.06_encoded.hevc x265 [info]: HEVC encoder version 3.6+35-4b4002c13 x265 [info]: build info [Windows][GCC 14.1.0][64 bit] 10bit x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT SSSE3 SSE4.2 AVX FMA3 BMI2 AVX2 x265 [info]: Main 10 profile, Level-5.1 (High tier) x265 [info]: Thread pool created using 16 threads x265 [info]: Slices : 1 x265 [info]: frame threads / pool features : 4 / wpp(34 rows) x265 [info]: Coding QT: max CU size, min CU size : 64 / 8 x265 [info]: Residual QT: max TU size, max depth : 32 / 1 inter / 1 intra x265 [info]: ME / range / subpel / merge : star / 57 / 3 / 3 x265 [info]: Keyframe min / max / scenecut / bias : 23 / 250 / 40 / 5.00 x265 [info]: Lookahead / bframes / badapt : 25 / 4 / 2 x265 [info]: b-pyramid / weightp / weightb : 1 / 1 / 0 x265 [info]: References / ref-limit cu / depth : 4 / on / on x265 [info]: AQ: mode / str / qg-size / cu-tree : 2 / 1.0 / 32 / 1 x265 [info]: Rate Control / qCompress : CRF-14.0 / 0.60 x265 [info]: VBV/HRD buffer / max-rate / init : 160000 / 160000 / 0.900 x265 [info]: tools: rect limit-modes rd=4 psy-rd=2.00 rdoq=2 psy-rdoq=1.00 x265 [info]: tools: rskip mode=1 signhide tmvp strong-intra-smoothing lslices=4 x265 [info]: tools: deblock(tC=-3:B=-3) Validation failed: !params->renderable || fmt_caps & PL_FMT_CAP_RENDERABLE (../../../../../src_packages/libplacebo/src/gpu.c:234) for texture: ../../../../../src_packages/vs-placebo/src/tonemap.c:114 Warning: Avisynth Compat: requested frame 2 not prefetched, using slow method Validation failed: !params->renderable || fmt_caps & PL_FMT_CAP_RENDERABLE (../../../../../src_packages/libplacebo/src/gpu.c:234) for texture: ../../../../../src_packages/vs-placebo/src/tonemap.c:114 ......

Environment Info OS : Windows 11 x64 (22631) [UTF-8] CPU: 13th Gen Intel Core i5-13400 GPU: Intel UHD Graphics 730 (24EU) 300-1550MHz [65W] (32.0.101.5762) Intel Media SDK API v2.12 OpenGL 4.6 DirectX 11.1, 12.1 Vulkan 1.3.286

temp.folder31.zip

R3S3t9999 commented 2 months ago

do you have a sample? It's working fine on my end but I know that some iTunes P5 web-dl are not working.

PS, you must have a GPU that supports Vulkan to use libplacebo.

kliffgomel commented 2 months ago

https://www.demolandia.net/4k-video-test/dolby-vision/page-3.html?highlight=2 -palette- video sample

kliffgomel commented 2 months ago

I also tested a few more samples with this profile, and the result is the same everywhere.

kliffgomel commented 2 months ago

do you have a sample? It's working fine on my end but I know that some iTunes P5 web-dl are not working.

PS, you must have a GPU that supports Vulkan to use libplacebo.

Intel UHD Graphics 730 supports vulkan, I also specifically checked the functionality of vulkan via ffmpeg - video decoding works, I think other filters will work too.

R3S3t9999 commented 2 months ago

No issue converting this P5 video to P8 HDR10 on my end(i9 + rtx3070) but I also tried it on my cheap laptop with intel graphics and it failed, so libplacebo might not be supported at all on i-gpu.

Here, I converted it for you: https://drive.google.com/file/d/1ji9nRJbRL1UryoQ1ioilaTdveg-trDfp/view?usp=sharing

some screenshot comparison P5 vs encode: https://slow.pics/c/LfKy9mbR

WindowsTerminal_dtucCG2L10