Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rff: Reintroduce warning and change which fields props are used #37

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 9 additions & 8 deletions vssource/rff.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,15 @@ def apply_rff_array(old_array: Sequence[T], rff: Sequence[int], tff: Sequence[in

# It seems really weird thats its allowed to have rff stuff across
# vob boundries even for multi angle stuff i have seen this so often though it is ok to remove the warnings
# for i, f1, f2 in zip(count(), array_double_rate[::2], array_double_rate[1::2]):
# if f1 != f2:
# warnings.warn(
# f'Ambiguous pattern due to rff {f1}!={f2} on index {i}\n'
# 'This probably just means telecine happened across chapters boundary.'
# )

return array_double_rate[::2]
for i, f1, f2 in zip(count(), array_double_rate[::2], array_double_rate[1::2]):
if f1 != f2:
warnings.warn(
f'Ambiguous pattern due to rff {f1}!={f2} on index {i}\n'
)

# 1::2 because there might be the case where there is a one frame cell at the end and if we cut off the last field
# we will miss that vobid with 0::2
return array_double_rate[1::2]


def apply_rff_video(
Expand Down