Commit 19db35a9 authored by Thomas Guillem's avatar Thomas Guillem

codec: videotoolbox: select best chroma for SW deinterlacer

parent b0bdeb01
......@@ -1773,14 +1773,35 @@ static int DecodeBlock(decoder_t *p_dec, block_t *p_block)
if (p_block->i_flags & BLOCK_FLAG_INTERLACED_MASK)
msg_Warn(p_dec, "VT decoder doesn't handle deinterlacing on iOS, "
p_sys->vtsession_status = VTSESSION_STATUS_ABORT;
if (p_sys->i_forced_cvpx_format == 0)
/* In case of interlaced content, force VT to output I420 since our
* SW deinterlacer handle this chroma natively. This avoids having
* 2 extra conversions (CVPX->I420 then I420->CVPX). */
p_sys->i_forced_cvpx_format = kCVPixelFormatType_420YpCbCr8Planar;
msg_Warn(p_dec, "Interlaced content: forcing VT to output I420");
if (p_sys->session != nil && p_sys->vtsession_status == VTSESSION_STATUS_OK)
msg_Warn(p_dec, "restarting vt session (color changed)");
/* Drain before stopping */
Drain(p_dec, false);
if (p_sys->vtsession_status == VTSESSION_STATUS_RESTART)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment