Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(251)

Unified Diff: webrtc/modules/video_processing/main/test/unit_test/readYUV420file.m

Issue 1410663004: modules/video_processing: refactor interface->include + more. (Closed) Base URL: https://chromium.googlesource.com/external/webrtc.git@master
Patch Set: Rebased Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: webrtc/modules/video_processing/main/test/unit_test/readYUV420file.m
diff --git a/webrtc/modules/video_processing/main/test/unit_test/readYUV420file.m b/webrtc/modules/video_processing/main/test/unit_test/readYUV420file.m
deleted file mode 100644
index 03013efd3a6ce99486ec48f147939dca0e370669..0000000000000000000000000000000000000000
--- a/webrtc/modules/video_processing/main/test/unit_test/readYUV420file.m
+++ /dev/null
@@ -1,45 +0,0 @@
-function [Y,U,V] = readYUV420file(filename, width, height)
-% [Y,U,V] = readYUVfile(filename, width, height)
-
-fid = fopen(filename,'rb');
-if fid==-1
- error(['Cannot open file ' filename]);
-end
-
-% Number of pixels per image
-nPx=width*height;
-
-% nPx bytes luminance, nPx/4 bytes U, nPx/4 bytes V
-frameSizeBytes = nPx*1.5;
-
-% calculate number of frames
-fseek(fid,0,'eof'); % move to end of file
-fileLen=ftell(fid); % number of bytes
-fseek(fid,0,'bof'); % rewind to start
-
-% calculate number of frames
-numFrames = floor(fileLen/frameSizeBytes);
-
-Y=uint8(zeros(height,width,numFrames));
-U=uint8(zeros(height/2,width/2,numFrames));
-V=uint8(zeros(height/2,width/2,numFrames));
-
-[X,nBytes]=fread(fid, frameSizeBytes, 'uchar');
-
-for k=1:numFrames
-
- % Store luminance
- Y(:,:,k)=uint8(reshape(X(1:nPx), width, height).');
-
- % Store U channel
- U(:,:,k)=uint8(reshape(X(nPx + (1:nPx/4)), width/2, height/2).');
-
- % Store V channel
- V(:,:,k)=uint8(reshape(X(nPx + nPx/4 + (1:nPx/4)), width/2, height/2).');
-
- % Read next frame
- [X,nBytes]=fread(fid, frameSizeBytes, 'uchar');
-end
-
-
-fclose(fid);

Powered by Google App Engine
This is Rietveld 408576698