Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Video Encoding > New and alternative video codecs

Reply
 
Thread Tools Search this Thread Display Modes
Old 19th May 2019, 00:26   #141  |  Link
LigH
German doom9/Gleitz SuMo
 
LigH's Avatar
 
Join Date: Oct 2001
Location: Germany, rural Altmark
Posts: 5,833
It does quite probably depend on the GPU chipset supporting a specific version. Which GPU do you have?
__________________

New German Gleitz board
MediaFire: x264 | x265 | VPx | AOM | Xvid
LigH is offline   Reply With Quote
Old 19th May 2019, 06:24   #142  |  Link
p0w3rh0u5e
Registered User
 
Join Date: Feb 2008
Posts: 21
Quote:
Originally Posted by LigH View Post
It does quite probably depend on the GPU chipset supporting a specific version. Which GPU do you have?
Yep, I think so too. I have an RTX 2060, newest drivers, win10.
p0w3rh0u5e is offline   Reply With Quote
Old 20th May 2019, 21:43   #143  |  Link
p0w3rh0u5e
Registered User
 
Join Date: Feb 2008
Posts: 21
Quote:
Originally Posted by LigH View Post
It does quite probably depend on the GPU chipset supporting a specific version. Which GPU do you have?
For CUDA i had a look into the DLL and SDK, and it seems that there is simply no function called "cuMemsetD8Async_V2", there is only a "cuMemsetD8Async". The functions without Async do have indeed a V2, so maybe it's a typo or NVIDIA killed this function in an updated SDK?
p0w3rh0u5e is offline   Reply With Quote
Old 24th May 2019, 05:31   #144  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 560
At the beginning I apologize for the mess.
Here I add codecs which I compiled in GCC as I could and quickly without testing.
Quote:
Are there any prerequisites to get OpenCL or CUDA running (like some runtime DLLs)?
Good question. I don't know what is the function '-c' for? In theory, you can add the nvcuda.dll file from your graphics card.

I will describe a little bit about the compilation.

First of all, I used the latest drivers with the old codec guetzli software (2017).

I'll give half my kingdom to the one who knows the answer.
Which software to merged to close cl.h and cuda.h libraries.

Thirdly. I have not found the new CUDA DRVAPI DYNLINK software and I do not know how to compile it. Otherwise it displays messages like the nvcuda.dll driver in Windows.
The easiest way to compile using the nvcuda.dll and OpenCL.dll driver files. However the program may be unstable because these files were not compiled in GCC.

g++.exe -ftree-vectorize -g0 -O3 -fPIC -Wall -Wextra butteraugli.o butteraugli_comparator.o dct_double.o debug_print.o entropy_encode.o fdct.o gamma_correct.o guetzli.o idct.o jpeg_data.o jpeg_data_decoder.o jpeg_data_encoder.o jpeg_data_reader.o jpeg_data_writer.o jpeg_huffman_decode.o output_image.o preprocess_downsample.o processor.o quality.o quantize.o score.o gflags\windows_port.o clguetzli\clbutter_comparator.o clguetzli\clguetzli.o clguetzli\clguetzli_test.o clguetzli\clguetzli.cl.o clguetzli\cuguetzli.o clguetzli\cumem_pool.o clguetzli\ocl.o clguetzli\ocu.o clguetzli\utils.o libpng\png.o libpng\pngerror.o libpng\pngget.o libpng\pngmem.o libpng\pngpread.o libpng\pngread.o libpng\pngrio.o libpng\pngrtran.o libpng\pngrutil.o libpng\pngset.o libpng\pngtrans.o libpng\pngwio.o libpng\pngwrite.o libpng\pngwtran.o libpng\pngwutil.o libz\adler32.o libz\crc32.o libz\deflate.o libz\gzclose.o libz\gzlib.o libz\gzread.o libz\gzwrite.o libz\infback.o libz\inffast.o libz\inflate.o libz\inftrees.o libz\trees.o libz\uncompr.o libz\zutil.o -L. -lnvcuda -lOpenCL -o guetzli_opencl_cuda_08bit.exe

Should I use the nvcc software? I don't know. In my opinion, it isn't necessary.

For OpenCL I've added version 200 and for CUDA version 9000
Code:
-D__CUDA_API_VERSION=9000 -DCL_TARGET_OPENCL_VERSION=200
How do I replace the OpenCL.dll file? It should be added:
clguetzli\icd.o clguetzli\icd_dispatch.o clguetzli\icd_test_log.o clguetzli\icd_windows.o clguetzli\icd_windows_hkr.o

don't add files:

