It is currently 28 Mar 2024, 22:20




 Page 14 of 31 [ 606 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16, 17 ... 31  Next
Author Message
 Post subject: Re: (WIP) Laserdisc software image decoder from raw signal
PostPosted: 13 Sep 2017, 17:34 
Honest fan
Honest fan
User avatar

Joined: 11 Sep 2017, 14:24
Posts: 88
Location: Sweden
Has thanked: 2 times
Been thanked: 36 times
The primary issue I have is to get a copy of all the laserdiscs (some are very rare; but we already have some verbal agreement with a UK museum to get access to their collection); decoding the EFM would be nice, but it's not an immediate issue - as long as I have a good digital RF image, then time is less of a problem.

As for the ADC, well I'm going to make another prototype run this weekend to improve the SNR and sampling accuracy (mainly by making the power regulation cleaner and better decoupling design around the ADC). The design also has a high-bandwidth preamp, which will allow me to tune the input specifically to the player (to get the 300mA RF output as close as possible to the 1V PtP of the ADC).

The last improvement is to add in a much more accurate clock to drive the ADC; clock jitter in the ADC causes distortion of the sample, so this will help get a cleaner conversion. The new clock generator IC is also programmable, so I'll be able to see how far I can push the clock speed before the FX3 chip (cypress USB 3.0) can't manage the throughput. At the least I'm hoping for 32MSPS but, realistically, the speed (as long as it's over the required Nyquist) is less important than resolution. Analogue design of this sort is always a little tricky; but the current prototype is happily making samples, there is just a bit too much jitter right now.

As soon as I have something that I think is a valid sample I'll post back with a link. I'm hoping to get there within the next few weeks (I have to do the day job too :) )
Offline
 Profile  
 
 Post subject: Re: (WIP) Laserdisc software image decoder from raw signal
PostPosted: 19 Sep 2017, 14:10 
Honest fan
Honest fan
User avatar

Joined: 11 Sep 2017, 14:24
Posts: 88
Location: Sweden
Has thanked: 2 times
Been thanked: 36 times
I decided to grab one of the video capture cards with the same chip as recommended by the documentation. I wanted to test with a 'known' set up before replacing it with the 10-bit ADC (that is currently waiting on parts).

I realized that I needed a VGA amp or something to boost the signal; but Ebay prices were not so great :) So I designed a simple one (based on a common design) that does the trick for a couple of Euros/bucks. It runs from 5Vs, so it's easy to power from USB, a power supply, or whatever. I ran some bode analysis on it and fed the ADC from a function generator and checked the resulting sample... all looks good. Seems the video capture card input could do with an anti-alias filter, but that's another issue.

Schematic is attached; it's so simple you could build it on a stripboard in half an hour :)

My PAL decode questions will begin soon, but I wanted to give something back first!

Attachment:
File comment: 2x gain RF amp
ld-decode video amp.PNG
ld-decode video amp.PNG [ 47.16 KiB | Viewed 7210 times ]


P.S. The 47R resistor on the output sets the output impedance and can be changed if you need more or less.
Offline
 Profile  
 
 Post subject: Re: (WIP) Laserdisc software image decoder from raw signal
PostPosted: 19 Sep 2017, 15:33 
Honest fan
Honest fan
User avatar

