View Full Version : Seikon no Qwaser BDMV
romeyo007
9th December 2010, 22:46
Hello
I have the BDMV for seikon no qwaser Anime and I'm trying to encode it to 1080p MKV the problem with that is the BDMV's are interlace here the Media info for the m2ts
any advice in encoding them? I'm using MeGUI for my encode
thank you
mp3dom
9th December 2010, 23:45
You can try to see if it can be inverse telecined.
romeyo007
9th December 2010, 23:53
is that option available in MeGUI
when i tried to analyse the dga file it gave me this setting:
LoadPlugin("C:\Program Files\MeGUI\tools\dgavcindex\DGAVCDecode.dll")
AVCSource("D:\Anime\RAWS\SnQVol.1\QWASER OF STIGMATA VOL1\BDMV\STREAM\00004.dga")
LoadPlugin("C:\Program Files\MeGUI\tools\avisynth_plugin\TIVTC.dll")
LoadPlugin("C:\Program Files\MeGUI\tools\avisynth_plugin\EEDI2.dll")
LoadPlugin("C:\Program Files\MeGUI\tools\avisynth_plugin\TDeint.dll")
edeintted = AssumeTFF().SeparateFields().SelectEven().EEDI2(field=-1)
tdeintted = TDeint(edeint=edeintted,order=1)
tfm(order=1,clip2=tdeintted).tdecimate(mode=1,hybrid=1)
#crop
#resize
#denoise
but the problem still there
Blue_MiSfit
10th December 2010, 03:18
Post a stream sample. You're probably not handling ivtc/deinterlace correctly.
You can definitely do a better job than TDeint+EEDI2 for the deinterlacing.
Derek
romeyo007
10th December 2010, 03:26
do u want an encoded it sample or sample for the m2ts?
RunningSkittle
10th December 2010, 03:29
post sample from m2ts on mediafire or somewhere similar
romeyo007
10th December 2010, 03:38
post sample from m2ts on mediafire or somewhere similar
how can I cut a part from m2ts and save it as m2ts?
thanks
Hiritsuki
10th December 2010, 04:28
What!! BDMV is interlaced, I first heard.
romeyo007
10th December 2010, 04:35
What!! BDMV is interlaced, I first heard.
I know i was surprise to but it's the truth
check the txt file
Hiritsuki
10th December 2010, 04:45
I cant download txt to view, it's means "Attachments Pending Approval".
romeyo007
10th December 2010, 04:47
here:
General
ID : 0
Complete name : D:\Anime\RAWS\SnQVol.1\QWASER OF STIGMATA VOL1\BDMV\STREAM\00002.m2ts
Format : BDAV
Format/Info : Blu-ray Video
File size : 4.76 GiB
Duration : 23mn 36s
Overall bit rate : 28.9 Mbps
Maximum Overall bit rate : 48.0 Mbps
Video
ID : 4113 (0x1011)
Menu ID : 1 (0x1)
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L4.1
Format settings, CABAC : Yes
Format settings, ReFrames : 2 frames
Codec ID : 27
Duration : 23mn 36s
Bit rate mode : Variable
Bit rate : 25.4 Mbps
Maximum bit rate : 38.0 Mbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 29.970 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : MBAFF
Bits/(Pixel*Frame) : 0.409
Stream size : 4.19 GiB (88%)
Color primaries : BT.709-5, BT.1361, IEC 61966-2-4, SMPTE RP177
Transfer characteristics : BT.709-5, BT.1361
Matrix coefficients : BT.709-5, BT.1361, IEC 61966-2-4 709, SMPTE RP177
Hiritsuki
10th December 2010, 04:52
Wow!, that so small of normal BDMV size.
It's not AVCHD of DVD9 size?
romeyo007
10th December 2010, 04:59
Wow!, that so small of normal BDMV size.
It's not AVCHD of DVD9 size?
this is one episode from the BDMV
Blue_MiSfit
10th December 2010, 06:01
Interlaced BluRay is perfectly normal. I've seen tons of them, though they're not nearly as common as 1080p24.
Don't attach things to the forum, upload a piece (cut using MKVMerge or something) to mediafire or another free hosting. No rapidshare please, unless you have a paid account.
Derek
x110x
10th December 2010, 06:31
hi, try ripbot x264
chose your m2ts file
click to properties
http://pepperpics.biz/i/r2.png
search with right arrow "deinterleace"
http://pepperpics.biz/i/r1.png
?
romeyo007
10th December 2010, 06:47
Interlaced BluRay is perfectly normal. I've seen tons of them, though they're not nearly as common as 1080p24.
Don't attach things to the forum, upload a piece (cut using MKVMerge or something) to mediafire or another free hosting. No rapidshare please, unless you have a paid account.
Derek
here a sample (http://hotfile.com/dl/88415286/60d9dff/00002a.rar.html)
jpsdr
10th December 2010, 10:23
I've made for personnal use of case like it (anime) an IVTC filter under VDub, with purpose of not deinterlacing after. I must check on your sample if it works, as i've for now only used it on DVD (even if i've made update to handle blu-ray).
Otherwise, are you sure it's still the "pain" anime format used to see on DVD ? Telecine sequence change on almost each scene ?
Otherwise, it telecine sequence is stable almost all along, with a simple chain of PullDown() you can get it.
Can't download your sample for nor...
romeyo007
10th December 2010, 15:20
this what I'm trying to fix
http://img262.imageshack.us/img262/1668/96424682.png
mp3dom
10th December 2010, 15:48
The problem comes probably because the source is an upscale (most probably from an half-hd source like 960x540). The source suffers from huge aliasing and this confuses TFM to detect combed frames even if the frames are clean. In the screenshot that you've posted, the book's page suffer from aliasing and TFM think is combed and so it deinterlace it with the tdeint+eedi combo. If you disable the deinterlacing you'll get only 'clean' frames (the aliasing still remains, so probably you should use an antialias script).
If you try a plain
xxxsource("xxx.dga")
tfm(PP=1,display=true,mode=1,slow=2,micmatching=3,order=1)
you'll see that in your screenshot TFM flag the frame as combed on the book's page.
PP=1 tells TFM to detect combed frames but not deinterlace it. display=true shows the metrics used by TFM. You can remove the display=true if you want.
romeyo007
10th December 2010, 15:58
thanks I'll try that
but would fix everything or it fix some part and then another problem to fix?
mp3dom
10th December 2010, 16:09
On your sample it fix everything (in the sense that it will no longer deinterlace clean frames wrongly detected as combed). The aliasing still remains as it's in the source. Obviously I don't know if on the entire show it will fix everything. If the source is encoded at 60i probably there are some parts at 30p or some cross-dissolvences/edits at a real 60i (with no pulldown) so you should watch and treat those parts in a different way.
jpsdr
10th December 2010, 18:52
My VDub filter seems to work fine on this sample, are you interested by trying it ?
You can get them here (http://rapidshare.com/files/436131928/Filtres_JPSDR.rar).
Filter is made to work with YV12 video, so you can input your YV12 29.97 interlaced, and output YV12 23.976fps progressive, without any deinterlace filter/process needed !
I've tested it with the following avs input file :
DGSource("00002a.dgi",i420=false,deinterlace=0,fieldop=0,use_D3D=false)
(DGI file created with DGIndexNV).
Note : Because of the cut, the 3 first frame are interlaced, so when applied, the output of the 1rst frame is interlaced, because pattern of the begining is not standard telecine. Output of all the others frames is good.
You have to put in VDub the 2 following filters (in this order) :
IVTC v4.4.2
Remove Frames v1.0.0
Leave all the parameters by default.
You can first test on sample, and on one episode after if test on sample satisfy you. If you find it interesting, i'll explain the "Manual Mode".
romeyo007
11th December 2010, 00:15
My VDub filter seems to work fine on this sample, are you interested by trying it ?
You can get them here (http://rapidshare.com/files/436131928/Filtres_JPSDR.rar).
Filter is made to work with YV12 video, so you can input your YV12 29.97 interlaced, and output YV12 23.976fps progressive, without any deinterlace filter/process needed !
I've tested it with the following avs input file :
DGSource("00002a.dgi",i420=false,deinterlace=0,fieldop=0,use_D3D=false)
(DGI file created with DGIndexNV).
Note : Because of the cut, the 3 first frame are interlaced, so when applied, the output of the 1rst frame is interlaced, because pattern of the begining is not standard telecine. Output of all the others frames is good.
You have to put in VDub the 2 following filters (in this order) :
IVTC v4.4.2
Remove Frames v1.0.0
Leave all the parameters by default.
You can first test on sample, and on one episode after if test on sample satisfy you. If you find it interesting, i'll explain the "Manual Mode".
I don't have the DGIndexNV where can i get it?
jpsdr
11th December 2010, 01:15
You can get it here (http://neuron2.net/dgdecnv/dgdecnv.html), but it's not free (even if price is very small), it's by the same authot of DGAVCDecode, but you need an nVidia card wich support some minimal features (if you have an nVidia card, but realy too old, it may not work).
The only problem with DGAVCDecode, it's that it begins to be a little old and not supported/updated anymore, but otherwise, i don't see why you couldn't use it. Nothing prevent you to test my filters with DGAVCDecode.
romeyo007
11th December 2010, 01:31
You can get it here (http://neuron2.net/dgdecnv/dgdecnv.html), but it's not free (even if price is very small), it's by the same authot of DGAVCDecode, but you need an nVidia card wich support some minimal features (if you have an nVidia card, but realy too old, it may not work).
The only problem with DGAVCDecode, it's that it begins to be a little old and not supported/updated anymore, but otherwise, i don't see why you couldn't use it. Nothing prevent you to test my filters with DGAVCDecode.
My PC Spec:
Core i5 750@ 2.67Ghz
4 GB DDR3
Win7 Ultimate 32bit
Geforce GT 220
23" HDMI monitor
mp3dom
11th December 2010, 03:05
The major problem of DGAVCDec is that it's single-threaded so your decoding speed will be slow (compared by your cpu possibilities). If you can't/don't want to spend for DGIndexNV you can use FFMS2 which is multi-threaded and have frame accurate indexing (as DGAVCDec) for m2ts and mkv containers.
romeyo007
11th December 2010, 03:24
after using this function
tfm(PP=1,display=true,mode=1,slow=2,micmatching=3,order=1)
General
Complete name : D:\Anime\RAWS\SnQVol.1\QWASER OF STIGMATA VOL1\BDMV\STREAM\00002[test1][1080].mkv
Format : Matroska
File size : 909 MiB
Duration : 23mn 36s
Overall bit rate : 5 380 Kbps
Writing application : x264 r1649 c54c47d
Writing library : Haali Matroska Writer b0
Video
ID : 1
Format : AVC
Format/Info : Advanced Video Codec
Format profile : High@L5.0
Format settings, CABAC : Yes
Format settings, ReFrames : 8 frames
Codec ID : V_MPEG4/ISO/AVC
Duration : 23mn 36s
Bit rate : 5 273 Kbps
Width : 1 920 pixels
Height : 1 080 pixels
Display aspect ratio : 16:9
Frame rate : 29.970 fps
Color space : YUV
Chroma subsampling : 4:2:0
Bit depth : 8 bits
Scan type : Progressive
Bits/(Pixel*Frame) : 0.085
Stream size : 891 MiB (98%)
Writing library : x264 core 98 r1649 c54c47d
Encoding settings : cabac=1 / ref=8 / deblock=1:0:0 / analyse=0x3:0x113 / me=umh / subme=9 / psy=1 / psy_rd=1.00:0.00 / mixed_ref=1 / me_range=24 / chroma_me=1 / trellis=1 / 8x8dct=1 / cqm=0 / deadzone=21,11 / fast_pskip=0 / chroma_qp_offset=-2 / threads=6 / sliced_threads=0 / nr=0 / decimate=1 / interlaced=0 / constrained_intra=0 / bframes=3 / b_pyramid=2 / b_adapt=1 / b_bias=0 / direct=1 / weightb=1 / weightp=2 / keyint=250 / keyint_min=25 / scenecut=40 / intra_refresh=0 / rc_lookahead=40 / rc=crf / mbtree=1 / crf=18.0 / qcomp=0.60 / qpmin=10 / qpmax=31 / qpstep=4 / ip_ratio=1.40 / aq=1:1.00
Language : English
it kinda fixed the problem but now there is weird squares are blurry in the start and in dark areas
Blue_MiSfit
11th December 2010, 06:20
Damn. That's a seriously screwed up source you've got there, mate :(
I don't know how to fix it. There's nasty aliasing in the source fields. Yuck.
Derek
jpsdr
11th December 2010, 09:28
Core i5 750@ 2.67Ghz
Geforce GT 220
It's Ok.
So, have you try my VDub filters, even with DGAVCDec ?
mp3dom
11th December 2010, 16:59
The image is under pending approval so we cannot see it. Can you upload it elsewhere? Thanks.
Edit: Have you seen if the source contains 30p or true 60i zones? Because if it can be full ivtc'ed you should add TDecimate (or you can use hybrid parameter to convert 30p to 24p with blend)
Also, try to use latest version of x264
romeyo007
11th December 2010, 17:56
The image is under pending approval so we cannot see it. Can you upload it elsewhere? Thanks.
Edit: Have you seen if the source contains 30p or true 60i zones? Because if it can be full ivtc'ed you should add TDecimate (or you can use hybrid parameter to convert 30p to 24p with blend)
Also, try to use latest version of x264
http://img8.imageshack.us/img8/4576/00002test11080mkvsnapsh.png
where can i know if the source is 30 or 60?
i know the frame rate is 29.970 fps
thanks
Blue_MiSfit
11th December 2010, 21:12
I think hybrid or not is the least of this footage's problems. The fields are horribly aliased.
romeyo007
11th December 2010, 21:21
I think hybrid or not is the least of this footage's problems. The fields are horribly aliased.
what is the best setting and res for it you think?
mp3dom
11th December 2010, 22:51
If you accept to loose a bit of sharpness you can think of keep it at 1080p (the source is anyway an upscale too):
http://img709.imageshack.us/img709/4758/1301j.png
Not the best result but at least it's more "watchable".
I think the source was made at 960x540. Some recent anime was made at that resolution and then upscaled to 1080p
romeyo007
11th December 2010, 23:03
If you accept to loose a bit of sharpness you can think of keep it at 1080p (the source is anyway an upscale too):
http://img709.imageshack.us/img709/4758/1301j.png
Not the best result but at least it's more "watchable".
I think the source was made at 960x540. Some recent anime was made at that resolution and then upscaled to 1080p
what setting did u use for that image?
look much better than mine
VFR maniac
12th December 2010, 00:55
I think the source was made at 960x540. Some recent anime was made at that resolution and then upscaled to 1080p
No, Qwaser was made at 1280x720 exactly since Cross-Conversion Correction (CCC) (http://www.geocities.jp/flash3kyuu/), one of AviUtl plugins, restores almost all its original resolution.
[before]
http://vfrmaniac.fushizen.eu/OtherStuff/QUASER_OP1.PNG
[after]
http://vfrmaniac.fushizen.eu/OtherStuff/QUASER_OP1_ccc.PNG
This plugin is the best option for interlaced Cross-Conversion (720i->1080i).
It's a pity that this plugin cannot be used in Avisynth. (Memory Access Violation)
If you hope to Avisynth to restore progressive resolution, here is one option. (This functions' is inferior to CCC.)
BCSInterlacedResize_mod 1.3 (http://www.avisynth.info/?%A5%A2%A1%BC%A5%AB%A5%A4%A5%D6)
Blue_MiSfit
12th December 2010, 02:06
Wow. That's seriously impressive!
Fadeout
12th December 2010, 04:12
Does it help if I can see the encoding options in a file that was encoded solving that problem?
I know it can be done, just don't know how.
romeyo007
12th December 2010, 04:16
Does it help if I can see the encoding options in a file that was encoded solving that problem?
I know it can be done, just don't know how.
i can post the avs file if that what u asking?
Fadeout
12th December 2010, 04:24
This is how it should look. No idea how it was made, though.
http://img819.imageshack.us/img819/2415/qws.png
romeyo007
12th December 2010, 04:27
This is how it should look. No idea how it was made, though.
http://img819.imageshack.us/img819/2415/qws.png
where did u got that?
romeyo007
12th December 2010, 17:07
If same like to see how the main source looks I upload it the m2ts for the first episode.(I hope that okay to do here)
(warning some mature scene)
http://hotfile.com/dl/88856612/34655ae/00002.part01.rar.html
http://hotfile.com/dl/88859663/316a728/00002.part02.rar.html
http://hotfile.com/dl/88887123/6333869/00002.part03.rar.html
http://hotfile.com/dl/88862122/d4b7010/00002.part04.rar.html
http://hotfile.com/dl/88862123/42554a2/00002.part05.rar.html
http://hotfile.com/dl/88865810/556cb50/00002.part06.rar.html
http://hotfile.com/dl/88866325/da4d74e/00002.part07.rar.html
http://hotfile.com/dl/88873520/7a616cb/00002.part08.rar.html
http://hotfile.com/dl/88880318/b247df5/00002.part09.rar.html
http://hotfile.com/dl/88880816/c4f817b/00002.part10.rar.html
if someone can encode the episode and tell me what the best setting I should use for it. since all the other group failed with this project.
thanks
jpsdr
13th December 2010, 10:12
Have-you try my VDub pluggin ?
romeyo007
13th December 2010, 20:17
Have-you try my VDub pluggin ?
I wasn't able to do or I didn't know how to do it?
if u can explain the steps in more details then i can try it
thanks
jpsdr
13th December 2010, 20:59
As i said :
In the first time, you just have to use the 2 following filters (in this order) :
IVTC v4.4.2
Remove Frames v1.0.0
Leave all the parameters by default.
romeyo007
13th December 2010, 21:05
As i said :
In the first time, you just have to use the 2 following filters (in this order) :
IVTC v4.4.2
Remove Frames v1.0.0
Leave all the parameters by default.
what the function code for them? and is it okay to use it on dga or it have to be .dgi?
Daemon404
13th December 2010, 21:15
No, Qwaser was made at 1280x720 exactly since Cross-Conversion Correction (CCC) (http://www.geocities.jp/flash3kyuu/), one of AviUtl plugins, restores almost all its original resolution.
[before]
http://vfrmaniac.fushizen.eu/OtherStuff/QUASER_OP1.PNG
[after]
http://vfrmaniac.fushizen.eu/OtherStuff/QUASER_OP1_ccc.PNG
This plugin is the best option for interlaced Cross-Conversion (720i->1080i).
It's a pity that this plugin cannot be used in Avisynth. (Memory Access Violation)
I've put together a clean room AviSynth port here:
http://japland.org/ccc/ccc_v0.4_avs.zip
Just make sure call it before you crop/resize.
Enjoy!
jpsdr
13th December 2010, 21:19
I have no idea what you call function code...
You just have to select them in VDub.
A few minutes ago i would have said it's Ok to use on dga, but i've just downloaded the 1rst episode you've put, open it in VDub with DirectShowSource and... result was "awfull" !!! Nothing to do with the sample you've provided, but opened with DGIndexNV. So, now i'm transfering the 1rst episode on my PC dedicated for video (where DGIndexNV is installed), and see if there is a difference between DirectShowSource and DGIndex. Nevertheless, i strongly suggest you to try with .dga for now.
Edit : Same result with DirectShowSource and DGIndex, so, no problem to use on dga.
Problem i thought i see is what said : upscale was made in interlace mode : Each field have been upscaled independantly, and put back together. Shouldn't have impact on my filters, so, no problem to try them.
romeyo007
13th December 2010, 21:43
I will try the two advice as soon I'm done from my exams.
is there freeware for the DGIndexNV?
thanks
jpsdr
13th December 2010, 22:09
There's no freeware for DGIndexNV, so, if you don't want to buy it, you can continue with DGAVCDecode.
I've just take a quick look to the result with my IVTC filter, result is very good, but, as nothing is perfect, and i know both limits of my filters and where there is always problem, i'll have to explain to you :
- How to use "manual mode" and detect where there is problem.
- How to use my Deinterlace filter combined with "file mode".
But, it will be a little long, so, tells when you've done with your exams.
But basiquely, you can have very good result, but my filters have to be used in a 2 pass process.
After the 1rst pass, you have to watch the result to find out the small parts where filter fails, to manualy correct them. It's a little long, but you avoid the deinterlace of the whole video process.
As expected, you can first see problems on fades on the opening, so, some frames (but only a few), need to be deinterlaced, this is where my Deinterlace filter combined with "file mode" is used.
Not seen yet parts where IVTC failed, but i've made a VERY quick look.
When you'll check, or if anyone other want to try. After doing the whole process (in YV12), open the result file with a simple script like :
AVISource("File.avi")
PointResize(720,480)
This will make the part still interlaced more visible.
On the result file of my filter, problem are visible on 74 first frame fading, and on frames 2617 to 2620 (for exemple).
There is problem on fading almost because :
- Fading are made after pulldown and field based, and unfortunately, not frame based before pulldown. So, even if your IVTC is correct, result is still interlaced because fading is between fields.
- Fading between 2 scenes, often the 2 scenes have different telecine patterns, in that case IVTC is impossible. Even if pattern is the same, because fading is field based, result is still interlaced, even if your IVTC pattern match the telecine pattern.
@Daemon404
Thanks for the ccc filter, i've take a look at the code, strange behavior to work only on Y...
Nevertheless, code is very simple, and i'll look later to create a VDub filter and add it to my filters.
Maybe some SSE optimisation can be made, but i'll see this later.
Daemon404
13th December 2010, 22:55
@Daemon404
Thanks for the ccc filter, i've take a look at the code, strange behavior to work only on Y...
Nevertheless, code is very simple, and i'll look later to create a VDub filter and add it to my filters.
Maybe some SSE optimisation can be made, but i'll see this later.
What's the point of making it a vdub filter? There is literally no reason to do this. (Tip: VDub can use AviSynth.)
romeyo007
13th December 2010, 23:08
i payed for the DVIndexNV now waiting for them to send me the licence to try the filters
jpsdr
13th December 2010, 23:35
@Daemon404
Because :
- I prefer and want to have it in my VDub filters.
- I want a 64bit version.
- It can be realy be SSE optimised.
Fadeout
14th December 2010, 04:37
If you accept to loose a bit of sharpness you can think of keep it at 1080p (the source is anyway an upscale too):
http://img709.imageshack.us/img709/4758/1301j.png
Not the best result but at least it's more "watchable".
Imho this looks "ok". I haven't seen anyone achieving better.
So mp3dom says how it was made you're set (if it doesn't require to customize every encoding and every segment accurately).
romeyo007
14th December 2010, 05:09
cool I which if he can help me
jpsdr
14th December 2010, 10:38
I'm wondering : If original is 720i, and 1080i has been made by using interlaced interpolation, isn't the best option to trying to go back to original 720i, and after doing IVTC and stay in 720p afterward ? Is there reelay a point to upscaling to 1080p ? From my point of view, you'll simply waste encoding bandwith.
You just have to find a pluggin wich will do 1080i -> 720i, but work in interlaced mode.
Maybe simply an AssumeFieldBased followed by one of the resize function will work.
jpsdr
14th December 2010, 20:28
Here how to resize interlaced to 720.
Global NewHeight=720
Global NewWidth=1280
DirectShowSource("00002.m2ts",fps=29.97)
AssumeTFF()
SeparateFields()
Shift=(Height()/Float(NewHeight/2)-1.0)*0.25 # Field shift correction
Tf=SelectEven().LanczosResize(NewWidth, NewHeight/2, 0, -Shift, Width(), Height())
Bf=SelectOdd().LanczosResize(NewWidth, NewHeight/2, 0, Shift, Width(), Height())
Interleave(Tf, Bf)
Weave()
Replace DirectShowSource line with DGAVC or DGSource.
You can also try different resize methods than Lanczos, to find wich one you prefer.
romeyo007
14th December 2010, 20:39
thank you man i will try that
VFR maniac
14th December 2010, 21:01
Here how to resize interlaced to 720.
Global NewHeight=720
Global NewWidth=1280
DirectShowSource("00002.m2ts",fps=29.97)
AssumeTFF()
SeparateFields()
Shift=(Height()/Float(NewHeight/2)-1.0)*0.25 # Field shift correction
Tf=SelectEven().LanczosResize(NewWidth, NewHeight/2, 0, -Shift, Width(), Height())
Bf=SelectOdd().LanczosResize(NewWidth, NewHeight/2, 0, Shift, Width(), Height())
Interleave(Tf, Bf)
Weave()
Replace DirectShowSource line with DGAVC or DGSource.
You can also try different resize methods than Lanczos, to find wich one you prefer.
No one resize filter defeat Cross-Conversion Correction. (I had tried many resize filters AFAIK.)
That method cannot restore original resolution and are still too bad since interpolation does the extra things.
romeyo007
14th December 2010, 21:09
Oh...!
Blue_MiSfit
15th December 2010, 02:10
jpsdr:
Please stop telling people to use DGAVCDec. This software is deprecated, and was withdrawn by its author (neuron2) for good reason.
Derek
romeyo007
15th December 2010, 02:21
I start using DGIndexeNV
jpsdr
15th December 2010, 11:58
No one resize filter defeat Cross-Conversion Correction. (I had tried many resize filters AFAIK.)
That method cannot restore original resolution and are still too bad since interpolation does the extra things.
I've begun to work to add CCC in my Vdub filters.
Simple implement is made.
ASM SSE optimisation will be a little later.
jpsdr
15th December 2010, 17:01
I've put together a clean room AviSynth port here:
http://japland.org/ccc/ccc_v0.4_avs.zip
Enjoy!
/*
Copyright (c) 2010 daemon404(not at)gmail.com
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
Thanks to the original AviUtl plugin author: http://www.geocities.jp/flash3kyuu/
And to: JEEB and thedot from #darkhold@Rizon
*/
#include "avisynth.h"
/* Macros to make sure luma fits into 0-255 range */
#define CLP(x) ((x > 255) ? 255 : x)
#define ZRC(x) ((x < 0) ? 0 : x)
class CCC : public GenericVideoFilter {
int trackbar;
public:
CCC(PClip _child, int phase) : GenericVideoFilter(_child), trackbar(phase) {};
PVideoFrame __stdcall GetFrame(int n, IScriptEnvironment* env);
};
PVideoFrame __stdcall CCC::GetFrame(int n, IScriptEnvironment* env) {
/* Copypasta'd from example plugin. */
PVideoFrame src = child->GetFrame(n, env);
PVideoFrame dst = env->NewVideoFrame(vi);
const unsigned char* srcpY = src->GetReadPtr(PLANAR_Y);
const unsigned char* srcpY_orig = srcpY;
const unsigned char* srcpV = src->GetReadPtr(PLANAR_V);
const unsigned char* srcpU = src->GetReadPtr(PLANAR_U);
unsigned char* dstpY = dst->GetWritePtr(PLANAR_Y);
unsigned char* dstpY_orig = dstpY;
unsigned char* dstpV = dst->GetWritePtr(PLANAR_V);
unsigned char* dstpU = dst->GetWritePtr(PLANAR_U);
const int src_pitchUV = src->GetPitch(PLANAR_V);
const int dst_pitchUV = dst->GetPitch(PLANAR_U);
const int row_sizeUV = dst->GetRowSize(PLANAR_U);
const int heightUV = dst->GetHeight(PLANAR_U);
int i, j;
/* These vars hold the offsets to the next 7 lines in bytes.
Stupid way of doing it but whatever. */
int line = dst->GetPitch(PLANAR_Y);
int line2 = 2 * line;
int line3 = 3 * line;
int line4 = 4 * line;
int line5 = 5 * line;
int line6 = 6 * line;
int line7 = 7 * line;
int height = dst->GetHeight(PLANAR_Y);
int width = dst->GetRowSize(PLANAR_Y);
/* Work on 6 luma lines at once, and traverse them horizontally/ */
/* Make sure we don't try and grab lines that don't exist */
for (i=0; i<(6-trackbar); i++)
{
memcpy(dstpY,srcpY,width);
srcpY+=line;
dstpY+=line;
}
for(i = 6; i < (height-7+trackbar); i += 6)
{
/* Apply the phase */
srcpY = &srcpY_orig[line * (i - trackbar)];
dstpY = &dstpY_orig[line * (i - trackbar)];
memcpy(dstpY,srcpY,width);
for(j = 0; j < width; j++)
{
int calc1 = 5 * srcpY[line] - srcpY[-line];
int calc2 = 5 * srcpY[line5] - srcpY[line7];
int calc3 = srcpY[0];
int calc4 = srcpY[line6];
int calc5 = (3 * (srcpY[line4] + srcpY[line2]) - calc3 - calc4) >> 2;
dstpY[line] = ZRC(CLP((calc1 + 2 * calc3) / 6));
dstpY[line2] = ZRC(CLP((calc1 + 2 * calc5) / 6));
dstpY[line3] = ZRC(CLP(calc5));
dstpY[line4] = ZRC(CLP((calc2 + 2 * calc5) / 6));
dstpY[line5] = ZRC(CLP((calc2 + 2 * calc4) / 6));
++srcpY;
++dstpY;
}
}
/* Make sure we don't try and grab lines that don't exist */
srcpY = &srcpY_orig[line*(i-trackbar)];
dstpY = &dstpY_orig[line*(i-trackbar)];
for (j=(i-trackbar); j<height; j++)
{
memcpy(dstpY,srcpY,width);
srcpY+=line;
dstpY+=line;
}
/* Copy over chroma, since it isn't touched. */
for (int y = 0; y < heightUV; y++) {
for (int x = 0; x < row_sizeUV; x++) {
dstpU[x] = srcpU[x];
dstpV[x] = srcpV[x];
}
srcpU += src_pitchUV;
dstpU += dst_pitchUV;
srcpV += src_pitchUV;
dstpV += dst_pitchUV;
}
return dst;
}
AVSValue __cdecl Create_CCC(AVSValue args, void* user_data, IScriptEnvironment* env) {
/* Make sure the phase range is valid. */
if( args[1].AsInt(1) < 0 || args[1].AsInt(1) > 5 )
env->ThrowError("ccc: phase must be in the range 0-5.");
return new CCC(args[0].AsClip(), args[1].AsInt(1));
}
extern "C" __declspec(dllexport) const char* __stdcall AvisynthPluginInit2(IScriptEnvironment* env) {
env->AddFunction("ccc", "c[phase]i", Create_CCC, 0);
return "CCC: Cross-Conversion Correction";
}
This should be a little faster, and sure of not goinf out of frame end of frame.
In the original code, height - 7 <= i cannot assure the fact that dstpY[line5] would still be in the picture.
If i=h-1 and trackab=0, you have troubles i think.
jpsdr
15th December 2010, 19:26
I've made some test on Seikon with CCC, phase value wich give best result is 0.
romeyo007
15th December 2010, 19:42
I'm done from exams so I'm ready to work on the encoding anyone like to instruct me to get the best result talk to me on kira-fansub@live.com
thanks
Daemon404
15th December 2010, 23:03
This should be a little faster, and sure of not goinf out of frame end of frame.
In the original code, height - 7 <= i cannot assure the fact that dstpY[line5] would still be in the picture.
If i=h-1 and trackab=0, you have troubles i think.
I already switched over to memcpy() for that stuff as well as fixed a bug where the bottom 'trackbar' lines would not be displayed. I just haven't released it yet. I've also ported the 720 output mode.
The but you mention about i=h-1 is irrelevant, since my plugin is NOT SUPPOSED TO BE RUN ON ANYTHING BUT THINGS WITH EXACTLY 1080 HEIGHT, and thus i can never equal h-1 (actually it can never h-1 ever, because i is always even, and h-1 is always odd (since yv12 must be mod2)). The original AviUtl plugin is designed the same way. Read the original readme. It is specifically designed to only be run on things with a height of 1080 pixels. The equations are hardcoded to ONLY work on that. There is no reason to run it on anything else.
(and FYI, I did compensate for the trackbar in my local version (part of the bug fix for it not processing the whole thing). Just hasn't been released yet.)
Basically: your point is moot.
P.S. You neglected to use memcpy to copy over the chroma, which could benefit a lot from it. (you also made the code ugly)
P.S.S You forgot to include the header that actually has memcpy in it. Nice Job!
I'm going to release updated dll and code, as well as 720 output version later today.
jpsdr
15th December 2010, 23:21
The but you mention about i=h-1 is irrelevant, since my plugin is NOT SUPPOSED TO BE RUN ON ANYTHING BUT THINGS WITH EXACTLY 1080 HEIGHT
In that case, shouldn't you throw an error if height is different from 1080, the same you do if phase is out of [0,5] ?
I'm going to release updated dll and code, as well as 720 output version later today.
Wonderfull, thanks for your work.
Daemon404
15th December 2010, 23:34
In that case, shouldn't you throw an error if height is different from 1080, the same you do if phase is out of [0,5] ?
Actually, you are correct. I'm going to add this in.
jpsdr
17th December 2010, 18:25
I've updated my VDub filters with CCC.
x64 version is SSE optimized.
You can get them here (http://rapidshare.com/files/437857369/Filtres_JPSDR.rar).
jpsdr
19th December 2010, 10:15
mp3dom and VRF Maniac said that even recent anime are not always at 1080(i or p).
My question : I've bought the japanese Blu-Ray of Kiddy Grade and Full Metal Panic.
Is the probability high that they are upscaled to 1080, and, in that case, if i'm doing my own work, a 720p video will finaly be enough ?
Of course, on older anime on film, question is not to ask, because... it was a film...
JEEB
19th December 2010, 10:59
mp3dom and VRF Maniac said that even recent anime are not always at 1080(i or p).
99.9% of aired anime isn't really 1080i/1080p, and just upscaled to the given resolution.
Original resolution can be everything between 480i/p and 720p, usually. Bones stuff is mostly 540p, f.ex. (IIRC only one NHK-related production from Bones is 720p, and for that one NHK gave out the hardware). It really varies depending on the studio.
My question : I've bought the japanese Blu-Ray of Kiddy Grade and Full Metal Panic.
Is the probability high that they are upscaled to 1080, and, in that case, if i'm doing my own work, a 720p video will finaly be enough ?
First animated series made for TV that were made (and aired) in some kind of HD'ish resolution were Sola and some other anime I can't remember. This was in 2007. For satellite/cable I've heard that WOWOW-produced King Gainer (2002) might've been produced in a HD'ish resolution, but I don't think there's a public HD mastered source of it available anywhere to prove it.
Original FMP airing was back in 2002. This puts it into the age of "We got into digital, welcome to 480i/p."
Kiddy Grade is of the same age, airing between 2002-2003.
In a nutshell, even if they had the cells/film rolls they would hardly be worth even 720p, I would say. The blu-rays? Definitely 480i/p upscaled to 1080i/p for the customers to think what great quality they are buying. Just pray to your local deity that they didn't use Q-TEC for the mastering process, which would basically mean "professional warpsharp" on your image + something along the lines of bilinear resize.
jpsdr
19th December 2010, 11:15
I'm 99.99% sure that Kiddy Grade and FMP are not made with cells, and so there is no film, and only digital/computer masters.
JEEB
19th December 2010, 11:51
I'm 99.99% sure that Kiddy Grade and FMP are not made with cells, and so there is no film, and only digital/computer masters.
Yes, which I meant with the "This puts it into the age of "We got into digital, welcome to 480i/p."" part.
The last part's first sentence was meant to amplify that "even if they happened to have the damn cells/film (in the case it was miraculously made in cells/film, which it most certainly isn't), it would barely be worth X".
Anyways, you asked a question, I answered. Neither of those are going to be even close to high definition if you get your hands on the sources. BDs are upscaled, and as I said -- just pray it wasn't Q-TEC who mastered them.
(Also, I'm still surprised that this thread is in the H.264/AAC subforum, it's mostly been about avisynth usage with the given source)
mp3dom
19th December 2010, 14:10
All the FMP series are upscaled. In anime the upscale is quite common unless you're watching recent shows (which could anyway be an upscale but from an higher source like 720p or 540p) or watching old animation from film. At least now they're working with pure 24p (23.976p) without fancy cadence or mixing 24p and 60i/30p. In general, recent anime movies are true 1080p or the source is near to 1080p.
Keep in mind that even quite recent shows (for example Suzumiya Haruhi 1st series - that is out now in BD thanks to Q-TEC upscale, or Gurren Lagann) are in plain SD. Bluray in that case will be an upscale.
The only title that I'm aware of being completely re-done was Serial Experiments Lain. It was redone/re-take from cells, with CG completely redone from scratch.
jpsdr
19th December 2010, 15:14
Anyways, you asked a question, I answered.
Yes, thanks.
jpsdr
20th December 2010, 09:57
Any idea about Macross Frontier TV serie ? I've also the japanese Blu-Ray, but i hope if upscaled, production was at least at 720p...
TheRyuu
22nd December 2010, 06:00
I've updated my VDub filters with CCC.
x64 version is SSE optimized.
You can get them here (http://rapidshare.com/files/437857369/Filtres_JPSDR.rar).
Just use /Qax and avoid a billion different builds.
jpsdr
22nd December 2010, 09:53
No, my intend is to have optimizest builds. I prefer to have 10 builds /Qx, than one /Qax, if the /Qx could be (in theory) better/faster, even if it's only a little.
Daemon404
25th December 2010, 04:44
http://forum.doom9.org/showthread.php?t=158696
Enjoy.
mp3dom
25th December 2010, 15:51
Thank you very much!
vBulletin® v3.8.11, Copyright ©2000-2026, vBulletin Solutions Inc.