[MPlayer-dev-eng] [PATCH] Unichrome XvMC VLD support
Michael Niedermayer
michaelni at gmx.at
Wed Sep 22 22:16:40 CEST 2004
Hi
On Wednesday 22 September 2004 15:55, Ivan Kalvachev wrote:
> On Tue, 21 Sep 2004 21:43:16 +0000
>
> Ivor Hewitt <ivor at ivor.org> wrote:
> > --- _main/libavcodec/mpeg12.c 2004-09-10 19:54:02.000000000 +0100
[...]
> > +#ifdef HAVE_XVMC_VLD
> > +extern int XVMC_VLD_field_start(MpegEncContext *s, AVCodecContext
*avctx);
> > +extern int XVMC_VLD_field_end(MpegEncContext *s);
> > +extern int XVMC_VLD_decode_slice(MpegEncContext *s, int start_code,
> > + uint8_t *buffer, int buf_size);
> > +#endif
these should be in some header file IMHO
> > + binfo.BHMV_range = (s->mpeg_f_code[1][0] - 1);
> > +
> > + Status status;
this wont compile with gcc 2.95
> > +//these functions should be called on every new field or/and frame
> > +//They should be safe if they are called few times for same field!
> > +int XVMC_VLD_field_start(MpegEncContext*s, AVCodecContext *avctx){
> > +xvmc_render_state_t * render;
please use doxygen compatible comments
> > + case B_TYPE:
> > + render->p_past_surface = findPastSurface(s, render);
> > + render->p_future_surface = findFutureSurface(s);
> > + if (!render->p_past_surface)
> > + av_log(avctx, AV_LOG_ERROR, "error: decoding B frame and
past frameis null!");
> > + else if (!render->p_future_surface)
> > + av_log(avctx, AV_LOG_ERROR, "error: decoding B frame and
future frame is null!");
> > + break;
> > +
> > + case P_TYPE:
> > + render->p_past_surface = findPastSurface(s, render);
> > + if (!render->p_past_surface)
> > + av_log(avctx, AV_LOG_ERROR, "error: decoding P frame and past
frameis null!");
typo 'frameis'
and why not:
----
case B_TYPE:
render->p_future_surface = findFutureSurface(s);
if (!render->p_future_surface) ...
case P_TYPE:
render->p_past_surface = ...
----
[...]
> Now about the whole VLD acceleration.
> I would be happy if I should not commit it.
> BTW it is good if you send the patch to FFmpeg-dev maillist
> so the project leader could say that he think about it. I guess
> he will be less happier than me:(
no, iam only unhappy if clean or fast code is messed up or slowed down, adding
independent new code which is messy isnt a problem, especially if its under
#ifdefs
> But if he accept it I will commit the whole patch.
feel free to commit it
[...]
--
Michael
level[i]= get_vlc(); i+=get_vlc(); (violates patent EP0266049)
median(mv[y-1][x], mv[y][x-1], mv[y+1][x+1]); (violates patent #5,905,535)
buf[i]= qp - buf[i-1]; (violates patent #?)
for more examples, see http://mplayerhq.hu/~michael/patent.html
stop it, see http://petition.eurolinux.org & http://petition.ffii.org/eubsa/en
More information about the MPlayer-dev-eng
mailing list