Mercurial > mplayer.hg
annotate libmpcodecs/vd_real.c @ 6542:7af3fcd76d2d
support dropping some chroma src lines for a bit extra speed
author | michael |
---|---|
date | Mon, 24 Jun 2002 01:05:41 +0000 |
parents | 83b3315c679b |
children | 70a9c9f695a2 |
rev | line source |
---|---|
6360 | 1 //#define USE_WIN32_REAL_CODECS |
2 | |
6341
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
3 #include <stdio.h> |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
4 #include <stdlib.h> |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
5 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
6 #include "config.h" |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
7 #ifdef USE_REALCODECS |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
8 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
9 #include <dlfcn.h> |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
10 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
11 #include "mp_msg.h" |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
12 #include "help_mp.h" |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
13 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
14 #include "vd_internal.h" |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
15 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
16 static vd_info_t info = { |
6404
83b3315c679b
Implement Nilmoni's and Bernd Ernesti's patches for:
atmos4
parents:
6361
diff
changeset
|
17 "RealVideo decoder", |
6341
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
18 "real", |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
19 VFM_REAL, |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
20 "Florian Schneider", |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
21 "using original closed source codecs for Linux", |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
22 "binary real video codecs" |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
23 }; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
24 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
25 LIBVD_EXTERN(real) |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
26 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
27 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
28 typedef unsigned long ulong; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
29 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
30 ulong (*rvyuv_custom_message)(ulong,ulong); |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
31 ulong (*rvyuv_free)(ulong); |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
32 ulong (*rvyuv_hive_message)(ulong,ulong); |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
33 ulong (*rvyuv_init)(ulong,ulong); |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
34 ulong (*rvyuv_transform)(ulong,ulong,ulong,ulong,ulong); |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
35 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
36 void *rv_handle=NULL; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
37 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
38 void *__builtin_vec_new(unsigned long size) { |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
39 return malloc(size); |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
40 } |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
41 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
42 void __builtin_vec_delete(void *mem) { |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
43 free(mem); |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
44 } |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
45 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
46 void __pure_virtual(void) { |
6361 | 47 printf("FATAL: __pure_virtual() called!\n"); |
48 // exit(1); | |
6341
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
49 } |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
50 |
6404
83b3315c679b
Implement Nilmoni's and Bernd Ernesti's patches for:
atmos4
parents:
6361
diff
changeset
|
51 #if defined(__FreeBSD__) || defined(__NetBSD__) |
6361 | 52 void ___brk_addr(void) {exit(0);} |
6404
83b3315c679b
Implement Nilmoni's and Bernd Ernesti's patches for:
atmos4
parents:
6361
diff
changeset
|
53 char **__environ={NULL}; |
6361 | 54 #undef stderr |
6404
83b3315c679b
Implement Nilmoni's and Bernd Ernesti's patches for:
atmos4
parents:
6361
diff
changeset
|
55 FILE *stderr=NULL; |
6361 | 56 #endif |
6341
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
57 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
58 // to set/get/query special features/parameters |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
59 static int control(sh_video_t *sh,int cmd,void* arg,...){ |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
60 // switch(cmd){ |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
61 // case VDCTRL_QUERY_MAX_PP_LEVEL: |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
62 // return 9; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
63 // case VDCTRL_SET_PP_LEVEL: |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
64 // vfw_set_postproc(sh,10*(*((int*)arg))); |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
65 // return CONTROL_OK; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
66 // } |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
67 return CONTROL_UNKNOWN; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
68 } |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
69 |
6360 | 70 #ifndef USE_WIN32_REAL_CODECS |
71 | |
6341
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
72 /* exits program when failure */ |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
73 int load_syms(char *path) { |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
74 void *handle; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
75 char *error; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
76 |
6361 | 77 mp_msg(MSGT_DECVIDEO,MSGL_INFO, "opening shared obj '%s'\n", path); |
6341
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
78 rv_handle = dlopen (path, RTLD_LAZY); |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
79 handle=rv_handle; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
80 if (!handle) { |
6361 | 81 mp_msg(MSGT_DECVIDEO,MSGL_WARN,"Error: %s\n",dlerror()); |
6341
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
82 return 0; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
83 } |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
84 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
85 rvyuv_custom_message = dlsym(handle, "RV20toYUV420CustomMessage"); |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
86 rvyuv_free = dlsym(handle, "RV20toYUV420Free"); |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
87 rvyuv_hive_message = dlsym(handle, "RV20toYUV420HiveMessage"); |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
88 rvyuv_init = dlsym(handle, "RV20toYUV420Init"); |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
89 rvyuv_transform = dlsym(handle, "RV20toYUV420Transform"); |
6361 | 90 |
91 if(rvyuv_custom_message && | |
92 rvyuv_free && | |
93 rvyuv_hive_message && | |
94 rvyuv_init && | |
95 rvyuv_transform) return 1; | |
96 | |
97 mp_msg(MSGT_DECVIDEO,MSGL_WARN,"Error resolving symbols! (version incompatibility?)\n"); | |
98 return 0; | |
6341
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
99 } |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
100 |
6360 | 101 #else |
102 | |
103 int load_syms(char *path) { | |
104 void *handle; | |
105 Setup_LDT_Keeper(); | |
106 rv_handle = handle = LoadLibraryA(path); | |
6361 | 107 mp_msg(MSGT_DECVIDEO,MSGL_V,"win32 real codec handle=%p \n",handle); |
6360 | 108 |
109 rvyuv_custom_message = GetProcAddress(handle, "RV20toYUV420CustomMessage"); | |
110 rvyuv_free = GetProcAddress(handle, "RV20toYUV420Free"); | |
111 rvyuv_hive_message = GetProcAddress(handle, "RV20toYUV420HiveMessage"); | |
112 rvyuv_init = GetProcAddress(handle, "RV20toYUV420Init"); | |
113 rvyuv_transform = GetProcAddress(handle, "RV20toYUV420Transform"); | |
114 | |
115 if(rvyuv_custom_message && | |
116 rvyuv_free && | |
117 rvyuv_hive_message && | |
118 rvyuv_init && | |
119 rvyuv_transform) return 1; | |
120 return 0; // error | |
121 } | |
122 | |
123 #endif | |
124 | |
6341
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
125 /* we need exact positions */ |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
126 struct rv_init_t { |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
127 short unk1; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
128 short w; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
129 short h; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
130 short unk3; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
131 int unk2; |
6345 | 132 int subformat; |
6341
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
133 int unk5; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
134 int format; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
135 } rv_init_t; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
136 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
137 // init driver |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
138 static int init(sh_video_t *sh){ |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
139 //unsigned int out_fmt; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
140 char path[4096]; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
141 int result; |
6345 | 142 // we export codec id and sub-id from demuxer in bitmapinfohdr: |
143 unsigned int* extrahdr=(unsigned int*)(sh->bih+1); | |
6341
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
144 struct rv_init_t init_data={ |
6345 | 145 11, sh->disp_w, sh->disp_h,0,0,extrahdr[0], |
146 1,extrahdr[1]}; // rv30 | |
147 | |
148 mp_msg(MSGT_DECVIDEO,MSGL_V,"realvideo codec id: 0x%08X sub-id: 0x%08X\n",extrahdr[1],extrahdr[0]); | |
6341
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
149 |
6404
83b3315c679b
Implement Nilmoni's and Bernd Ernesti's patches for:
atmos4
parents:
6361
diff
changeset
|
150 sprintf(path, REALCODEC_PATH "/%s", sh->codec->dll); |
6341
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
151 if(!load_syms(path)){ |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
152 mp_msg(MSGT_DECVIDEO,MSGL_ERR,MSGTR_MissingDLLcodec,sh->codec->dll); |
6404
83b3315c679b
Implement Nilmoni's and Bernd Ernesti's patches for:
atmos4
parents:
6361
diff
changeset
|
153 mp_msg(MSGT_DECVIDEO,MSGL_HINT,"You need to copy the contents from the RealPlayer codecs directory\n"); |
83b3315c679b
Implement Nilmoni's and Bernd Ernesti's patches for:
atmos4
parents:
6361
diff
changeset
|
154 mp_msg(MSGT_DECVIDEO,MSGL_HINT,"into " REALCODEC_PATH "/ !\n"); |
6341
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
155 return 0; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
156 } |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
157 // only I420 supported |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
158 if(!mpcodecs_config_vo(sh,sh->disp_w,sh->disp_h,IMGFMT_I420)) return 0; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
159 // init codec: |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
160 sh->context=NULL; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
161 result=(*rvyuv_init)(&init_data, &sh->context); |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
162 if (result){ |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
163 mp_msg(MSGT_DECVIDEO,MSGL_ERR,"Couldn't open RealVideo codec, error code: 0x%X \n",result); |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
164 return 0; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
165 } |
6345 | 166 // setup rv30 codec (codec sub-type and image dimensions): |
167 if(extrahdr[1]>=0x30000000){ | |
168 ulong cmsg24[4]={sh->disp_w,sh->disp_h,sh->disp_w,sh->disp_h}; | |
6354 | 169 ulong cmsg_data[3]={0x24,1+((extrahdr[0]>>16)&7),&cmsg24}; |
6345 | 170 (*rvyuv_custom_message)(cmsg_data,sh->context); |
171 } | |
6341
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
172 mp_msg(MSGT_DECVIDEO,MSGL_V,"INFO: RealVideo codec init OK!\n"); |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
173 return 1; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
174 } |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
175 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
176 // uninit driver |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
177 static void uninit(sh_video_t *sh){ |
6345 | 178 if(rv_handle) dlclose(rv_handle); |
179 rv_handle=NULL; | |
6341
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
180 } |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
181 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
182 // decode a frame |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
183 static mp_image_t* decode(sh_video_t *sh,void* data,int len,int flags){ |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
184 mp_image_t* mpi; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
185 ulong result; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
186 int *buff=(unsigned int *)((char*)data+len); |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
187 ulong transform_out[5]; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
188 ulong transform_in[6]={ |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
189 len, // length of the packet (sub-packets appended) |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
190 0, // unknown, seems to be unused |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
191 buff[0], // number of sub-packets - 1 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
192 &buff[2], // table of sub-packet offsets |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
193 0, // unknown, seems to be unused |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
194 buff[1], // timestamp (the integer value from the stream) |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
195 }; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
196 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
197 if(len<=0 || flags&2) return NULL; // skipped frame || hardframedrop |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
198 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
199 mpi=mpcodecs_get_image(sh, MP_IMGTYPE_TEMP, 0 /*MP_IMGFLAG_ACCEPT_STRIDE*/, |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
200 sh->disp_w, sh->disp_h); |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
201 if(!mpi) return NULL; |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
202 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
203 result=(*rvyuv_transform)(data, mpi->planes[0], transform_in, |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
204 transform_out, sh->context); |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
205 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
206 return (result?NULL:mpi); |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
207 } |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
208 |
d79c52610702
RealVideo rv30 decoder, using binary driver from realplayer8
arpi
parents:
diff
changeset
|
209 #endif |