Initial commit
This commit is contained in:
20
src/watfag/parsers/generic/hdr.py
Normal file
20
src/watfag/parsers/generic/hdr.py
Normal file
@@ -0,0 +1,20 @@
|
||||
import regex as re
|
||||
|
||||
from parsers.generic import GenericParser
|
||||
from parsers.generic.parsers import CheckParser
|
||||
from parsers.generic.watfag import DynamicRange
|
||||
|
||||
checks = {
|
||||
re.compile(r"hybrid|do?vi? ?hdr(?:10)?[\+p]?", re.IGNORECASE): DynamicRange.HYBRID,
|
||||
re.compile(r"do?vi?", re.IGNORECASE): DynamicRange.DV,
|
||||
re.compile(r"hdr10\+?", re.IGNORECASE): DynamicRange.HDR10P,
|
||||
re.compile(r"hdr", re.IGNORECASE): DynamicRange.HDR
|
||||
}
|
||||
|
||||
class DynamicRangeParser(CheckParser, GenericParser):
|
||||
def __init__(self, release):
|
||||
super().__init__(release)
|
||||
self.checks = checks
|
||||
self.remove_checks = [] # No remove checks for HDR
|
||||
self.attribute_name = "dynamic_range"
|
||||
self.default = DynamicRange.SDR # Default to SDR if no HDR indicators are found
|
||||
Reference in New Issue
Block a user