comparison libmpcodecs/vd_xanim.c @ 30555:ad6740b58b0d

libmpcodecs: Mark functions not used outside of their files as static.
author diego
date Tue, 16 Feb 2010 16:16:42 +0000
parents cc27da5d7286
children 6e85fdf79584
comparison
equal deleted inserted replaced
30554:321e9ea69b9f 30555:ad6740b58b0d
333 codec_hdr->description); 333 codec_hdr->description);
334 return 0; 334 return 0;
335 } 335 }
336 } 336 }
337 337
338 void XA_Print(char *fmt, ...) 338 static void XA_Print(char *fmt, ...)
339 { 339 {
340 va_list vallist; 340 va_list vallist;
341 char buf[1024]; 341 char buf[1024];
342 342
343 va_start(vallist, fmt); 343 va_start(vallist, fmt);
349 } 349 }
350 350
351 /* 0 is no debug (needed by 3ivX) */ 351 /* 0 is no debug (needed by 3ivX) */
352 long xa_debug = 0; 352 long xa_debug = 0;
353 353
354 void TheEnd1(char *err_mess) 354 static void TheEnd1(char *err_mess)
355 { 355 {
356 XA_Print("error: %s - exiting\n", err_mess); 356 XA_Print("error: %s - exiting\n", err_mess);
357 /* we should exit here... */ 357 /* we should exit here... */
358 358
359 return; 359 return;
360 } 360 }
361 361
362 void XA_Add_Func_To_Free_Chain(XA_ANIM_HDR *anim_hdr, void (*function)()) 362 static void XA_Add_Func_To_Free_Chain(XA_ANIM_HDR *anim_hdr, void (*function)())
363 { 363 {
364 // XA_Print("XA_Add_Func_To_Free_Chain('anim_hdr: %08x', 'function: %08x')", 364 // XA_Print("XA_Add_Func_To_Free_Chain('anim_hdr: %08x', 'function: %08x')",
365 // anim_hdr, function); 365 // anim_hdr, function);
366 xa_close_func[xa_close_funcs] = function; 366 xa_close_func[xa_close_funcs] = function;
367 if (xa_close_funcs+1 < XA_CLOSE_FUNCS) 367 if (xa_close_funcs+1 < XA_CLOSE_FUNCS)
368 xa_close_funcs++; 368 xa_close_funcs++;
369 369
370 return; 370 return;
371 } 371 }
372 372
373 373 static unsigned long XA_Time_Read(void)
374 unsigned long XA_Time_Read(void)
375 { 374 {
376 return GetTimer(); //(GetRelativeTime()); 375 return GetTimer(); //(GetRelativeTime());
377 } 376 }
378 377
379 void XA_dummy(void) 378 static void XA_dummy(void)
380 { 379 {
381 XA_Print("dummy() called"); 380 XA_Print("dummy() called");
382 } 381 }
383 382
384 void XA_Gen_YUV_Tabs(XA_ANIM_HDR *anim_hdr) 383 static void XA_Gen_YUV_Tabs(XA_ANIM_HDR *anim_hdr)
385 { 384 {
386 XA_Print("XA_Gen_YUV_Tabs('anim_hdr: %08x')", anim_hdr); 385 XA_Print("XA_Gen_YUV_Tabs('anim_hdr: %08x')", anim_hdr);
387 return; 386 return;
388 } 387 }
389 388
390 void JPG_Setup_Samp_Limit_Table(XA_ANIM_HDR *anim_hdr) 389 static void JPG_Setup_Samp_Limit_Table(XA_ANIM_HDR *anim_hdr)
391 { 390 {
392 XA_Print("JPG_Setup_Samp_Limit_Table('anim_hdr: %08x')", anim_hdr); 391 XA_Print("JPG_Setup_Samp_Limit_Table('anim_hdr: %08x')", anim_hdr);
393 return; 392 return;
394 } 393 }
395 394
396 void JPG_Alloc_MCU_Bufs(XA_ANIM_HDR *anim_hdr, unsigned int width, 395 static void JPG_Alloc_MCU_Bufs(XA_ANIM_HDR *anim_hdr, unsigned int width,
397 unsigned int height, unsigned int full_flag) 396 unsigned int height, unsigned int full_flag)
398 { 397 {
399 XA_Print("JPG_Alloc_MCU_Bufs('anim_hdr: %08x', 'width: %d', 'height: %d', 'full_flag: %d')", 398 XA_Print("JPG_Alloc_MCU_Bufs('anim_hdr: %08x', 'width: %d', 'height: %d', 'full_flag: %d')",
400 anim_hdr, width, height, full_flag); 399 anim_hdr, width, height, full_flag);
401 return; 400 return;
421 image->planes[0][((x)+0)+((y)+1)*image->stride[0]]=cmap2x2->clr0_2;\ 420 image->planes[0][((x)+0)+((y)+1)*image->stride[0]]=cmap2x2->clr0_2;\
422 image->planes[0][((x)+1)+((y)+1)*image->stride[0]]=cmap2x2->clr0_3;\ 421 image->planes[0][((x)+1)+((y)+1)*image->stride[0]]=cmap2x2->clr0_3;\
423 image->planes[1][((x)>>1)+((y)>>1)*image->stride[1]]=cmap2x2->clr1_0;\ 422 image->planes[1][((x)>>1)+((y)>>1)*image->stride[1]]=cmap2x2->clr1_0;\
424 image->planes[2][((x)>>1)+((y)>>1)*image->stride[2]]=cmap2x2->clr1_1; 423 image->planes[2][((x)>>1)+((y)>>1)*image->stride[2]]=cmap2x2->clr1_1;
425 424
426 void XA_2x2_OUT_1BLK_Convert(unsigned char *image_p, unsigned int x, unsigned int y, 425 static void XA_2x2_OUT_1BLK_Convert(unsigned char *image_p, unsigned int x, unsigned int y,
427 unsigned int imagex, XA_2x2_Color *cmap2x2) 426 unsigned int imagex, XA_2x2_Color *cmap2x2)
428 { 427 {
429 mp_image_t *mpi = (mp_image_t *)image_p; 428 mp_image_t *mpi = (mp_image_t *)image_p;
430 429
431 #if 0 430 #if 0
438 #endif 437 #endif
439 438
440 return; 439 return;
441 } 440 }
442 441
443 void XA_2x2_OUT_4BLKS_Convert(unsigned char *image_p, unsigned int x, unsigned int y, 442 static void XA_2x2_OUT_4BLKS_Convert(unsigned char *image_p, unsigned int x, unsigned int y,
444 unsigned int imagex, XA_2x2_Color *cm0, XA_2x2_Color *cm1, XA_2x2_Color *cm2, 443 unsigned int imagex, XA_2x2_Color *cm0, XA_2x2_Color *cm1, XA_2x2_Color *cm2,
445 XA_2x2_Color *cm3) 444 XA_2x2_Color *cm3)
446 { 445 {
447 mp_image_t *mpi = (mp_image_t *)image_p; 446 mp_image_t *mpi = (mp_image_t *)image_p;
448 447
451 SET_4_YUV_PIXELS(mpi,x,y+2,cm2) 450 SET_4_YUV_PIXELS(mpi,x,y+2,cm2)
452 SET_4_YUV_PIXELS(mpi,x+2,y+2,cm3) 451 SET_4_YUV_PIXELS(mpi,x+2,y+2,cm3)
453 return; 452 return;
454 } 453 }
455 454
456 void *YUV2x2_Blk_Func(unsigned int image_type, int blks, unsigned int dith_flag) 455 static void *YUV2x2_Blk_Func(unsigned int image_type, int blks, unsigned int dith_flag)
457 { 456 {
458 mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "YUV2x2_Blk_Func(image_type=%d, blks=%d, dith_flag=%d)\n", 457 mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "YUV2x2_Blk_Func(image_type=%d, blks=%d, dith_flag=%d)\n",
459 image_type, blks, dith_flag); 458 image_type, blks, dith_flag);
460 switch(blks){ 459 switch(blks){
461 case 1: 460 case 1:
468 return (void*) XA_dummy; 467 return (void*) XA_dummy;
469 } 468 }
470 469
471 // Take Four Y's and UV and put them into a 2x2 Color structure. 470 // Take Four Y's and UV and put them into a 2x2 Color structure.
472 471
473 void XA_YUV_2x2_clr(XA_2x2_Color *cmap2x2, unsigned int Y0, unsigned int Y1, 472 static void XA_YUV_2x2_clr(XA_2x2_Color *cmap2x2, unsigned int Y0, unsigned int Y1,
474 unsigned int Y2, unsigned int Y3, unsigned int U, unsigned int V, 473 unsigned int Y2, unsigned int Y3, unsigned int U, unsigned int V,
475 unsigned int map_flag, unsigned int *map, XA_CHDR *chdr) 474 unsigned int map_flag, unsigned int *map, XA_CHDR *chdr)
476 { 475 {
477 476
478 mp_dbg(MSGT_DECVIDEO,MSGL_DBG3, "XA_YUV_2x2_clr(%p [%d,%d,%d,%d][%d][%d] %d %p %p)\n", 477 mp_dbg(MSGT_DECVIDEO,MSGL_DBG3, "XA_YUV_2x2_clr(%p [%d,%d,%d,%d][%d][%d] %d %p %p)\n",
485 cmap2x2->clr1_0=U; 484 cmap2x2->clr1_0=U;
486 cmap2x2->clr1_1=V; 485 cmap2x2->clr1_1=V;
487 return; 486 return;
488 } 487 }
489 488
490 void *YUV2x2_Map_Func(unsigned int image_type, unsigned int dith_type) 489 static void *YUV2x2_Map_Func(unsigned int image_type, unsigned int dith_type)
491 { 490 {
492 mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "YUV2x2_Map_Func('image_type: %d', 'dith_type: %d')", 491 mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "YUV2x2_Map_Func('image_type: %d', 'dith_type: %d')",
493 image_type, dith_type); 492 image_type, dith_type);
494 return (void*)XA_YUV_2x2_clr; 493 return (void*)XA_YUV_2x2_clr;
495 } 494 }
520 YUVBufs jpg_YUVBufs; 519 YUVBufs jpg_YUVBufs;
521 YUVTabs def_yuv_tabs; 520 YUVTabs def_yuv_tabs;
522 521
523 /* -------------- YUV 4x4 1x1 1x1 (4:1:0 aka YVU9) [Indeo 3,4,5] ------------------ */ 522 /* -------------- YUV 4x4 1x1 1x1 (4:1:0 aka YVU9) [Indeo 3,4,5] ------------------ */
524 523
525 void XA_YUV1611_Convert(unsigned char *image_p, unsigned int imagex, unsigned int imagey, 524 static void XA_YUV1611_Convert(unsigned char *image_p, unsigned int imagex, unsigned int imagey,
526 unsigned int i_x, unsigned int i_y, YUVBufs *yuv, YUVTabs *yuv_tabs, 525 unsigned int i_x, unsigned int i_y, YUVBufs *yuv, YUVTabs *yuv_tabs,
527 unsigned int map_flag, unsigned int *map, XA_CHDR *chdr) 526 unsigned int map_flag, unsigned int *map, XA_CHDR *chdr)
528 { 527 {
529 sh_video_t *sh = (sh_video_t*)image_p; 528 sh_video_t *sh = (sh_video_t*)image_p;
530 vd_xanim_ctx *priv = sh->context; 529 vd_xanim_ctx *priv = sh->context;
592 unsigned char* d=mpi->planes[2]+mpi->stride[2]*y; 591 unsigned char* d=mpi->planes[2]+mpi->stride[2]*y;
593 for(x=0;x<imagex;x++) d[x]=s[x]<<1; 592 for(x=0;x<imagex;x++) d[x]=s[x]<<1;
594 } 593 }
595 } 594 }
596 595
597 void *XA_YUV1611_Func(unsigned int image_type) 596 static void *XA_YUV1611_Func(unsigned int image_type)
598 { 597 {
599 mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "XA_YUV1611_Func('image_type: %d')", image_type); 598 mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "XA_YUV1611_Func('image_type: %d')", image_type);
600 return (void *)XA_YUV1611_Convert; 599 return (void *)XA_YUV1611_Convert;
601 } 600 }
602 601
603 /* --------------- YUV 2x2 1x1 1x1 (4:2:0 aka YV12) [3ivX,H263] ------------ */ 602 /* --------------- YUV 2x2 1x1 1x1 (4:2:0 aka YV12) [3ivX,H263] ------------ */
604 603
605 void XA_YUV221111_Convert(unsigned char *image_p, unsigned int imagex, unsigned int imagey, 604 static void XA_YUV221111_Convert(unsigned char *image_p, unsigned int imagex, unsigned int imagey,
606 unsigned int i_x, unsigned int i_y, YUVBufs *yuv, YUVTabs *yuv_tabs, unsigned int map_flag, 605 unsigned int i_x, unsigned int i_y, YUVBufs *yuv, YUVTabs *yuv_tabs, unsigned int map_flag,
607 unsigned int *map, XA_CHDR *chdr) 606 unsigned int *map, XA_CHDR *chdr)
608 { 607 {
609 sh_video_t *sh = (sh_video_t*)image_p; 608 sh_video_t *sh = (sh_video_t*)image_p;
610 vd_xanim_ctx *priv = sh->context; 609 vd_xanim_ctx *priv = sh->context;
630 mpi->width=imagex; 629 mpi->width=imagex;
631 mpi->stride[0]=ystride; //i_x; // yuv->y_w 630 mpi->stride[0]=ystride; //i_x; // yuv->y_w
632 mpi->stride[1]=mpi->stride[2]=uvstride; //=i_x/4; // yuv->uv_w 631 mpi->stride[1]=mpi->stride[2]=uvstride; //=i_x/4; // yuv->uv_w
633 } 632 }
634 633
635 void *XA_YUV221111_Func(unsigned int image_type) 634 static void *XA_YUV221111_Func(unsigned int image_type)
636 { 635 {
637 mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "XA_YUV221111_Func('image_type: %d')\n",image_type); 636 mp_dbg(MSGT_DECVIDEO,MSGL_DBG2, "XA_YUV221111_Func('image_type: %d')\n",image_type);
638 return (void *)XA_YUV221111_Convert; 637 return (void *)XA_YUV221111_Convert;
639 } 638 }
640 639