[Libav-user] change pixel format without scaling data ? // more3

jim morgenstern jmorgie at yahoo.com
Sat Jan 5 21:36:06 CET 2013


I go YUV-RGB -YUV'.  
On output I see YUV' is messed up

8 bits in YUV gives 8 bits in RGB according to all  the equations.  

I find I have to right shift 8 bits of the RGB to get proper looking images
back out at YUV'.  Hence sws_scale is actually doing some scaling.  Even
though I did not request.  So how do I transform formats without invoking
some scaling?  Are you familiar with the modules that can point me to lines
of C code in a specific file where the scaling is happening ?
 

-----Original Message-----
From: libav-user-bounces at ffmpeg.org [mailto:libav-user-bounces at ffmpeg.org]
On Behalf Of Roman Ryltsov
Sent: Saturday, January 05, 2013 1:59 PM
To: This list is about using libavcodec, libavformat, libavutil, libavdevice
and libavfilter.
Subject: Re: [Libav-user] change pixel format without scaling data ? //
more3

Jim,

> I use this many ways.  For one instance:
> Input is YUV422
> Output Is RGB16

What kind of grayscale alteration do you see? YUV color space has explicit
brightness component, while in RGB it is distributed between all three
components. That is, converting between these you inevitably apply math to
grayscale levels, though you should not get any significant difference going
beyond rounding to nearest integer.

Roman
_______________________________________________
Libav-user mailing list
Libav-user at ffmpeg.org
http://ffmpeg.org/mailman/listinfo/libav-user



More information about the Libav-user mailing list