# UniTAP.utils.dscl_api

def encode_video_frame( src_video_frame: UniTAP.common.video_frame.VideoFrame, info: UniTAP.common.dsc_compression_info.DscCompressionInfo ) -> UniTAP.common.dsc_video_frame.VideoFrameDSC:

Encode custom video frame `VideoFrame` with transferred DSC parameters to video frame with DSC data.

###### Arguments:

- src_video_frame (`VideoFrame`)
- info (`CompressionInfo`)

def decode_video_frame( src_video_frame: UniTAP.common.dsc_video_frame.VideoFrameDSC ) -> UniTAP.common.video_frame.VideoFrame:

Decode custom video frame `VideoFrameDSC` with DSC data.

###### Arguments:

- src_video_frame (`VideoFrame`)

def dsc_video_frame_from_data(data: bytearray) -> UniTAP.common.dsc_video_frame.VideoFrameDSC:

Read PPS from DSC video frame data `VideoFrameDSC`.

###### Arguments:

- data (`bytearray`)

def calculate_dsc_crc(video_frame: UniTAP.common.dsc_video_frame.VideoFrameDSC ) -> tuple:

Calculate DSC CRC by DSC Video Frame.

###### Arguments:

- video_frame ('VideoFrameDSC')

def calculate_dsc_slice_size(value: int, slice_number: int):

Calculate DSC slice size by value and slice number.

###### Arguments:

- value ('int')
- slice_number ('int')