[Libav-user] Swscale: Interlaced 4:2:2 to interlaced 4:2:0

Carl Lindqvist lulebo at gmail.com
Thu May 24 10:19:36 CEST 2012


2012/5/24 Carl Eugen Hoyos <cehoyos at ag.or.at>

> Carl Lindqvist <lulebo at ...> writes:
>
> > 2012/5/24 Carl Eugen Hoyos <cehoyos <at> ag.or.at>
> > Alex Cohn <alexcohn <at> ...> writes:
> > > > In ffmpeg, deinterlace is performed by avcodec (imgconvert.c
> > > > avpicture_deinterlace)
> > >
> > > This deinterlacer is old, if you have no license issue, please
> > > use yadif.
> >
> > You are not understanding the issue. The issue is not
> > deinterlacing anything, it is producing correct 4:2:0 frames
> > for encoding interlaced.
>
> I just wanted to answer the sentence "In ffmpeg, deinterlace is
> performed by avcodec" by Alex Cohn, I did not comment
> on your original issue.
>
> Is your input interlaced frames?
> Or do you want to half the framerate of your input?
>
> Carl Eugen
>
> _______________________________________________
> Libav-user mailing list
> Libav-user at ffmpeg.org
> http://ffmpeg.org/mailman/listinfo/libav-user
>


Ok, I misunderstood you.

Yes, my input is raw SDI video. Interlaced SD 4:2:2 8bit (or 10bit, but I
use 8bit). I want the output to be interlaced, full field rade. Right now,
swscale produces chroma samples that are scaled from both fields, which
give the effect in the image in the stack overflow thread when looking at
the final video.

I have been reading what I can find about swscale, but can't really find
any info on this. This is the code I use (just standard stuff):

img_convert_ctx = sws_getContext(destWidth, destHeight,
                                                 PIX_FMT_UYVY422,
                                                 c->width, c->height,
                                                 c->pix_fmt,
                                                 sws_flags, NULL, NULL,
NULL);

sws_scale(img_convert_ctx, tmp_picture->data, tmp_picture->linesize,
                      0, destHeight, picture->data, picture->linesize);

Is there a flag that sets this? There are some flags like
SWS_FULL_CHR_H_INP, but I can't find any info on what they do.

Regards
Carl Lindqvist
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://ffmpeg.org/pipermail/libav-user/attachments/20120524/9b019b89/attachment.html>


More information about the Libav-user mailing list