[mythtv] Gbuffer usage [was: Frames per second?]

Bruce Markey bjm at lvcm.com
Wed Apr 30 15:11:27 EDT 2003


[from mythtv-users]
Robert Kulagowski wrote:
>  
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> I'm assuming that all Bt8x8 cards use the same buffers, correct? 
> Therefore, if there are multiple encoders, a higher value may be
> warranted.  Sound OK?

Robert, I did try to look into this and I don't see anything
in the MythTV code to indicate that it is doing anything to
use the gbuffer space. NuppelVideoRecorder.cpp uses a buffer
of 20MB for higher res on 12MB for lower res:

    if (w >= 480 || h > 288)
        videomegs = 20;
    else
        videomegs = 12;

    video_buffer_count = (videomegs * 1000 * 1000) / video_buffer_size;

The gbuffer space is specific to the bttv driver and not a
part of v4l. Other programs have a test case for the bttv
driver and add code to use gbuffers but I don't see this.
Tvtime is unambigous about how it uses specifically four 
frames from gbuffer space if it is using the bttv driver.
In MytvTV, there is one test leftover from nuvrec that is
appearently disabled.

    usebttv = 0;
    // here is the non preferable timecode - drop algorithm - fallback
    if (!usebttv)

This "if" will be true every time.

Slightly off topic, I see that in WriteVideo there is a test
to write a video header for dropped frames that was disabled
awhile back along with enabling PIP. Not writing theses headers
would be related to having fewer video frames than the frames
per secomd which leads to the screwy behavior for files recorded
when the CPU is pegged to the quality values are distorted.

Back on topic ;-), the gbuffer space is allocated when the
driver loads before it probes for cards:

Apr 28 14:23:24 moktoo kernel: bttv: using 8 buffers with 2080k (16640k total) for capture

Here there are 16MB allocated regardless of the number of cards
found (bttv0, bttv1, etc.). It doesn't appear that this space
is per card. However, I tried a few debug statmens to see if
more frames are back logged if gbuffers are increased. Couldn't
find anything. If someone could send a test case, patch, or
debug output to show that more pages are being back logged,
that would be great. Otherwise, this is just snake oil and
not a valid solution to any problems.

--  bjm






More information about the mythtv-dev mailing list