void AvisynthVideoSource::OutputFrame(const FFMS_Frame *Frame, PVideoFrame &Dst, IScriptEnvironment *Env) { if (VI.pixel_type == VideoInfo::CS_I420) { BlitPlane(Frame, Dst, Env, 0); BlitPlane(Frame, Dst, Env, 1); BlitPlane(Frame, Dst, Env, 2); } else if (VI.IsYUY2()) { BlitPlane(Frame, Dst, Env, 0); } else { // RGB Env->BitBlt( Dst->GetWritePtr() + Dst->GetPitch() * (Dst->GetHeight() - 1), -Dst->GetPitch(), Frame->Data[0], Frame->Linesize[0], Dst->GetRowSize(), Dst->GetHeight()); } }
UINT32 gamate_state::screen_update_gamate(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect) { int x, y, j; for (y=0;y<152;y++) { for (x=-(video.bitmap.xpos&7), j=0;x<160;x+=8, j++) { UINT8 d1, d2; if (video.bitmap.ypos<200) { d1=video.bitmap.data[0][(y+video.bitmap.ypos)%200][(j+video.bitmap.xpos/8)&0x1f]; d2=video.bitmap.data[1][(y+video.bitmap.ypos)%200][(j+video.bitmap.xpos/8)&0x1f]; } else if ((video.bitmap.ypos&0xf)<8) { // lcdtest, of course still some registers not known, my gamate doesn't display bottom lines; most likely problematic 200 warp around hardware! no real usage int yi=(y+(video.bitmap.ypos&0xf)-8); if (yi<0) yi=video.bitmap.ypos+y; // in this case only 2nd plane used!?, source of first plane? d1=video.bitmap.data[0][yi][(j+video.bitmap.xpos/8)&0x1f]; // value of lines bevor 0 chaos d2=video.bitmap.data[1][yi][(j+video.bitmap.xpos/8)&0x1f]; } else { d1=video.bitmap.data[0][y][(j+video.bitmap.xpos/8)&0x1f]; d2=video.bitmap.data[1][y][(j+video.bitmap.xpos/8)&0x1f]; } BlitPlane(&bitmap.pix16(y, x+4), d1, d2); BlitPlane(&bitmap.pix16(y, x), d1>>4, d2>>4); } } return 0; }
void AvisynthVideoSource::OutputFrame(const FFMS_Frame *Frame, PVideoFrame &Dst, IScriptEnvironment *Env) { if (VI.IsPlanar()) { BlitPlane(Frame, Dst, Env, 0, VI.IsRGB() ? PLANAR_G : PLANAR_Y); if (HighBitDepth ? !VI.IsY() : !VI.IsY8()) { BlitPlane(Frame, Dst, Env, 1, VI.IsRGB() ? PLANAR_B : PLANAR_U); BlitPlane(Frame, Dst, Env, 2, VI.IsRGB() ? PLANAR_R : PLANAR_V); } if (VI.IsYUVA() || VI.IsPlanarRGBA()) BlitPlane(Frame, Dst, Env, 3, PLANAR_A); } else if (VI.IsYUY2()) { BlitPlane(Frame, Dst, Env, 0, 0); } else if (VI.IsRGB24() || VI.IsRGB32()) { Env->BitBlt( Dst->GetWritePtr() + Dst->GetPitch() * (Dst->GetHeight() - 1), -Dst->GetPitch(), Frame->Data[0], Frame->Linesize[0], Dst->GetRowSize(), Dst->GetHeight()); } else { assert(false); } }