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 > Video Encoding > New and alternative video codecs

Reply
 
Thread Tools Search this Thread Display Modes
Old 3rd December 2017, 21:26   #41  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,468
And there are quite a few software which did use of it and have direct integration.
Hopefully someone will take this task
kolak is offline   Reply With Quote
Old 9th December 2017, 02:42   #42  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,182
Quote:
Originally Posted by shekh View Post
VDFM is also in the list. I think the FFMpeg statement was right there: "patch welcome"
Hey shekh, great to see that VDFM does now have native Cineform support also. Ran a quick test comparing Cineform (YUV 422 10-bit) avi encode bitrates at the different quality levels and they tally with those obtained with the vfw Cineform codec (v 9.2.1) from GoPro Studio (Quik).

But where did "Filmscan 3" come from ? Not that I'm complaining, but I was under the impression that "Filmscan 2" was the max quality level. I haven't done any quality metric tests (yet), but with the same source clip the bitrate of the 'Filmscan 3" encode was about 5% higher than that of the 'Filmscan 2" encode.

Edit:
Quote:
Originally Posted by WorBry View Post
I haven't done any quality metric tests (yet)....
With this one test clip (HD-AVC 1080/30p mp4) as source:
Code:
               Bitrate (Mb/s)               SSIM score (%)

Filmscan 3      346                          98.28
Filmscan 2      327                          98.09 
Filmscan 1      239                          96.43
And that's after converting the Cineform encodes back to YV12 for the AVISynth SSIM test.
__________________
Nostalgia's not what it used to be

Last edited by WorBry; 9th December 2017 at 05:52.
WorBry is offline   Reply With Quote
Old 9th December 2017, 08:39   #43  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 755
From the sdk:

Quote:
CFHD_ENCODING_QUALITY_FILMSCAN3, // overkill but useful for get higher data-rates from animation or extremely clean sources
shekh is offline   Reply With Quote
Old 9th December 2017, 21:23   #44  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,182
Thanks shekh.
__________________
Nostalgia's not what it used to be
WorBry is offline   Reply With Quote
Old 10th December 2017, 00:56   #45  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,468
FilmsScan3 is a "special" mode made for Disney for very clean sources. For typical or noisy source it may rise bitrate a lot for not much quality gain.

Cineform was made with idea of high-end RAW (or film scan) sources, not already pre-compressed ones. When you test it with h264 etc (or even already compressed ProRes) source it will tend to use relatively low bitrates even for FS2 mode. If you take some RAW source (RED, Arri) etc then it's a different story. It will nicely preserve quality over whole source.
Here is an example:

http://s32.postimg.org/u54dzr079/test.png

Great to see native Cinefrom in Vdub!

Last edited by kolak; 10th December 2017 at 01:06.
kolak is offline   Reply With Quote
Old 10th December 2017, 03:45   #46  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,182
Interesting. I knew 'Film Scan' per se was developed to accurately reproduce the grain characteristics in high grade film scans but had seen no mention of 'Film Scan 3' before:

https://cineform.zendesk.com/hc/en-u...ality-Settings
__________________
Nostalgia's not what it used to be
WorBry is offline   Reply With Quote
Old 11th December 2017, 12:51   #47  |  Link
kolak
Registered User
 
Join Date: Nov 2004
Location: Poland
Posts: 2,468
FilmScan3 or mode 6 in old cmd tools was rather a "secret" mode for typical users. You could turn it on with registry "hack" on PC.
kolak is offline   Reply With Quote
Old 12th December 2017, 16:57   #48  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,327
Quote:
Originally Posted by WorBry View Post
Ran a quick test comparing Cineform (YUV 422 10-bit) avi encode bitrates at the different quality levels and they tally with those obtained with the vfw Cineform codec (v 9.2.1) from GoPro Studio (Quik).
I'm not getting bit for bit identical the same result.... Very slightly different bitrate and differences on a 10bit422 source . Anyone else ?
poisondeathray is offline   Reply With Quote
Old 12th December 2017, 17:59   #49  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 755
Quote:
Originally Posted by poisondeathray View Post
Very slightly different bitrate and differences on a 10bit422 source . Anyone else ?
I am not sure it is possible to compare results bit-to-bit from current sdk vs vfw 9.2.1 implementation. Probably something was changed.
shekh is offline   Reply With Quote
Old 12th December 2017, 18:50   #50  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,327
There seem to be decoder differences as well , between ffmpeg and VFW (regardless if file was encoded with 9.2.1 or native vdfm sdk implementation)

