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 > Announcements and Chat > General Discussion

Reply
 
Thread Tools Search this Thread Display Modes
Old 28th January 2013, 22:59   #1  |  Link
SMurf
Registered User
 
Join Date: Jun 2002
Posts: 32
Resizing Pure Luma Without Conversion

Hello,

I'm not sure which sub-forum this would fit in, so I'm posting it here.

If I have a pure luma (Y) stream of a particular resolution (I can split it into individual frames if need be), is there any software out that will allow me to resize the frames without converting to/from RGB?

Bonus point for something that uses a high quality algorithm (splines?)
SMurf is offline   Reply With Quote
Old 28th January 2013, 23:01   #2  |  Link
paradoxical
Guest
 
Posts: n/a
Does Avisynth not allow you to do that?

Last edited by paradoxical; 28th January 2013 at 23:03.
  Reply With Quote
Old 28th January 2013, 23:15   #3  |  Link
SMurf
Registered User
 
Join Date: Jun 2002
Posts: 32
Hmmm. It does support an ImageSource with pixel_type=Y8, but it's not clear whether that is luma or not (says "8-bit grayscale" in the manual)

Edit: Thinking about this... Y is 8-bit values range 16-235... if I tell a program that it's normal RGB grayscale, and get it to do high quality resize with gray samples, then export raw... that would do it, yes?

Last edited by SMurf; 28th January 2013 at 23:33.
SMurf is offline   Reply With Quote
Old 28th January 2013, 23:39   #4  |  Link
J_Darnley
Registered User
 
J_Darnley's Avatar
 
Join Date: May 2006
Posts: 959
Luma is greyscale (what is confusing about this?) so you could use avisynth. Another option is ffmpeg.
__________________
x264 log explained || x264 deblocking how-to
preset -> tune -> user set options -> fast first pass -> profile -> level
Doom10 - Of course it's better, it's one more.
J_Darnley is offline   Reply With Quote
Old 28th January 2013, 23:50   #5  |  Link
SMurf
Registered User
 
Join Date: Jun 2002
Posts: 32
Quote:
Originally Posted by J_Darnley View Post
Luma is greyscale (what is confusing about this?)
Lots of programs think grayscale is R = G = B.
Luma is 0.299 R + 0.587 G + 0.114 B.

Hence confusion.
SMurf is offline   Reply With Quote
Old 29th January 2013, 00:11   #6  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 3,250
Avisynth 2.6 has the Y8 color space which it sounds like is exactly what you want.
Asmodian is offline   Reply With Quote
Old 31st January 2013, 01:38   #7  |  Link
SMurf
Registered User
 
Join Date: Jun 2002
Posts: 32
Avisynth doesn't seem to want to accept raw YUV frames, so I'm looking at the ffmpeg route.

I'm trying:-
ffmpeg -pix_fmt gray -s 704x576 -i frame2217.y -s 752x576 out.yuv

The output looks OK, but analysing the histogram shows that some pixels have luma values out of range (16-235).

Is there a way of intimating to ffmpeg that the input luma is TV scale, and the output should be too?
SMurf is offline   Reply With Quote
Old 31st January 2013, 02:10   #8  |  Link
Asmodian
Registered User
 
Join Date: Feb 2002
Location: San Jose, California
Posts: 3,250
Quote:
Originally Posted by SMurf View Post
Avisynth doesn't seem to want to accept raw YUV frames, so I'm looking at the ffmpeg route.
http://avisynth.org/mediawiki/FAQ_lo...to_AviSynth.3F
Asmodian is offline   Reply With Quote
Old 13th February 2013, 15:51   #9  |  Link
carla2013
Registered User
 
Join Date: Feb 2013
Posts: 6
Quote:
Originally Posted by SMurf View Post
Lots of programs think grayscale is R = G = B.
Luma is 0.299 R + 0.587 G + 0.114 B.

Hence confusion.
You are so right
__________________
Doombox | YouTube Downloader Download
carla2013 is offline   Reply With Quote
Old 14th February 2013, 12:08   #10  |  Link
nevcairiel
Registered Developer
 
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 9,389
Quote:
Originally Posted by SMurf View Post
Lots of programs think grayscale is R = G = B.
Luma is 0.299 R + 0.587 G + 0.114 B.

Hence confusion.
But it is. Anything else would get a colored tint.
If you assume it is, and then insert that into your equation there, the result is interesting.

Code:
R = G = B
Y = 0.299 R + 0.587 G + 0.114 B

R = G = B, subsitute all G/B with R, because they are equal
Y = 0.299 R + 0.587 R + 0.114 R
Y = R * (0.299 + 0.587 + 0.114)
Y = R * 1

Y = R = G = B
Easy math.
Chroma isn't present, and the Luma alone defines the value of R/G/B
__________________
LAV Filters - open source ffmpeg based media splitter and decoders
nevcairiel 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 11:22.


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