| 388 | } |
| 389 | |
| 390 | void AvisynthVideoSource::OutputFrame(const FFMS_Frame *Frame, PVideoFrame &Dst, IScriptEnvironment *Env) { |
| 391 | if (VI.IsPlanar()) { |
| 392 | BlitPlane(Frame, Dst, Env, 0, VI.IsRGB() ? PLANAR_G : PLANAR_Y); |
| 393 | if (HighBitDepth ? !VI.IsY() : !VI.IsY8()) { |
| 394 | BlitPlane(Frame, Dst, Env, 1, VI.IsRGB() ? PLANAR_B : PLANAR_U); |
| 395 | BlitPlane(Frame, Dst, Env, 2, VI.IsRGB() ? PLANAR_R : PLANAR_V); |
| 396 | } |
| 397 | if (VI.IsYUVA() || VI.IsPlanarRGBA()) |
| 398 | BlitPlane(Frame, Dst, Env, 3, PLANAR_A); |
| 399 | } else if (VI.IsYUY2()) { |
| 400 | BlitPlane(Frame, Dst, Env, 0, 0); |
| 401 | } else if (VI.IsRGB24() || VI.IsRGB32()) { |
| 402 | Env->BitBlt( |
| 403 | Dst->GetWritePtr() + Dst->GetPitch() * (Dst->GetHeight() - 1), -Dst->GetPitch(), |
| 404 | Frame->Data[0], Frame->Linesize[0], |
| 405 | Dst->GetRowSize(), Dst->GetHeight()); |
| 406 | } else { |
| 407 | assert(false); |
| 408 | } |
| 409 | } |
| 410 | |
| 411 | static void BlitField(const FFMS_Frame *Frame, PVideoFrame &Dst, IScriptEnvironment *Env, int Plane, int PlaneId, int Field) { |
| 412 | Env->BitBlt( |
nothing calls this directly
no test coverage detected