Lines Matching refs:code

46 * ACTS-MoMuSys partners retain full right to use the code for his/her own
47 * purpose, assign or donate the code to a third party and to inhibit third
48 * parties from using the code for non MPEG-4 Video (ISO/IEC 14496-2) Standard
71 * Donated to the Momusys-project as background code by
106 uint32 code;
109 BitstreamShowBits32(stream, 24, &code);
111 while (code != 1)
115 BitstreamShowBits32(stream, 24, &code);
128 * 3/29/00 : added return code check to some functions and
129 * optimize the code.
263 * 3/29/00 : added return code check to some functions
455 uint code;
457 BitstreamShow13Bits(stream, &code);
459 if (code >> 12)
466 if (code >= 512)
468 code = (code >> 8) - 2;
469 PV_BitstreamFlushBits(stream, PV_TMNMVtab0[code].len + 1);
470 *mv = PV_TMNMVtab0[code].val;
474 if (code >= 128)
476 code = (code >> 2) - 32;
477 PV_BitstreamFlushBits(stream, PV_TMNMVtab1[code].len + 1);
478 *mv = PV_TMNMVtab1[code].val;
482 if (code < 4)
488 code -= 4;
490 PV_BitstreamFlushBits(stream, PV_TMNMVtab2[code].len + 1);
492 *mv = PV_TMNMVtab2[code].val;
505 uint code;
507 BitstreamShowBits16(stream, 9, &code);
510 if (code < 8)
515 code >>= 3;
517 if (code >= 32)
523 PV_BitstreamFlushBits(stream, PV_MCBPCtabintra[code].len);
525 return PV_MCBPCtabintra[code].val;
538 uint code;
540 BitstreamShowBits16(stream, 9, &code);
542 if (code == 0)
546 else if (code >= 256)
552 PV_BitstreamFlushBits(stream, PV_MCBPCtab[code].len);
553 return PV_MCBPCtab[code].val;
559 uint code;
561 BitstreamShow13Bits(stream, &code);
563 if (code == 0)
567 else if (code >= 4096)
572 if (code >= 16)
574 PV_BitstreamFlushBits(stream, PV_MCBPCtab[code >> 4].len);
575 return PV_MCBPCtab[code >> 4].val;
579 PV_BitstreamFlushBits(stream, PV_MCBPCtab1[code - 8].len);
580 return PV_MCBPCtab1[code - 8].val;
593 uint code;
595 BitstreamShowBits16(stream, 6, &code);
598 if (code < 2)
602 else if (code >= 48)
609 PV_BitstreamFlushBits(stream, PV_CBPYtab[code].len);
610 CBPY = PV_CBPYtab[code].val;
631 uint code;
637 BitstreamShowBits16(stream, 11, &code);
639 if (code == 1)
645 code >>= 1;
646 if (code == 1)
652 code >>= 1;
653 if (code == 1)
660 code >>= 1;
661 if (code == 1)
668 code >>= 1;
669 if (code == 1)
676 code >>= 1;
677 if (code == 1)
684 code >>= 1;
685 if (code == 1)
692 code >>= 1;
693 if (code == 1)
700 code >>= 1;
701 if (code == 1)
707 else if (code == 2)
713 else if (code == 3)
720 code >>= 1;
721 if (code == 2)
727 else if (code == 3)
737 BitstreamShow13Bits(stream, &code);
738 code >>= 1;
739 if (code == 1)
746 code >>= 1;
747 if (code == 1)
754 code >>= 1;
755 if (code == 1)
762 code >>= 1;
763 if (code == 1)
770 code >>= 1;
771 if (code == 1)
778 code >>= 1;
779 if (code == 1)
786 code >>= 1;
787 if (code == 1)
794 code >>= 1;
795 if (code == 1)
802 code >>= 1;
803 if (code == 1)
810 code >>= 1;
811 if (code == 1)
818 code >>= 1;
820 *DC_size = (int)(3 - code);
841 uint code;
844 BitstreamShow13Bits(stream, &code);
847 /* if(GetTcoeffIntra(code,pTcoef,&tab,stream)!=PV_SUCCESS) return status;*/
848 if (code >= 1024)
850 tab = &PV_DCT3Dtab3[(code >> 6) - 16];
854 if (code >= 256)
856 tab = &PV_DCT3Dtab4[(code >> 3) - 32];
860 if (code >= 16)
862 tab = &PV_DCT3Dtab5[(code>>1) - 8];
872 pTcoef->sign = (code >> (12 - tab->len)) & 1;
889 BitstreamShow13Bits(stream, &code);
892 /* if(GetTcoeffIntra(code,pTcoef,&tab,stream)!=PV_SUCCESS) return status;*/
893 if (code >= 1024)
895 tab = &PV_DCT3Dtab3[(code >> 6) - 16];
899 if (code >= 256)
901 tab = &PV_DCT3Dtab4[(code >> 3) - 32];
905 if (code >= 16)
907 tab = &PV_DCT3Dtab5[(code>>1) - 8];
919 pTcoef->sign = (code >> (12 - tab->len)) & 1;
942 BitstreamShow13Bits(stream, &code);
945 /* if(GetTcoeffIntra(code,pTcoef,&tab,stream)!=PV_SUCCESS) return status;*/
946 if (code >= 1024)
948 tab = &PV_DCT3Dtab3[(code >> 6) - 16];
952 if (code >= 256)
954 tab = &PV_DCT3Dtab4[(code >> 3) - 32];
958 if (code >= 16)
960 tab = &PV_DCT3Dtab5[(code>>1) - 8];
971 pTcoef->sign = (code >> (12 - tab->len)) & 1;
1001 code = BitstreamReadBits16_INLINE(stream, 8);
1002 pTcoef->last = code >> 7;
1003 pTcoef->run = (code >> 1) & 0x3F;
1024 uint code;
1027 BitstreamShow13Bits(stream, &code);
1030 /* if(GetTcoeffInter(code,pTcoef,&tab,stream)!=PV_SUCCESS) return status;*/
1031 if (code >= 1024)
1033 tab = &PV_DCT3Dtab0[(code >> 6) - 16];
1037 if (code >= 256)
1039 tab = &PV_DCT3Dtab1[(code >> 3) - 32];
1043 if (code >= 16)
1045 tab = &PV_DCT3Dtab2[(code>>1) - 8];
1054 pTcoef->sign = (code >> (12 - tab->len)) & 1;
1070 BitstreamShow13Bits(stream, &code);
1073 /* if(GetTcoeffInter(code,pTcoef,&tab,stream)!=PV_SUCCESS) return status;*/
1074 if (code >= 1024)
1076 tab = &PV_DCT3Dtab0[(code >> 6) - 16];
1080 if (code >= 256)
1082 tab = &PV_DCT3Dtab1[(code >> 3) - 32];
1086 if (code >= 16)
1088 tab = &PV_DCT3Dtab2[(code>>1) - 8];
1097 pTcoef->sign = (code >> (12 - tab->len)) & 1;
1117 BitstreamShow13Bits(stream, &code);
1120 /*if(GetTcoeffInter(code,pTcoef,&tab,stream)!=PV_SUCCESS) return status;*/
1121 if (code >= 1024)
1123 tab = &PV_DCT3Dtab0[(code >> 6) - 16];
1127 if (code >= 256)
1129 tab = &PV_DCT3Dtab1[(code >> 3) - 32];
1133 if (code >= 16)
1135 tab = &PV_DCT3Dtab2[(code>>1) - 8];
1144 pTcoef->sign = (code >> (12 - tab->len)) & 1;
1170 code = BitstreamReadBits16_INLINE(stream, 8);
1171 pTcoef->last = code >> 7;
1172 pTcoef->run = (code >> 1) & 0x3F;
1203 uint code;
1206 BitstreamShow13Bits(stream, &code);
1210 if (code >= 1024) tab = &PV_DCT3Dtab0[(code >> 6) - 16];
1213 if (code >= 256) tab = &PV_DCT3Dtab1[(code >> 3) - 32];
1216 if (code >= 16) tab = &PV_DCT3Dtab2[(code>>1) - 8];
1222 pTcoef->sign = (code >> (12 - tab->len)) & 1;
1263 uint code;
1266 BitstreamShow13Bits(stream, &code);
1270 if (code >= 1024) tab = &PV_DCT3Dtab6[(code >> 6) - 16];
1273 if (code >= 256) tab = &PV_DCT3Dtab7[(code >> 3) - 32];
1276 if (code >= 16) tab = &PV_DCT3Dtab8[(code>>1) - 8];
1282 pTcoef->sign = (code >> (12 - tab->len)) & 1;
1318 uint code;
1321 BitstreamShow13Bits(stream, &code);
1325 if (code >= 1024) tab = &PV_DCT3Dtab0[(code >> 6) - 16];
1328 if (code >= 256) tab = &PV_DCT3Dtab1[(code >> 3) - 32];
1331 if (code >= 16) tab = &PV_DCT3Dtab2[(code>>1) - 8];
1337 pTcoef->sign = (code >> (12 - tab->len)) & 1;
1369 code = BitstreamReadBits16(stream, 11); /* ANNEX_T */
1371 code = (code >> 6 & 0x1F) | (code << 5 & 0x7ff);
1372 if (code > 1024)
1375 pTcoef->level = (2048 - code);
1380 pTcoef->level = code;
1391 uint code;
1394 BitstreamShow13Bits(stream, &code);
1398 if (code >= 1024) tab = &PV_DCT3Dtab6[(code >> 6) - 16];
1401 if (code >= 256) tab = &PV_DCT3Dtab7[(code >> 3) - 32];
1404 if (code >= 16) tab = &PV_DCT3Dtab8[(code>>1) - 8];
1410 pTcoef->sign = (code >> (12 - tab->len)) & 1;
1442 code = BitstreamReadBits16(stream, 11); /* ANNEX_T */
1444 code = (code >> 6 & 0x1F) | (code << 5 & 0x7ff);
1445 if (code > 1024)
1448 pTcoef->level = (2048 - code);
1453 pTcoef->level = code;
1473 uint code, mask;
1478 BitstreamShow15Bits(stream, &code); /* 03/07/01 */
1484 if (code < 2048)
1499 if (code & mask)
1505 if (code & mask)
1518 if (!(code & mask))
1526 code = code & 0x7fff;
1527 code = code >> (15 - (len + 1));
1530 /* code is in two forms : 0xxxx0xxx00 or 0xxx0xxx01
1537 if (num[1] > 10 || num[0] > 11) /* invalid RVLC code */
1540 if (code&(1 << len))
1541 tab2 = RvlcDCTtabInter + 146 + (num[0] << 1) + (code & 1);
1543 tab2 = RvlcDCTtabInter + ptrRvlcTab[num[1]] + (num[0] << 1) + (code & 1);
1556 uint code, mask;
1561 BitstreamShow15Bits(stream, &code);
1567 if (code < 2048)
1582 if (code & mask)
1588 if (code & mask)
1601 if (!(code & mask))
1609 code = code & 0x7fff;
1610 code = code >> (15 - (len + 1));
1613 /* code is in two forms : 0xxxx0xxx00 or 0xxx0xxx01
1620 if (num[1] > 10 || num[0] > 11) /* invalid RVLC code */
1623 if (code & (1 << len))
1624 tab2 = RvlcDCTtabIntra + 146 + (num[0] << 1) + (code & 1);
1626 tab2 = RvlcDCTtabIntra + ptrRvlcTab[num[1]] + (num[0] << 1) + (code & 1);