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. |
28th January 2013, 22:59 | #1 | Link |
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?) |
28th January 2013, 23:15 | #3 | Link |
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. |
28th January 2013, 23:39 | #4 | Link |
Registered User
Join Date: May 2006
Posts: 957
|
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. |
31st January 2013, 01:38 | #7 | Link |
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? |
31st January 2013, 02:10 | #8 | Link | |
Registered User
Join Date: Feb 2002
Location: San Jose, California
Posts: 4,407
|
Quote:
|
|
14th February 2013, 12:08 | #10 | Link | |
Registered Developer
Join Date: Mar 2010
Location: Hamburg/Germany
Posts: 10,348
|
Quote:
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 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 |
|
|
|