[FFmpeg-devel] [PATCH] Google WebP support
    Michael Niedermayer 
    michaelni
       
    Sun Oct 17 21:32:59 CEST 2010
    
    
  
On Tue, Oct 12, 2010 at 06:41:04PM -0700, Pascal Massimino wrote:
[...]
> Could it be that image2 should map to muxers in addition to codec?
iam not opposed if its simpler and cleaner than this
[...]
> @@ -245,7 +246,6 @@
>      }
>      if(st->codec->codec_type == AVMEDIA_TYPE_VIDEO && ap->pix_fmt != PIX_FMT_NONE)
>          st->codec->pix_fmt = ap->pix_fmt;
> -
>      return 0;
>  }
>  
shouldnt be in here
> @@ -295,6 +295,18 @@
iam a fan of diff -p for the function names it adds which makes it easier to
review
[...]
> @@ -314,6 +326,7 @@
>          s->img_number++;
>          return 0;
>      }
> +
>  }
>  
>  #if CONFIG_IMAGE2_MUXER || CONFIG_IMAGE2PIPE_MUXER
this also shouldnt be in here
> @@ -323,6 +336,7 @@
>  static int img_write_header(AVFormatContext *s)
>  {
>      VideoData *img = s->priv_data;
> +    int i;
>  
>      img->img_number = 1;
>      av_strlcpy(img->path, s->filename, sizeof(img->path));
> @@ -333,6 +347,14 @@
>      else
>          img->is_pipe = 1;
>  
> +    for (i = 0; i < s->nb_streams; ++i) {
> +        AVCodecContext *codec = s->streams[ i ]->codec;
> +        if (codec->codec_type == AVMEDIA_TYPE_VIDEO &&
> +            codec->codec_id == CODEC_ID_VP8) {
> +                codec->gop_size = 1;  /* force keyframe only */
thats a bit ugly, muxers cannot change encoder parameters
its not even guranteed to have any effect on the encoder and we dont even know
if there is a encoder or if the source is a vp8 file
[...]
-- 
Michael     GnuPG fingerprint: 9FF2128B147EF6730BADF133611EC787040B0FAB
Let us carefully observe those good qualities wherein our enemies excel us
and endeavor to excel them, by avoiding what is faulty, and imitating what
is excellent in them. -- Plutarch
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20101017/79496168/attachment.pgp>
    
    
More information about the ffmpeg-devel
mailing list