Or how do you test "proper" 10-bit VFW decoding ? Maybe some testing methodology errors ? I'm testing in vapoursynth, with avisource and pixel_type="v210" . The differences don't look like a simple 10bit vs 8bit issue . And the difference pattern is quite different when testing v9.2.1 vs SDK

Code:
import vapoursynth as vs
core = vs.get_core()

c0 = core.ffms2.Source(source=r'F:\_Video Tests\QT Prores\cineform_filmscan2_native.avi')
a0 = core.avisource.AVISource(r'F:\_Video Tests\QT Prores\cineform_filmscan2_native.avi', pixel_type="v210")
#c0 = core.ffms2.Source(source=r'F:\_Video Tests\QT Prores\cineform_filmscan2_v9.2.1.avi')
#a0 = core.avisource.AVISource(r'F:\_Video Tests\QT Prores\cineform_filmscan2_v9.2.1.avi', pixel_type="v210")

d = core.std.MakeDiff(c0,a0)
da = core.std.Levels(d, min_in=511, max_in=513, gamma=1, min_out=0, max_out=1023, planes=[0,1,2])

da.set_output()
poisondeathray is offline   Reply With Quote
Old 12th December 2017, 19:16   #51  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 755
Can you post pictures with your results? And the source file.
shekh is offline   Reply With Quote
Old 12th December 2017, 19:27   #52  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,327
The original file is prores , then I used vdfm to encode either with native cfhd, or gopro v9.2.1 implementation
http://www.mediafire.com/file/fzxi5p...v210.part1.rar
http://www.mediafire.com/file/pqrydi...v210.part2.rar

I'm still investigating, but it looks like ffms2 issue (I'll try a few others later) ; but it also looks like recent ffmpeg.exe (zeranoe) decoding it incorrectly too when outputing v210 and checking the uncompressed stream. Looks almost like interlace issue

EDIT:
1) It seems like only the 9.2.1 streams are affected . The native implmentation encoded streams are decoded correctly by everything. ffmpeg, ffms2 derivatives all decode it incorrectly. Yet vdfm decodes it correctly. I had video format "automatic" for the 9.2.1 settings. I'll try with progressive

Yes that's it for that "interlace" issue. You have to explicity set progressive encoding settings for 9.2.1, otherwise ffmpeg, ffms2 exhibit the issue

2) Does the SDK expose progressive / interlaced settings ? I didn't see the option in the vdfm native implementation

3) But there are still differences between decoders. e.g when I test a native stream such as in post #50 . The ffms2 result is consistent with ffmpeg result (decoding to v210) as expected , but the VFW result is still different

Last edited by poisondeathray; 12th December 2017 at 20:25.
poisondeathray is offline   Reply With Quote
Old 12th December 2017, 20:24   #53  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 755
This is what I see: https://s8.postimg.org/hpxoe38id/alexa.png
(Levels min_in=512-20, max_in=512+20)

The lower edge is maybe this problem: http://trac.ffmpeg.org/ticket/6675
Other parts look good to me.

Btw in VDFM there are 3 ways to decode CineForm, this way I saw some defects with different behavior across implementations.
1) Native: through caching input driver and default options
2) FFMpeg: through caching input driver and uncheck "Use native decoder" in open dialog options
3) VFW: through AVI driver
shekh is offline   Reply With Quote
Old 12th December 2017, 20:39   #54  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,327
Yes, some differences similar to that when testing VFW vs. FFMS2 in vapoursynth . I would expect on the decode side things would be identical for the same input stream . Not just the lower edge issue, but decoder should output bit identical, so the other parts don't look good to me in terms of testing (they look fine to naked eye when not testing differences)

I know it's work in progress, but it's supposed to be standardized STMPE VC5 , so results so be more consistent IMO . I don't know a thing about writing code. I can't even spel properly . I can only help by making observations and test


I'll look in the QT/MOV and Adobe implementation next . Do you know if it's based on the same SDK or did they do some tweaks ?


Is there a "reference" decoder ? Similar to JVT JM bitstream reference decoder for AVC streams ? I would assume it's the go pro implementation

