VIDEO-005: add full offline QPSK IQ video receiver
This commit is contained in:
@@ -6,6 +6,8 @@
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
from typing import Any, Callable, cast
|
||||
|
||||
import numpy as np
|
||||
|
||||
from protocol import convolutional_fec, punctured_fec
|
||||
@@ -54,8 +56,12 @@ def _trellis(soft_values: np.ndarray, information_bit_count: int,
|
||||
return decoded[:information_bit_count]
|
||||
|
||||
|
||||
COMPILED_TRELLIS = (njit(cache=False, nogil=True, fastmath=False)(_trellis)
|
||||
if njit is not None else None)
|
||||
_compiler = cast(Any, njit) # У Numba нет точной типизации фабрики декоратора.
|
||||
COMPILED_TRELLIS: Callable[[np.ndarray, int, np.ndarray, np.ndarray], np.ndarray] | None = (
|
||||
cast(Callable[[np.ndarray, int, np.ndarray, np.ndarray], np.ndarray],
|
||||
_compiler(cache=False, nogil=True, fastmath=False)(_trellis))
|
||||
if njit is not None else None
|
||||
)
|
||||
|
||||
|
||||
def decode_soft(soft_values: np.ndarray, information_bit_count: int,
|
||||
|
||||
Reference in New Issue
Block a user