<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>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’<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>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.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Thanks guys<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>Jim<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p> </o:p></span></p><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> libav-user-bounces@ffmpeg.org [mailto:libav-user-bounces@ffmpeg.org] <b>On Behalf Of </b>Roman Ryltsov<br><b>Sent:</b> Saturday, January 05, 2013 11:00 AM<br><b>To:</b> This list is about using libavcodec, libavformat, libavutil, libavdevice and libavfilter.<br><b>Subject:</b> Re: [Libav-user] change pixel format without scaling data ? // more 1<o:p></o:p></span></p><p class=MsoNormal><o:p> </o:p></p><p class=MsoNormal style='margin-bottom:12.0pt'>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?<br><br>Roman<o:p></o:p></p><div><p class=MsoNormal>On Sat, Jan 5, 2013 at 5:55 PM, jim morgenstern <<a href="mailto:jmorgie@yahoo.com" target="_blank">jmorgie@yahoo.com</a>> wrote:<o:p></o:p></p><p class=MsoNormal>I have 10 bit data;  I am converting from say YUV422 to YUV444 or RGB etc.;<br>swscale is useful for changing the pixel format.  But I find that my 10bit<br>data is getting scaled to 16 bit such that when I output only 10bits I have,<br>well, wrap around etc.  I am not asking ffmpeg to rescale the data<br>automatically, I want the scale left alone.<br><br>So a) is there a better way to change pixel format?  B) a way to turn off<br>gray-level scaling ??<br><br>-----Original Message-----<br>From: <a href="mailto:libav-user-bounces@ffmpeg.org">libav-user-bounces@ffmpeg.org</a> [mailto:<a href="mailto:libav-user-bounces@ffmpeg.org">libav-user-bounces@ffmpeg.org</a>]<br>On Behalf Of Carl Eugen Hoyos<br>Sent: Saturday, January 05, 2013 10:27 AM<br>To: <a href="mailto:libav-user@ffmpeg.org">libav-user@ffmpeg.org</a><br>Subject: Re: [Libav-user] change pixel format without scaling data ?<br><br>jim morgenstern <<a href="mailto:jmorgie@...">jmorgie@...</a>> writes:<br><br>> I am using sws_scale to change the pixel formatting but this routine<br>> is also changing the scale of the data graylevel values themselves and<br>> I do not want it to.<br><br>I am not sure I understand:<br>Are you converting from GRAY8 to GRAY8A without changing the resolution but<br>the values are changed?<br><br>Generally, swscale should be used both if you want to change a frame's<br>resolution and if you only want to change the pix_fmt.<br><br>Carl Eugen<br><br>_______________________________________________<br>Libav-user mailing list<br><a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br><a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><br><br>_______________________________________________<br>Libav-user mailing list<br><a href="mailto:Libav-user@ffmpeg.org">Libav-user@ffmpeg.org</a><br><a href="http://ffmpeg.org/mailman/listinfo/libav-user" target="_blank">http://ffmpeg.org/mailman/listinfo/libav-user</a><o:p></o:p></p></div><p class=MsoNormal><o:p> </o:p></p></div></body></html>