Half-frame

Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #9375
    thecloud
    Participant

    Hi.
    Is it possible to capture only one video field instead of full frame?
    I think it can increase the speed of my program.

    #9377
    Michael
    Keymaster

    It was a long time ago, but I know I was experimenting with that. The “odd/even” pad on the Video Experimenter board will be HIGH if the video signal is the odd frame, and LOW if the even frame. Connect this signal to an Arduino pin (in the case below, it is digital pin 10) and make the capture conditional on this pin being HIGH. Remember to do pinMode(10, INPUT) somewhere in your setup().

    This is the code at the end of the function blank_line() in TVout/video_gen.cpp:

    
    	// BEGIN Video Experimenter
    
            // original code
    	//if ((dataCaptureBuf != 0) && (display.scanLine == dataCaptureLine)) {
    
    	// capture only if ODDEVEN pin is HIGH
    	if ((dataCaptureBuf != 0) && (display.scanLine == dataCaptureLine) && ((PINB & 0x4) > 0)) {
    
    	  render_line = &dataCapture_line5c;
    	  wait_until(dataCaptureWait);
    	  render_line();
    	  render_line = save_render_line;
    	}
    	display.scanLine++;
    
    #9388
    thecloud
    Participant

    Thank you very much for the answer. I also would like to ask another question about the defenition in the base-code. What does exactly function “delay_frame()” mean – odd OR even frame delay, or odd AND even frame delay together. Does “delay_frame(6)” delay for 6 full-frames or 6 half-frames? Is frame in the program lasts for 40 ms or 20 ms?

    #9390
    Michael
    Keymaster

    I’m pretty sure it is half-frames. So delay_frame(6) would be 3 odd fields and 3 even fields.

    • This reply was modified 6 years, 11 months ago by Michael.
Viewing 4 posts - 1 through 4 (of 4 total)
  • You must be logged in to reply to this topic.