386sx
Posts: 15
Joined: Mon Jun 05, 2017 7:50 pm

Rpi as a scan converter / scaler, possible?

Wed May 22, 2019 1:30 pm

Hi,

I'd like to know if it's possible to use a rpi as a scaler/scan converter to take an analog video signal (rgb or composite) and convert it (just the analog/digital conversion like scan line doubler) in real time to the hdmi output like the Open Source Scan Converter to connect older game consoles with newer monitors.
I know this is a difficult task and must be really done in a real time process cause latency is the most important factor. here but considering how many things the rpi can work for, it'd be nice. Maybe with some low level input like the camera connector and some hardware functions?
I imagine a usb video input device is out of question cause I tried the latency without any encoding task (just to view the input signal) with the rpi3b+ and the latency to get to the monitor is really too much when using the game controller.

Thanks

fruitoftheloom
Posts: 20469
Joined: Tue Mar 25, 2014 12:40 pm
Location: Delightful Dorset

Re: Rpi as a scan converter / scaler, possible?

Wed May 22, 2019 2:05 pm

386sx wrote:
Wed May 22, 2019 1:30 pm
Hi,

I'd like to know if it's possible to use a rpi as a scaler/scan converter to take an analog video signal (rgb or composite) and convert it (just the analog/digital conversion like scan line doubler) in real time to the hdmi output like the Open Source Scan Converter to connect older game consoles with newer monitors.
I know this is a difficult task and must be really done in a real time process cause latency is the most important factor. here but considering how many things the rpi can work for, it'd be nice. Maybe with some low level input like the camera connector and some hardware functions?
I imagine a usb video input device is out of question cause I tried the latency without any encoding task (just to view the input signal) with the rpi3b+ and the latency to get to the monitor is really too much when using the game controller.

Thanks

Considering the Raspberry Pi SBC has no dedicated Video Input it will be difficult.

There are 2 posts regarding video inputs, see:

viewtopic.php?f=45&t=238826

viewtopic.php?f=38&t=120702
Retired disgracefully.....

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7137
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Rpi as a scan converter / scaler, possible?

Wed May 22, 2019 2:21 pm

fruitoftheloom wrote:
Wed May 22, 2019 2:05 pm
Considering the Raspberry Pi SBC has no dedicated Video Input it will be difficult.

There are 2 posts regarding video inputs, see:

viewtopic.php?f=45&t=238826

viewtopic.php?f=38&t=120702
Both those links are for HDMI input, not RGB or composite.
You want the ADV7282-M for composite input, eg viewtopic.php?f=43&t=218933
Please note that it will only accept standard NTSC/PAL/SECAM refresh rates and resolutions, not any of the weirder resolutions.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

dave j
Posts: 116
Joined: Mon Mar 05, 2012 2:19 pm

Re: Rpi as a scan converter / scaler, possible?

Thu May 23, 2019 9:45 am

Someone on the stardot Acorn retro forum has produced something that uses a Pi zero and a small CPLD to convert BBC Micro RGB output to HDMI. More recent developments allow it to convert other formats up to VGA. It also does de-interlacing and/or scan lines.

Particularly interesting for you is that the it genlocks the Pi's output to the source, allowing a latency of 2.4ms.

The bad news is it only supports digital RGB signals - with up to 6 bits per pixel (R2G2B2).

It might provide some inspiration though. With some suitably fast ADCs you might be able to use it as the basis for something converting analog signals.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7137
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Rpi as a scan converter / scaler, possible?

Thu May 23, 2019 10:41 am

dave j wrote:
Thu May 23, 2019 9:45 am
Someone on the stardot Acorn retro forum has produced something that uses a Pi zero and a small CPLD to convert BBC Micro RGB output to HDMI. More recent developments allow it to convert other formats up to VGA. It also does de-interlacing and/or scan lines.

Particularly interesting for you is that the it genlocks the Pi's output to the source, allowing a latency of 2.4ms.

The bad news is it only supports digital RGB signals - with up to 6 bits per pixel (R2G2B2).

