Well, that is my problem - it is not clear how it scales or why if I don't request it!! What we used to call an 'undocumented feature'
The input to the context is the input format, the input sizes, the output format and the output sizes. Gray levels, scaling, expected means etc. have no part of the context or the input. I would post my code but I am away from the workstation at the moment. But if you look at the function calls for sws_getcontext and sws_scale you will no mention of modifying gray levels. Thanks guys Jim From: [email protected] [mailto:[email protected]] On Behalf Of Roman Ryltsov Sent: Saturday, January 05, 2013 11:00 AM To: This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter. Subject: Re: [Libav-user] change pixel format without scaling data ? // more 1 It is not quite clear how it scales if you don't request it. Perhaps you could post some code, esp. your SWS context initialization arguments? Roman On Sat, Jan 5, 2013 at 5:55 PM, jim morgenstern <[email protected]> wrote: I have 10 bit data; I am converting from say YUV422 to YUV444 or RGB etc.; swscale is useful for changing the pixel format. But I find that my 10bit data is getting scaled to 16 bit such that when I output only 10bits I have, well, wrap around etc. I am not asking ffmpeg to rescale the data automatically, I want the scale left alone. So a) is there a better way to change pixel format? B) a way to turn off gray-level scaling ?? -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Carl Eugen Hoyos Sent: Saturday, January 05, 2013 10:27 AM To: [email protected] Subject: Re: [Libav-user] change pixel format without scaling data ? jim morgenstern <jmorgie@...> writes: > I am using sws_scale to change the pixel formatting but this routine > is also changing the scale of the data graylevel values themselves and > I do not want it to. I am not sure I understand: Are you converting from GRAY8 to GRAY8A without changing the resolution but the values are changed? Generally, swscale should be used both if you want to change a frame's resolution and if you only want to change the pix_fmt. Carl Eugen _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user _______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
_______________________________________________ Libav-user mailing list [email protected] http://ffmpeg.org/mailman/listinfo/libav-user
