MPEG2 Video Encoder

by

 

MPEG2 Video Encoder

Checkruns(block)
function [runmat]= Checkruns(block)

runmat = [];
pastval = 0;
row = 1;
run = 0;
if(block(length(block)) ==0)
    block(length(block)) = Inf;
end
    
for i=2:length(block)
    if(block(i) == 0)
        run = run + 1;        
    else
        runmat(row, 1) = run;
        runmat(row, 2) = block(i);
        row = row + 1;
        run = 0;
    end
end
return

Contact us