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 > MPEG-4 AVC / H.264

Reply
 
Thread Tools Search this Thread Display Modes
Old 17th May 2012, 21:58   #21  |  Link
06_taro
soy sauce buyer
 
Join Date: Mar 2010
Location: United Kingdom
Posts: 164
A test build

Compiled with APP's SDK. Can also run on NVidia cards, but not sure if it would be faster or not on NV cards when compiled with CUDA SDK....
06_taro is offline   Reply With Quote
Old 17th May 2012, 22:06   #22  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 4,629
Thx.
Crashes my graphic driver, so beware!
Radeon HD 5850, Catalyst 12.4, Win7 x64
sneaker_ger is offline   Reply With Quote
Old 17th May 2012, 22:08   #23  |  Link
06_taro
soy sauce buyer
 
Join Date: Mar 2010
Location: United Kingdom
Posts: 164
Actually crashed once in about 10 tests on my HD6770M, Catalyst 12.3, Win7 x64. :P
06_taro is offline   Reply With Quote
Old 17th May 2012, 22:26   #24  |  Link
sneaker_ger
Registered User
 
Join Date: Dec 2002
Posts: 4,629
Then you have more luck than me. Mine crashes 60% of the time .... every time.
The BSOD right now was probably my PC telling me it's time to stop trying.
sneaker_ger is offline   Reply With Quote
Old 17th May 2012, 22:50   #25  |  Link
06_taro
soy sauce buyer
 
Join Date: Mar 2010
Location: United Kingdom
Posts: 164
Oops, that's terrible....

The only case it crashed was when I use Ctrl+C to terminate the process, which now I found is always crashing.
And my friends's GTX460 hadn't met crash in normal usage.
Not sure if 12.4 has any issues with APP runtime or I have any problems with my compiling configure....

Last edited by 06_taro; 18th May 2012 at 00:06.
06_taro is offline   Reply With Quote
Old 17th May 2012, 23:14   #26  |  Link
aufkrawall
Registered User
 
Join Date: Dec 2011
Posts: 1,638
It works here but GPU load is very low.
Do I have to consider any commands?
aufkrawall is offline   Reply With Quote
Old 18th May 2012, 00:57   #27  |  Link
Audionut
Registered User
 
Join Date: Nov 2003
Posts: 1,254
Looks like the patch has disappeared.

Quick tests on the test build, I'm finding that the higher the encoded bitrate, the lower the performance increase.

dgnv 1440x1080 source, preset veryslow

Around 60% @ 350kbps
45% @ 1500kbps
8% @ 6500kbps

preset medium (default)
12% @ 1500kbps
6% @ 5000kbps
__________________
http://www.7-zip.org/
Audionut is offline   Reply With Quote
Old 18th May 2012, 04:02   #28  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 452
I just tested it. Thanks for the build, 06_taro!

The source file is 4000 frames out of a 720p H.264 file. The source filter is FFVideoSource. No crashes during the test.

Preset was --crf 21 preset "slower". That's it.

Speed wise:

OpenCL: 17.83 fps
Normal: 11.12 fps

The OpenCL version did produce a slightly bigger file, as Anandtech noted. The OpenCL file was 61.6MB and the normal file 60.8MB.

My system:

i7-2600K
16GB RAM
Radeon 7850

Edit: I'm doing more comprehensive tests to determine is the crashes are driver related, or GPU generation related. Perhaps GCN is more stable?

Last edited by aegisofrime; 18th May 2012 at 04:04.
aegisofrime is offline   Reply With Quote
Old 18th May 2012, 04:15   #29  |  Link
06_taro
soy sauce buyer
 
Join Date: Mar 2010
Location: United Kingdom
Posts: 164
In my tests opencl lookahead always archives lower ssim with higher bitrate. Tested with --tune ssim --ssim, and with/without --no-opencl.
06_taro is offline   Reply With Quote
Old 18th May 2012, 04:28   #30  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 452
Quote:
Originally Posted by 06_taro View Post
In my tests opencl lookahead always archives lower ssim with higher bitrate. Tested with --tune ssim --ssim, and with/without --no-opencl.
Could you post a short guide on how to build? I'm just stuck at the part where after I have "patch -p < "C:/x264/OpenCL.diff"", I get a prompt asking me what file I want to patch
aegisofrime is offline   Reply With Quote
Old 18th May 2012, 05:20   #31  |  Link
06_taro
soy sauce buyer
 
