<div class="gmail_quote">2012/5/24 Alex Cohn <span dir="ltr"><<a href="mailto:alexcohn@netvision.net.il" target="_blank">alexcohn@netvision.net.il</a>></span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="im">On Thu, May 24, 2012 at 11:19 AM, Carl Lindqvist <<a href="mailto:lulebo@gmail.com">lulebo@gmail.com</a>> wrote:<br>
><br>
> Yes, my input is raw SDI video. Interlaced SD 4:2:2 8bit (or 10bit, but I<br>
> use 8bit). I want the output to be interlaced, full field rade. Right now,<br>
> swscale produces chroma samples that are scaled from both fields, which give<br>
> the effect in the image in the stack overflow thread when looking at the<br>
> final video.<br>
><br>
> I have been reading what I can find about swscale, but can't really find any<br>
> info on this. This is the code I use (just standard stuff):<br>
><br>
> img_convert_ctx = sws_getContext(destWidth, destHeight,<br>
>                                                  PIX_FMT_UYVY422,<br>
>                                                  c->width, c->height,<br>
>                                                  c->pix_fmt,<br>
>                                                  sws_flags, NULL, NULL,<br>
> NULL);<br>
><br>
> sws_scale(img_convert_ctx, tmp_picture->data, tmp_picture->linesize,<br>
>                       0, destHeight, picture->data, picture->linesize);<br>
<br>
</div>What are the input and output sizes in your case?<br>
<div class="im"><br>
> Is there a flag that sets this? There are some flags like<br>
> SWS_FULL_CHR_H_INP, but I can't find any info on what they do.<br>
><br>
> Regards<br>
> Carl Lindqvist<br>
<br>
</div>BR<br>
<span class="HOEnZb"><font color="#888888">Alex<br>
</font></span><div class="HOEnZb"><div class="h5">_______________________________________________<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>
</div></div></blockquote></div><br><div>In this case the video is just standard SD video, 720x576 8bit uyvy. But I also have some 1080i video i would like to process in the same way. If I understand how to do one, I can probably figure out how to do the other one. I can probably do my own calculations and even optimize a bit with SSE, since I think I get how the chroma samples should behave, but it would be nice to have swscale do it for me if it is supported. Is it really necessary to have 2 instances, one for each field. It seems as if this would be a pretty common thing to want to do.</div>
<div><br></div><div>I have not yet looked at <span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px">MPlayer/libmpcodecs/vf_scale.c, will do it tomorrow and see what I can find.</span></div>
<div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px"><br></span></div><div><span style="background-color:rgb(255,255,255);font-family:arial,sans-serif;font-size:13px">How does the ffmpeg app do it? What file should I look at for source examples?</span></div>
<div><br></div><div>Regards</div><div>Carl Lindqvist</div>