[MPlayer-dev-eng] [PATCH] dvdnav

Ötvös Attila oattila at chello.hu
Mon Jul 16 21:48:59 CEST 2007


2007. július 16. 21.01 dátummal Benjamin Zores ezt írta:

Hi Ben!
> Wouldn't it be possible to have one unique status variable in structure
> and get/set bits for all these stuff instead of adding new integer
> variables each time ?
>
Thanks. This is a good idea.

>   > +#ifdef USE_DVDNAV
> >
> > +#include "libmpcodecs/img_format.h"
> > +#include "libmpcodecs/mp_image.h"
> > +#include "libvo/fastmemcpy.h"
> > +// vo color mode:
> > +// -1 : no settings
> > +//  0 : Y
> > +//  1 : YUV
> > +//  2 : RGB
> > +//  3 : BGR
> > +//  4 : YUYV
> > +int dvdnav_color_spu_flg = -1;
> > +// enable/disable SPU menu button
> > +int dvdnav_color_spu = 1;
> > +
> > +unsigned char emptyframe[371] = {
> > +   
> > 0x00,0x00,0x01,0x00,0x03,0x17,0xff,0xfb,0x80,0x00,0x00,0x01,0xb5,0x81,0x1
> >f,0xf3, +   
> > 0x41,0x80,0x00,0x00,0x01,0x01,0x12,0x70,0x10,0x14,0x70,0x00,0x00,0x01,0x0
> >2,0x12, +   
> > 0x70,0x10,0x14,0x70,0x00,0x00,0x01,0x03,0x12,0x70,0x10,0x14,0x70,0x00,0x0
> >0,0x01, +   
> > 0x04,0x12,0x70,0x10,0x14,0x70,0x00,0x00,0x01,0x05,0x12,0x70,0x10,0x14,0x7
> >0,0x00, +   
> > 0x00,0x01,0x06,0x12,0x70,0x10,0x14,0x70,0x00,0x00,0x01,0x07,0x12,0x70,0x1
> >0,0x14, +   
> > 0x70,0x00,0x00,0x01,0x08,0x12,0x76,0xe1,0x3a,0x01,0x01,0x8e,0x00,0x00,0x0
> >1,0x09, +   
> > 0x12,0x70,0x10,0x14,0x70,0x00,0x00,0x01,0x0a,0x12,0x70,0x10,0x14,0x70,0x0
> >0,0x00, +   
> > 0x01,0x0b,0x12,0x70,0x10,0x14,0x70,0x00,0x00,0x01,0x0c,0x12,0x70,0x38,0xe
> >1,0x3e, +   
> > 0x06,0x38,0x00,0x00,0x01,0x0d,0x12,0x70,0x10,0x26,0x80,0xe4,0x67,0x00,0x0
> >0,0x01, +   
> > 0x0e,0x12,0x70,0x10,0x14,0x70,0x00,0x00,0x01,0x0f,0x12,0x70,0x10,0x14,0x7
> >0,0x00, +   
> > 0x00,0x01,0x10,0x12,0x70,0x49,0xd0,0x67,0xff,0xf8,0x11,0x1c,0x00,0x00,0x0
> >1,0x11, +   
> > 0x12,0x70,0x11,0x70,0x0e,0x41,0x67,0x00,0x00,0x01,0x12,0x12,0x74,0xe8,0x1
> >c,0x93, +   
> > 0x40,0xce,0x00,0x30,0x08,0x23,0x80,0x00,0x00,0x01,0x13,0x12,0x70,0x67,0x0
> >0,0xec, +   
> > 0x07,0x0e,0x00,0x00,0x01,0x14,0x12,0x70,0x10,0x14,0x70,0x00,0x00,0x01,0x1
> >5,0x12, +   
> > 0x70,0x4d,0xa0,0x39,0x02,0x13,0x80,0x00,0x00,0x01,0x16,0x12,0x70,0x55,0xa
> >0,0x3b, +   
> > 0x01,0xf3,0x80,0x00,0x00,0x01,0x17,0x12,0x70,0x10,0x14,0x70,0x00,0x00,0x0
> >1,0x18, +   
> > 0x12,0x70,0x10,0x14,0x70,0x00,0x00,0x01,0x19,0x12,0x70,0x10,0x14,0x70,0x0
> >0,0x00, +   
> > 0x01,0x1a,0x12,0x70,0x10,0x14,0x70,0x00,0x00,0x01,0x1b,0x12,0x70,0x10,0x1
> >4,0x70, +   
> > 0x00,0x00,0x01,0x1c,0x12,0x70,0x10,0x14,0x70,0x00,0x00,0x01,0x1d,0x12,0x7
> >0,0x10, +   
> > 0x14,0x70,0x00,0x00,0x01,0x1e,0x12,0x70,0x10,0x6e,0x13,0xe1,0x1c,0x00,0x0
> >0,0x01, +   
> > 0x1f,0x12,0x70,0x10,0x14,0x70,0x00,0x00,0x01,0x20,0x12,0x70,0x10,0x14,0x7
> >0,0x00, +   
> > 0x00,0x01,0x21,0x12,0x70,0x10,0x14,0x70,0x00,0x00,0x01,0x22,0x12,0x70,0x1
> >0,0x14, +   
> > 0x70,0x00,0x00,0x01,0x23,0x12,0x70,0x10,0x14,0x70,0x00,0x00,0x01,0x24,0x1
> >2,0x70, +    0x10,0x14,0x70};
> > +#endif
>
> What the hell is that ??
> Don't tell me it's an empty frame, I can read that and I guess you're
> implementing still frames through this stuff but I don't even have a
> slightest clue where this values can come from.
>

I asked a help at 9. marc 2007 that be able to replace the emptyframe:
http://archives.free.net.ph/message/20070308.232541.d016693d.en.html

The problem is if there is one frame then decode frame will be unsuccessfull. 
It works with the emptyframe.

+static void* mp_dvdnav_decode_video_post(int in_size, unsigned char *start,
+        mp_image_t* decoded_frame, sh_video_t *sh_video, int drop_frame) {
...
+                if(!decoded_frame && mpctx->last_buffer) {          
// unsuccessful decode video frame
+                    start=mpctx->last_start;                        
// probe with empty frame ???!!!!
+                    memcpy(start,emptyframe,sizeof(emptyframe));
+                    in_size=sizeof(emptyframe);
+                    decoded_frame = decode_video(sh_video, start, in_size, 
drop_frame,
+                        sh_video->pts);
+                    }
+                   }


Attila



More information about the MPlayer-dev-eng mailing list