[FFmpeg-devel] [PATCH 05/19] swscale/utils: add SwsFormat abstraction and helpers
Michael Niedermayer
michael at niedermayer.cc
Mon Oct 14 16:16:26 EEST 2024
On Mon, Oct 14, 2024 at 11:57:02AM +0200, Niklas Haas wrote:
> On Fri, 11 Oct 2024 00:26:52 +0200 Niklas Haas <ffmpeg at haasn.xyz> wrote:
[...]
> > + }
> > +
> > + switch (frame->format) {
> > + case AV_PIX_FMT_YUVJ420P:
> > + case AV_PIX_FMT_YUVJ411P:
> > + case AV_PIX_FMT_YUVJ422P:
> > + case AV_PIX_FMT_YUVJ444P:
> > + case AV_PIX_FMT_YUVJ440P:
> > + fmt.range = AVCOL_RANGE_JPEG;
> > + break;
> > + }
> > +
> > + if (!desc->log2_chroma_w && !desc->log2_chroma_h)
> > + fmt.loc = AVCHROMA_LOC_UNSPECIFIED;
> > +
> > + if (frame->flags & AV_FRAME_FLAG_INTERLACED) {
> > + av_assert1(!(fmt.height & 1));
>
> I'm not sure about this assertion; I think it may need to go. The easiest way
> to handle inherlaced odd sized frames would be to just discard the last line,
> though with a little extra effort we could easily support them as two
> differently sized fields.
>
> Does anybody know how odd sized interlaced frames are handled in elsewhere?
good old PAL & NTSC used fields with different number of lines,
these where used so it could be identified which is top and which
is bottom i think.
I would assume some capture hw passed all these lines on.
I think odd number of lines needs to be supported, its needed for
things like 4:2:0 (where its commonly used in jpeg) and just croping
a video that has some part interlaced would give you odd lines interlaced
too very easily
thx
[...]
--
Michael GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
The day soldiers stop bringing you their problems is the day you have stopped
leading them. They have either lost confidence that you can help or concluded
you do not care. Either case is a failure of leadership. - Colin Powell
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <https://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20241014/403ebcae/attachment.sig>
More information about the ffmpeg-devel
mailing list