Re: How to convert a JPEG image to an I-frame?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 12/27/07 14:53, Reinhard Nissl wrote:
> Hi,
> 
> Klaus Schmidinger schrieb:
> 
>> When I display field_test.mpg via DeviceStillPicture() on my FF DVB card
>> I see a picture that has a top and a bottom half that rapidly flicker
>> black and white (top black, bottom white and vice versa).
> 
> I've just verified this behavior on my EPIA VDR in the living room
> (which is connected to a 50 Hz TV set) by taking a photo.
> 
> The photo shows that the white lines are quite thick -- there is no gap
> between them. And the black area is totally black, i. e. the white area
> from the previous field has vanished already.
> 
>> After like half a second the picture gets static, and the top half is
>> solid black, while the bottom half is solid white.
> 
> I had a look into the FF card's driver implementation. The driver simply
> repeats the still image data for some time. And from your report I
> guess, that the FF card automatically displays two fields for each frame
> it receives. When the driver stops sending frames, the FF card displays
> the last field forever.
> 
> 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 never see anything like the field_test.png you posted (with alternating
>> black and white lines).

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 @@
                dvb_ringbuffer_flush_spinlock_wakeup(&av7110->avout);
                ret = play_iframe(av7110, pic->iFrame, pic->size,
                                  file->f_flags & O_NONBLOCK);
+               ret = vidcom(av7110, AV_VIDEO_CMD_FREEZE, 1);
                break;
        }

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).

Klaus

_______________________________________________
vdr mailing list
vdr@xxxxxxxxxxx
http://www.linuxtv.org/cgi-bin/mailman/listinfo/vdr

[Index of Archives]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Util Linux NG]     [Xfree86]     [Big List of Linux Books]     [Fedora Users]     [Fedora Women]     [ALSA Devel]     [Linux USB]

  Powered by Linux