简体   繁体   English

如何知道x264是否使用Windows多处理器

[英]How to know if x264 uses multiple processors Windows

I have Linphone open source application that uses x264 encoder. 我有使用x264编码器的Linphone开源应用程序。 By default it runs on one thread: 默认情况下,它在一个线程上运行:

x264_param_t *params= ..... 
params->i_threads=1;

I added ability to use all processors: 我添加了使用所有处理器的能力:

long num_cpu=1;
SYSTEM_INFO sysinfo;
GetSystemInfo( &sysinfo );
num_cpu = sysinfo.dwNumberOfProcessors;
params->i_threads=num_cpu;  

The question is how do I know that during video streaming x264 runs on (in my case) 4 processors? 问题是我怎么知道在视频流中x264运行(在我的情况下)4个处理器?

Because from Task Manager -> Performance -> CPU usage history doesn't clear. 因为从Task Manager -> Performance -> CPU usage history不清楚。

I use windows 7 我用的是Windows 7

Thanks, 谢谢,

In windows task manager, be sure to select View -> CPU History -> One Graph Per CPU . 在Windows任务管理器中,请务必选择“ View -> CPU History -> One Graph Per CPU If it still does not look like all processor cores are running at full speed, then possibly some resource is starving the encoding threads, and there's a bottleneck feeding data into the encoder. 如果它看起来仍然不是所有处理器内核都以全速运行,那么可能某些资源正在使编码线程匮乏,并且存在将数据输入编码器的瓶颈。

There are three easy to see indications that encoding leverages multiple cores: 有三个容易看到的迹象表明编码利用了多个核心:

  1. Encoding runs faster 编码运行得更快
  2. Per core CPU load indicates simultaneous load on several cores/processors 每个核心CPU负载表示多个核心/处理器上的同时负载
  3. Per thread CPU load of your application shows relevant load on multiple threads 每个线程应用程序的CPU负载显示多个线程上的相关负载

Also, you can use processor affinity mask (programmatically, and via Task Manager) to limit the application to single CPU. 此外,您可以使用处理器关联掩码(以编程方式,并通过任务管理器)将应用程序限制为单CPU。 If x264 is using multiple processors, setting the mask will seriously affect application performance. 如果x264使用多个处理器,则设置掩码将严重影响应用程序性能。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM