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 > DV

Reply
 
Thread Tools Search this Thread Display Modes
Old 27th April 2021, 08:36   #1  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
better than cedocida?

Hi is there any codec better than Cedocida?
Or some approach how to gain maximum from the data and deinterlace +upsize to higher resolution using knowledge how the DV codec works?
Terka is offline   Reply With Quote
Old 27th April 2021, 15:48   #2  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,345
Quote:
Originally Posted by Terka View Post
Hi is there any codec better than Cedocida?
Or some approach how to gain maximum from the data and deinterlace +upsize to higher resolution using knowledge how the DV codec works?
For DEcoding ?

In theory all decoders should output the same thing, but some might have additional error correction

For PAL DV it shouldn't matter, because it's 4:2:0

For NTSC DV it definitely matters, because of how codec and host application interpolate and resample 4:1:1. Cedocida uses something similar to bilinear chroma upscaling.

ffmpeg/libavcodec based decoders return the original 4:1:1 color samples for NTSC DV, so you have control over how chroma is upsampled and transformed. There are some situations where you might want "blocky" color edges (such as nearest neighbor/point, e.g. for multiple generations) , but others where you might want smoother color edges
poisondeathray is offline   Reply With Quote
Old 28th April 2021, 21:17   #3  |  Link
scharfis_brain
brainless
 
scharfis_brain's Avatar
 
Join Date: Mar 2003
Location: Germany
Posts: 3,653
Quote:
Originally Posted by poisondeathray View Post
For PAL DV it shouldn't matter, because it's 4:2:0
But it has different chroma alignment than standard YUV4:2:0:

If I remember correctly it created reinterpolate420 for exactly this case: https://forum.doom9.org/showthread.php?t=82787
(you might want to replace tomsmocomp by nnedi3.)

Quote:
For NTSC DV it definitely matters, because of how codec and host application interpolate and resample 4:1:1. Cedocida uses something similar to bilinear chroma upscaling.
For YUV4:1:1 upsampling I very much like nnedi3 in conjunction with some [u/v]toy, turn[left/right] operations.
This mostly avoids any stairstepping.
__________________
Don't forget the 'c'!

Don't PM me for technical support, please.
scharfis_brain is offline   Reply With Quote
Old 28th April 2021, 22:15   #4  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,345
Quote:
Originally Posted by scharfis_brain View Post
But it has different chroma alignment than standard YUV4:2:0:

If I remember correctly it created reinterpolate420 for exactly this case: https://forum.doom9.org/showthread.php?t=82787
(you might want to replace tomsmocomp by nnedi3.)
Yes, if your other codec forces the resampling to 4:2:2

If you recall , cedocida configuration allows you to select and "force" YV12 output and DV YV12 chroma sampling for decoder settings (you uncheckmark YUY2 and the other boxes) . So this works for PAL DV. You have the original 4:2:0, and you can choose whatever method to resample.

