mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
videoconvert: pass frame interlaced flag to pack/unpack
If the frame is interlaced, pass the interlaced flag to the pack/unpack functions to make it unpack correctly.
This commit is contained in:
parent
c1a25d2ce7
commit
e3a9a7cf07
1 changed files with 14 additions and 6 deletions
|
@ -370,11 +370,19 @@ videoconvert_dither_halftone (VideoConvert * convert, guint16 * pixels, int j)
|
|||
#define TO_16(x) (((x)<<8) | (x))
|
||||
|
||||
#define UNPACK_FRAME(frame,dest,line,width) \
|
||||
frame->info.finfo->unpack_func (frame->info.finfo, GST_VIDEO_PACK_FLAG_NONE, \
|
||||
dest, frame->data, frame->info.stride, 0, line, width)
|
||||
frame->info.finfo->unpack_func (frame->info.finfo, \
|
||||
(GST_VIDEO_FRAME_IS_INTERLACED (frame) ? \
|
||||
GST_VIDEO_PACK_FLAG_INTERLACED : \
|
||||
GST_VIDEO_PACK_FLAG_NONE), \
|
||||
dest, frame->data, frame->info.stride, 0, \
|
||||
line, width)
|
||||
#define PACK_FRAME(frame,dest,line,width) \
|
||||
frame->info.finfo->pack_func (frame->info.finfo, GST_VIDEO_PACK_FLAG_NONE, \
|
||||
dest, 0, frame->data, frame->info.stride, frame->info.chroma_site, line, width);
|
||||
frame->info.finfo->pack_func (frame->info.finfo, \
|
||||
(GST_VIDEO_FRAME_IS_INTERLACED (frame) ? \
|
||||
GST_VIDEO_PACK_FLAG_INTERLACED : \
|
||||
GST_VIDEO_PACK_FLAG_NONE), \
|
||||
dest, 0, frame->data, frame->info.stride, \
|
||||
frame->info.chroma_site, line, width);
|
||||
|
||||
static void
|
||||
videoconvert_convert_generic (VideoConvert * convert, GstVideoFrame * dest,
|
||||
|
|
Loading…
Reference in a new issue