Joined: 11 Sep 2017, 14:24
Posts: 88
Location: Sweden
Has thanked: 2 times
Been thanked: 36 times
ok, so I'm trying to follow the documentation, but it's a bit confusing as some of the example commands (like ./ntsc don't seem to exist any more :) )

I captured a sample of a cross-hatch test pattern (from a paused PAL player) and ran the 'simple test' which seems to produce the expected output:

Attachment:
File comment: screenshot of ubuntu
lddb-simple-test.jpg
lddb-simple-test.jpg [ 139.78 KiB | Viewed 7204 times ]


So, the question is; what next? I want to do the following test:

Quote:
Simple test run:

./ld-decoder.py testpat.raw | ./ntsc - | ./comb -O -d 2 - > testpat.rgb
(This will complain about a broken pipe, because comb quits early)
display -size 744x480 -depth 16 rgb:testpat.rgb


but no matter what I do the .rgb file ends up with 0 bytes. I've tried replacing ntsc with tbc-pal (and even running tbc-ntsc against the included mb.raw file) - but to no effect. Any advice would be appreciated!
Offline
 Profile  
 
 Post subject: Re: (WIP) Laserdisc software image decoder from raw signal
PostPosted: 20 Sep 2017, 03:58 
Absolute fan
Absolute fan
User avatar

Joined: 18 Apr 2012, 18:02
Posts: 1614
Location: United States
Has thanked: 71 times
Been thanked: 88 times
Thanks for the schematic! Hopefully I'll have a chance to build it soon :)

Updated the simple test run - which is ntsc only. The mb and snw.raw are both too small now for the later tbc-ntsc.

updated: ./ld-decoder.py testpat.raw | ./tbc-ntsc - | ./comb-ntsc -O -d 2 - > testpat.rgb

And the PAL version of the simple test run:

./ld-decoder-pal.py -S testpal.raw | ./tbc-pal - | ./comb-pal -O > tmp-pal.rgb
display -size 974x576 -depth 16 -resize 1280x960\! rgb:tmp-pal.rgb
_________________
Happycube Labs: Where the past is being re-made, today. [meep!]
Offline
 Profile  
 
 Post subject: Re: (WIP) Laserdisc software image decoder from raw signal
PostPosted: 20 Sep 2017, 05:39 
Honest fan
Honest fan
User avatar

Joined: 11 Sep 2017, 14:24
Posts: 88
Location: Sweden
Has thanked: 2 times
Been thanked: 36 times
Thanks :) Worked like a charm on all my test captures!

Attachment:
File comment: PAL Test card
ld-decode_testcard_small.jpg
ld-decode_testcard_small.jpg [ 115.05 KiB | Viewed 7180 times ]


Also shows the amplifier circuit works (since it was captured through it). Tonight I will try and decode some longer sequences. I'm waiting on some parts from Mouser in the US for the 10 bit ADC, but now I have a 'known-working' environment, it should make testing and comparison much easier.

As a side note; looking at the samples from the present set-up, it looks like there is some anti-aliasing noise created by input signals above the frequency limit of the ADC. There should be a 27-30MHz filter in there to prevent this; the downside is it will attenuate the signal a bit.

Thanks for the quick response and the update on github, I really appreciate the help!
Offline
 Profile  
 
 Post subject: Re: (WIP) Laserdisc software image decoder from raw signal
PostPosted: 20 Sep 2017, 06:35 
Absolute fan
Absolute fan
User avatar

Joined: 18 Apr 2012, 18:02
Posts: 1614
Location: United States
Has thanked: 71 times
Been thanked: 88 times
You're welcome and I'm glad you've got a capture! The 1994 UK Jason and the Argonauts release has a good color bar (megapixie sent me a capture a while ago, hope I still have it!), but I don't see any copies for sale right now.

I think around 15-20mhz would be better (remember Nyquist) - too low and it starts cutting the already lower response high end (~12-13.5-14mhz) range though. I guess better de-aliasing would be the main benefit of getting to 35-40mhz captures.
_________________
Happycube Labs: Where the past is being re-made, today. [meep!]
Offline
 Profile  
 
 Post subject: Re: (WIP) Laserdisc software image decoder from raw signal
PostPosted: 20 Sep 2017, 17:45 
Honest fan
Honest fan
User avatar

