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

Side by Side Diff: webrtc/modules/video_processing/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
1 function writeYUV420file(filename, Y, U, V) 1 function writeYUV420file(filename, Y, U, V)
2 % writeYUV420file(filename, Y, U, V) 2 % writeYUV420file(filename, Y, U, V)
3 3
4 fid = fopen(filename,'wb'); 4 fid = fopen(filename,'wb');
5 if fid==-1 5 if fid==-1
6 error(['Cannot open file ' filename]); 6 error(['Cannot open file ' filename]);
7 end 7 end
8 8
9 numFrames=size(Y,3); 9 numFrames=size(Y,3);
10 10
11 for k=1:numFrames 11 for k=1:numFrames
12 % Write luminance 12 % Write luminance
13 fwrite(fid,uint8(Y(:,:,k).'), 'uchar'); 13 fwrite(fid,uint8(Y(:,:,k).'), 'uchar');
14 14
15 % Write U channel 15 % Write U channel
16 fwrite(fid,uint8(U(:,:,k).'), 'uchar'); 16 fwrite(fid,uint8(U(:,:,k).'), 'uchar');
17 17
18 % Write V channel 18 % Write V channel
19 fwrite(fid,uint8(V(:,:,k).'), 'uchar'); 19 fwrite(fid,uint8(V(:,:,k).'), 'uchar');
20 end 20 end
21 21
22 fclose(fid); 22 fclose(fid);
OLDNEW
« no previous file with comments | « webrtc/modules/video_processing/test/video_processing_unittest.cc ('k') | webrtc/modules/video_processing/video_decimator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698