Skip to content

Commit

Permalink
Reduce thread count.
Browse files Browse the repository at this point in the history
  • Loading branch information
dchapyshev committed Nov 10, 2024
1 parent 9f3e9d1 commit 77942a8
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 7 deletions.
14 changes: 7 additions & 7 deletions source/base/codec/video_decoder_vpx.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,16 +95,16 @@ std::unique_ptr<VideoDecoderVPX> VideoDecoderVPX::createVP9()
//--------------------------------------------------------------------------------------------------
VideoDecoderVPX::VideoDecoderVPX(proto::VideoEncoding encoding)
{
LOG(LS_INFO) << "VPX(" << encoding << ") Ctor";
codec_.reset(new vpx_codec_ctx_t());

uint32_t thread_count = std::thread::hardware_concurrency();
if (thread_count >= 12)
thread_count = 8;
else if (thread_count >= 8)
if (thread_count >= 8)
thread_count = 4;
else
else if (thread_count >= 4)
thread_count = 2;
else
thread_count = 1;

LOG(LS_INFO) << "VPX(" << encoding << ") Ctor (thread_count=" << thread_count << ")";
codec_.reset(new vpx_codec_ctx_t());

vpx_codec_dec_cfg_t config;
config.w = 0;
Expand Down
10 changes: 10 additions & 0 deletions source/client/translations/aspia_client_pt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3202,27 +3202,31 @@
<source>%n seconds</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<location filename="../ui/router_manager/router_manager_window.cc" line="1767"/>
<source>%n minutes</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<location filename="../ui/router_manager/router_manager_window.cc" line="1768"/>
<source>%n hours</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<location filename="../ui/router_manager/router_manager_window.cc" line="1792"/>
<source>%n days</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message>
Expand Down Expand Up @@ -3380,6 +3384,7 @@
<source>Password can not be empty and should not exceed %n characters.</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message>
Expand All @@ -3392,6 +3397,7 @@
<source>The password must contain lowercase and uppercase characters, numbers and should not be shorter than %n characters.</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message>
Expand Down Expand Up @@ -3694,27 +3700,31 @@
<source>%n seconds</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<location filename="../ui/sys_info/sys_info_widget.cc" line="143"/>
<source>%n minutes</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<location filename="../ui/sys_info/sys_info_widget.cc" line="144"/>
<source>%n hours</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message numerus="yes">
<location filename="../ui/sys_info/sys_info_widget.cc" line="168"/>
<source>%n days</source>
<translation type="unfinished">
<numerusform></numerusform>
<numerusform></numerusform>
</translation>
</message>
<message>
Expand Down

0 comments on commit 77942a8

Please sign in to comment.