clguetzli\cl.o clguetzli\cl_ext.o clguetzli\cl_gl.o clguetzli\icd.o clguetzli\icd_test_log.o

Missing commands in icd_windows_hkr.c :
Code:
-DCM_GETIDLIST_FILTER_CLASS=0x00000200 -DCM_GETIDLIST_FILTER_PRESENT=0x00000100 
#include <devpropdef.h>
DEFINE_DEVPROPKEY(DEVPKEY_Device_ClassGuid,              0xa45c254e, 0xdf1c, 0x4efd, 0x80, 0x20, 0x67, 0xd1, 0x46, 0xa8, 0x50, 0xe0, 10);
Missing commands in cl.c :
Code:
CL_API_ENTRY cl_command_queue CL_API_CALL
clCreateCommandQueueWithProperties(
    cl_context                  context,
    cl_device_id                device,
    const cl_queue_properties * properties,
    cl_int *                    errcode_ret) CL_API_SUFFIX__VERSION_2_0
{
    cl_command_queue obj = (cl_command_queue) malloc(sizeof(struct _cl_command_queue));
    obj->dispatch = dispatchTable;
    test_icd_stub_log("clCreateCommandQueueWithProperties(%p, %p, %x, %p)\n",
                      context,
                      device,
                      properties,
                      errcode_ret);
}
Missing commands in cuguetzli.cpp :
#include <math.h>

Delete commands in clguetzli.cl.cpp :
#define abs(exper) fabs((exper))

I don't know why guetzli has to read additional .cu/.cl files outside of the codec since it's added inside.

Remember to delete the commands in clguetzli.cl:
Code:
#if defined (__USE_OPENCL__) || defined (__USE_CUDA__)
...
#endif // __USE_OPENCL__
Problem with old cuda_drvapi_dynlink.c

