From patchwork Sun Dec 30 13:25:38 2007 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Klaus Schmidinger X-Patchwork-Id: 12562 Received: from raven.cadsoft.de ([217.7.101.211]) by www.linuxtv.org with esmtp (Exim 4.63) (envelope-from ) id 1J8yAe-0007zq-7R for vdr@linuxtv.org; Sun, 30 Dec 2007 14:25:40 +0100 Received: from [192.168.100.10] (hawk.cadsoft.de [192.168.100.10]) by raven.cadsoft.de (8.13.3/8.13.3) with ESMTP id lBUDPcBg026443 for ; Sun, 30 Dec 2007 14:25:38 +0100 Message-ID: <47779C52.80805@cadsoft.de> Date: Sun, 30 Dec 2007 14:25:38 +0100 From: Klaus Schmidinger Organization: CadSoft Computer GmbH User-Agent: Thunderbird 2.0.0.9 (X11/20070801) MIME-Version: 1.0 To: vdr@linuxtv.org References: <4729C1CC.2090703@cadsoft.de> <47370AEC.8020602@cadsoft.de> <47370FAE.4070903@gmx.de> <4737121E.7070001@cadsoft.de> <4737134B.8070307@cadsoft.de> <47371598.1000909@gmx.de> <4737182E.3040509@cadsoft.de> <47371A3C.6020803@gmx.de> <47371BCA.7040904@cadsoft.de> <473725C1.80605@gmx.de> <47372C39.2040904@cadsoft.de> <47372DD3.20201@gmx.de> <473756C6.1000702@cadsoft.de> <47376011.7010209@gmx.de> <4738E1B2.6060205@gmx.de> <477398FB.6010704@cadsoft.de> <4773AE40.3060609@gmx.de> In-Reply-To: <4773AE40.3060609@gmx.de> X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-2.0 (raven.cadsoft.de [192.168.1.1]); Sun, 30 Dec 2007 14:25:39 +0100 (CET) Subject: Re: [vdr] How to convert a JPEG image to an I-frame? X-BeenThere: vdr@linuxtv.org X-Mailman-Version: 2.1.9 Precedence: list Reply-To: VDR Mailing List List-Id: VDR Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 30 Dec 2007 13:25:40 -0000 Status: O X-Status: X-Keywords: X-UID: 14918 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: 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 --- 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; }