The problem is NTSC DV, where cedocida does not have 4:1:1 output option (ie. it's always resampled by cedocida, and not very nicely) . A better option would be ffmpeg/libavcodec based decoders, which do output the original 4:1:1


Note you can also control the chroma location interpretation and algorithm used with internal avs resizer or avsresize, but if codec already resampled the chroma, then it's possibly done incorrectly. If you start with original DV chroma sampling, then you have more control and ensure it's done correctly

Chroma in/out placement
http://avisynth.nl/index.php/Convert#Chroma_placement

Avsresize chromaloc
http://avisynth.nl/index.php/Avsresize
poisondeathray is offline   Reply With Quote
Old 28th April 2021, 23:08   #5  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
i use PAL DV, im from Europe
Terka is offline   Reply With Quote
Old 29th April 2021, 08:34   #6  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
Thank you for explanation, i read the linked.
Can you please advice how to use nnedi3 to get best results?
If i understand it properly, nnedi3 is able to compute every second missing line
But for C we have one line and three missing.

Also i want to ask: if we have two frames after each other, if the lines are:
Y Cr
Cr Y
Y Cb
Cb Y
Y Cr
Cr Y
Y Cb
Cb Y


or


Y Cb
Cr Y
Y Cr
Cb Y
Y Cb
Cr Y
Y Cr
Cb Y
Terka is offline   Reply With Quote
Old 29th April 2021, 19:08   #7  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,345
Quote:
Originally Posted by Terka View Post
Thank you for explanation, i read the linked.
Can you please advice how to use nnedi3 to get best results?
If i understand it properly, nnedi3 is able to compute every second missing line
But for C we have one line and three missing.
But what is your desired goal or output format ?

If it's something like DVD-video, you need to stay with interlaced 4:2:0 - you cannot "interpolate" missing lines


Quote:
if we have two frames after each other, if the lines are:
Two sequential interlaced PAL DV frames have the same configuration. For PAL DV 4:2:0 , the chroma samples are co-sited vertically - Cr and Cb samples reside on alternate lines on each field.

If you look at the "dither" package for avisynth, there are diagrams in the documentation. There is a weblink below, you need to scroll down a bit to see the diagrams
http://avisynth.nl/index.php/Dither_...her_resize16nr


Also see this diagram
https://www.adamwilt.com/pix-sampling.html
poisondeathray is offline   Reply With Quote
Old 29th April 2021, 22:06   #8  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
The goal is to have 50p using TGMC, best what i can get from the PAL DV source. About format i did not think until now. So it seems the 4:2:0 is kind of standard.
If i understand, i may interpolate somehow, but i need to have different output than 4:2:0, correct?

Last edited by Terka; 29th April 2021 at 22:10.
Terka is offline   Reply With Quote
Old 29th April 2021, 23:51   #9  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,345
Quote:
Originally Posted by Terka View Post
The goal is to have 50p using TGMC, best what i can get from the PAL DV source. About format i did not think until now. So it seems the 4:2:0 is kind of standard.
If i understand, i may interpolate somehow, but i need to have different output than 4:2:0, correct?


Correct, there is no chroma interpolation in that case

The other discussion referred to 4:2:0 to 4:2:2 upsampling - this is "upscaling" the chroma - if it's done with nearest neighbor (point resize in avisynth), pixels are just duplicated. This leads to "blocky" color borders.

If instead you used another algorithm (such as nnedi3 or others), you could get smoother, perhaps "better" results, or at least less blocky

There are times when you might want "blocky" results - to preserve the samples with nearest neighbor - when you have multiple generations of up/down scaling. This can be lossless if done properly. But if you used the other algorithms (nnedi3 or others), they are not reversible losslessly
poisondeathray is offline   Reply With Quote
Old 30th April 2021, 10:01   #10  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
Its rather complicated also because the interlace. My goal is to achieve the best i can pull of of the source.
Luma is compressed by 50% because of interlace 4:2:0
Cr by 50% and again by 25% => 12,5%
Cb by 50% and again by 25% => 12,5%
I might go for upsampling. Question is which should i use - if going to 4:2:2 or even 4:4:4 is not overkill. Not sure how the filesize will change.
I can imagine that some kind of coloring based on the Luma, which has 4times higher resolution.
Terka is offline   Reply With Quote
Old 30th April 2021, 15:51   #11  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,345
Quote:
Originally Posted by Terka View Post
Its rather complicated also because the interlace. My goal is to achieve the best i can pull of of the source.
Luma is compressed by 50% because of interlace 4:2:0
Cr by 50% and again by 25% => 12,5%
Cb by 50% and again by 25% => 12,5%
I might go for upsampling. Question is which should i use - if going to 4:2:2 or even 4:4:4 is not overkill. Not sure how the filesize will change.
Yes, interlaced 4:2:0 chroma has issues

Upsampling depends a lot on the source quality. Sometimes there are other problems with the chroma

In general, I'd say upsampling the chroma has marginal benefits

Quote:
I can imagine that some kind of coloring based on the Luma, which has 4times higher resolution.
There is chromareconstructor by feisty2, but it's very slow

http://forum.doom9.net/showthread.php?t=173005
poisondeathray is offline   Reply With Quote
Old 30th April 2021, 21:36   #12  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
Thank you.

Quote:
Upsampling depends a lot on the source quality. Sometimes there are other problems with the chroma
which ones?
I see spots in one of the chroma channels. They appear on one frame and disappear.
Terka is offline   Reply With Quote
Old 30th April 2021, 21:49   #13  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,345
Quote:
Originally Posted by Terka View Post
Thank you.


which ones?
I see spots in one of the chroma channels. They appear on one frame and disappear.
Lots of problems, in general, such as noise

How often is DV from consumer source "pristine" ?

"Spots" are probably chroma noise. It probably is not a good idea to upscale spots and noise - you'd probably need to filter it first
poisondeathray is offline   Reply With Quote
Old 1st May 2021, 09:38   #14  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
can you please recommend me what filtering should i use, ideally separately for chroma and luma?
Terka is offline   Reply With Quote
Old 1st May 2021, 15:36   #15  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,345
Quote:
Originally Posted by Terka View Post
can you please recommend me what filtering should i use, ideally separately for chroma and luma?
Not without some better description than some "spots" in the chroma channels, or no description of luma
poisondeathray is offline   Reply With Quote
Old 4th May 2021, 09:34   #16  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
Thank you, here is an example from the camera
https://www.uschovna.cz/zasilka/LBUXBY89KYFZ72KR-74Z/
Terka is offline   Reply With Quote
Old 4th May 2021, 18:56   #17  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,345
That clip is typical "quality" of consumer PAL DV

The amount and type of denoising to apply is really subjective and up to personal taste

If you're using QTGMC, that already denoises by default

Personally, I prefer details over loss of details, so I'm more cautious with denoising
poisondeathray is offline   Reply With Quote
Old 6th May 2021, 21:22   #18  |  Link
Terka
Registered User
 
Join Date: Jan 2005
Location: cz
Posts: 704
Can i somehow improve it more by using something else than TGMC? Eg filtering chroma chanels extra and do the conversion to 4:4:4 using the chromareconstructor?
Terka is offline   Reply With Quote
Old 8th May 2021, 00:10   #19  |  Link
poisondeathray
Registered User
 
Join Date: Sep 2007
Posts: 5,345
Quote:
Originally Posted by Terka View Post
Can i somehow improve it more by using something else than TGMC? Eg filtering chroma chanels extra and do the conversion to 4:4:4 using the chromareconstructor?
I doubt it will make much difference, but you can try it out
poisondeathray 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 09:18.


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