[Ffmpeg-devel] [BUG] coded_frame->quality not set?
Luca Abeni
lucabe72
Wed Oct 12 17:21:20 CEST 2005
Hello,
trying something like
output_example test.m4v
ffmpeg -i test.m4v test1.m4v
you'll see that ffmpeg always shows q=0.0
This is due to the fact that the coded_frame->quality field in
AVCodecContext (enc->coded_frame->quality in ffmpeg.c) is not updated.
I looked at the code, but I do not know the libavcodec internals
enough... I see that libavcodec/mpegvideo.c:encode_picture() sets
s->current_picture.quality (line 5363), and
libavcodec/mpegvideo.c:MPV_frame_end() (called by MPV_encode_picture)
sets s->avctx->coded_frame= (AVFrame*)s->current_picture_ptr;
But I am lost between current_picture, current_picture_ptr & friends...
Something like the attached patch "fixes" the problem (meaning that now
ffmpeg shows a reasonable value in "q="), but I doubt the patch is
correct... Anyway, maybe it can be useful to some ffmpeg expert to
understand where the problem is...
Does anyone have any clue?
Thanks,
Luca
--
_____________________________________________________________________________
Copy this in your signature, if you think it is important:
N O W A R ! ! !
-------------- next part --------------
A non-text attachment was scrubbed...
Name: quality.diff
Type: text/x-patch
Size: 587 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20051012/bf6498a0/attachment.bin>
More information about the ffmpeg-devel
mailing list