# UniTAP.common.dsc_compression_info

class DscCompressionInfo:

Class contains information about DSC compression used on frame.

color_format
bpp
is_block_prediction_enabled
h_slice_size
v_slice_size
buffer_bit_depth
version
is_simple_as_444
def is_valid(self) -> bool:

Return state of the video frame and check color_format, bpp, h and v slice_size and DSC version. If everything ok, return True, otherwise - False.

###### Returns:

> object of `bool` type.

class DscCompressionInfo.DscColorFormat(enum.IntEnum):

Contains values of possible color format.

CF_NONE = <DscColorFormat.CF_NONE: -1>
CF_RGB = <DscColorFormat.CF_RGB: 0>
CF_YCbCr_422 = <DscColorFormat.CF_YCbCr_422: 1>
CF_YCbCr_444 = <DscColorFormat.CF_YCbCr_444: 2>
CF_YCbCr_420 = <DscColorFormat.CF_YCbCr_420: 3>
CF_Simple_422 = <DscColorFormat.CF_Simple_422: 4>

##### Inherited Members

enum.Enum
  name
  value
builtins.int
  conjugate
  bit_length
  bit_count
  to_bytes
  from_bytes
  as_integer_ratio
  real
  imag
  numerator
  denominator

def create_from_pps( pps_bytearray: bytearray) -> DscCompressionInfo:

Fill structure 'DscCompressionInfo' from PPS header of the DSC image.

###### Returns:

> object of `DscCompressionInfo` type.