Code:
clguetzli\clguetzli.cl.o:clguetzli.cl.cpp:(.text+0x1ff5d): undefined reference to `cuMemcpyDtoH_v2'
clguetzli\cuguetzli.o:cuguetzli.cpp:(.text+0x1f51): undefined reference to `cuMemcpyDtoHAsync_v2'
clguetzli\cuguetzli.o:cuguetzli.cpp:(.text+0x2041): undefined reference to `cuMemcpyDtoDAsync_v2'
clguetzli\cuguetzli.o:cuguetzli.cpp:(.text+0x38a3): undefined reference to `cuMemcpyDtoD_v2'
clguetzli\cuguetzli.o:cuguetzli.cpp:(.text+0x5bf4): undefined reference to `cuMemcpyDtoH_v2'
clguetzli\cumem_pool.o:cumem_pool.cpp:(.text+0x99): undefined reference to `cuMemFree_v2'
clguetzli\cumem_pool.o:cumem_pool.cpp:(.text+0x23d): undefined reference to `cuMemAlloc_v2'
clguetzli\cumem_pool.o:cumem_pool.cpp:(.text+0x29e): undefined reference to `cuMemsetD8Async'
clguetzli\ocu.o:ocu.cpp:(.text+0x18): undefined reference to `cuCtxDestroy_v2'
clguetzli\ocu.o:ocu.cpp:(.text+0x92): undefined reference to `cuCtxDestroy_v2'
clguetzli\ocu.o:ocu.cpp:(.text+0x443): undefined reference to `cuCtxCreate_v2'

Last edited by Jamaika; 26th May 2019 at 12:10.
Jamaika is offline   Reply With Quote
Old 24th May 2019, 10:01   #145  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 560
Remake codecs google:
Code:
- new guetzli changed creators:
  https://github.com/maxime-killinger/guetzli
  https://github.com/ianhuang-777/guetzli-cuda-opencl
  I've combined the fixes, although google didn't accept the Additions of cuda 9.0 and opencl 2.0. {test}
  https://github.com/google/guetzli/pull/227
  additions:
  https://github.com/NVIDIA/cuda-samples
  https://github.com/KhronosGroup/OpenCL-ICD-Loader
  https://github.com/KhronosGroup/OpenCL-Headers
  https://github.com/ptillet/isaac
- new brunsli lossless
- new fixes for codec VVC 5.0
#define JVET_N0438_LOOP_FILTER_DISABLED_ACROSS_VIR_BOUND  1 // loop filter disabled across virtual boundaries
#define JVET_N0067_NAL_Unit_Header                        1 // NAL Unit Header 
#define JVET_N0349_DPS                                    1 // Decoding Parameter Set
#define JVET_N0857_TILES_BRICKS                           1 // VTM-5 basic Slices/Tiles/Bricks design, rectangular slices not supported yet
#define JVET_N0150_ONE_CTU_DELAY_WPP                      1 // one CTU delay WPP
#define EMULATION_PREVENTION_FIX                          1 // fix for start code emulation reported in #270. Diverges from specification text
delete #define HEVC_DEPENDENT_SLICES                             1
https://www.sendspace.com/filegroup/...XoPbXwxyBjQXcw

Last edited by Jamaika; 26th May 2019 at 12:08.
Jamaika is offline   Reply With Quote
Old 28th May 2019, 20:54   #146  |  Link
p0w3rh0u5e
Registered User
 
Join Date: Feb 2008
Posts: 21
Thank you very much.

I think we are getting closer. ;-)

OpenCL Test1 returns a lot of these errors now "Error: clScaleImageEx:526 returned CL_INVALID_KERNEL.", it's not just limited to clScaleImageEx. / no output file
OpenCL Test2 returns the same two lines as your first version "Number of available platforms: 1
DeviceName: ICD_LOADER_TEST_OPENCL_STUB
SelectDevice: ICD_LOADER_TEST_OPENCL_STUB GPU=1" seems to do something, but still no output file is created

Cuda_OpenCL Version with --cuda returns a lot of these "Error: cuScaleImageEx:602 returned CUDA_ERROR_INVALID_HANDLE" (again, not just for cuScaleImageEx) when called with CUDA / no output file.
Cuda_OpenCL Version with --opencl returns a lot of these "Error: cuScaleImageEx:602 returned CUDA_ERROR_NOT_INITIALIZED.
Error: cuScaleImageEx:604 returned CUDA_ERROR_INVALID_HANDLE.
Error: cuComputeBlockZeroingOrder:143 returned CUDA_ERROR_NOT_INITIALIZED.
Error: cuComputeBlockZeroingOrder:146 returned CUDA_ERROR_INVALID_HANDLE." / but actually creates an output-file, sadly only with grey pixels. ;-)

I can send you complete logs if you need, but it's just a chain of almost the same errors.

Last edited by p0w3rh0u5e; 28th May 2019 at 20:56.
p0w3rh0u5e is offline   Reply With Quote
Old 30th May 2019, 15:15   #147  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 560
I have no idea for mistakes. I think GCC is still underdeveloped.
Only Visual Studio 2019 remains.
Jamaika is offline   Reply With Quote
Old 30th May 2019, 15:25   #148  |  Link
Jamaika
Registered User
 
Join Date: Jul 2015
Posts: 560
Code:
Library enc/dec:
libJPEGLS   2.0.1+     [13 Jun 2019] ooapi test 8/16bit C⁺⁺14
lodepng                [01 jun 2019] don't use libpng 
libWebP     1.0.2+     [29 May 2019] don't use images 16bit PPM

libx265     3.1_RC1+3  [15 Jun 2019] 8+10+12bit
jvetvvc     5.0+       [13 Jun 2019] 8+10+12bit
libde265    2.0.0      [null 2019]
libheif HDR 1.0.0+     [07 Jun 2019] only 8bit
libsvt      1.3.0+     [14 Jun 2019]
libbpg      0.9.8                    add new function svt_hevc & jctvc

GCC 9.1.1 2019.05.30 /ftree-vectorize /g0 /O3 /fPIC don't use /flto
JPEG XT only /ggdb3 /flto /fPIC

New function VVC 5.0+:
#define JVET_N0276_CONSTRAINT_FLAGS 1 // JVET-N0276: On interoperability point signalling
#define JVET_N0063_VUI 1 // JVET-N0063: Video Usability Information
#define JVET_N0847_SCALING_LISTS 1 //1: default mode, 2: user defined mode
#define JVET_N0438_LOOP_FILTER_DISABLED_ACROSS_VIR_BOUND 1 // loop filter disabled across virtual boundaries
#define JVET_N0067_NAL_Unit_Header 1 // NAL Unit Header
#define JVET_N0349_DPS 1 // Decoding Parameter Set
#define JVET_N0857_TILES_BRICKS 1 // VTM-5 basic Slices/Tiles/Bricks design, rectangular slices not supported yet
#define JVET_N0150_ONE_CTU_DELAY_WPP 1 // one CTU delay WPP
#define EMULATION_PREVENTION_FIX 1 // fix for start code emulation reported in #270. Diverges from specification text

https://www.sendspace.com/file/8fjrp4

Last edited by Jamaika; 15th June 2019 at 17:43.
Jamaika is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 22:21.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2019, vBulletin Solutions Inc.