Last edited by poisondeathray; 12th December 2017 at 20:51.
poisondeathray is offline   Reply With Quote
Old 12th December 2017, 21:11   #55  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 755
But this is hacked ffmpeg decoder that makes this test look bad.
I just compared:
vfw decode of vfw.avi, vfw decode of native.avi, native decode of native.avi, native decode of vfw.avi: all appear bit-identical. I am lazy to run it through md5, just seeing perfectly gray difference.
Quote:
I'm not getting bit for bit identical the same result....
So returning to your observation, how you see that?
Bitrate may be slightly different due to embedded metadata (things like encoding date etc).

Previously the sdk included compiled dlls, I doubt any at Adobe had source code. But I have no idea.
shekh is offline   Reply With Quote
Old 12th December 2017, 21:22   #56  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,327
Yes, the problem is the ffmpeg decoder (or derivatives , ffms2 etc...)

The not bit for bit identical results are from different decoder output. The ENcode side is ok

The ffmpeg decoder also requires 9.2.1 steams to select "progressive". When "automatic" is used for the encoding, they are decoded even more incorrectly. So something is written into the header that causes additional problems on top
poisondeathray is offline   Reply With Quote
Old 12th December 2017, 21:45   #57  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,327
Actually there are differences between vfw decode of 9.2.1 encoded vs. vfw decode of vdfm native encoded . 1st frame is identical , as are a few others. But other frames are not.

But you said : "I am not sure it is possible to compare results bit-to-bit from current sdk vs vfw 9.2.1 implementation. Probably something was changed. "

Code:
a0 = core.avisource.AVISource(r'F:\_Video Tests\QT Prores\cineform_filmscan2_native.avi', pixel_type="v210")
ap = core.avisource.AVISource(r'F:\_Video Tests\QT Prores\cineform_filmscan2_v9.2.1_prog.avi', pixel_type="v210")

d = core.std.MakeDiff(a0,ap)
da = core.std.Levels(d, min_in=511, max_in=513, gamma=1, min_out=0, max_out=1023, planes=[0,1,2])

da.set_output()
poisondeathray is offline   Reply With Quote
Old 12th December 2017, 21:57   #58  |  Link
shekh
Registered User
 
Join Date: Mar 2015
Posts: 755
It is probably possible to upgrade vfw codec to current state by replacing CFHDDecoder.dll etc. Not curious enough to try this right now
Which frame was most different?
shekh is offline   Reply With Quote
Old 12th December 2017, 22:03   #59  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 4,327
I don't know about "most" different, but

frame zero (1st frame) was the same
frame one (2nd frame) was different

Some frames later on were identical, some were different. Again this is on amplified differences. On plain difference you can barely see any differences
poisondeathray is offline   Reply With Quote
Old 13th December 2017, 01:47   #60  |  Link
WorBry
Registered User
 
Join Date: Jan 2004
Location: Here, there and everywhere
Posts: 1,182
Quote:
Originally Posted by WorBry View Post
Ran a quick test comparing Cineform (YUV 422 10-bit) avi encode bitrates at the different quality levels and they tally with those obtained with the vfw Cineform codec (v 9.2.1) from GoPro Studio (Quik).
Quote:
Originally Posted by poisondeathray View Post
I'm not getting bit for bit identical the same result.... Very slightly different bitrate and differences on a 10bit422 source . Anyone else ?
The actual results obtained with that one 1080/30p HD-AVC.mp4 (8-bit 4:2:0) source clip (795 frames)

Code:
Bitrate of Cineform avi encode (Mb/s) - no audio

                   Native           VFW
Filmscan 2          327             326
Filmscan 1          239             239
High                169             168                  
Medium              133             133
Low                 122             122
Same frame count in all cases. I didn't record the actual file sizes (in bytes).

Edit: And just for reference, same source clip transcoded to Cineform.avi with DaVinci Resolve 14.1 (at Full 'Data' levels), which uses a different terminology for the quality levels, just to confuse matters:

Code:
Bitrate Mb/s

Best (= Film Scan 2)          332
High (= Film Scan 1)          242
Medium (= High)               172
Low (= Medium)                135
Least (= Low)                 124
Same frame count (795)
__________________
Nostalgia's not what it used to be

Last edited by WorBry; 13th December 2017 at 03:33.
WorBry 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:58.


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