Join Date: Mar 2010
Location: United Kingdom
Posts: 164
Here's a step-by-step guide: How to Compile x264 on 32 & 64 Bit Windows. The only thing not mentioned in this article is that building x264 with opencl support needs opencl sdk installed in your system. Either CUDA SDK or AMD APP SDK is required. The opencl libs will be checked during configuring.

Last edited by 06_taro; 18th May 2012 at 05:28.
06_taro is offline   Reply With Quote
Old 18th May 2012, 05:33   #32  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 452
Quote:
Originally Posted by 06_taro View Post
Here's a step-by-step guide: How to Compile x264 on 32 & 64 Bit Windows. The only thing not mentioned in this article is that building x264 with opencl support needs opencl sdk installed in your system. Either CUDA SDK or AMD APP SDK is required. The opencl libs will be checked during configuring.
In fact I did use that guide. The unclear part is the patching, because I was prompted for which file to patch. I didn't know what to fill in.

Basically what I did was to save the patch as OpenCL.diff. I then moved this file to my x264 folder.

Here's my build script:

Code:
#!/bin/bash -x
set -e
#git clone git://git.videolan.org/x264.git "C:/x264"
patch -p1 < "C:/x264/OpenCL.diff"
cd "C:/x264"
CFLAGS=-march=corei7-avx ./configure --cross-prefix=x86_64-w64-mingw32- --host=x86_64-pc-mingw32 --enable-win32thread --bit-depth=10
make fprofiled VIDS="C:/fprofile.avs"
Did I get the order correct?

Edit: Hmmm maybe my problem was that I didn't have the AMD APP SDK installed? I will install that and try again.
aegisofrime is offline   Reply With Quote
Old 18th May 2012, 05:34   #33  |  Link
Audionut
Registered User
 
Join Date: Nov 2003
Posts: 1,254
Can someone also re-upload the patch please.
__________________
http://www.7-zip.org/
Audionut is offline   Reply With Quote
Old 18th May 2012, 05:38   #34  |  Link
aegisofrime
Registered User
 
Join Date: Apr 2009
Posts: 452
Quote:
Originally Posted by Audionut View Post
Can someone also re-upload the patch please.
There ya go:

http://www.mediafire.com/?8qxxp7zbocqn14m
aegisofrime is offline   Reply With Quote
Old 18th May 2012, 05:50   #35  |  Link
06_taro
soy sauce buyer
 
Join Date: Mar 2010
Location: United Kingdom
Posts: 164
Quote:
Originally Posted by aegisofrime View Post
In fact I did use that guide. The unclear part is the patching, because I was prompted for which file to patch. I didn't know what to fill in.

Basically what I did was to save the patch as OpenCL.diff. I then moved this file to my x264 folder.

Here's my build script:

Code:
#!/bin/bash -x
set -e
#git clone git://git.videolan.org/x264.git "C:/x264"
patch -p1 < "C:/x264/OpenCL.diff"
cd "C:/x264"
CFLAGS=-march=corei7-avx ./configure --cross-prefix=x86_64-w64-mingw32- --host=x86_64-pc-mingw32 --enable-win32thread --bit-depth=10
make fprofiled VIDS="C:/fprofile.avs"
Did I get the order correct?

Edit: Hmmm maybe my problem was that I didn't have the AMD APP SDK installed? I will install that and try again.
"cd /c/x264" before patching, then patch.exe will find the files to be patched.

Also note that opencl lookahead doesn't support high bit depth, so don't build 10-bit version.
06_taro is offline   Reply With Quote
Old 18th May 2012, 06:39   #36  |  Link
Bloax
The speed of stupid
 
Bloax's Avatar
 
Join Date: Sep 2011
Posts: 319
Well it's a bit faster @ --preset Medium & --crf 25.05 (and lots of other stuff) here, though with about 1 fps. (Strangely enough --rc-lookahead 80 was almost 2 fps faster than non-ocl)

Of course I just compared it to a x264 build without OCL that I had before.

My silly machine: C2D E8600 @ 3.67 Ghz and a 9800 GT.

