MCPcopy Create free account
hub / github.com/FFMS/ffms2 / OutputFrame

Method OutputFrame

src/avisynth/avssources.cpp:390–409  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

388}
389
390void 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
411static void BlitField(const FFMS_Frame *Frame, PVideoFrame &Dst, IScriptEnvironment *Env, int Plane, int PlaneId, int Field) {
412 Env->BitBlt(

Callers

nothing calls this directly

Calls 1

BlitPlaneFunction · 0.85

Tested by

no test coverage detected