matlab/STMAD_2011_MatlabCode/readframefromfid.m (5 lines of code) (raw):

function [y,cb,cr]=readframefromfid(fid,height,width) % for now, read yuv420p only y=fread(fid,width*height, 'uchar')'; cb=fread(fid,width*height/4, 'uchar')'; cr=fread(fid,width*height/4, 'uchar')'; end