Devs - An Observation on Cut-Up/Pink-Frames
I've been using ML Raw Video (raw rec) on a 7D and find it is hard to totally eliminate the occasional cut-up / pink frame:
If recording with Global Draw on, I get approximately 1 bad frame per 1000 good frames. Not a lot, but enough to be annoying to edit out. Turning off Global Draw reduces but does not totally eliminate it. Looking over a number of the videos, I have realized the cut-up/pink-frames are ALWAYS ON ODD FRAMES (with the first frame in the sequence being frame zero).
Diving into the code (raw_rec.c), this corresponds to transfers from the ML allocated memory buffer used in the liveview double-buffering scheme (i.e. fullsize_buffers[0]) as opposed to Canons' buffer (full-size_buffer[1]).
I don't know why the ML allocated memory would be more more prone to corrupt frames than the default Canon buffer - but it seems like it is.
As an experiment, I simply changed the code to eliminate the double buffering. The Canon buffer is used by default and I removed the call to raw_lv_redirect_edmac(). I have looked at over 30,000 frames taken with this change while running with Global Draw on, Histogram on and Spotmeter on - mostly non-cropped (but some cropped) at 24FPS, 1728*972. Not a single cut-up/pink-or-corrupted-frame yet.
Given this, I am wondering whether double-buffering is strictly needed. At the end of the day, the liveview buffer on average needs to get offloaded before the next vsync cycle. As the transfers are executed off-CPU (by EDMAC) and the transfers are set up within callbacks (are these done within the context of interrupts?) - even with a busy CPU, they should be able to complete reliably in time.
So I am looking for any feedback from the devs on this. Was double-buffering added to solve a specific problem (that might now have been addressed by more sophisticated FIO buffering)? Is this likely to be a 7D-only fix with other models requiring the double-buffering? For sure I need to do some more testing with larger resolutions, 30 FPS, etc.
Thanks
.
I've been using ML Raw Video (raw rec) on a 7D and find it is hard to totally eliminate the occasional cut-up / pink frame:
If recording with Global Draw on, I get approximately 1 bad frame per 1000 good frames. Not a lot, but enough to be annoying to edit out. Turning off Global Draw reduces but does not totally eliminate it. Looking over a number of the videos, I have realized the cut-up/pink-frames are ALWAYS ON ODD FRAMES (with the first frame in the sequence being frame zero).
Diving into the code (raw_rec.c), this corresponds to transfers from the ML allocated memory buffer used in the liveview double-buffering scheme (i.e. fullsize_buffers[0]) as opposed to Canons' buffer (full-size_buffer[1]).
I don't know why the ML allocated memory would be more more prone to corrupt frames than the default Canon buffer - but it seems like it is.
As an experiment, I simply changed the code to eliminate the double buffering. The Canon buffer is used by default and I removed the call to raw_lv_redirect_edmac(). I have looked at over 30,000 frames taken with this change while running with Global Draw on, Histogram on and Spotmeter on - mostly non-cropped (but some cropped) at 24FPS, 1728*972. Not a single cut-up/pink-or-corrupted-frame yet.
Given this, I am wondering whether double-buffering is strictly needed. At the end of the day, the liveview buffer on average needs to get offloaded before the next vsync cycle. As the transfers are executed off-CPU (by EDMAC) and the transfers are set up within callbacks (are these done within the context of interrupts?) - even with a busy CPU, they should be able to complete reliably in time.
So I am looking for any feedback from the devs on this. Was double-buffering added to solve a specific problem (that might now have been addressed by more sophisticated FIO buffering)? Is this likely to be a 7D-only fix with other models requiring the double-buffering? For sure I need to do some more testing with larger resolutions, 30 FPS, etc.
Thanks
.