Joined: 11 Sep 2017, 14:24
Posts: 88
Location: Sweden
Has thanked: 2 times
Been thanked: 36 times
The test images are from the Jason disc; I sourced a copy a while back to help with repairing and recalibrating the Philips VP415 players required for the Domesday system (there's a bunch of notes about it on my domesday86.com site). I thought the output from my recalibrated VP415 was good... but ld-decode is mind-blowing quality in comparison. I am very impressed! Hopefully I will get the new ADC up and running soon; it will be very interesting to do a comparison.
Offline
 Profile  
 
 Post subject: Re: (WIP) Laserdisc software image decoder from raw signal
PostPosted: 21 Sep 2017, 05:27 
Honest fan
Honest fan
User avatar

Joined: 11 Sep 2017, 14:24
Posts: 88
Location: Sweden
Has thanked: 2 times
Been thanked: 36 times
Just for my knowledge, can you explain what each step of the process is doing? I understand the workings of a LD player so you can be quite brief :)

As I see it there are 4 stages; 1) ld-process, 2) TBC, 3) Comb filter, 4) final output

Process 1) takes an 8 bit file and outputs a 16 bit - and then the rest of the steps are 16-bit or?

..and, once I have the output from the comb filter, can you give me an example command to convert the PAL output into video and sound?
Offline
 Profile  
 
 Post subject: Re: (WIP) Laserdisc software image decoder from raw signal
PostPosted: 21 Sep 2017, 06:39 
Absolute fan
Absolute fan
User avatar

Joined: 18 Apr 2012, 18:02
Posts: 1614
Location: United States
Has thanked: 71 times
Been thanked: 88 times
Cool re Jason - and glad you like the quality too... hopefully the new ADC (and some readjustments to the filtering, since it's been based around the... characteristics of the current ADC) will improve things!

Bit wiped tonight, so remind me and I'll edit this later :)

1) does RF demodulation and filtering - basically all the bits of a regular player up to the TBC. (There's also the '-a' switch for it to perform analog audio.)

2) The TBC does not just time base correction, but NTSC/PAL framing. So the output is basically a B&W picture. Analog audio can also be fed into it and adjusted from (a rather high #) to 48khz.

3) Comb filtering takes the framed pictures and then turns them into RGB output.

4) Standard ffmpeg with raw input settings is then used to make .avi/.mpg/whateveryouwant.

I haven't actually made a PAL encode script yet, I just have short samples of PAL RF right now, and I'm a bit tired to tonight.
_________________
Happycube Labs: Where the past is being re-made, today. [meep!]
Offline
 Profile  
 
 Post subject: Re: (WIP) Laserdisc software image decoder from raw signal
PostPosted: 30 Oct 2017, 15:37 
Honest fan
Honest fan
User avatar

Joined: 11 Sep 2017, 14:24
Posts: 88
Location: Sweden
Has thanked: 2 times
Been thanked: 36 times
Well, it's been a while :) and I now have a development version of the sampler up and running. The ADC is 10-bits, but I'm scaling this to 16 bits on the fly. This means my samples are unsigned 16 bits (but with a 'real' resolution of 10-bits).

To make things simple, I'm currently taking the 16 bit unsigned file and converting it to 8 bits unsigned (simple divide by 256). My sample rate is currently 32 Million samples/sec.

If I try to run a 32MSPS 8-bit unsigned sample through ld-decode I don't seem to get any useful output. I'm guessing I need to change something to tell it I'm using 32MSPS rather than the original 27MSPS from the TV card? Can you give me a clue as to what to change in the ld-decoder-pal.py and tbc-pal source files?

Clearly, it would be better just to use the original 16-bit unsigned sample, but I'm guessing that's more work to do?
Offline
 Profile  
 
 Post subject: Re: (WIP) Laserdisc software image decoder from raw signal
PostPosted: 30 Oct 2017, 15:56 
Honest fan
Honest fan
User avatar

Joined: 11 Sep 2017, 14:24
Posts: 88
Location: Sweden
Has thanked: 2 times
Been thanked: 36 times
I've popped a 5 second PAL test sample on my website (in case you want to give it a try), the sample is 32MSPS, 8-bit unsigned.

