View Full Version : Chroma bug in anime
EruPii
28th August 2016, 11:25
Hello,
I have an anime DVD source which looks like interlaced video but it's not. The problem is the same as in this archived thread: http://forum.doom9.org/showthread.php?t=163937. I tried the code Didée wrote in it but didn't help (after encoding the source the result will be crappy with only chroma frames).
I bobbed the source and saw that the chroma is swapped between frames. Can't we solve the problem somehow if we Bob it or use SeparateFields, swap the chroma of the frames and use Weave or change the frame rate back to 29.970 fps in any other way?
I attached wrong frames from the bobbed source. Also, the source can be downloaded here: https://mega.nz/#!cc53iYCb!rg_42zzJwkY1qV1Oq2uQcbbiPUuKjNnEFtQK2HpG4co
Thank you for your answer in advance.
real.finder
28th August 2016, 15:59
try this
orig = last
sanimebob()
chroma_rep() (https://forum.doom9.org/showthread.php?t=170364)
getparity(orig) ? interlaced60or50 : interlaced60or50(bff=true)
ChiDragon
28th August 2016, 22:11
You should've cut a sample using DGIndex or another tool instead of posting the entire 800MB episode.
The problem is that they took the hard-telecined source and encoded it in progressive mode, BTW:
Format : MPEG-PS
File size : 842 MiB
Duration : 23mn 25s
Overall bit rate mode : Variable
Overall bit rate : 5 024 Kbps
Video
ID : 224 (0xE0)
Format : MPEG Video
Format version : Version 2
Format profile : Main@Main
Format settings, BVOP : Yes
Format settings, Matrix : Custom
Format settings, GOP : Variable
Duration : 23mn 25s
Bit rate mode : Variable
Bit rate : 4 700 Kbps
Maximum bit rate : 9 800 Kbps
Width : 720 pixels
Height : 480 pixels
Display aspect ratio : 4:3
Frame rate : 29.970 fps
Standard : NTSC
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Scan order : Top Field First
Compression mode : Lossy
Bits/(Pixel*Frame) : 0.454
Time code of first frame : 00:00:00:00
Time code source : Group of pictures header
GOP, Open/Closed : Open
GOP, Open/Closed of first fram : Closed
Stream size : 788 MiB (94%)
FranceBB
29th August 2016, 17:05
@chidragon... exactly.
Interlaced source encoded as progressive, with the chroma expanded between fields. There isn't much you can do to fix it... :(
real.finder
29th August 2016, 21:46
@chidragon... exactly.
Interlaced source encoded as progressive, with the chroma expanded between fields. There isn't much you can do to fix it... :(
this code can (in most frames)
MPEG2Source("hhws_ep37.d2v")
orig = last
sanimebob() (http://forum.doom9.org/showpost.php?p=1750019&postcount=77)
chroma_rep(10)
getparity(orig) ? interlaced60or50 : interlaced60or50(bff=true) (https://forum.doom9.org/showthread.php?p=1720135#post1720135)
FrameCache(10)
# next lines from http://forum.doom9.org/showpost.php?p=1582950&postcount=6 with some edit
luma = AnimeIVTC(1,chroma=false,mchroma=false,o3025cfr=true) (http://forum.doom9.org/showpost.php?p=1725899&postcount=48)
chroma = vinverse().Srestore(omode="PP3", cache=10)
# manual sync: figure out which frame (previous,current aka p,c) of 'chroma' clip is most similar to current frame of 'luma' clip
# 46*log(|x-y|+1) uses the full [0,255]-range and scales little differences better than |x-y|*2
diffp = mt_lutxy(luma,chroma.selectevery(1,-1),"x y - abs 1 + log 46 *")
diffc = mt_lutxy(luma,chroma, "x y - abs 1 + log 46 *")
# average difference between compared frames
mp = mt_lutf(diffp,diffp,"avg",expr="x")
mc = mt_lutf(diffc,diffc,"avg",expr="x")
# build conditional masks based on the caculated comparisons
maskp = mt_lutxy(mp,mc,"x y < 255 0 ?")
# finally merge the luma of the tfm with the chroma of the srestore clip accordingly to the binary mask
mt_merge(luma,chroma.selectevery(1,-1),maskp,luma=true,Y=2,U=3,V=3)
tdecimate(1)
smam(filter=daa3mod())
The result http://www.solidfiles.com/v/RqQ2WmWMLq3Gk
EruPii
31st August 2016, 11:57
Yup, I know my source sucks much a**, but it's my only source.
Thanks real.finder, I'll try your code as soon as I can.
EruPii
16th September 2016, 23:06
It's almost good, the problem is that I get these kind of frames in part of the video. Maybe chroma_rep doesn't work fully correctly. Does somebody have some kind of solution for this? Thank you for your reply in advance.
GMJCZP
16th September 2016, 23:25
Try this: Here (http://forum.doom9.org/showthread.php?p=1582950#post1582950)
EruPii
17th September 2016, 10:21
I'm using that script real.finder pasted here which contains the script you linked here. My problem is with this code block:
orig = last
sanimebob()
chroma_rep(10)
getparity(orig) ? interlaced60or50 : interlaced60or50(bff=true)
FrameCache(10)
I think the function in bold characters might not work correctly, even with its default parameter values. When I commented it out, that frame was correct, but some frames directly after scene changes were wrong.
real.finder
18th September 2016, 01:47
I'm using that script real.finder pasted here which contains the script you linked here. My problem is with this code block:
orig = last
sanimebob()
chroma_rep(10)
getparity(orig) ? interlaced60or50 : interlaced60or50(bff=true)
FrameCache(10)
I think the function in bold characters might not work correctly, even with its default parameter values. When I commented it out, that frame was correct, but some frames directly after scene changes were wrong.
yes, it will not work in 60i, it work only in pure Telecine
that why I add other code in bottom
EruPii
18th September 2016, 21:06
yes, it will not work in 60i, it work only in pure Telecine
that why I add other code in bottom
Oh, thanks. But could you tell me where I can get "Hqdn3dY"? I googled it but I got no download links.
StainlessS
18th September 2016, 21:14
Dont know about hqdn3dY (The Y is unknown to me), but Hqdn3d can be found here:- http://avisynth.nl/index.php/External_filters#Spatio-Temporal_Denoisers
EDIT: I dont see hqdn3d in this thread anyway (apart from your prev post [with/without the Y]).
EruPii
18th September 2016, 22:17
Dont know about hqdn3dY (The Y is unknown to me), but Hqdn3d can be found here:- http://avisynth.nl/index.php/External_filters#Spatio-Temporal_Denoisers
EDIT: I dont see hqdn3d in this thread anyway (apart from your prev post [with/without the Y]).
This line needs hqdnd3dy:
smam(filter="daa3mod()")
real.finder
19th September 2016, 06:22
This line needs hqdnd3dy:
smam(filter="daa3mod()")
http://web.archive.org/web/20160221133819/http://media.snovidenie.com/plugins/Hqdn3dY.7z
but it's not the last one but work here
EruPii
19th September 2016, 07:49
http://web.archive.org/web/20160221133819/http://media.snovidenie.com/plugins/Hqdn3dY.7z
but it's not the last one but work here
Thanks!
real.finder
21st September 2016, 12:24
I upload the last one I have in Attachments
EruPii
22nd September 2016, 15:48
Thanks. I put the line smam(filter="daa3mod()") into the script, but when I try to pan or encode the source Avisynth returns with an error: RequestLinear: internal error (frame not cached)! after some frames. What can I do against it?
real.finder
22nd September 2016, 16:30
Thanks. I put the line smam(filter="daa3mod()") into the script, but when I try to pan or encode the source Avisynth returns with an error: RequestLinear: internal error (frame not cached)! after some frames. What can I do against it?
this should not happened since I add FrameCache(10)
anyway this is normal http://forum.doom9.org/showpost.php?p=1779901&postcount=81
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.