Mercurial > mplayer.hg
annotate libmpcodecs/vd.c @ 5263:da664f9894e8
added zlib support
author | alex |
---|---|
date | Fri, 22 Mar 2002 22:12:09 +0000 |
parents | 3e04fd1074d3 |
children | d3846ebe974d |
rev | line source |
---|---|
4878 | 1 #include <stdio.h> |
2 #include <stdlib.h> | |
3 #include <string.h> | |
4 | |
5 #include "config.h" | |
6 #include "mp_msg.h" | |
5075 | 7 #include "help_mp.h" |
4878 | 8 |
9 #ifdef HAVE_MALLOC_H | |
10 #include <malloc.h> | |
11 #endif | |
12 | |
13 #include "codec-cfg.h" | |
14 //#include "mp_image.h" | |
15 | |
16 #include "../libvo/img_format.h" | |
17 | |
18 #include "stream.h" | |
19 #include "demuxer.h" | |
20 #include "stheader.h" | |
21 | |
22 #include "vd.h" | |
23 //#include "vd_internal.h" | |
24 | |
25 extern vd_functions_t mpcodecs_vd_null; | |
4885 | 26 extern vd_functions_t mpcodecs_vd_cinepak; |
4915
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
4899
diff
changeset
|
27 extern vd_functions_t mpcodecs_vd_qtrpza; |
4951 | 28 extern vd_functions_t mpcodecs_vd_ffmpeg; |
4958 | 29 extern vd_functions_t mpcodecs_vd_dshow; |
4968 | 30 extern vd_functions_t mpcodecs_vd_vfw; |
31 extern vd_functions_t mpcodecs_vd_vfwex; | |
32 extern vd_functions_t mpcodecs_vd_odivx; | |
33 extern vd_functions_t mpcodecs_vd_divx4; | |
4969 | 34 extern vd_functions_t mpcodecs_vd_raw; |
35 extern vd_functions_t mpcodecs_vd_xanim; | |
5193
abea2deab4d6
MPlayer now has a Microsoft RLE decoder to call its own...only supports
melanson
parents:
5180
diff
changeset
|
36 extern vd_functions_t mpcodecs_vd_msrle; |
4987 | 37 extern vd_functions_t mpcodecs_vd_msvidc; |
38 extern vd_functions_t mpcodecs_vd_fli; | |
4989 | 39 extern vd_functions_t mpcodecs_vd_qtrle; |
40 extern vd_functions_t mpcodecs_vd_qtsmc; | |
41 extern vd_functions_t mpcodecs_vd_roqvideo; | |
42 extern vd_functions_t mpcodecs_vd_cyuv; | |
43 extern vd_functions_t mpcodecs_vd_nuv; | |
4998 | 44 extern vd_functions_t mpcodecs_vd_mpng; |
5029 | 45 extern vd_functions_t mpcodecs_vd_ijpg; |
4998 | 46 extern vd_functions_t mpcodecs_vd_libmpeg2; |
5235
3e04fd1074d3
added HuffYUV support, courtesy of Roberto Togni <rtogni@bresciaonline.it>
melanson
parents:
5224
diff
changeset
|
47 extern vd_functions_t mpcodecs_vd_huffyuv; |
4878 | 48 |
49 vd_functions_t* mpcodecs_vd_drivers[] = { | |
50 &mpcodecs_vd_null, | |
4884 | 51 &mpcodecs_vd_cinepak, |
4915
f6990fad0ab3
Qt RPZA decoder interface by Roberto Togni <rtogni@bresciaonline.it>
arpi
parents:
4899
diff
changeset
|
52 &mpcodecs_vd_qtrpza, |
4951 | 53 #ifdef USE_LIBAVCODEC |
54 &mpcodecs_vd_ffmpeg, | |
55 #endif | |
4968 | 56 #ifdef USE_WIN32DLL |
4958 | 57 #ifdef USE_DIRECTSHOW |
58 &mpcodecs_vd_dshow, | |
59 #endif | |
4968 | 60 &mpcodecs_vd_vfw, |
61 &mpcodecs_vd_vfwex, | |
62 #endif | |
63 #ifdef USE_DIVX | |
64 &mpcodecs_vd_odivx, | |
65 #ifdef NEW_DECORE | |
66 &mpcodecs_vd_divx4, | |
67 #endif | |
68 #endif | |
4969 | 69 &mpcodecs_vd_raw, |
5193
abea2deab4d6
MPlayer now has a Microsoft RLE decoder to call its own...only supports
melanson
parents:
5180
diff
changeset
|
70 &mpcodecs_vd_msrle, |
4987 | 71 &mpcodecs_vd_msvidc, |
72 &mpcodecs_vd_fli, | |
4989 | 73 &mpcodecs_vd_qtrle, |
74 &mpcodecs_vd_qtsmc, | |
75 &mpcodecs_vd_roqvideo, | |
76 &mpcodecs_vd_cyuv, | |
77 &mpcodecs_vd_nuv, | |
4969 | 78 #ifdef USE_XANIM |
79 &mpcodecs_vd_xanim, | |
80 #endif | |
4998 | 81 #ifdef HAVE_PNG |
82 &mpcodecs_vd_mpng, | |
83 #endif | |
5029 | 84 #ifdef HAVE_JPEG |
85 &mpcodecs_vd_ijpg, | |
86 #endif | |
4998 | 87 &mpcodecs_vd_libmpeg2, |
5235
3e04fd1074d3
added HuffYUV support, courtesy of Roberto Togni <rtogni@bresciaonline.it>
melanson
parents:
5224
diff
changeset
|
88 &mpcodecs_vd_huffyuv, |
4878 | 89 NULL |
90 }; | |
91 | |
4971 | 92 #include "libvo/video_out.h" |
5224 | 93 extern int vo_directrendering; |
4971 | 94 |
5075 | 95 // libvo opts: |
96 int fullscreen=0; | |
97 int vidmode=0; | |
98 int softzoom=0; | |
99 int flip=-1; | |
100 int opt_screen_size_x=0; | |
101 int opt_screen_size_y=0; | |
102 int screen_size_xy=0; | |
103 float movie_aspect=-1.0; | |
104 int vo_flags=0; | |
105 | |
106 static vo_tune_info_t vtune; | |
107 | |
5156
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
108 static mp_image_t* static_images[2]; |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
109 static mp_image_t* temp_images[1]; |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
110 static mp_image_t* export_images[1]; |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
111 static int static_idx=0; |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
112 |
5180 | 113 extern vd_functions_t* mpvdec; // FIXME! |
114 | |
4878 | 115 int mpcodecs_config_vo(sh_video_t *sh, int w, int h, unsigned int preferred_outfmt){ |
5131
cff03e88d331
prefer outfmt with no conversion (see vo's query flags)
arpi
parents:
5077
diff
changeset
|
116 int i,j; |
5075 | 117 unsigned int out_fmt=0; |
118 int screen_size_x=0;//SCREEN_SIZE_X; | |
119 int screen_size_y=0;//SCREEN_SIZE_Y; | |
120 vo_functions_t* video_out=sh->video_out; | |
121 | |
5004 | 122 mp_msg(MSGT_DECVIDEO,MSGL_INFO,"VDec: vo config request - %d x %d, %s \n", |
123 w,h,vo_format_name(preferred_outfmt)); | |
5075 | 124 |
5077 | 125 if(!video_out) return 1; // temp hack |
126 | |
5131
cff03e88d331
prefer outfmt with no conversion (see vo's query flags)
arpi
parents:
5077
diff
changeset
|
127 // check if libvo and codec has common outfmt (no conversion): |
cff03e88d331
prefer outfmt with no conversion (see vo's query flags)
arpi
parents:
5077
diff
changeset
|
128 j=-1; |
5075 | 129 for(i=0;i<CODECS_MAX_OUTFMT;i++){ |
130 out_fmt=sh->codec->outfmt[i]; | |
131 if(out_fmt==(signed int)0xFFFFFFFF) continue; | |
132 vo_flags=video_out->control(VOCTRL_QUERY_FORMAT, &out_fmt); | |
5131
cff03e88d331
prefer outfmt with no conversion (see vo's query flags)
arpi
parents:
5077
diff
changeset
|
133 mp_msg(MSGT_CPLAYER,MSGL_DBG2,"vo_debug: query(%s) returned 0x%X (i=%d) \n",vo_format_name(out_fmt),vo_flags,i); |
5180 | 134 if((vo_flags&2) || (vo_flags && j<0)){ |
135 // check (query) if codec really support this outfmt... | |
136 if(mpvdec->control(sh,VDCTRL_QUERY_FORMAT,&out_fmt)==CONTROL_FALSE) | |
137 continue; | |
138 j=i; if(vo_flags&2) break; | |
139 } | |
5075 | 140 } |
5131
cff03e88d331
prefer outfmt with no conversion (see vo's query flags)
arpi
parents:
5077
diff
changeset
|
141 if(j<0){ |
5075 | 142 // TODO: no match - we should use conversion... |
143 mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_VOincompCodec); | |
144 return 0; // failed | |
145 } | |
5131
cff03e88d331
prefer outfmt with no conversion (see vo's query flags)
arpi
parents:
5077
diff
changeset
|
146 out_fmt=sh->codec->outfmt[j]; |
cff03e88d331
prefer outfmt with no conversion (see vo's query flags)
arpi
parents:
5077
diff
changeset
|
147 sh->outfmtidx=j; |
5075 | 148 |
149 // autodetect flipping | |
150 if(flip==-1){ | |
151 flip=0; | |
5131
cff03e88d331
prefer outfmt with no conversion (see vo's query flags)
arpi
parents:
5077
diff
changeset
|
152 if(sh->codec->outflags[j]&CODECS_FLAG_FLIP) |
cff03e88d331
prefer outfmt with no conversion (see vo's query flags)
arpi
parents:
5077
diff
changeset
|
153 if(!(sh->codec->outflags[j]&CODECS_FLAG_NOFLIP)) |
5075 | 154 flip=1; |
155 } | |
156 | |
157 // time to do aspect ratio corrections... | |
158 | |
159 if(movie_aspect>-1.0) sh->aspect = movie_aspect; // cmdline overrides autodetect | |
160 // if(!sh->aspect) sh->aspect=1.0; | |
161 screen_size_x = opt_screen_size_x; | |
162 screen_size_y = opt_screen_size_y; | |
163 if(screen_size_xy||screen_size_x||screen_size_y){ | |
164 if(screen_size_xy>0){ | |
165 if(screen_size_xy<=8){ | |
166 screen_size_x=screen_size_xy*sh->disp_w; | |
167 screen_size_y=screen_size_xy*sh->disp_h; | |
168 } else { | |
169 screen_size_x=screen_size_xy; | |
170 screen_size_y=screen_size_xy*sh->disp_h/sh->disp_w; | |
171 } | |
172 } else if(!vidmode){ | |
173 if(!screen_size_x) screen_size_x=SCREEN_SIZE_X; | |
174 if(!screen_size_y) screen_size_y=SCREEN_SIZE_Y; | |
175 if(screen_size_x<=8) screen_size_x*=sh->disp_w; | |
176 if(screen_size_y<=8) screen_size_y*=sh->disp_h; | |
177 } | |
178 } else { | |
179 // check source format aspect, calculate prescale ::atmos | |
180 screen_size_x=sh->disp_w; | |
181 screen_size_y=sh->disp_h; | |
182 if(sh->aspect>0.01){ | |
183 mp_msg(MSGT_CPLAYER,MSGL_INFO,"Movie-Aspect is %.2f:1 - prescaling to correct movie aspect.\n", | |
184 sh->aspect); | |
185 screen_size_x=(int)((float)sh->disp_h*sh->aspect); | |
186 screen_size_x+=screen_size_x%2; // round | |
187 if(screen_size_x<sh->disp_w){ | |
188 screen_size_x=sh->disp_w; | |
189 screen_size_y=(int)((float)sh->disp_w*(1.0/sh->aspect)); | |
190 screen_size_y+=screen_size_y%2; // round | |
191 } | |
192 } else { | |
193 mp_msg(MSGT_CPLAYER,MSGL_INFO,"Movie-Aspect is undefined - no prescaling applied.\n"); | |
194 } | |
195 } | |
196 | |
5172 | 197 if(video_out->get_info) |
5156
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
198 { const vo_info_t *info = video_out->get_info(); |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
199 mp_msg(MSGT_CPLAYER,MSGL_INFO,"VO: [%s] %dx%d => %dx%d %s %s%s%s%s\n",info->short_name, |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
200 sh->disp_w,sh->disp_h, |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
201 screen_size_x,screen_size_y, |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
202 vo_format_name(out_fmt), |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
203 fullscreen?"fs ":"", |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
204 vidmode?"vm ":"", |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
205 softzoom?"zoom ":"", |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
206 (flip==1)?"flip ":""); |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
207 mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Description: %s\n",info->name); |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
208 mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Author: %s\n", info->author); |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
209 if(info->comment && strlen(info->comment) > 0) |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
210 mp_msg(MSGT_CPLAYER,MSGL_V,"VO: Comment: %s\n", info->comment); |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
211 } |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
212 |
5075 | 213 // Time to config libvo! |
214 mp_msg(MSGT_CPLAYER,MSGL_V,"video_out->init(%dx%d->%dx%d,flags=%d,'%s',0x%X)\n", | |
215 sh->disp_w,sh->disp_h, | |
216 screen_size_x,screen_size_y, | |
217 fullscreen|(vidmode<<1)|(softzoom<<2)|(flip<<3), | |
218 "MPlayer",out_fmt); | |
219 | |
5077 | 220 memset(&vtune,0,sizeof(vo_tune_info_t)); |
5075 | 221 if(video_out->config(sh->disp_w,sh->disp_h, |
222 screen_size_x,screen_size_y, | |
223 fullscreen|(vidmode<<1)|(softzoom<<2)|(flip<<3), | |
224 "MPlayer",out_fmt,&vtune)){ | |
225 mp_msg(MSGT_CPLAYER,MSGL_FATAL,MSGTR_CannotInitVO); | |
226 return 0; // exit_player(MSGTR_Exit_error); | |
227 } | |
228 | |
5156
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
229 #define FREE_MPI(mpi) if(mpi){if(mpi->flags&MP_IMGFLAG_ALLOCATED) free(mpi->planes[0]); free(mpi); mpi=NULL;} |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
230 FREE_MPI(static_images[0]) |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
231 FREE_MPI(static_images[1]) |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
232 FREE_MPI(temp_images[0]) |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
233 FREE_MPI(export_images[0]) |
1c250c1da93c
libvo printfs added (moved from mplayer.c), mpi buffers free'd to fix multifile playback
arpi
parents:
5131
diff
changeset
|
234 #undef FREE_MPI |
4878 | 235 return 1; |
236 } | |
237 | |
238 // mp_imgtype: buffering type, see mp_image.h | |
239 // mp_imgflag: buffer requirements (read/write, preserve, stride limits), see mp_image.h | |
240 // returns NULL or allocated mp_image_t* | |
241 // Note: buffer allocation may be moved to mpcodecs_config_vo() later... | |
242 mp_image_t* mpcodecs_get_image(sh_video_t *sh, int mp_imgtype, int mp_imgflag, int w, int h){ | |
243 mp_image_t* mpi=NULL; | |
4968 | 244 int w2=(mp_imgflag&MP_IMGFLAG_ACCEPT_STRIDE)?((w+15)&(~15)):w; |
4878 | 245 // Note: we should call libvo first to check if it supports direct rendering |
246 // and if not, then fallback to software buffers: | |
247 switch(mp_imgtype){ | |
248 case MP_IMGTYPE_EXPORT: | |
4951 | 249 // mpi=new_mp_image(w,h); |
4968 | 250 if(!export_images[0]) export_images[0]=new_mp_image(w2,h); |
4951 | 251 mpi=export_images[0]; |
4878 | 252 break; |
253 case MP_IMGTYPE_STATIC: | |
4968 | 254 if(!static_images[0]) static_images[0]=new_mp_image(w2,h); |
4878 | 255 mpi=static_images[0]; |
256 break; | |
257 case MP_IMGTYPE_TEMP: | |
4968 | 258 if(!temp_images[0]) temp_images[0]=new_mp_image(w2,h); |
4878 | 259 mpi=temp_images[0]; |
260 break; | |
261 case MP_IMGTYPE_IPB: | |
262 if(!(mp_imgflag&MP_IMGFLAG_READABLE)){ // B frame: | |
4968 | 263 if(!temp_images[0]) temp_images[0]=new_mp_image(w2,h); |
4878 | 264 mpi=temp_images[0]; |
265 break; | |
266 } | |
267 case MP_IMGTYPE_IP: | |
4968 | 268 if(!static_images[static_idx]) static_images[static_idx]=new_mp_image(w2,h); |
4878 | 269 mpi=static_images[static_idx]; |
270 static_idx^=1; | |
271 break; | |
272 } | |
273 if(mpi){ | |
274 mpi->type=mp_imgtype; | |
4971 | 275 mpi->flags&=~(MP_IMGFLAG_PRESERVE|MP_IMGFLAG_READABLE|MP_IMGFLAG_DIRECT); |
276 mpi->flags|=mp_imgflag&(MP_IMGFLAG_PRESERVE|MP_IMGFLAG_READABLE|MP_IMGFLAG_ACCEPT_STRIDE|MP_IMGFLAG_ACCEPT_WIDTH|MP_IMGFLAG_ALIGNED_STRIDE|MP_IMGFLAG_DRAW_CALLBACK); | |
4968 | 277 if((mpi->width!=w2 || mpi->height!=h) && !(mpi->flags&MP_IMGFLAG_DIRECT)){ |
278 mpi->width=w2; | |
4951 | 279 mpi->height=h; |
280 if(mpi->flags&MP_IMGFLAG_ALLOCATED){ | |
281 // need to re-allocate buffer memory: | |
282 free(mpi->planes[0]); | |
283 mpi->flags&=~MP_IMGFLAG_ALLOCATED; | |
284 } | |
285 } | |
4971 | 286 if(!mpi->bpp) mp_image_setfmt(mpi,sh->codec->outfmt[sh->outfmtidx]); |
287 if(!(mpi->flags&MP_IMGFLAG_ALLOCATED) && mpi->type>MP_IMGTYPE_EXPORT){ | |
288 | |
289 // check libvo first! | |
290 vo_functions_t* vo=sh->video_out; | |
5224 | 291 if(vo && vo_directrendering) vo->control(VOCTRL_GET_IMAGE,mpi); |
4971 | 292 |
293 if(!(mpi->flags&MP_IMGFLAG_DIRECT)){ | |
4878 | 294 // non-direct and not yet allocaed image. allocate it! |
295 mpi->planes[0]=memalign(64, mpi->bpp*mpi->width*mpi->height/8); | |
296 if(mpi->flags&MP_IMGFLAG_PLANAR){ | |
297 // YV12/I420. feel free to add other planar formats here... | |
4899
c84d841ef43b
fixed stride for packed formats, more detailed printf at image allocation
arpi
parents:
4885
diff
changeset
|
298 if(!mpi->stride[0]) mpi->stride[0]=mpi->width; |
4878 | 299 if(!mpi->stride[1]) mpi->stride[1]=mpi->stride[2]=mpi->width/2; |
300 mpi->planes[1]=mpi->planes[0]+mpi->width*mpi->height; | |
301 mpi->planes[2]=mpi->planes[1]+mpi->width*mpi->height/4; | |
4899
c84d841ef43b
fixed stride for packed formats, more detailed printf at image allocation
arpi
parents:
4885
diff
changeset
|
302 } else { |
c84d841ef43b
fixed stride for packed formats, more detailed printf at image allocation
arpi
parents:
4885
diff
changeset
|
303 if(!mpi->stride[0]) mpi->stride[0]=mpi->width*mpi->bpp/8; |
4878 | 304 } |
305 mpi->flags|=MP_IMGFLAG_ALLOCATED; | |
4971 | 306 } |
307 if(!(mpi->flags&MP_IMGFLAG_TYPE_DISPLAYED)){ | |
308 mp_msg(MSGT_DECVIDEO,MSGL_INFO,"*** %s mp_image_t, %dx%dx%dbpp %s %s, %d bytes\n", | |
309 (mpi->flags&MP_IMGFLAG_DIRECT)?"Direct Rendering":"Allocating", | |
310 mpi->width,mpi->height,mpi->bpp, | |
311 (mpi->flags&MP_IMGFLAG_YUV)?"YUV":"RGB", | |
312 (mpi->flags&MP_IMGFLAG_PLANAR)?"planar":"packed", | |
313 mpi->bpp*mpi->width*mpi->height/8); | |
314 mpi->flags|=MP_IMGFLAG_TYPE_DISPLAYED; | |
315 } | |
316 | |
4878 | 317 } |
318 } | |
319 return mpi; | |
320 } | |
321 |