madshi bug tracker - madVR
View Issue Details
0000150madVRbugpublic2014-02-08 08:282015-03-23 09:33
turbojet 
madshi 
normalminoralways
acknowledgedreopened 
WindowsWindows 7SP1
87.4
Potplayer, MPC-BE
Internal
LAV Filters
Software
forced film mode
no
On
all modes
NVidia
250 and 650
327
0000150: 60i 3:2:3:2:2 cadence should produce 25fps, but madVR switches to 23Hz
This is originally 25 fps source converted to 30 fps by duplicating every sixth frame.

http://www.mediafire.com/download/jd5s4c5qz4x5tlm/4%3B2cadence.mpg [^]
1. enable deinterlace and film mode.
2. play the file
3. see good frames being removed
4. osd usually shows 3:2:3:2:2 cadence
No tags attached.
Issue History
2014-02-08 08:28turbojetNew Issue
2014-02-27 11:15madshiAssigned To => madshi
2014-02-27 11:15madshiStatusnew => assigned
2014-02-28 15:48turbojetNote Added: 0000389
2014-03-03 15:59huhnNote Added: 0000407
2014-03-03 22:45turbojetNote Added: 0000418
2014-03-04 09:47huhnNote Added: 0000419
2014-03-04 09:50madshiNote Added: 0000420
2014-03-04 09:55madshiNote Added: 0000421
2014-03-04 09:55madshiStatusassigned => closed
2014-03-04 09:55madshiResolutionopen => won't fix
2014-03-04 10:02madshiNote Added: 0000422
2014-03-04 10:02madshiStatusclosed => feedback
2014-03-04 10:02madshiResolutionwon't fix => reopened
2014-03-04 10:02madshiStatusfeedback => acknowledged
2014-03-04 10:19huhnNote Added: 0000423
2014-03-04 10:31madshiNote Added: 0000424
2014-03-05 00:08turbojetNote Added: 0000453
2014-03-05 00:11madshiNote Added: 0000454
2015-03-23 09:33madshiSummary4:2 cadence detected as 3:2:3:2:2 => 60i 3:2:3:2:2 cadence should produce 25fps, but madVR switches to 23Hz
2015-03-23 09:33madshiDescription Updatedbug_revision_view_page.php?rev_id=193#r193

Notes
(0000389)
turbojet   
2014-02-28 15:48   
Here's 3:2 detected as 4:2:2:2 http://www.mediafire.com/download/150g9d9f7ahmph2/3_2_as_4_2_2_2.mpg [^]
(0000407)
huhn   
2014-03-03 15:59   
are you sure the 3:2:3:2:2 sample is 4:2? if the sample is 4:2 that would mean it is 20 fps.
after a short look at it. it is 3:2:3:2:2 or something like that at least 3:2 is in there. and the output fps should be 25 fps. and 3:2:3:2:2 should result in 25 fps.
the problem is not the wrong cadence detection, because they are both totally right. the problem is the decimation and frame rate control.

i'm just looking here because i was going to report a 4:2:2:2 issue where the wrong frame is droped when played with 23p like your 3_2_as_4_2_2_2.mpg
(0000418)
turbojet   
2014-03-03 22:45   
The file in the original post is 4 good, 2 duplicate frames, isn't that 4:2? Madvr should remove the second duplicate and output 24.975 fps and switch display to a multiple of 25hz.
(0000419)
huhn   
2014-03-04 09:47   
that's not how telecine work.
i think this is a bad place to talk about telecine and top/odd field so you can read the Frame rate differences part from http://en.wikipedia.org/wiki/Telecine [^] .
you are right about the 25fps and that madvr drops the wrong frame but the source of this issue is not the cadence.

a 30i source like ntsc tv got 60 fields per sec and if these fields are 3:2:3:2:2 it should result in 25 fps. but madvr switches to 23p and drops more frames then it should be. on top of it it got quiet some cadence breaks too.
(0000420)
madshi   
2014-03-04 09:50   
madVR currently always switches to 23Hz when having forced film mode on while playing 59i content. Yeah, with some cadences 23Hz is not the optimal refresh rate. But that's not so easy to solve, especially because cadence detection can be unstable. E.g. what happens if cadence detection switches between 3:2 and between 3:2:3:2:2 all the time? Should madVR then always switch between 23Hz and 25Hz all the time, in the middle of playback? This is a problem I'll have to revisit later, but I don't consider it a "bug" right now. It's as intended, even it might not be the best (or even the correct) solution.
(0000421)
madshi   
2014-03-04 09:55   
I've downloaded the sample, added it to my cadence collection, and added an entry to my to do list to look at which refresh rates to switch to with different cadences. But as mentioned above, this will not be easy to do well, because we don't want to switch back and forth between different refresh rates all the time. So this will have to wait until I get back to the whole deinterlacing topic. For now I'll close this bug entry.
(0000422)
madshi   
2014-03-04 10:02   
P.S: Actually, I think there *is* a cadence misdetection of some sort here. Haven't had the time to look at it in detail, but this is different than just failing to switch to the correct framerate. As such I'll leave this open, after all, but it will take some time before I get to this.
(0000423)
huhn   
2014-03-04 10:19   
should i at least create a bug report for a problem with 2:2:2:4 or 4:2:2:2? because in this case madvr drops the wrong frame and the output should be 24 fps. i even found a cadence like this on a bd.
(0000424)
madshi   
2014-03-04 10:31   
Just send me a sample (or multiple samples) via PM or eMail. Thanks.
(0000453)
turbojet   
2014-03-05 00:08   
I thought cadence worked on frames instead of fields, 3:2 would be correct on either but thanks for the info.

I wouldn't expect madvr to change refresh rate every time the cadence changed but I'd expect FRC to toggle on the fly which it already can do without any noticeable change. Refresh rate changes take seconds on 2 displays here. While this wouldn't fix the issue using 24/25/30 hz displays it should work fine using higher multiples, which in some cases should be used currently.

The original post file plays wrong when 50hz is forced, like huhn said it's probably removing the wrong frame.
(0000454)
madshi   
2014-03-05 00:11   
FWIW, the cadence is for fields, not frames. E.g. the typical NTSC 3:2 cadence has one field repeated 3 times and one repeated 2 times.