summaryrefslogtreecommitdiff
path: root/rotord/rotor.h
diff options
context:
space:
mode:
Diffstat (limited to 'rotord/rotor.h')
-rwxr-xr-xrotord/rotor.h23
1 files changed, 12 insertions, 11 deletions
diff --git a/rotord/rotor.h b/rotord/rotor.h
index af1bb72..bedf936 100755
--- a/rotord/rotor.h
+++ b/rotord/rotor.h
@@ -382,17 +382,18 @@ namespace Rotor {
Testcard* clone(map<string,string> &_settings) { return new Testcard(_settings);};
Image *get_output(const Frame_spec &frame){
if (image->setup(frame.w,frame.h)) {
- //create testcard
- float ws=(255.0f/frame.w);
- float hs=(255.0f/frame.h);
- for (int i=0;i<frame.h;i++){
- for (int j=0;j<frame.w;j++){
- image->RGBdata[(i*frame.w+j)*3]=(uint8_t)(i*hs);
- image->RGBdata[((i*frame.w+j)*3)+1]=(uint8_t)(j*ws);
- image->RGBdata[((i*frame.w+j)*3)+2]=(uint8_t)(0);
- image->Adata[i*frame.w+j]=(uint8_t)255;
- image->Zdata[i*frame.w+j]=(uint16_t)512; //1.0 in fixed point 8.8 bits
- }
+
+ }
+ //always create testcard
+ float ws=(255.0f/frame.w);
+ float hs=(255.0f/frame.h);
+ for (int i=0;i<frame.h;i++){
+ for (int j=0;j<frame.w;j++){
+ image->RGBdata[(i*frame.w+j)*3]=(uint8_t)((int)((i+(frame.time*25.0f)*hs))%255);
+ image->RGBdata[((i*frame.w+j)*3)+1]=(uint8_t)((int)((j+(frame.time*100.0f)*hs))%255);
+ image->RGBdata[((i*frame.w+j)*3)+2]=(uint8_t)(0);
+ image->Adata[i*frame.w+j]=(uint8_t)255;
+ image->Zdata[i*frame.w+j]=(uint16_t)512; //1.0 in fixed point 8.8 bits
}
}
return image;