Hi,

that came out of nowhere - cool stuff!

On Mon, Aug 15, 2011 at 2:12 PM, Alberto Delmás <adel...@gmail.com> wrote:
> @@ -208,6 +208,7 @@ enum CodecID {
>      CODEC_ID_PRORES,
>      CODEC_ID_JV,
>      CODEC_ID_DFA,
> +    CODEC_ID_WMIMAGE,

So later on, I see you relying on codec_tag to distinguish between
WVP2/WMVP. I'd prefer (although I do admit it sucks) that you use
separate codecIDs instead for WVP2 vs WMVP (just like WMV3 vs VC1),
just so that things like muxing into different container formats
becomes at least theoretically possible.

>  static void free_frame_buffer(MpegEncContext *s, Picture *pic)
>  {
> -    ff_thread_release_buffer(s->avctx, (AVFrame*)pic);
> +    /* WMImage codecs allocate internal buffers with different dimensions;
> +       ignore user defined callbacks for these */
> +    if (!s->codec_id == CODEC_ID_WMIMAGE)
> +        ff_thread_release_buffer(s->avctx, (AVFrame*)pic);
> +    else
> +        avcodec_default_release_buffer(s->avctx, (AVFrame*)pic);
>      av_freep(&pic->f.hwaccel_picture_private);
>  }

Could you elaborate here?

> @@ -2317,7 +2325,7 @@ void ff_draw_horiz_band(MpegEncContext *s, int y, int 
> h){
>
>      if(field_pic && s->first_field && 
> !(s->avctx->slice_flags&SLICE_FLAG_ALLOW_FIELD)) return;
>
> -    if (s->avctx->draw_horiz_band) {
> +    if (s->avctx->draw_horiz_band && s->codec_id != CODEC_ID_WMIMAGE) {

Removing CODEC_CAP_FLAG_HORIZ_BAND from the AVCodec should be sufficient, right?

> +typedef struct {
> +    float coefs[2][7];
> +    int effect_type, effect_flag, effect_pcount1, effect_pcount2;
> +    float effect_params1[14], effect_params2[10];
> +} SpriteData;
[..]
>  static inline float get_float_val(GetBitContext* gb)
>  {
> -    return (float)get_bits_long(gb, 30) / (1<<15) - (1<<14);
> +    return (float)(get_bits_long(gb, 30) - (1<<29)) / (1<<15) ;
>  }

Can you please document the struct members, and also is float really
the best thing here? I gather that they're not actually floats in the
bitstream, just fixed point values with some fractional meaning.

How many files decode with this code? I see a lot of
not-implemented/ask-for-sample code, is it just that the specs allow
for much more than the binary decoder uses, or do existing sample
files just use a small subset of binary decoder features?

Ronald
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to