http://www.domesday86.com/wp-content/uploads/2017/01/PAL_5sec_8bit_unsigned_32MSPS.zip
Offline
 Profile  
 
 Post subject: Re: (WIP) Laserdisc software image decoder from raw signal
PostPosted: 31 Oct 2017, 06:00 
Site Admin
Site Admin
User avatar

Joined: 07 Aug 2002, 23:37
Posts: 4540
Location: Tokyo
Has thanked: 292 times
Been thanked: 1136 times
simoni wrote:
I've popped a 5 second PAL test sample on my website (in case you want to give it a try), the sample is 32MSPS, 8-bit unsigned.


How do you play such file?

VLC doesn't recognize it.
IrfanView just output a B&W 100x100 single image.

Julien
_________________
HARDWARE DATABASE
HLD-X0/9 LD-S9 OPPO 105/205 SL-1200G
LDD-1 MSC-4000 R2144 PONTUS II C45 MC257
Offline
 Profile  
 
 Post subject: Re: (WIP) Laserdisc software image decoder from raw signal
PostPosted: 31 Oct 2017, 10:52 
Shows curiousity
Shows curiousity
User avatar

Joined: 20 Jan 2010, 23:33
Posts: 24
Location: United Kingdom
Has thanked: 15 times
Been thanked: 3 times
Hi Julien

My understanding is the file supplied is a raw RF sample from the new ADC hardware.
I don't think LD-decode is understanding it due to higher sample rate than the regular card that is in use.

Im looking forward to seeing the output results from this capture hardware.
Offline
 Profile  
 
 Post subject: Re: (WIP) Laserdisc software image decoder from raw signal
PostPosted: 31 Oct 2017, 10:56 
Honest fan
Honest fan
User avatar

Joined: 11 Sep 2017, 14:24
Posts: 88
Location: Sweden
Has thanked: 2 times
Been thanked: 36 times
Quote:
How do you play such file?


You can't as it's not a video file. It's a raw RF sample from a laserdisc player - it has to run through ld-decode and be processed into video data. That's the issue (as ld-decode doesn't seem to think the sample is valid) :)

The test file is so that you could run the sample through ld-decode and see why it's not processing (requires understanding of all the debug output which I don't really have at the moment).
Offline
 Profile  
 
 Post subject: Re: (WIP) Laserdisc software image decoder from raw signal
PostPosted: 01 Nov 2017, 05:47 
Absolute fan
Absolute fan
User avatar

Joined: 18 Apr 2012, 18:02
Posts: 1614
Location: United States
Has thanked: 71 times
Been thanked: 88 times
Cool - hopefully I'll get some time to look at this file soon! (Also if you can send/post a bit with the highest resolution that would make a nice comparison once I've implemented it)

ld-decode can handle some variation, but it expects something close to 28.8mhz and 32mhz is too far out at the moment. a 'final' version I'm considering writing would be fully adaptive, but who knows when/if I'll write it ;)
_________________
Happycube Labs: Where the past is being re-made, today. [meep!]
Offline
 Profile  
 
 Post subject: Re: (WIP) Laserdisc software image decoder from raw signal
PostPosted: 01 Nov 2017, 06:09 
Honest fan
Honest fan
User avatar

Joined: 11 Sep 2017, 14:24
Posts: 88
Location: Sweden
Has thanked: 2 times
Been thanked: 36 times
Quote:
but it expects something close to 28.8mhz


Is this the (315 / 88) * 8 (= 28.636363) calculation in the decoder code? What's the significance of the 3 figures?

I'll reprogram the sampler to produce samples at 28.64MSPS and try again. Right now I'm trying to confirm that the sampler is functioning correctly and I need to do some more analysis to check the various frequencies and how much attenuation there is. I've done some basic testing (using a function generator to sample sine waves between 1 and 16Mhz), but I need to spend a bit more time on this to ensure it's right.

