[vdr] How to convert a JPEG image to an I-frame?
Klaus.Schmidinger at cadsoft.de
Sun Dec 30 16:42:19 CET 2007
On 12/30/07 14:51, Reinhard Nissl wrote:
> Klaus Schmidinger schrieb:
>>> I also had a look into the hardware specification. It seems to me that
>>> the chip can be switched to a mode where it toggles between the fields
>>> automatically. But my coarse understanding of the driver tells me, that
>>> the driver doesn't make use of it.
>> I followed your lead on the FREEZE command and found that when I change the
>> driver's av7110_av.c like this:
>> --- av7110_av.c 2007-12-30 12:59:44.204192651 +0100
>> +++ av7110_av.c 2007-12-30 14:03:53.048848398 +0100
>> @@ -1125,6 +1125,7 @@
>> ret = play_iframe(av7110, pic->iFrame, pic->size,
>> file->f_flags & O_NONBLOCK);
>> + ret = vidcom(av7110, AV_VIDEO_CMD_FREEZE, 1);
>> I get a smooth still picture (might need some thought on what to actually
>> use as the 'ret' value). And also your test image field_test.mpg displays
>> as shown in your field_test.png (after some short flicker, which apparently
>> comes from the phase where the frame is sent several times to fill up the
>> card's buffer).
> I think sending the frame several times to the card should be omitted then.
Tried that, but that doesn't work. Apparently the buffer(s) need to be filled
up before anything is displayed. Maybe they could be filled with something
else than repeating the actual frame data, thus avoiding the short flicker?
> Do you think there is the need to distinguish between progressive still
> images and interlaced ones?
> It might be reasonable to show a frame picture for progressive images
> and only the last field picture for interlaced images.
I'm generating my images as "progressive" (at least that's what I think).
The command I'm using is
mpeg2enc -f 3 -b 12500 -a 2 -q 1 -n p -I 0
which gives the best results so far. If I use '-I 1' to have it "interlaced",
the result looks just the same on the tv screen.
More information about the vdr