Welcome to Doom9's Forum, THE in-place to be for everyone interested in DVD conversion.

Before you start posting please read the forum rules. By posting to this forum you agree to abide by the rules.

 

Go Back   Doom9's Forum > Capturing and Editing Video > Avisynth Usage

Reply
 
Thread Tools Search this Thread Display Modes
Old 20th January 2004, 19:50   #1  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
***Formula to guess the Decimate cycle***

Have a look:

http://forum.doom9.org/showthread.ph...541#post431541

This could be very neat for weird patterns like silent movies

Code:
c= combed frame number
fc = former combed frame number
bfc = before former frame number

if (fc=c-1 OR fc=bfc+1) then cycle=c-bfc 

Example 1: Telecine (cycle=5)
=============================

ABBCDEFFGH
ABCDDEFGHH
ppccpppccp (p=progressive c=combed)

frames before combed:
ccppp fc=bfc+1
cpppc fc=c-1

cycle=c-bfc=5

Example 2: PAL2NTSC (cycle=6)
=============================
aka 2:2:3:2:3 pulldown

ABCCDEFGHHIJ
ABCDEEFGHIJJ
pppccppppccp (p=progressive c=combed)

frames before combed:
ccpppp fc=bfc+1
cppppc fc=c-1

cycle=c-bfc=6
New version: IF (fc=c-1 OR fc=bfc+1) THEN cycle=c-bfc ELSE cycle=c-fc (version able to deal with cycle=3)


Bilu

Last edited by bilu; 21st January 2004 at 00:27.
bilu is offline   Reply With Quote
Old 21st January 2004, 00:36   #2  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
Last version doesn't work on patterns like this:
Code:
3000130001

AABCDE -> ABCDEE 
ABCDEE    ABCDEE

AABCDEFFGHIJ
ABCDEEFGHIJJ
pccccppccccp

c ppccc fc=c-1 AND fc=bfc+1 -> cycle=2
c cppcc fc=c-1 AND fc=bfc+1 -> cycle=2
c ccppc fc=c-1 -> cycle=4
c cccpp -> cycle=3
Working on a new one...


Bilu
bilu is offline   Reply With Quote
Old 21st January 2004, 01:21   #3  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
Consider these patterns:
Code:
23012301 -> cycle 5

ABBCDEFFGH
ABCDDEFGHH
ppccpppccp

30013001 -> cycle 5

AABCDEEFGH
ABCDDEFGHH
pcccppcccp

3131 -> cycle 3

AABCCD
ABBCDD
pcppcp

p=progressive
c=combed
Safest way to define a pattern cycle? The longest distance between progressive or interlaced frames + 1 (if cycle>3) or +0 (cycle=3).

Assuming:
Code:
p=progressive
fp=former progressive

c=combed
fc=former combed

pat=(c-fc > p-fp) 1:0
off_c=((pat==1) && (c-fc==3))? 0:1
off_p=((pat==0) && (p-fp==3))? 0:1
cycle=(pat=1)? (c-fc)+off_c:(p-fp)+off_p
Now every pattern, no matter how weird it is, gets detected :)


Bilu
bilu is offline   Reply With Quote
Old 21st January 2004, 15:22   #4  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
Small correction:
Code:
p=progressive
fp=former progressive

c=combed
fc=former combed

pat=(c-fc > p-fp) 1:0
off_c=((pat==1) && (c-fc<4))? 0:1
off_p=((pat==0) && (p-fp<4))? 0:1
cycle=(pat=1)? (c-fc)+off_c:(p-fp)+off_p
Now able to deal with cycle=2 and cycle=1 (duh!).

Pretty nice for stuff like a Neo Genesis clip I have:
Code:
A B  C
A AC C
AC is a blended field from A and C, B is an orphan field. So its combed at every 2 frames.

The purpose of this stuff is statistical, to help you make decisions over what you can do with weird streams.


Bilu
bilu is offline   Reply With Quote
Old 22nd January 2004, 08:41   #5  |  Link
Mug Funky
interlace this!
 
Mug Funky's Avatar
 
Join Date: Jun 2003
Location: i'm in ur transfers, addin noise
Posts: 4,555
nice work... i'd like to bump this because i don't have any sources that choke with simple telecide default (good telecine must be a PAL thing :P)
__________________
sucking the life out of your videos since 2004
Mug Funky is offline   Reply With Quote
Old 22nd January 2004, 18:31   #6  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
This is mostly useful to:
1) Identify Video and Film parts on hybrid streams;
2) Identify PAL to NTSC conversions made with the 2:2:3:2:3 process;
3) Identify large patterns with silent movies;

As you can see in http://www.doom9.org/ivtc-tut.htm "SILENT FILMS", you have streams with multiple Telecine patterns one over another, and you have to Decimate more than one time. Maybe this can help too in those cases, at least the composed pattern shall repeat itself


Bilu
bilu is offline   Reply With Quote
Old 22nd January 2004, 19:45   #7  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,653
decimate(6) will restore PAL from 2:2:3:2:3 Pulldown, but the resulting
framerate is 24.975 fps instead of 25fps, due to the 30.00 <-> 29.97 issue. This means every 1000th frame of the PAL-Video will be dropped.
a decimate cycle of 2997/497 (6.03018108651) is needed. Unfortunately decimate doesn't support float-cycles...

is there any way to get true 25fps without using change/assumefps afterwards?
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 23rd January 2004, 14:31   #8  |  Link
bilu
Registered User
 
bilu's Avatar
 
Join Date: Oct 2002
Location: Portugal
Posts: 1,182
I don't know anything else related to 2:2:3:2:3 pulldown beyond Telecide(guide=3).Decimate(6)

And since you are deconstructing a specific method, you'd be safer this way IMHO.

Bilu
bilu is offline   Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +1. The time now is 13:13.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.