The hardware is quite capable of exceeding 32MSPS, but the generated files start to get really big. I'll post up some 10-bit resolution samples shortly (once I'm happy the samples are (most likely) valid).
Offline
 Profile  
 
 Post subject: Re: (WIP) Laserdisc software image decoder from raw signal
PostPosted: 01 Nov 2017, 07:10 
Absolute fan
Absolute fan
User avatar

Joined: 18 Apr 2012, 18:02
Posts: 1614
Location: United States
Has thanked: 71 times
Been thanked: 88 times
It's 8x NTSC's color carrier, and more importantly what my video capture card turned ADC's native clock rate (although it can be varied)

For the captures, it could be made to be different, but for the later NTSC stages having a 4X FSC clocking is essential for color decoding, it makes phase management much easier.
_________________
Happycube Labs: Where the past is being re-made, today. [meep!]
Offline
 Profile  
 
 Post subject: Re: (WIP) Laserdisc software image decoder from raw signal
PostPosted: 01 Nov 2017, 08:02 
Honest fan
Honest fan
User avatar

Joined: 11 Sep 2017, 14:24
Posts: 88
Location: Sweden
Has thanked: 2 times
Been thanked: 36 times
Thanks for the additional info!

Using the cxadc, what's the exact sampling rate for the current setup? If I can match the expected output of the TV capture card then I'll be able to remove that 'factor' from the initial testing. Should it be 28.8MSPS or 28.6364?

Once I've performed some more in-depth testing of the sampler I'll make some additional test files; they are likely to be quite big, so I can share them, but not publicly due to the bandwidth. I'll PM you with some links to my owncloud server once the files are ready, if that's ok with you? My current laserdisc player is PAL only, but it may be possible for me to get my hands on an NTSC player too so I can make some NTSC samples also.
Offline
 Profile  
 
 Post subject: Re: (WIP) Laserdisc software image decoder from raw signal
PostPosted: 02 Nov 2017, 05:35 
Absolute fan
Absolute fan
User avatar

Joined: 18 Apr 2012, 18:02
Posts: 1614
Location: United States
Has thanked: 71 times
Been thanked: 88 times
28.636 is right - but anything within .5-1% of that shouldn't be a problem. And thanks!
_________________
Happycube Labs: Where the past is being re-made, today. [meep!]
Offline
 Profile  
 
 Post subject: Re: (WIP) Laserdisc software image decoder from raw signal
PostPosted: 02 Nov 2017, 16:54 
Honest fan
Honest fan
User avatar

Joined: 11 Sep 2017, 14:24
Posts: 88
Location: Sweden
Has thanked: 2 times
Been thanked: 36 times
As a side-note; if you're interested in the current status of the ADC system, all of the source code and schematics are available on Github (the project is completely open-source/open-hardware). It's all still (very much) WIP, but you can get a good idea of the components I'm using and how it all slots together.

https://github.com/simoninns/DomesdayDuplicator

The major components are:

A custom RF amplification, treatment and ADC board
A DE0-Nano FPGA board (on-the-fly sample conversion and FIFO buffering)
A Cypress FX3 SuperSpeed explorer board (Provides an ARM based microcontroller and USB 3.0/3.1 hardware for the host interface)

There's a PDF of the schematic under the KiCAD/PDF directory.

The current status is that the RF front-end is working fine, as is the FPGA and USB3.0 data transfer; however, there is an issue with noise across the ADC which I believe is being caused by the loading on the ADC<->FPGA databus. I have already redesigned the board to compensate for the issue and I'll make it and start testing again this weekend.
Offline
 Profile  
 
Display posts from previous:  Sort by  
 Page 14 of 31 [ 606 posts ]  Go to page Previous  1 ... 11, 12, 13, 14, 15, 16, 17 ... 31  Next


Who is online

Users browsing this forum: rcarlson and 21 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to: