MCPcopy Create free account
hub / github.com/JasonLSC/GSCodec_Studio / to_dict

Method to_dict

examples/codec_ply_sequence.py:169–183  ·  view source on GitHub ↗

Convert the CompressionConfig instance to a dictionary. If attribute_codec_registry is not None, it will be converted to a dictionary using its to_dict method.

(self)

Source from the content-addressed store, hash-verified

167 })
168
169 def to_dict(self) -> Dict[str, Any]:
170 """
171 Convert the CompressionConfig instance to a dictionary.
172 If attribute_codec_registry is not None, it will be converted to a dictionary using its to_dict method.
173 """
174 # Get only attributes defined in VideoCompressionConfig
175 video_compression_attrs = [
176 "video_codec_type", "use_sort", "sort_type", "verbose", "qp",
177 "use_all_intra", "debug", "transform_attributes",
178 "chroma_subsampling", "use_chroma_qp_offset", "attribute_configs",
179 ]
180
181 result = {attr: getattr(self, attr) for attr in video_compression_attrs}
182
183 return result
184
185
186@dataclass

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected