diff options
author | Rémi Denis-Courmont <remi@remlab.net> | 2023-08-15 18:16:42 +0300 |
---|---|---|
committer | Rémi Denis-Courmont <remi@remlab.net> | 2023-08-24 20:58:57 +0300 |
commit | 05115a77e012331b6ff5e24bab40e75848447c62 (patch) | |
tree | 3f41a0623c0dfb82a4b9f9400fbbc1f0298fcfa6 /libavformat/av1.h | |
parent | 5f5a1ccd04acc74e31e1e4fe7e297b3f589425b3 (diff) | |
download | ffmpeg-05115a77e012331b6ff5e24bab40e75848447c62.tar.gz |
lavu/timer: use time for AV_READ_TIME on RISC-V
So far, AV_READ_TIME would return the cycle counter. This posed two
problems:
1) On recent systems, it would just raise an illegal instruction
exception. Indeed RDCYCLE is blocked in user space to ward off some
side channel attacks. In particular, this would cause the random
number generator to crash.
2) It does not match the x86 behaviour and the apparent original intent
of AV_READ_TIME in the functional code base (outside test cases).
So this replaces the cycle counter with the time counter. The unit is
a platform-dependent constant fraction of time, and the value should be
stable across harts (RISC-V lingo for physical CPU thread).
Diffstat (limited to 'libavformat/av1.h')
0 files changed, 0 insertions, 0 deletions