Hi Luca! On Thu, 2007-01-25 at 16:28 +0100, Luca Abeni wrote: > Hi, > > I finally found some time to play with ffh264 again, and I found out > that it sets avctx->coded_frame to NULL. > Since ffmpeg.c contains code for supporting this situation, I assume > that avctx->coded_frame == NULL is valid. But this makes impossible to > know the frame quality, the frame type, and to recognize key frames. > > So, I tried to add support for coded_frame... I came up with the > attached patch, but I do not know if it is correct (in particular, is it > ok to set coded_frame = &t->po?). > > After applying this patch ffmpeg shows a reasonable "q=" value while > encoding (I hope it is correct). It seems to be correct, as I compared the shown q with the QP set in the encoder by the bitrate controller, and they are identical. > I am not setting coded_frame->pts yet, > but I expect that something like avctx->coded_frame->pts = ((AVFrame > *)data)->pts should work... > > Finally, when preparing this patch I had some doubts about t->po: if I > understand it correctly, t->po contains the encoded frame... Is this > right? If yes, why is it allocated with > "avpicture_alloc(&t->po, avctx->pix_fmt, width, height);", implying that > it contains non-compressed video? Also, why not directly allocating > t->po_data0 instead of allocating t->po and doing t->po_data0 = > (uint8_t *)t->po.data[0];? > Sorry for the dumb question; I'm just trying to get acquited with the > code... Thanks for the patch!!! With friendly regards, Takis -- vCard: http://www.issaris.org/pi.vcf Public key: http://www.issaris.org/pi.key -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070129/86f4842e/attachment.pgp>
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4