[FFmpeg-devel] Google Summer of Code participation

Michael Niedermayer michaelni
Fri Apr 3 18:08:34 CEST 2009


On Fri, Apr 03, 2009 at 05:44:41PM +0200, Thilo Borgmann wrote:
>
>
> Michael Niedermayer schrieb:
>>
>>
>> decode_frame() should be changed not a new one added.
>>
>>
>> [...]
>>   
>>
>> indention if totally off
>>
>>
>>   avcodec_decode_video() should call avcodec_decode_video2()
>>
>>
>>
>> [...]
>>
>>   
>
> I've appended revision 1 of the patch correcting all remarks.
[...]
> diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
> index 4d03223..4c8738d 100644
> --- a/libavcodec/h263dec.c
> +++ b/libavcodec/h263dec.c
> @@ -331,8 +331,10 @@ static int decode_slice(MpegEncContext *s){
>  
>  int ff_h263_decode_frame(AVCodecContext *avctx,
>                               void *data, int *data_size,
> -                             const uint8_t *buf, int buf_size)
> +                             AVPacket *avpkt)
>  {
> +    const uint8_t *buf = avpkt->data;
> +    int buf_size = avpkt->size;
>      MpegEncContext *s = avctx->priv_data;
>      int ret;
>      AVFrame *pict = data;
> @@ -751,7 +753,7 @@ AVCodec h263_decoder = {
>      ff_h263_decode_init,
>      NULL,
>      ff_h263_decode_end,
> -    ff_h263_decode_frame,
> +    ff_h263_decode_frame2,
>      CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1 | CODEC_CAP_TRUNCATED | CODEC_CAP_DELAY,
>      .flush= ff_mpeg_flush,
>      .long_name= NULL_IF_CONFIG_SMALL("H.263 / H.263-1996, H.263+ / H.263-1998 / H.263 version 2"),
> @@ -766,7 +768,7 @@ AVCodec msmpeg4v1_decoder = {
>      ff_h263_decode_init,
>      NULL,
>      ff_h263_decode_end,
> -    ff_h263_decode_frame,
> +    ff_h263_decode_frame2,
>      CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
>      .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 1"),
>      .pix_fmts= ff_pixfmt_list_420,
> @@ -780,7 +782,7 @@ AVCodec msmpeg4v2_decoder = {
>      ff_h263_decode_init,
>      NULL,
>      ff_h263_decode_end,
> -    ff_h263_decode_frame,
> +    ff_h263_decode_frame2,
>      CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
>      .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 2"),
>      .pix_fmts= ff_pixfmt_list_420,
> @@ -794,7 +796,7 @@ AVCodec msmpeg4v3_decoder = {
>      ff_h263_decode_init,
>      NULL,
>      ff_h263_decode_end,
> -    ff_h263_decode_frame,
> +    ff_h263_decode_frame2,
>      CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
>      .long_name= NULL_IF_CONFIG_SMALL("MPEG-4 part 2 Microsoft variant version 3"),
>      .pix_fmts= ff_pixfmt_list_420,
> @@ -808,7 +810,7 @@ AVCodec wmv1_decoder = {
>      ff_h263_decode_init,
>      NULL,
>      ff_h263_decode_end,
> -    ff_h263_decode_frame,
> +    ff_h263_decode_frame2,
>      CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
>      .long_name= NULL_IF_CONFIG_SMALL("Windows Media Video 7"),
>      .pix_fmts= ff_pixfmt_list_420,
> @@ -822,7 +824,7 @@ AVCodec h263i_decoder = {
>      ff_h263_decode_init,
>      NULL,
>      ff_h263_decode_end,
> -    ff_h263_decode_frame,
> +    ff_h263_decode_frame2,
>      CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
>      .long_name = NULL_IF_CONFIG_SMALL("Intel H.263"),
>      .pix_fmts= ff_pixfmt_list_420,
> @@ -836,7 +838,7 @@ AVCodec flv_decoder = {
>      ff_h263_decode_init,
>      NULL,
>      ff_h263_decode_end,
> -    ff_h263_decode_frame,
> +    ff_h263_decode_frame2,
>      CODEC_CAP_DRAW_HORIZ_BAND | CODEC_CAP_DR1,
>      .long_name= NULL_IF_CONFIG_SMALL("Flash Video (FLV)"),
>      .pix_fmts= ff_pixfmt_list_420,

ff_h263_decode_frame2 ?
have you even tried to compile this?

please make sure 
make && make test 
works before submitting patches

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

Why not whip the teacher when the pupil misbehaves? -- Diogenes of Sinope
-------------- 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/20090403/588dbff8/attachment.pgp>



More information about the ffmpeg-devel mailing list