If it crashes, then that's a bit unfortunate for it, since the video I tested it on (I was lazy, so it was a 0:29 clip) turned out to be 3 MB bigger than the normal x264.
But yeah, it's a nice feature and all - but it's far from there. :/
Bloax is offline   Reply With Quote
Old 18th May 2012, 09:31   #37  |  Link
JEEB
もこたんインしたお!
 
JEEB's Avatar
 
Join Date: Jan 2008
Location: Finland / Japan
Posts: 509
Quote:
Originally Posted by 06_taro View Post
In my tests opencl lookahead always archives lower ssim with higher bitrate. Tested with --tune ssim --ssim, and with/without --no-opencl.
Yes, it isn't using the same algorithms

One of the problems for GPU lookahead pretty much seems to have been the fact that you'd have to implement something completely new that would work on the GPU at least with some amount of speed (if not in the context of no such prior art, at least in the context of the application).

Should try building this version of the OpenCL patch with the nvidia's SDK, but I'm lazy to use dlltool on the dot-lib files for mingw (to create dot-a files) .-.
__________________
[I'm human, no debug | Unofficial x264 Builds]
JEEB is offline   Reply With Quote
Old 18th May 2012, 14:43   #38  |  Link
Przemek_Sperling
Registered User
 
Join Date: Jun 2009
Location: Poland
Posts: 120
Quote:
Originally Posted by JoeH View Post
Is this currently working (as well as an alpha can work, of course) on NVidia as well as AMD? I know NVidia as implemented OpenCL, but I'm not sure if there implementation is as complete as AMD's.
The problem is that NV cards are pretty weak in OpenCL
http://vr-zone.com/articles/from-gtc...ts-/15903.html
Przemek_Sperling is offline   Reply With Quote
Old 18th May 2012, 15:11   #39  |  Link
zbutsam
Registered User
 
Join Date: May 2004
Posts: 5
I must be doing something wrong because the OpenCL build is about 2-3% slower with OpenCL activated than with the --no-opencl switch.

My PC is a Core2Duo E8200@3.4 Ghz with an Ati 5850 and Windows XP 32 Professional. I'm running the 11.12 Catalyst drivers which are the last to support OpenCL under XP. I can see my card speeding up from idle when running the OpenCL build but the load stays at 0%. I have tried OpenCL with other tools and benchmarks (to make sure it works) and the GPU load goes to 100%.

My x264 settings are
x264.exe --level 3.1 --preset slow --tune film --crf 20 --vbv-bufsize 14000 --vbv-maxrate 17500 --vbv-bufsize 14000 --vbv-maxrate 17500 -o e:\trailer.mkv e:\trailer.avs
zbutsam is offline   Reply With Quote
Old 18th May 2012, 16:33   #40  |  Link
LoRd_MuldeR
Software Developer
 
LoRd_MuldeR's Avatar
 
Join Date: Jun 2005
Location: Last House on Slunk Street
Posts: 12,811
Quote:
Originally Posted by zbutsam View Post
I must be doing something wrong because the OpenCL build is about 2-3% slower with OpenCL activated than with the --no-opencl switch.
GPUGPU, may it be implemented via OpenCL or via CUDA or via something else, is not the "magic" speed booster that many people seems to think. Just throwing your CPU code on the GPU won't work. Even if you manage to port your CPU code and make it run on the GPU, it will be slow like hell. Getting calculations done one the GPU fast usually requires completely new ideas/algorithms - and that's exactly where all those so-called "GPU Encoders" sacrifice quality for speed to get some nice FPS numbers for the marketing department! And even if you mange to get your calculations done on the GPU fast - and with "fast" I mean significant faster than on a state-of-the-art the CPU - then it's still not guaranteed that you'll see an overall speed-up! Uploading and downloading the data to/from the "device" (graphics card memory) causes a lot of overhead. Only if you still save time including that overhead then you might be able to see some overall speed-up...

In other words: It's very easy to port your CPU-based software to the GPU and get something that runs a lot slower than the original. At the same time getting something that actually runs faster is very difficult and sometimes impossible!

(There are some calculations that are "sequential" by nature and therefore will never run fast on a massively parallel processor, such as a GPU)
__________________
There was of course no way of knowing whether you were being watched at any given moment.
How often, or on what system, the Thought Police plugged in on any individual wire was guesswork.



Last edited by LoRd_MuldeR; 18th May 2012 at 16:41.
LoRd_MuldeR 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 19:57.


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