[Libav-user] x265 HVEC much slower on AMD than Intel

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[Libav-user] x265 HVEC much slower on AMD than Intel

Dave
Hi,  first timer here.

If I've missed any info below that may be required, please tell me.

I have two PCs I use for transcoding as follows, the Intel one being at
least twice as fast at trancoding to X265 as the AMD one despite the
Intel one having 2 cores (4 with hyperthreading) at 2.8GHz compared
to the AMD with 6 actual cores at 3.5GHz

Intel box:
FreeBSD testbox.asgard.uk 10.3-RELEASE-p20
CPU: Intel(R) Core(TM) i5 CPU         750  @ 2.67GHz (2675.02-MHz K8-class CPU)
FreeBSD/SMP: Multiprocessor System Detected: 4 CPUs
real memory  = 4294967296 (4096 MB)
avail memory = 4098699264 (3908 MB)
nvidia0: <GeForce 9500 GT> on vgapci0


ffmpeg-3.3.4,1

AMD box
FreeBSD amd.asgard.uk 10.3-RELEASE-p20
CPU: AMD Phenom(tm) II X6 1100T Processor (3311.05-MHz K8-class CPU)
FreeBSD/SMP: Multiprocessor System Detected: 6 CPUs
real memory  = 8589934592 (8192 MB)
avail memory = 8249188352 (7867 MB)
nvidia0: <GeForce 8400GS> on vgapci0

ffmpeg-3.3.4,1

Note that ffmpeg is built from source using the latest version in the
FreeBSD ports collectionon each PC so any default local compiler or
cpu optimisation which may occur based on the local hardware and
CPU type ought to occur.

The most obvious difference when running ffmpeg are the following lines
On Intel box
x265 [info]: HEVC encoder version 2.3
x265 [info]: build info [Unk-OS][clang 3.4.1][64 bit] 8bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2

On AMD box
x265 [info]: HEVC encoder version 2.3
x265 [info]: build info [Unk-OS][clang 3.4.1][64 bit] 8bit
x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT


Specifically the CPU capabilities are quite different so I suspect are
the most likely reason for the difference.

Are AMD CPUs not as well supported for optimised X265 encoding or is
my AMD Phenom II X6 1100T simply too old by modern standards?
Note that I have tried swapping the video cards between the two boxes
to no effect.

The general command line I'm using, with variations on the preset and CRF
values depending on the source, is:

ffmpeg -i input.ts -c:v libx265 -preset medium -crf 26 -c:a copy ouput.mkv

sometimes with a -vf scale,  sometimes transcoding the audio, but the above
is probably the most common command I use.

Are there any AMD specific options I should be using?

I'm considering building a new PC so would appreciate any suggestions on
what to look for and what to avoid.  Is it primarily CPU "grunt" (+ extensions)
or should I be looking at GPU too?  Bearing in mind also that I run FreeBSD so
CUDA is  not an option (if it even is an option on any OS)

_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|

Re: x265 HVEC much slower on AMD than Intel

Carl Eugen Hoyos-2
2017-10-10 23:06 GMT+02:00 Dave <[hidden email]>:

> The most obvious difference when running ffmpeg are the following lines
> On Intel box
> x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
>
> On AMD box
> x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT

This indicates that the Intel cpu can at least be much more efficient
and that higher throughput is no surprise.

Carl Eugen
_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user
Reply | Threaded
Open this post in threaded view
|

Re: x265 HVEC much slower on AMD than Intel

Dave
On Thursday 12 October 2017 14:05:50 Carl Eugen Hoyos wrote:

> 2017-10-10 23:06 GMT+02:00 Dave <[hidden email]>:
>
> > The most obvious difference when running ffmpeg are the following lines
> > On Intel box
> > x265 [info]: using cpu capabilities: MMX2 SSE2Fast SSSE3 SSE4.2
> >
> > On AMD box
> > x265 [info]: using cpu capabilities: MMX2 SSE2Fast LZCNT
>
> This indicates that the Intel cpu can at least be much more efficient
> and that higher throughput is no surprise.

Thanks Carl.  I was fairly confident that those instruction set extensions
would be the prime reason for the difference, so I guess the only option
is to build a new box with the "right" CPU.

_______________________________________________
Libav-user mailing list
[hidden email]
http://ffmpeg.org/mailman/listinfo/libav-user