[FFmpeg-devel] Google Summer of Code participation

Michael Niedermayer michaelni
Wed Apr 1 22:45:05 CEST 2009


On Wed, Apr 01, 2009 at 10:13:12PM +0200, Thilo Borgmann wrote:
> Ok here is a patch which shows my proposals. Remark: This is not meant to 
> be applied, just reviewed... so no need to point at the wrong indents at 
> some places and such....
>
> I forgot to mention that there are three little workarounds in 
> libavcodec/avcodec.h and libavutils/utils.c. They do also call the decoding 
> function and have to do this using the new AVPacket version. Therefore a 
> dummy AVPacket is created, .data and .size set and the AVPacket is then 
> passed to the decoder.
> Finally, these functions have to be updated up to the application layer 
> (ffplay.c, ffmpeg.c) as the avcodec_decode_video() function had to.
>
> As I said, this already works for the two altered decoders (pngdec.c & 
> pcm.c).
>
> Well I've also thought about the struct-expansion-Null-checking idea... 
> ehm... let's make it right from the beginning. If my qualification fails, 
> there will be at least some benefit for FFmpeg. If no one volunteers, I 
> will alter the codecs.
>
> TB

> Index: ffmpeg.c
> ===================================================================
> --- ffmpeg.c	(Revision 18211)
> +++ ffmpeg.c	(Arbeitskopie)
> @@ -1246,7 +1246,7 @@
>                      avcodec_get_frame_defaults(&picture);
>  
>                      ret = avcodec_decode_video(ist->st->codec,
> -                                               &picture, &got_picture, ptr, len);
> +                                               &picture, &got_picture, pkt);

avcodec_decode_video2() otherwise ABI breaks

[...]
> Index: libavcodec/avcodec.h
> ===================================================================
> --- libavcodec/avcodec.h	(Revision 18211)
> +++ libavcodec/avcodec.h	(Arbeitskopie)
> @@ -842,6 +842,57 @@
>  #define FF_BUFFER_HINTS_PRESERVE 0x04 // User must not alter buffer content.
>  #define FF_BUFFER_HINTS_REUSABLE 0x08 // Codec will reuse the buffer (update).
>  
> +
> +typedef struct AVPacket {
> +    /**
> +     * Presentation timestamp in time_base units; the time at which the

moving AVPacket should be a seperate  patch


[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB

He who knows, does not speak. He who speaks, does not know. -- Lao Tsu
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20090401/df79ff81/attachment.pgp>



More information about the ffmpeg-devel mailing list