[x265] [PATCH] fix invalid Instruction Set provided in CLI if CPU doesn't support it
chen
chenm003 at 163.com
Wed Oct 28 15:24:35 CET 2015
At 2015-10-28 16:45:33,dnyaneshwar at multicorewareinc.com wrote:
># HG changeset patch
># User Dnyaneshwar G <dnyaneshwar at multicorewareinc.com>
># Date 1446021877 -19800
># Wed Oct 28 14:14:37 2015 +0530
># Node ID 975087370d14e90cd63edecb34fb4bf2feda2468
># Parent 6563218ce342c30bfd4f9bc172a1dab510e6e55b
>fix invalid Instruction Set provided in CLI if CPU doesn't support it
>
>This patch avoids crash/invalid instructions when we provide instruction sets to
>be used are higher than the cpu capabilities.
>
>For example, if our cpu supports instruction sets upto AVX and we provide
>--asm "avx2" (AVX2 is higher than AVX) then it will show warning and use default
>x265 detected intruction sets.
>
>diff -r 6563218ce342 -r 975087370d14 source/common/primitives.cpp
>--- a/source/common/primitives.cpp Mon Oct 26 12:13:53 2015 +0530
>+++ b/source/common/primitives.cpp Wed Oct 28 14:14:37 2015 +0530
>@@ -238,6 +238,15 @@
> primitives.cu[i].intra_pred_allangs = NULL;
>
> #if ENABLE_ASSEMBLY
>+
>+ if ((uint32_t)param->cpuid > X265_NS::cpu_detect())
How about use AND mask to clear unsupport instruction set and keep user wanted?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x265-devel/attachments/20151028/ad1a4314/attachment.html>
More information about the x265-devel
mailing list