run_codecs
Author: Ismael Seidel Affiliation: Embedded Computing Lab (ECL), Federal University of Santa Catarina (UFSC)
- Description:
This module encodes the JPEG Pleno LF Dataset using the JPEG Pleno Model (JPLM). This implementation is for JPEG Pleno CE 16.
- get_data_from_preffix(file_lines, preffix)[source]
Extracts the value from a log line that starts with the given prefix.
- Parameters:
file_lines (List[str]) – List of lines from the log file
preffix (str) – Prefix string to search for at the start of lines
- Returns:
The value after the prefix, or empty string if not found
- Return type:
str
- clone_and_build_repo(codec_configuration, global_configuration, fulldocker=None)[source]
Clones and builds the codec repository if configured.
If repository is present in codec_configuration, clones and builds it using GitRepositoryClonerAndBuilder and returns the created object. Otherwise returns None.
- Parameters:
codec_configuration (Dict) – Codec-specific configuration
global_configuration (Dict) – Global configuration
fulldocker (bool | None)
- Returns:
GitRepositoryClonerAndBuilder instance or None
- Return type:
Optional[GitRepositoryClonerAndBuilder]
- create_codec_wrapper_instance(codec, codec_configuration, repository_obj=None)[source]
Imports the wrapper module/class and creates an instance configured with codec_configuration.
- Parameters:
codec (str) – Codec name
codec_configuration (Dict) – Codec configuration
repository_obj (Optional[object]) – Optional repository object from clone_and_build_repo
- Returns:
Configured codec wrapper instance
- Return type:
object
- process_codec_using_wrapper(codec_wrapper_instance, configuration, codec_configuration)[source]
Encodes and decodes all lightfields using the codec wrapper.
- Parameters:
codec_wrapper_instance (object) – Prepared codec wrapper instance
configuration (ConfigurationReader) – Configuration reader
codec_configuration (Dict) – Codec-specific configuration
- Returns:
None
- Return type:
None
- main(configuration=None, fulldocker=None)[source]
Encode and decode light fields using configured codecs.
Orchestrates the complete encoding/decoding pipeline: 1. Clones and builds codec repositories if configured 2. Initializes codec wrappers 3. Encodes all light fields at target bitrates 4. Decodes encoded files and converts to configured formats
Usage: python run_codecs.py <configuration.json>
- Parameters:
configuration (ConfigurationReader) – Configuration reader (read from argv if None)
fulldocker (bool) – Whether to use full Docker for building and running codecs
- Returns:
None
- Return type:
None