Forum Discussion
Altera_Forum
Honored Contributor
16 years agoHi,
I have been doing some modification since tuesday. I found values of the Avid Start pixel (2), Stop pixel (-22) and pane register (IOWR(video_in_base[0], 0x3 , (640<< 16) | 1920 )) so that I have a video displayed on the screen. It is wide enough but it is not high enough. It is only 2/3 (even less) of the screen and the image is flattened. I found those values experimentally and still don't understand how the Avid Start and stop pixels and the pane register are related (still don't understand either the values (640-318)*2 for the pane outer an 318*2 for the inner pane in the mosaic example). If you could lighten me on this subject. In case I am on the right way (am I ?), I would like to have my image on a full screen. Thus, I tried to settle the vertical blanking start and stop registers by enabling vertical blanking in the 3rd register but I don't manage to change those values. Here is my new code : for(i=0;i<4;i++){ i2c_write(I2C_BASE, 0xb8>>1, 0xfe, (1<<0) ); i2c_write(I2C_BASE, 0xb8>>1, 0x03,0x0F); // Enable VBLK i2c_write(I2C_BASE, 0xb8>>1, 0x05,0x0C); // Enable Clock 2 output i2c_write(I2C_BASE, 0xb8>>1, 0x17,0x1B); i2c_write(I2C_BASE, 0xb8>>1, 0x15,0x81); // Enable Stable Sync mode i2c_write(I2C_BASE, 0xb8>>1, 0x00,0x00); // Select video source // Initialise video input cores IOWR(video_in_base[0], 0x0, 0 ); // stop channel IOWR(video_in_base[0], 0x2, IMAGE_MEMORY + video_in_addr[0]); IOWR(video_in_base[0], 0x3 , ((640) << 16) | 1920 ); } // Main loop # define SV 20 int StopVideo = -SV; while ( 1 == 1 ) for(i=0;i<4;i++){ i2c_write(I2C_BASE, 0xb8>>1, 0xff, (1<<0) ); if(i2c_read(I2C_BASE, 0xb8>>1, 0x88) & 0x06) //Vertical sync and horizontal sync are locked { i2c_write(I2C_BASE, 0xb8>>1, 0xfe, (1<<0) ); //reçoit commandes i2c i2c_write(I2C_BASE, 0xb8>>1, 0x1F, 0x00);// disables the scaling. i2c_write(I2C_BASE, 0xb8>>1, 0x11, 0 ); //MSB de AVID start Video (1) i2c_write(I2C_BASE, 0xb8>>1, 0x12, 2 ); //LSB de AVID start Video(1) i2c_write(I2C_BASE, 0xb8>>1, 0x13, StopVideo); //MSB de AVID stop Video i2c_write(I2C_BASE, 0xb8>>1, 0x14, 2 ); //LSB de AVID stop Video i2c_write(I2C_BASE, 0xb8>>1, 0x18, 48 ); //Vertical Blanking Start Register i2c_write(I2C_BASE, 0xb8>>1, 0x19, 48 ); //Vertical Blanking Stop Register i2c_write(I2C_BASE, 0xb8>>1, 0xff, (1<<0) ); // Chacun des décodeurs lit l'i2c IOWR(video_in_base[0], 0x0, 1 ); // start channel } else IOWR(video_in_base[0], 0x0, 0 ); // stop channel } Sorry for the length of my message and thank you for your help, Myriam