Lines Matching defs:run

142     Int PutCoeff_Inter(Int run, Int level, BitstreamEncVideo *bitstream);
143 Int PutCoeff_Inter_Last(Int run, Int level, BitstreamEncVideo *bitstream);
144 Int PutCoeff_Intra(Int run, Int level, BitstreamEncVideo *bitstream);
145 Int PutCoeff_Intra_Last(Int run, Int level, BitstreamEncVideo *bitstream);
154 Int PutCoeff_Inter_RVLC(Int run, Int level, BitstreamEncVideo *bitstream);
155 Int PutCoeff_Inter_RVLC_Last(Int run, Int level, BitstreamEncVideo *bitstream);
156 Int PutCoeff_Intra_RVLC(Int run, Int level, BitstreamEncVideo *bitstream);
157 Int PutCoeff_Intra_RVLC_Last(Int run, Int level, BitstreamEncVideo *bitstream);
159 Int PutRunCoeff_Inter(Int run, Int level, BitstreamEncVideo *bitstream);
160 Int PutRunCoeff_Inter_Last(Int run, Int level, BitstreamEncVideo *bitstream);
161 Int PutRunCoeff_Intra(Int run, Int level, BitstreamEncVideo *bitstream);
162 Int PutRunCoeff_Intra_Last(Int run, Int level, BitstreamEncVideo *bitstream);
163 Int PutLevelCoeff_Inter(Int run, Int level, BitstreamEncVideo *bitstream);
164 Int PutLevelCoeff_Inter_Last(Int run, Int level, BitstreamEncVideo *bitstream);
165 Int PutLevelCoeff_Intra(Int run, Int level, BitstreamEncVideo *bitstream);
166 Int PutLevelCoeff_Intra_Last(Int run, Int level, BitstreamEncVideo *bitstream);
287 /* Note:::: I checked the ARM assembly for if( run > x && run < y) type
288 of code, they do a really good job compiling it to if( (UInt)(run-x) < y-x).
291 Int PutCoeff_Inter(Int run, Int level, BitstreamEncVideo *bitstream)
295 if (run < 2 && level < 13)
297 length = coeff_tab0[run][level-1].len;
299 BitstreamPutBits(bitstream, length, (UInt)coeff_tab0[run][level-1].code);
301 else if (run > 1 && run < 27 && level < 5)
303 length = coeff_tab1[run-2][level-1].len;
305 BitstreamPutBits(bitstream, length, (UInt)coeff_tab1[run-2][level-1].code);
311 Int PutCoeff_Inter_Last(Int run, Int level, BitstreamEncVideo *bitstream)
315 if (run < 2 && level < 4)
317 length = coeff_tab2[run][level-1].len;
319 BitstreamPutBits(bitstream, length, (UInt)coeff_tab2[run][level-1].code);
321 else if (run > 1 && run < 42 && level == 1)
323 length = coeff_tab3[run-2].len;
325 BitstreamPutBits(bitstream, length, (UInt)coeff_tab3[run-2].code);
333 Int PutCoeff_Intra(Int run, Int level, BitstreamEncVideo *bitstream)
337 if (run == 0 && level < 28)
343 else if (run == 1 && level < 11)
349 else if (run > 1 && run < 10 && level < 6)
351 length = coeff_tab6[run-2][level-1].len;
353 BitstreamPutBits(bitstream, length, (UInt)coeff_tab6[run-2][level-1].code);
355 else if (run > 9 && run < 15 && level == 1)
357 length = coeff_tab7[run-10].len;
359 BitstreamPutBits(bitstream, length, (UInt)coeff_tab7[run-10].code);
365 Int PutCoeff_Intra_Last(Int run, Int level, BitstreamEncVideo *bitstream)
369 if (run == 0 && level < 9)
375 else if (run > 0 && run < 7 && level < 4)
377 length = coeff_tab9[run-1][level-1].len;
379 BitstreamPutBits(bitstream, length, (UInt)coeff_tab9[run-1][level-1].code);
381 else if (run > 6 && run < 21 && level == 1)
383 length = coeff_tab10[run-7].len;
385 BitstreamPutBits(bitstream, length, (UInt)coeff_tab10[run-7].code);
393 Int PutCoeff_Inter_RVLC(Int run, Int level, BitstreamEncVideo *bitstream)
397 if (run == 0 && level < 20)
403 else if (run == 1 && level < 11)
409 else if (run > 1 && run < 4 && level < 8)
411 length = coeff_RVLCtab16[run-2][level-1].len;
413 BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab16[run-2][level-1].code);
415 else if (run == 4 && level < 6)
421 else if (run > 4 && run < 8 && level < 5)
423 length = coeff_RVLCtab18[run-5][level-1].len;
425 BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab18[run-5][level-1].code);
427 else if (run > 7 && run < 10 && level < 4)
429 length = coeff_RVLCtab19[run-8][level-1].len;
431 BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab19[run-8][level-1].code);
433 else if (run > 9 && run < 18 && level < 3)
435 length = coeff_RVLCtab20[run-10][level-1].len;
437 BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab20[run-10][level-1].code);
439 else if (run > 17 && run < 39 && level == 1)
441 length = coeff_RVLCtab21[run-18].len;
443 BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab21[run-18].code);
449 Int PutCoeff_Inter_RVLC_Last(Int run, Int level, BitstreamEncVideo *bitstream)
453 if (run >= 0 && run < 2 && level < 6)
455 length = coeff_RVLCtab22[run][level-1].len;
457 BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab22[run][level-1].code);
459 else if (run == 2 && level < 4)
465 else if (run > 2 && run < 14 && level < 3)
467 length = coeff_RVLCtab24[run-3][level-1].len;
469 BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab24[run-3][level-1].code);
471 else if (run > 13 && run < 45 && level == 1)
473 length = coeff_RVLCtab25[run-14].len;
475 BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab25[run-14].code);
483 Int PutCoeff_Intra_RVLC(Int run, Int level, BitstreamEncVideo *bitstream)
487 if (run == 0 && level < 28)
493 else if (run == 1 && level < 14)
499 else if (run == 2 && level < 12)
505 else if (run == 3 && level < 10)
511 else if (run > 3 && run < 6 && level < 7)
513 length = coeff_RVLCtab5[run-4][level-1].len;
515 BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab5[run-4][level-1].code);
517 else if (run > 5 && run < 8 && level < 6)
519 length = coeff_RVLCtab6[run-6][level-1].len;
521 BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab6[run-6][level-1].code);
523 else if (run > 7 && run < 10 && level < 5)
525 length = coeff_RVLCtab7[run-8][level-1].len;
527 BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab7[run-8][level-1].code);
530 else if (run > 9 && run < 13 && level < 3)
532 length = coeff_RVLCtab8[run-10][level-1].len;
534 BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab8[run-10][level-1].code);
536 else if (run > 12 && run < 20 && level == 1)
538 length = coeff_RVLCtab9[run-13].len;
540 BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab9[run-13].code);
545 Int PutCoeff_Intra_RVLC_Last(Int run, Int level, BitstreamEncVideo *bitstream)
549 if (run >= 0 && run < 2 && level < 6)
551 length = coeff_RVLCtab10[run][level-1].len;
553 BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab10[run][level-1].code);
555 else if (run == 2 && level < 4)
561 else if (run > 2 && run < 14 && level < 3)
563 length = coeff_RVLCtab12[run-3][level-1].len;
565 BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab12[run-3][level-1].code);
567 else if (run > 13 && run < 45 && level == 1)
569 length = coeff_RVLCtab13[run-14].len;
571 BitstreamPutBits(bitstream, length, (UInt)coeff_RVLCtab13[run-14].code);
580 PutRunCoeff_Inter(Int run, Int level, BitstreamEncVideo *bitstream)
584 if (run < 2 && level < 13)
586 length = coeff_tab0[run][level-1].len;
591 BitstreamPutBits(bitstream, length, (UInt)coeff_tab0[run][level-1].code);
595 else if (run > 1 && run < 27 && level < 5)
597 length = coeff_tab1[run-2][level-1].len;
602 BitstreamPutBits(bitstream, length, (UInt)coeff_tab1[run-2][level-1].code);
609 Int PutRunCoeff_Inter_Last(Int run, Int level, BitstreamEncVideo *bitstream)
613 if (run < 2 && level < 4)
615 length = coeff_tab2[run][level-1].len;
620 BitstreamPutBits(bitstream, length, (UInt)coeff_tab2[run][level-1].code);
624 else if (run > 1 && run < 42 && level == 1)
626 length = coeff_tab3[run-2].len;
631 BitstreamPutBits(bitstream, length, (UInt)coeff_tab3[run-2].code);
638 Int PutRunCoeff_Intra(Int run, Int level, BitstreamEncVideo *bitstream)
642 if (run == 0 && level < 28)
653 else if (run == 1 && level < 11)
664 else if (run > 1 && run < 10 && level < 6)
666 length = coeff_tab6[run-2][level-1].len;
671 BitstreamPutBits(bitstream, length, (UInt)coeff_tab6[run-2][level-1].code);
675 else if (run > 9 && run < 15 && level == 1)
677 length = coeff_tab7[run-10].len;
682 BitstreamPutBits(bitstream, length, (UInt)coeff_tab7[run-10].code);
688 Int PutRunCoeff_Intra_Last(Int run, Int level, BitstreamEncVideo *bitstream)
692 if (run == 0 && level < 9)
703 else if (run > 0 && run < 7 && level < 4)
705 length = coeff_tab9[run-1][level-1].len;
710 BitstreamPutBits(bitstream, length, (UInt)coeff_tab9[run-1][level-1].code);
714 else if (run > 6 && run < 21 && level == 1)
716 length = coeff_tab10[run-7].len;
721 BitstreamPutBits(bitstream, length, (UInt)coeff_tab10[run-7].code);
729 PutLevelCoeff_Inter(Int run, Int level, BitstreamEncVideo *bitstream)
733 if (run < 2 && level < 13)
735 length = coeff_tab0[run][level-1].len;
739 BitstreamPutBits(bitstream, length, (UInt)coeff_tab0[run][level-1].code);
743 else if (run > 1 && run < 27 && level < 5)
745 length = coeff_tab1[run-2][level-1].len;
749 BitstreamPutBits(bitstream, length, (UInt)coeff_tab1[run-2][level-1].code);
756 Int PutLevelCoeff_Inter_Last(Int run, Int level, BitstreamEncVideo *bitstream)
760 if (run < 2 && level < 4)
762 length = coeff_tab2[run][level-1].len;
766 BitstreamPutBits(bitstream, length, (UInt)coeff_tab2[run][level-1].code);
770 else if (run > 1 && run < 42 && level == 1)
772 length = coeff_tab3[run-2].len;
776 BitstreamPutBits(bitstream, length, (UInt)coeff_tab3[run-2].code);
783 Int PutLevelCoeff_Intra(Int run, Int level, BitstreamEncVideo *bitstream)
787 if (run == 0 && level < 28)
797 else if (run == 1 && level < 11)
807 else if (run > 1 && run < 10 && level < 6)
809 length = coeff_tab6[run-2][level-1].len;
813 BitstreamPutBits(bitstream, length, (UInt)coeff_tab6[run-2][level-1].code);
817 else if (run > 9 && run < 15 && level == 1)
819 length = coeff_tab7[run-10].len;
823 BitstreamPutBits(bitstream, length, (UInt)coeff_tab7[run-10].code);
829 Int PutLevelCoeff_Intra_Last(Int run, Int level, BitstreamEncVideo *bitstream)
833 if (run == 0 && level < 9)
843 else if (run > 0 && run < 7 && level < 4)
845 length = coeff_tab9[run-1][level-1].len;
849 BitstreamPutBits(bitstream, length, (UInt)coeff_tab9[run-1][level-1].code);
853 else if (run > 6 && run < 21 && level == 1)
855 length = coeff_tab10[run-7].len;
859 BitstreamPutBits(bitstream, length, (UInt)coeff_tab10[run-7].code);
1437 Int run;
1443 run = RLB->run[i];
1445 //if(i==63||RLB->run[i+1] == -1) /* Don't Code Last Coefficient Here */
1448 if (level < 28 && run < 39)
1451 length = PutCoeff_Intra_RVLC(run, level, bs);
1453 length = PutCoeff_Inter_RVLC(run, level, bs);
1462 BitstreamPutBits(bs, 6 + 1, (run << 1) | 1); /* RUN + MARKER BIT*/
1471 run = RLB->run[i];
1475 if (level < 6 && run < 45)
1478 length = PutCoeff_Intra_RVLC_Last(run, level, bs);
1480 length = PutCoeff_Inter_RVLC_Last(run, level, bs);
1489 BitstreamPutBits(bs, 6 + 1, (run << 1) | 1); /* RUN + MARKER BIT*/
1510 Int run;
1517 run = RLB->run[i];
1519 // if(i==63 ||RLB->run[i+1] == -1) /* Don't Code Last Coefficient Here */
1524 length = PutCoeff_Inter(run, level, bs);
1537 BitstreamPutBits(bs, 6, run); /* RUN */
1542 run = RLB->run[i];
1548 length = PutCoeff_Inter_Last(run, level, bs);
1561 BitstreamPutBits(bs, 6, run); /* RUN */
1579 Int run;
1594 run = RLB->run[i];
1600 length = (*PutCoeff)(run, level, bs); /* 5/28/01 replaces above */
1612 level_minus_max = level - intra_max_level[0][run];
1614 length = PutLevelCoeff_Intra(run, level_minus_max, bs);
1620 level_minus_max = level - inter_max_level[0][run];
1622 length = PutLevelCoeff_Inter(run, level_minus_max, bs);
1634 run_minus_max = run - (intra_max_run0[level] + 1);
1639 run_minus_max = run - (inter_max_run0[level] + 1);
1662 BitstreamPutBits(bs, 6 + 1, (run << 1) | 1); /* Encode Run + Marker Bit */
1677 run = RLB->run[i];
1685 length = PutCoeff_Intra_Last(run, level, bs);
1689 length = PutCoeff_Inter_Last(run, level, bs);
1706 level_minus_max = level - intra_max_level[1][run];
1708 length = PutLevelCoeff_Intra_Last(run, level_minus_max, bs);
1714 level_minus_max = level - inter_max_level[1][run];
1716 length = PutLevelCoeff_Inter_Last(run, level_minus_max, bs);
1727 run_minus_max = run - (intra_max_run1[level] + 1);
1732 run_minus_max = run - (inter_max_run1[level] + 1);
1754 BitstreamPutBits(bs, 6 + 1, (run << 1) | 1); /* Encode Run + Marker Bit */
1794 Int run, idx;
1819 RLB->run[0] = 0;
1850 run = 0;
1857 run++;
1865 RLB->run[idx] = run;
1866 run = 0;
1873 RLB->run[idx] = run;
1874 run = 0;