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

Side by Side Diff: webrtc/modules/video_processing/main/test/unit_test/writeYUV420file.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 unified diff | Download patch
OLDNEW
(Empty)
1 function writeYUV420file(filename, Y, U, V)
2 % writeYUV420file(filename, Y, U, V)
3
4 fid = fopen(filename,'wb');
5 if fid==-1
6 error(['Cannot open file ' filename]);
7 end
8
9 numFrames=size(Y,3);
10
11 for k=1:numFrames
12 % Write luminance
13 fwrite(fid,uint8(Y(:,:,k).'), 'uchar');
14
15 % Write U channel
16 fwrite(fid,uint8(U(:,:,k).'), 'uchar');
17
18 % Write V channel
19 fwrite(fid,uint8(V(:,:,k).'), 'uchar');
20 end
21
22 fclose(fid);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698