It might provide some inspiration though. With some suitably fast ADCs you might be able to use it as the basis for something converting analog signals.
Novel, and quite clever.
Do note that this is using the Pi in bare metal mode, so it's dedicated to that one task.
It's also below SD in resolution (pixel clock of 12 or 16MHz). If that weren't the case then there are various chips to convert composite to a ITU-R BT.656 parallel interface, but generally the CSI-2 versions of the chips are going to be easier to interface to the Pi.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

386sx
Posts: 15
Joined: Mon Jun 05, 2017 7:50 pm

Re: Rpi as a scan converter / scaler, possible?

Thu May 23, 2019 11:37 am

dave j wrote:
Thu May 23, 2019 9:45 am
Someone on the stardot Acorn retro forum has produced something that uses a Pi zero and a small CPLD to convert BBC Micro RGB output to HDMI. More recent developments allow it to convert other formats up to VGA. It also does de-interlacing and/or scan lines.

Particularly interesting for you is that the it genlocks the Pi's output to the source, allowing a latency of 2.4ms.

The bad news is it only supports digital RGB signals - with up to 6 bits per pixel (R2G2B2).

It might provide some inspiration though. With some suitably fast ADCs you might be able to use it as the basis for something converting analog signals.
Thanks, That's great but I was thinking if it support the RGBS or RGBHV basically if it would work with a rgb-scart output of a PAL 50Hz Megadrive console. I'm not a BBC Micro expert, it would anyway looks like they have the same RGB output standard (?). Also is it sold somewhere or the developer himself sell it? :)

dave j
Posts: 116
Joined: Mon Mar 05, 2012 2:19 pm

Re: Rpi as a scan converter / scaler, possible?

Thu May 23, 2019 12:58 pm

6by9 wrote:
Thu May 23, 2019 10:41 am
Novel, and quite clever.
Do note that this is using the Pi in bare metal mode, so it's dedicated to that one task.
It's also below SD in resolution (pixel clock of 12 or 16MHz).
The 12 and 16MHz pixel clocks are what the BBC uses for its screen modes. The device samples at 96MHz. There are examples in later pages of that thread of it converting ZX81 display and various PC screen formats - including VGA.
If that weren't the case then there are various chips to convert composite to a ITU-R BT.656 parallel interface, but generally the CSI-2 versions of the chips are going to be easier to interface to the Pi.
I mainly mentioned this as it's a potential way of inputting RGB signals - the ADV7282-M appears to do component in YPbPr format but not RGB.

dave j
Posts: 116
Joined: Mon Mar 05, 2012 2:19 pm

Re: Rpi as a scan converter / scaler, possible?

Thu May 23, 2019 1:05 pm

386sx wrote:
Thu May 23, 2019 11:37 am
Thanks, That's great but I was thinking if it support the RGBS or RGBHV basically if it would work with a rgb-scart output of a PAL 50Hz Megadrive console. I'm not a BBC Micro expert, it would anyway looks like they have the same RGB output standard (?). Also is it sold somewhere or the developer himself sell it? :)
Note: It only supports digital RGB signals. BBC Micros output RGB but it's at TTL levels (i.e. only 0v or 5v).

Check the thread for availability of boards.

I posted about this as an idea of what might be done rather than something you could buy that would work as is.

6by9
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 7137
Joined: Wed Dec 04, 2013 11:27 am
Location: ZZ9 Plural Z Alpha, aka just outside Cambridge.

Re: Rpi as a scan converter / scaler, possible?

Thu May 23, 2019 2:04 pm

dave j wrote:
Thu May 23, 2019 12:58 pm
I mainly mentioned this as it's a potential way of inputting RGB signals - the ADV7282-M appears to do component in YPbPr format but not RGB.
You're right. I'm getting confused with ADV748[1|2] which I believe will do analogue RGB in (up to XGA) if you feed the data into the main component processor instead of the standard def block.
Software Engineer at Raspberry Pi Trading. Views expressed are still personal views.
I'm not interested in doing contracts for bespoke functionality - please don't ask.

Return to “General discussion”