void AvisynthVideoSource::OutputField(const FFMS_Frame *Frame, PVideoFrame &Dst, int Field, IScriptEnvironment *Env) { const FFMS_Frame *SrcPicture = (Frame); if (VI.pixel_type == VideoInfo::CS_I420) { BlitField(Frame, Dst, Env, 0, Field); BlitField(Frame, Dst, Env, 1, Field); BlitField(Frame, Dst, Env, 2, Field); } else if (VI.IsYUY2()) { BlitField(Frame, Dst, Env, 0, Field); } else { // RGB Env->BitBlt( Dst->GetWritePtr() + Dst->GetPitch() * (Dst->GetHeight() - 1 - Field), -Dst->GetPitch() * 2, SrcPicture->Data[0] + SrcPicture->Linesize[0] * Field, SrcPicture->Linesize[0] * 2, Dst->GetRowSize(), Dst->GetHeight() / 2); } }
void AvisynthVideoSource::OutputField(const FFMS_Frame *Frame, PVideoFrame &Dst, int Field, IScriptEnvironment *Env) { const FFMS_Frame *SrcPicture = Frame; if (VI.IsPlanar()) { BlitField(Frame, Dst, Env, 0, VI.IsRGB() ? PLANAR_G : PLANAR_Y, Field); if (HighBitDepth ? !VI.IsY() : !VI.IsY8()) { BlitField(Frame, Dst, Env, 1, VI.IsRGB() ? PLANAR_B : PLANAR_U, Field); BlitField(Frame, Dst, Env, 2, VI.IsRGB() ? PLANAR_R : PLANAR_V, Field); } if (VI.IsYUVA() || VI.IsPlanarRGBA()) BlitField(Frame, Dst, Env, 3, PLANAR_A, Field); } else if (VI.IsYUY2()) { BlitField(Frame, Dst, Env, 0, 0, Field); } else if (VI.IsRGB24() || VI.IsRGB32()) { Env->BitBlt( Dst->GetWritePtr() + Dst->GetPitch() * (Dst->GetHeight() - 1 - Field), -Dst->GetPitch() * 2, SrcPicture->Data[0] + SrcPicture->Linesize[0] * Field, SrcPicture->Linesize[0] * 2, Dst->GetRowSize(), Dst->GetHeight() / 2); } else { assert(false); } }