add encoder cabac support
Unified · Split
| @@ -51,6 +51,9 @@ · 50 unmodified lines | |||
| 51 | 9AED66661946A2B3009A3567 /* utils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AED66651946A2B3009A3567 /* utils.cpp */; }; | 51 | 9AED66661946A2B3009A3567 /* utils.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 9AED66651946A2B3009A3567 /* utils.cpp */; }; |
| 52 | F5617A50196A833A006E2B20 /* reconstruct_aarch64_neon.S in Sources */ = {isa = PBXBuildFile; fileRef = F5617A4F196A833A006E2B20 /* reconstruct_aarch64_neon.S */; }; | 52 | F5617A50196A833A006E2B20 /* reconstruct_aarch64_neon.S in Sources */ = {isa = PBXBuildFile; fileRef = F5617A4F196A833A006E2B20 /* reconstruct_aarch64_neon.S */; }; |
| 53 | F5BE8005196B913200ED02ED /* memory_aarch64_neon.S in Sources */ = {isa = PBXBuildFile; fileRef = F5BE8004196B913200ED02ED /* memory_aarch64_neon.S */; }; | 53 | F5BE8005196B913200ED02ED /* memory_aarch64_neon.S in Sources */ = {isa = PBXBuildFile; fileRef = F5BE8004196B913200ED02ED /* memory_aarch64_neon.S */; }; |
| 54 | F7E9994519EBD1E9009B1021 /* svc_set_mb_syn_cabac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F7E9994419EBD1E9009B1021 /* svc_set_mb_syn_cabac.cpp */; }; | ||
| 55 | F7E9994719EBD1EF009B1021 /* cabac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F7E9994619EBD1EF009B1021 /* cabac.cpp */; }; | ||
| 56 | F7E9994919EBD1F8009B1021 /* set_mb_syn_cabac.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F7E9994819EBD1F8009B1021 /* set_mb_syn_cabac.cpp */; }; | ||
| 54 | /* End PBXBuildFile section */ | 57 | /* End PBXBuildFile section */ |
| 55 | 58 | ||
| 56 | /* Begin PBXCopyFilesBuildPhase section */ | 59 | /* Begin PBXCopyFilesBuildPhase section */ |
| @@ -164,6 +167,11 @@ · 107 unmodified lines | |||
| 164 | 9AED66671946A2C4009A3567 /* utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = utils.h; path = ../../../common/inc/utils.h; sourceTree = "<group>"; }; | 167 | 9AED66671946A2C4009A3567 /* utils.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = utils.h; path = ../../../common/inc/utils.h; sourceTree = "<group>"; }; |
| 165 | F5617A4F196A833A006E2B20 /* reconstruct_aarch64_neon.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; name = reconstruct_aarch64_neon.S; path = arm64/reconstruct_aarch64_neon.S; sourceTree = "<group>"; }; | 168 | F5617A4F196A833A006E2B20 /* reconstruct_aarch64_neon.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; name = reconstruct_aarch64_neon.S; path = arm64/reconstruct_aarch64_neon.S; sourceTree = "<group>"; }; |
| 166 | F5BE8004196B913200ED02ED /* memory_aarch64_neon.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; name = memory_aarch64_neon.S; path = arm64/memory_aarch64_neon.S; sourceTree = "<group>"; }; | 169 | F5BE8004196B913200ED02ED /* memory_aarch64_neon.S */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.asm; name = memory_aarch64_neon.S; path = arm64/memory_aarch64_neon.S; sourceTree = "<group>"; }; |
| 170 | F7E9994419EBD1E9009B1021 /* svc_set_mb_syn_cabac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = svc_set_mb_syn_cabac.cpp; sourceTree = "<group>"; }; | ||
| 171 | F7E9994619EBD1EF009B1021 /* cabac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = cabac.cpp; sourceTree = "<group>"; }; | ||
| 172 | F7E9994819EBD1F8009B1021 /* set_mb_syn_cabac.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = set_mb_syn_cabac.cpp; sourceTree = "<group>"; }; | ||
| 173 | F7E9997E19EBD3C6009B1021 /* set_mb_syn_cabac.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = set_mb_syn_cabac.h; sourceTree = "<group>"; }; | ||
| 174 | F7E9997F19EBD3CE009B1021 /* svc_set_mb_syn.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = svc_set_mb_syn.h; sourceTree = "<group>"; }; | ||
| 167 | /* End PBXFileReference section */ | 175 | /* End PBXFileReference section */ |
| 168 | 176 | ||
| 169 | /* Begin PBXFrameworksBuildPhase section */ | 177 | /* Begin PBXFrameworksBuildPhase section */ |
| @@ -254,6 +262,8 @@ · 84 unmodified lines | |||
| 254 | 4CE446A918BC605C0017DF25 /* inc */ = { | 262 | 4CE446A918BC605C0017DF25 /* inc */ = { |
| 255 | isa = PBXGroup; | 263 | isa = PBXGroup; |
| 256 | children = ( | 264 | children = ( |
| 265 | F7E9997F19EBD3CE009B1021 /* svc_set_mb_syn.h */, | ||
| 266 | F7E9997E19EBD3C6009B1021 /* set_mb_syn_cabac.h */, | ||
| 257 | 9AED66671946A2C4009A3567 /* utils.h */, | 267 | 9AED66671946A2C4009A3567 /* utils.h */, |
| 258 | 4CDBFB9D18E5068D0025A767 /* wels_transpose_matrix.h */, | 268 | 4CDBFB9D18E5068D0025A767 /* wels_transpose_matrix.h */, |
| 259 | 4CE446AA18BC605C0017DF25 /* as264_common.h */, | 269 | 4CE446AA18BC605C0017DF25 /* as264_common.h */, |
| @@ -309,6 +319,9 @@ · 49 unmodified lines | |||
| 309 | 4CE446DC18BC605C0017DF25 /* src */ = { | 319 | 4CE446DC18BC605C0017DF25 /* src */ = { |
| 310 | isa = PBXGroup; | 320 | isa = PBXGroup; |
| 311 | children = ( | 321 | children = ( |
| 322 | F7E9994819EBD1F8009B1021 /* set_mb_syn_cabac.cpp */, | ||
| 323 | F7E9994619EBD1EF009B1021 /* cabac.cpp */, | ||
| 324 | F7E9994419EBD1E9009B1021 /* svc_set_mb_syn_cabac.cpp */, | ||
| 312 | 9AED66651946A2B3009A3567 /* utils.cpp */, | 325 | 9AED66651946A2B3009A3567 /* utils.cpp */, |
| 313 | 4CE446DD18BC605C0017DF25 /* au_set.cpp */, | 326 | 4CE446DD18BC605C0017DF25 /* au_set.cpp */, |
| 314 | 4CE446DE18BC605C0017DF25 /* deblocking.cpp */, | 327 | 4CE446DE18BC605C0017DF25 /* deblocking.cpp */, |
| @@ -438,6 +451,7 @@ · 123 unmodified lines | |||
| 438 | 4C34067018C57D0400DFA14A /* memory_neon.S in Sources */, | 451 | 4C34067018C57D0400DFA14A /* memory_neon.S in Sources */, |
| 439 | 4CE4470F18BC605C0017DF25 /* deblocking.cpp in Sources */, | 452 | 4CE4470F18BC605C0017DF25 /* deblocking.cpp in Sources */, |
| 440 | 4CE4472518BC605C0017DF25 /* svc_encode_mb.cpp in Sources */, | 453 | 4CE4472518BC605C0017DF25 /* svc_encode_mb.cpp in Sources */, |
| 454 | F7E9994719EBD1EF009B1021 /* cabac.cpp in Sources */, | ||
| 441 | 4CE4471A18BC605C0017DF25 /* mv_pred.cpp in Sources */, | 455 | 4CE4471A18BC605C0017DF25 /* mv_pred.cpp in Sources */, |
| 442 | 4C34066E18C57D0400DFA14A /* intra_pred_sad_3_opt_neon.S in Sources */, | 456 | 4C34066E18C57D0400DFA14A /* intra_pred_sad_3_opt_neon.S in Sources */, |
| 443 | 4C23BC60195A77E0003B81FC /* intra_pred_sad_3_opt_aarch64_neon.S in Sources */, | 457 | 4C23BC60195A77E0003B81FC /* intra_pred_sad_3_opt_aarch64_neon.S in Sources */, |
| @@ -446,6 +460,7 @@ · 2 unmodified lines | |||
| 446 | F5BE8005196B913200ED02ED /* memory_aarch64_neon.S in Sources */, | 460 | F5BE8005196B913200ED02ED /* memory_aarch64_neon.S in Sources */, |
| 447 | 4CBC1B83194ACBB400214D9E /* intra_pred_aarch64_neon.S in Sources */, | 461 | 4CBC1B83194ACBB400214D9E /* intra_pred_aarch64_neon.S in Sources */, |
| 448 | 4CE4471718BC605C0017DF25 /* mc.cpp in Sources */, | 462 | 4CE4471718BC605C0017DF25 /* mc.cpp in Sources */, |
| 463 | F7E9994519EBD1E9009B1021 /* svc_set_mb_syn_cabac.cpp in Sources */, | ||
| 449 | F5617A50196A833A006E2B20 /* reconstruct_aarch64_neon.S in Sources */, | 464 | F5617A50196A833A006E2B20 /* reconstruct_aarch64_neon.S in Sources */, |
| 450 | 4CE4472918BC605C0017DF25 /* svc_set_mb_syn_cavlc.cpp in Sources */, | 465 | 4CE4472918BC605C0017DF25 /* svc_set_mb_syn_cavlc.cpp in Sources */, |
| 451 | 4CE4471818BC605C0017DF25 /* md.cpp in Sources */, | 466 | 4CE4471818BC605C0017DF25 /* md.cpp in Sources */, |
| @@ -465,6 +480,7 @@ · 13 unmodified lines | |||
| 465 | 6CA38DA51991D31A003EAAE0 /* svc_motion_estimation_aarch64_neon.S in Sources */, | 480 | 6CA38DA51991D31A003EAAE0 /* svc_motion_estimation_aarch64_neon.S in Sources */, |
| 466 | 4CE4471418BC605C0017DF25 /* encoder_ext.cpp in Sources */, | 481 | 4CE4471418BC605C0017DF25 /* encoder_ext.cpp in Sources */, |
| 467 | 4C34067218C57D0400DFA14A /* reconstruct_neon.S in Sources */, | 482 | 4C34067218C57D0400DFA14A /* reconstruct_neon.S in Sources */, |
| 483 | F7E9994919EBD1F8009B1021 /* set_mb_syn_cabac.cpp in Sources */, | ||
| 468 | ); | 484 | ); |
| 469 | runOnlyForDeploymentPostprocessing = 0; | 485 | runOnlyForDeploymentPostprocessing = 0; |
| 470 | }; | 486 | }; |
| @@ -329,6 +329,10 @@ · 328 unmodified lines | |||
| 329 | RelativePath="..\..\..\encoder\core\src\au_set.cpp" | 329 | RelativePath="..\..\..\encoder\core\src\au_set.cpp" |
| 330 | > | 330 | > |
| 331 | </File> | 331 | </File> |
| 332 | <File | ||
| 333 | RelativePath="..\..\..\encoder\core\src\cabac.cpp" | ||
| 334 | > | ||
| 335 | </File> | ||
| 332 | <File | 336 | <File |
| 333 | RelativePath="..\..\..\common\src\common_tables.cpp" | 337 | RelativePath="..\..\..\common\src\common_tables.cpp" |
| 334 | > | 338 | > |
| @@ -429,6 +433,10 @@ · 94 unmodified lines | |||
| 429 | RelativePath="..\..\..\encoder\core\src\sample.cpp" | 433 | RelativePath="..\..\..\encoder\core\src\sample.cpp" |
| 430 | > | 434 | > |
| 431 | </File> | 435 | </File> |
| 436 | <File | ||
| 437 | RelativePath="..\..\..\encoder\core\src\set_mb_syn_cabac.cpp" | ||
| 438 | > | ||
| 439 | </File> | ||
| 432 | <File | 440 | <File |
| 433 | RelativePath="..\..\..\encoder\core\src\set_mb_syn_cavlc.cpp" | 441 | RelativePath="..\..\..\encoder\core\src\set_mb_syn_cavlc.cpp" |
| 434 | > | 442 | > |
| @@ -461,6 +469,10 @@ · 26 unmodified lines | |||
| 461 | RelativePath="..\..\..\encoder\core\src\svc_motion_estimate.cpp" | 469 | RelativePath="..\..\..\encoder\core\src\svc_motion_estimate.cpp" |
| 462 | > | 470 | > |
| 463 | </File> | 471 | </File> |
| 472 | <File | ||
| 473 | RelativePath="..\..\..\encoder\core\src\svc_set_mb_syn_cabac.cpp" | ||
| 474 | > | ||
| 475 | </File> | ||
| 464 | <File | 476 | <File |
| 465 | RelativePath="..\..\..\encoder\core\src\svc_set_mb_syn_cavlc.cpp" | 477 | RelativePath="..\..\..\encoder\core\src\svc_set_mb_syn_cavlc.cpp" |
| 466 | > | 478 | > |
| @@ -626,6 +638,10 @@ · 159 unmodified lines | |||
| 626 | RelativePath="..\..\..\encoder\core\inc\sample.h" | 638 | RelativePath="..\..\..\encoder\core\inc\sample.h" |
| 627 | > | 639 | > |
| 628 | </File> | 640 | </File> |
| 641 | <File | ||
| 642 | RelativePath="..\..\..\encoder\core\inc\set_mb_syn_cabac.h" | ||
| 643 | > | ||
| 644 | </File> | ||
| 629 | <File | 645 | <File |
| 630 | RelativePath="..\..\..\encoder\core\inc\set_mb_syn_cavlc.h" | 646 | RelativePath="..\..\..\encoder\core\inc\set_mb_syn_cavlc.h" |
| 631 | > | 647 | > |
| @@ -678,6 +694,10 @@ · 46 unmodified lines | |||
| 678 | RelativePath="..\..\..\encoder\core\inc\svc_motion_estimate.h" | 694 | RelativePath="..\..\..\encoder\core\inc\svc_motion_estimate.h" |
| 679 | > | 695 | > |
| 680 | </File> | 696 | </File> |
| 697 | <File | ||
| 698 | RelativePath="..\..\..\encoder\core\inc\svc_set_mb_syn.h" | ||
| 699 | > | ||
| 700 | </File> | ||
| 681 | <File | 701 | <File |
| 682 | RelativePath="..\..\..\encoder\core\inc\svc_set_mb_syn_cavlc.h" | 702 | RelativePath="..\..\..\encoder\core\inc\svc_set_mb_syn_cavlc.h" |
| 683 | > | 703 | > |
| @@ -731,7 +751,7 @@ · 47 unmodified lines | |||
| 731 | > | 751 | > |
| 732 | <Tool | 752 | <Tool |
| 733 | Name="VCCustomBuildTool" | 753 | Name="VCCustomBuildTool" |
| 734 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 754 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 735 | Outputs="$(IntDir)\$(InputName).obj" | 755 | Outputs="$(IntDir)\$(InputName).obj" |
| 736 | /> | 756 | /> |
| 737 | </FileConfiguration> | 757 | </FileConfiguration> |
| @@ -740,7 +760,7 @@ · 2 unmodified lines | |||
| 740 | > | 760 | > |
| 741 | <Tool | 761 | <Tool |
| 742 | Name="VCCustomBuildTool" | 762 | Name="VCCustomBuildTool" |
| 743 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 763 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 744 | Outputs="$(IntDir)\$(InputName).obj" | 764 | Outputs="$(IntDir)\$(InputName).obj" |
| 745 | /> | 765 | /> |
| 746 | </FileConfiguration> | 766 | </FileConfiguration> |
| @@ -749,7 +769,7 @@ · 2 unmodified lines | |||
| 749 | > | 769 | > |
| 750 | <Tool | 770 | <Tool |
| 751 | Name="VCCustomBuildTool" | 771 | Name="VCCustomBuildTool" |
| 752 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 772 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 753 | Outputs="$(IntDir)\$(InputName).obj" | 773 | Outputs="$(IntDir)\$(InputName).obj" |
| 754 | /> | 774 | /> |
| 755 | </FileConfiguration> | 775 | </FileConfiguration> |
| @@ -758,7 +778,7 @@ · 2 unmodified lines | |||
| 758 | > | 778 | > |
| 759 | <Tool | 779 | <Tool |
| 760 | Name="VCCustomBuildTool" | 780 | Name="VCCustomBuildTool" |
| 761 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 781 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 762 | Outputs="$(IntDir)\$(InputName).obj" | 782 | Outputs="$(IntDir)\$(InputName).obj" |
| 763 | /> | 783 | /> |
| 764 | </FileConfiguration> | 784 | </FileConfiguration> |
| @@ -771,7 +791,7 @@ · 6 unmodified lines | |||
| 771 | > | 791 | > |
| 772 | <Tool | 792 | <Tool |
| 773 | Name="VCCustomBuildTool" | 793 | Name="VCCustomBuildTool" |
| 774 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 794 | CommandLine="nasm -I$(InputDir) -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 775 | Outputs="$(IntDir)\$(InputName).obj" | 795 | Outputs="$(IntDir)\$(InputName).obj" |
| 776 | /> | 796 | /> |
| 777 | </FileConfiguration> | 797 | </FileConfiguration> |
| @@ -780,7 +800,7 @@ · 2 unmodified lines | |||
| 780 | > | 800 | > |
| 781 | <Tool | 801 | <Tool |
| 782 | Name="VCCustomBuildTool" | 802 | Name="VCCustomBuildTool" |
| 783 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 803 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 784 | Outputs="$(IntDir)\$(InputName).obj" | 804 | Outputs="$(IntDir)\$(InputName).obj" |
| 785 | /> | 805 | /> |
| 786 | </FileConfiguration> | 806 | </FileConfiguration> |
| @@ -789,7 +809,7 @@ · 2 unmodified lines | |||
| 789 | > | 809 | > |
| 790 | <Tool | 810 | <Tool |
| 791 | Name="VCCustomBuildTool" | 811 | Name="VCCustomBuildTool" |
| 792 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 812 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 793 | Outputs="$(IntDir)\$(InputName).obj" | 813 | Outputs="$(IntDir)\$(InputName).obj" |
| 794 | /> | 814 | /> |
| 795 | </FileConfiguration> | 815 | </FileConfiguration> |
| @@ -798,7 +818,7 @@ · 2 unmodified lines | |||
| 798 | > | 818 | > |
| 799 | <Tool | 819 | <Tool |
| 800 | Name="VCCustomBuildTool" | 820 | Name="VCCustomBuildTool" |
| 801 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 821 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 802 | Outputs="$(IntDir)\$(InputName).obj" | 822 | Outputs="$(IntDir)\$(InputName).obj" |
| 803 | /> | 823 | /> |
| 804 | </FileConfiguration> | 824 | </FileConfiguration> |
| @@ -811,7 +831,7 @@ · 6 unmodified lines | |||
| 811 | > | 831 | > |
| 812 | <Tool | 832 | <Tool |
| 813 | Name="VCCustomBuildTool" | 833 | Name="VCCustomBuildTool" |
| 814 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 834 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 815 | Outputs="$(IntDir)\$(InputName).obj" | 835 | Outputs="$(IntDir)\$(InputName).obj" |
| 816 | /> | 836 | /> |
| 817 | </FileConfiguration> | 837 | </FileConfiguration> |
| @@ -820,7 +840,7 @@ · 2 unmodified lines | |||
| 820 | > | 840 | > |
| 821 | <Tool | 841 | <Tool |
| 822 | Name="VCCustomBuildTool" | 842 | Name="VCCustomBuildTool" |
| 823 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 843 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 824 | Outputs="$(IntDir)\$(InputName).obj" | 844 | Outputs="$(IntDir)\$(InputName).obj" |
| 825 | /> | 845 | /> |
| 826 | </FileConfiguration> | 846 | </FileConfiguration> |
| @@ -829,7 +849,7 @@ · 2 unmodified lines | |||
| 829 | > | 849 | > |
| 830 | <Tool | 850 | <Tool |
| 831 | Name="VCCustomBuildTool" | 851 | Name="VCCustomBuildTool" |
| 832 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 852 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 833 | Outputs="$(IntDir)\$(InputName).obj" | 853 | Outputs="$(IntDir)\$(InputName).obj" |
| 834 | /> | 854 | /> |
| 835 | </FileConfiguration> | 855 | </FileConfiguration> |
| @@ -838,7 +858,7 @@ · 2 unmodified lines | |||
| 838 | > | 858 | > |
| 839 | <Tool | 859 | <Tool |
| 840 | Name="VCCustomBuildTool" | 860 | Name="VCCustomBuildTool" |
| 841 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 861 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 842 | Outputs="$(IntDir)\$(InputName).obj" | 862 | Outputs="$(IntDir)\$(InputName).obj" |
| 843 | /> | 863 | /> |
| 844 | </FileConfiguration> | 864 | </FileConfiguration> |
| @@ -851,7 +871,7 @@ · 6 unmodified lines | |||
| 851 | > | 871 | > |
| 852 | <Tool | 872 | <Tool |
| 853 | Name="VCCustomBuildTool" | 873 | Name="VCCustomBuildTool" |
| 854 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 874 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 855 | Outputs="$(IntDir)\$(InputName).obj" | 875 | Outputs="$(IntDir)\$(InputName).obj" |
| 856 | /> | 876 | /> |
| 857 | </FileConfiguration> | 877 | </FileConfiguration> |
| @@ -860,7 +880,7 @@ · 2 unmodified lines | |||
| 860 | > | 880 | > |
| 861 | <Tool | 881 | <Tool |
| 862 | Name="VCCustomBuildTool" | 882 | Name="VCCustomBuildTool" |
| 863 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 883 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 864 | Outputs="$(IntDir)\$(InputName).obj" | 884 | Outputs="$(IntDir)\$(InputName).obj" |
| 865 | /> | 885 | /> |
| 866 | </FileConfiguration> | 886 | </FileConfiguration> |
| @@ -869,7 +889,7 @@ · 2 unmodified lines | |||
| 869 | > | 889 | > |
| 870 | <Tool | 890 | <Tool |
| 871 | Name="VCCustomBuildTool" | 891 | Name="VCCustomBuildTool" |
| 872 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 892 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 873 | Outputs="$(IntDir)\$(InputName).obj" | 893 | Outputs="$(IntDir)\$(InputName).obj" |
| 874 | /> | 894 | /> |
| 875 | </FileConfiguration> | 895 | </FileConfiguration> |
| @@ -878,7 +898,7 @@ · 2 unmodified lines | |||
| 878 | > | 898 | > |
| 879 | <Tool | 899 | <Tool |
| 880 | Name="VCCustomBuildTool" | 900 | Name="VCCustomBuildTool" |
| 881 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 901 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 882 | Outputs="$(IntDir)\$(InputName).obj" | 902 | Outputs="$(IntDir)\$(InputName).obj" |
| 883 | /> | 903 | /> |
| 884 | </FileConfiguration> | 904 | </FileConfiguration> |
| @@ -891,7 +911,7 @@ · 6 unmodified lines | |||
| 891 | > | 911 | > |
| 892 | <Tool | 912 | <Tool |
| 893 | Name="VCCustomBuildTool" | 913 | Name="VCCustomBuildTool" |
| 894 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 914 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 895 | Outputs="$(IntDir)\$(InputName).obj" | 915 | Outputs="$(IntDir)\$(InputName).obj" |
| 896 | /> | 916 | /> |
| 897 | </FileConfiguration> | 917 | </FileConfiguration> |
| @@ -900,7 +920,7 @@ · 2 unmodified lines | |||
| 900 | > | 920 | > |
| 901 | <Tool | 921 | <Tool |
| 902 | Name="VCCustomBuildTool" | 922 | Name="VCCustomBuildTool" |
| 903 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 923 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 904 | Outputs="$(IntDir)\$(InputName).obj" | 924 | Outputs="$(IntDir)\$(InputName).obj" |
| 905 | /> | 925 | /> |
| 906 | </FileConfiguration> | 926 | </FileConfiguration> |
| @@ -909,7 +929,7 @@ · 2 unmodified lines | |||
| 909 | > | 929 | > |
| 910 | <Tool | 930 | <Tool |
| 911 | Name="VCCustomBuildTool" | 931 | Name="VCCustomBuildTool" |
| 912 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 932 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 913 | Outputs="$(IntDir)\$(InputName).obj" | 933 | Outputs="$(IntDir)\$(InputName).obj" |
| 914 | /> | 934 | /> |
| 915 | </FileConfiguration> | 935 | </FileConfiguration> |
| @@ -918,7 +938,7 @@ · 2 unmodified lines | |||
| 918 | > | 938 | > |
| 919 | <Tool | 939 | <Tool |
| 920 | Name="VCCustomBuildTool" | 940 | Name="VCCustomBuildTool" |
| 921 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 941 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 922 | Outputs="$(IntDir)\$(InputName).obj" | 942 | Outputs="$(IntDir)\$(InputName).obj" |
| 923 | /> | 943 | /> |
| 924 | </FileConfiguration> | 944 | </FileConfiguration> |
| @@ -931,7 +951,7 @@ · 6 unmodified lines | |||
| 931 | > | 951 | > |
| 932 | <Tool | 952 | <Tool |
| 933 | Name="VCCustomBuildTool" | 953 | Name="VCCustomBuildTool" |
| 934 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 954 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 935 | Outputs="$(IntDir)\$(InputName).obj" | 955 | Outputs="$(IntDir)\$(InputName).obj" |
| 936 | /> | 956 | /> |
| 937 | </FileConfiguration> | 957 | </FileConfiguration> |
| @@ -940,7 +960,7 @@ · 2 unmodified lines | |||
| 940 | > | 960 | > |
| 941 | <Tool | 961 | <Tool |
| 942 | Name="VCCustomBuildTool" | 962 | Name="VCCustomBuildTool" |
| 943 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 963 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 944 | Outputs="$(IntDir)\$(InputName).obj" | 964 | Outputs="$(IntDir)\$(InputName).obj" |
| 945 | /> | 965 | /> |
| 946 | </FileConfiguration> | 966 | </FileConfiguration> |
| @@ -949,7 +969,7 @@ · 2 unmodified lines | |||
| 949 | > | 969 | > |
| 950 | <Tool | 970 | <Tool |
| 951 | Name="VCCustomBuildTool" | 971 | Name="VCCustomBuildTool" |
| 952 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 972 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 953 | Outputs="$(IntDir)\$(InputName).obj" | 973 | Outputs="$(IntDir)\$(InputName).obj" |
| 954 | /> | 974 | /> |
| 955 | </FileConfiguration> | 975 | </FileConfiguration> |
| @@ -958,7 +978,7 @@ · 2 unmodified lines | |||
| 958 | > | 978 | > |
| 959 | <Tool | 979 | <Tool |
| 960 | Name="VCCustomBuildTool" | 980 | Name="VCCustomBuildTool" |
| 961 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 981 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 962 | Outputs="$(IntDir)\$(InputName).obj" | 982 | Outputs="$(IntDir)\$(InputName).obj" |
| 963 | /> | 983 | /> |
| 964 | </FileConfiguration> | 984 | </FileConfiguration> |
| @@ -971,7 +991,7 @@ · 6 unmodified lines | |||
| 971 | > | 991 | > |
| 972 | <Tool | 992 | <Tool |
| 973 | Name="VCCustomBuildTool" | 993 | Name="VCCustomBuildTool" |
| 974 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 994 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 975 | Outputs="$(IntDir)\$(InputName).obj" | 995 | Outputs="$(IntDir)\$(InputName).obj" |
| 976 | /> | 996 | /> |
| 977 | </FileConfiguration> | 997 | </FileConfiguration> |
| @@ -980,7 +1000,7 @@ · 2 unmodified lines | |||
| 980 | > | 1000 | > |
| 981 | <Tool | 1001 | <Tool |
| 982 | Name="VCCustomBuildTool" | 1002 | Name="VCCustomBuildTool" |
| 983 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1003 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 984 | Outputs="$(IntDir)\$(InputName).obj" | 1004 | Outputs="$(IntDir)\$(InputName).obj" |
| 985 | /> | 1005 | /> |
| 986 | </FileConfiguration> | 1006 | </FileConfiguration> |
| @@ -989,7 +1009,7 @@ · 2 unmodified lines | |||
| 989 | > | 1009 | > |
| 990 | <Tool | 1010 | <Tool |
| 991 | Name="VCCustomBuildTool" | 1011 | Name="VCCustomBuildTool" |
| 992 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1012 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 993 | Outputs="$(IntDir)\$(InputName).obj" | 1013 | Outputs="$(IntDir)\$(InputName).obj" |
| 994 | /> | 1014 | /> |
| 995 | </FileConfiguration> | 1015 | </FileConfiguration> |
| @@ -998,7 +1018,7 @@ · 2 unmodified lines | |||
| 998 | > | 1018 | > |
| 999 | <Tool | 1019 | <Tool |
| 1000 | Name="VCCustomBuildTool" | 1020 | Name="VCCustomBuildTool" |
| 1001 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1021 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1002 | Outputs="$(IntDir)\$(InputName).obj" | 1022 | Outputs="$(IntDir)\$(InputName).obj" |
| 1003 | /> | 1023 | /> |
| 1004 | </FileConfiguration> | 1024 | </FileConfiguration> |
| @@ -1011,7 +1031,7 @@ · 6 unmodified lines | |||
| 1011 | > | 1031 | > |
| 1012 | <Tool | 1032 | <Tool |
| 1013 | Name="VCCustomBuildTool" | 1033 | Name="VCCustomBuildTool" |
| 1014 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1034 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1015 | Outputs="$(IntDir)\$(InputName).obj" | 1035 | Outputs="$(IntDir)\$(InputName).obj" |
| 1016 | /> | 1036 | /> |
| 1017 | </FileConfiguration> | 1037 | </FileConfiguration> |
| @@ -1020,7 +1040,7 @@ · 2 unmodified lines | |||
| 1020 | > | 1040 | > |
| 1021 | <Tool | 1041 | <Tool |
| 1022 | Name="VCCustomBuildTool" | 1042 | Name="VCCustomBuildTool" |
| 1023 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1043 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1024 | Outputs="$(IntDir)\$(InputName).obj" | 1044 | Outputs="$(IntDir)\$(InputName).obj" |
| 1025 | /> | 1045 | /> |
| 1026 | </FileConfiguration> | 1046 | </FileConfiguration> |
| @@ -1029,7 +1049,7 @@ · 2 unmodified lines | |||
| 1029 | > | 1049 | > |
| 1030 | <Tool | 1050 | <Tool |
| 1031 | Name="VCCustomBuildTool" | 1051 | Name="VCCustomBuildTool" |
| 1032 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1052 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1033 | Outputs="$(IntDir)\$(InputName).obj" | 1053 | Outputs="$(IntDir)\$(InputName).obj" |
| 1034 | /> | 1054 | /> |
| 1035 | </FileConfiguration> | 1055 | </FileConfiguration> |
| @@ -1038,7 +1058,7 @@ · 2 unmodified lines | |||
| 1038 | > | 1058 | > |
| 1039 | <Tool | 1059 | <Tool |
| 1040 | Name="VCCustomBuildTool" | 1060 | Name="VCCustomBuildTool" |
| 1041 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1061 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1042 | Outputs="$(IntDir)\$(InputName).obj" | 1062 | Outputs="$(IntDir)\$(InputName).obj" |
| 1043 | /> | 1063 | /> |
| 1044 | </FileConfiguration> | 1064 | </FileConfiguration> |
| @@ -1051,7 +1071,7 @@ · 6 unmodified lines | |||
| 1051 | > | 1071 | > |
| 1052 | <Tool | 1072 | <Tool |
| 1053 | Name="VCCustomBuildTool" | 1073 | Name="VCCustomBuildTool" |
| 1054 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1074 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1055 | Outputs="$(IntDir)\$(InputName).obj" | 1075 | Outputs="$(IntDir)\$(InputName).obj" |
| 1056 | /> | 1076 | /> |
| 1057 | </FileConfiguration> | 1077 | </FileConfiguration> |
| @@ -1060,7 +1080,7 @@ · 2 unmodified lines | |||
| 1060 | > | 1080 | > |
| 1061 | <Tool | 1081 | <Tool |
| 1062 | Name="VCCustomBuildTool" | 1082 | Name="VCCustomBuildTool" |
| 1063 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1083 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1064 | Outputs="$(IntDir)\$(InputName).obj" | 1084 | Outputs="$(IntDir)\$(InputName).obj" |
| 1065 | /> | 1085 | /> |
| 1066 | </FileConfiguration> | 1086 | </FileConfiguration> |
| @@ -1069,7 +1089,7 @@ · 2 unmodified lines | |||
| 1069 | > | 1089 | > |
| 1070 | <Tool | 1090 | <Tool |
| 1071 | Name="VCCustomBuildTool" | 1091 | Name="VCCustomBuildTool" |
| 1072 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1092 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1073 | Outputs="$(IntDir)\$(InputName).obj" | 1093 | Outputs="$(IntDir)\$(InputName).obj" |
| 1074 | /> | 1094 | /> |
| 1075 | </FileConfiguration> | 1095 | </FileConfiguration> |
| @@ -1078,7 +1098,7 @@ · 2 unmodified lines | |||
| 1078 | > | 1098 | > |
| 1079 | <Tool | 1099 | <Tool |
| 1080 | Name="VCCustomBuildTool" | 1100 | Name="VCCustomBuildTool" |
| 1081 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1101 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1082 | Outputs="$(IntDir)\$(InputName).obj" | 1102 | Outputs="$(IntDir)\$(InputName).obj" |
| 1083 | /> | 1103 | /> |
| 1084 | </FileConfiguration> | 1104 | </FileConfiguration> |
| @@ -1091,7 +1111,7 @@ · 6 unmodified lines | |||
| 1091 | > | 1111 | > |
| 1092 | <Tool | 1112 | <Tool |
| 1093 | Name="VCCustomBuildTool" | 1113 | Name="VCCustomBuildTool" |
| 1094 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1114 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1095 | Outputs="$(IntDir)\$(InputName).obj" | 1115 | Outputs="$(IntDir)\$(InputName).obj" |
| 1096 | /> | 1116 | /> |
| 1097 | </FileConfiguration> | 1117 | </FileConfiguration> |
| @@ -1100,7 +1120,7 @@ · 2 unmodified lines | |||
| 1100 | > | 1120 | > |
| 1101 | <Tool | 1121 | <Tool |
| 1102 | Name="VCCustomBuildTool" | 1122 | Name="VCCustomBuildTool" |
| 1103 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1123 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1104 | Outputs="$(IntDir)\$(InputName).obj" | 1124 | Outputs="$(IntDir)\$(InputName).obj" |
| 1105 | /> | 1125 | /> |
| 1106 | </FileConfiguration> | 1126 | </FileConfiguration> |
| @@ -1109,7 +1129,7 @@ · 2 unmodified lines | |||
| 1109 | > | 1129 | > |
| 1110 | <Tool | 1130 | <Tool |
| 1111 | Name="VCCustomBuildTool" | 1131 | Name="VCCustomBuildTool" |
| 1112 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1132 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1113 | Outputs="$(IntDir)\$(InputName).obj" | 1133 | Outputs="$(IntDir)\$(InputName).obj" |
| 1114 | /> | 1134 | /> |
| 1115 | </FileConfiguration> | 1135 | </FileConfiguration> |
| @@ -1118,7 +1138,7 @@ · 2 unmodified lines | |||
| 1118 | > | 1138 | > |
| 1119 | <Tool | 1139 | <Tool |
| 1120 | Name="VCCustomBuildTool" | 1140 | Name="VCCustomBuildTool" |
| 1121 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1141 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1122 | Outputs="$(IntDir)\$(InputName).obj" | 1142 | Outputs="$(IntDir)\$(InputName).obj" |
| 1123 | /> | 1143 | /> |
| 1124 | </FileConfiguration> | 1144 | </FileConfiguration> |
| @@ -1131,7 +1151,7 @@ · 6 unmodified lines | |||
| 1131 | > | 1151 | > |
| 1132 | <Tool | 1152 | <Tool |
| 1133 | Name="VCCustomBuildTool" | 1153 | Name="VCCustomBuildTool" |
| 1134 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1154 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1135 | Outputs="$(IntDir)\$(InputName).obj" | 1155 | Outputs="$(IntDir)\$(InputName).obj" |
| 1136 | /> | 1156 | /> |
| 1137 | </FileConfiguration> | 1157 | </FileConfiguration> |
| @@ -1140,7 +1160,7 @@ · 2 unmodified lines | |||
| 1140 | > | 1160 | > |
| 1141 | <Tool | 1161 | <Tool |
| 1142 | Name="VCCustomBuildTool" | 1162 | Name="VCCustomBuildTool" |
| 1143 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1163 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1144 | Outputs="$(IntDir)\$(InputName).obj" | 1164 | Outputs="$(IntDir)\$(InputName).obj" |
| 1145 | /> | 1165 | /> |
| 1146 | </FileConfiguration> | 1166 | </FileConfiguration> |
| @@ -1149,7 +1169,7 @@ · 2 unmodified lines | |||
| 1149 | > | 1169 | > |
| 1150 | <Tool | 1170 | <Tool |
| 1151 | Name="VCCustomBuildTool" | 1171 | Name="VCCustomBuildTool" |
| 1152 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1172 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1153 | Outputs="$(IntDir)\$(InputName).obj" | 1173 | Outputs="$(IntDir)\$(InputName).obj" |
| 1154 | /> | 1174 | /> |
| 1155 | </FileConfiguration> | 1175 | </FileConfiguration> |
| @@ -1158,7 +1178,7 @@ · 2 unmodified lines | |||
| 1158 | > | 1178 | > |
| 1159 | <Tool | 1179 | <Tool |
| 1160 | Name="VCCustomBuildTool" | 1180 | Name="VCCustomBuildTool" |
| 1161 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1181 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1162 | Outputs="$(IntDir)\$(InputName).obj" | 1182 | Outputs="$(IntDir)\$(InputName).obj" |
| 1163 | /> | 1183 | /> |
| 1164 | </FileConfiguration> | 1184 | </FileConfiguration> |
| @@ -1171,7 +1191,7 @@ · 6 unmodified lines | |||
| 1171 | > | 1191 | > |
| 1172 | <Tool | 1192 | <Tool |
| 1173 | Name="VCCustomBuildTool" | 1193 | Name="VCCustomBuildTool" |
| 1174 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1194 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1175 | Outputs="$(IntDir)\$(InputName).obj" | 1195 | Outputs="$(IntDir)\$(InputName).obj" |
| 1176 | /> | 1196 | /> |
| 1177 | </FileConfiguration> | 1197 | </FileConfiguration> |
| @@ -1180,7 +1200,7 @@ · 2 unmodified lines | |||
| 1180 | > | 1200 | > |
| 1181 | <Tool | 1201 | <Tool |
| 1182 | Name="VCCustomBuildTool" | 1202 | Name="VCCustomBuildTool" |
| 1183 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1203 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1184 | Outputs="$(IntDir)\$(InputName).obj" | 1204 | Outputs="$(IntDir)\$(InputName).obj" |
| 1185 | /> | 1205 | /> |
| 1186 | </FileConfiguration> | 1206 | </FileConfiguration> |
| @@ -1189,7 +1209,7 @@ · 2 unmodified lines | |||
| 1189 | > | 1209 | > |
| 1190 | <Tool | 1210 | <Tool |
| 1191 | Name="VCCustomBuildTool" | 1211 | Name="VCCustomBuildTool" |
| 1192 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1212 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1193 | Outputs="$(IntDir)\$(InputName).obj" | 1213 | Outputs="$(IntDir)\$(InputName).obj" |
| 1194 | /> | 1214 | /> |
| 1195 | </FileConfiguration> | 1215 | </FileConfiguration> |
| @@ -1198,7 +1218,7 @@ · 2 unmodified lines | |||
| 1198 | > | 1218 | > |
| 1199 | <Tool | 1219 | <Tool |
| 1200 | Name="VCCustomBuildTool" | 1220 | Name="VCCustomBuildTool" |
| 1201 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1221 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1202 | Outputs="$(IntDir)\$(InputName).obj" | 1222 | Outputs="$(IntDir)\$(InputName).obj" |
| 1203 | /> | 1223 | /> |
| 1204 | </FileConfiguration> | 1224 | </FileConfiguration> |
| @@ -1211,7 +1231,7 @@ · 6 unmodified lines | |||
| 1211 | > | 1231 | > |
| 1212 | <Tool | 1232 | <Tool |
| 1213 | Name="VCCustomBuildTool" | 1233 | Name="VCCustomBuildTool" |
| 1214 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1234 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1215 | Outputs="$(IntDir)\$(InputName).obj" | 1235 | Outputs="$(IntDir)\$(InputName).obj" |
| 1216 | /> | 1236 | /> |
| 1217 | </FileConfiguration> | 1237 | </FileConfiguration> |
| @@ -1220,7 +1240,7 @@ · 2 unmodified lines | |||
| 1220 | > | 1240 | > |
| 1221 | <Tool | 1241 | <Tool |
| 1222 | Name="VCCustomBuildTool" | 1242 | Name="VCCustomBuildTool" |
| 1223 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1243 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1224 | Outputs="$(IntDir)\$(InputName).obj" | 1244 | Outputs="$(IntDir)\$(InputName).obj" |
| 1225 | /> | 1245 | /> |
| 1226 | </FileConfiguration> | 1246 | </FileConfiguration> |
| @@ -1229,7 +1249,7 @@ · 2 unmodified lines | |||
| 1229 | > | 1249 | > |
| 1230 | <Tool | 1250 | <Tool |
| 1231 | Name="VCCustomBuildTool" | 1251 | Name="VCCustomBuildTool" |
| 1232 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1252 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1233 | Outputs="$(IntDir)\$(InputName).obj" | 1253 | Outputs="$(IntDir)\$(InputName).obj" |
| 1234 | /> | 1254 | /> |
| 1235 | </FileConfiguration> | 1255 | </FileConfiguration> |
| @@ -1238,7 +1258,7 @@ · 2 unmodified lines | |||
| 1238 | > | 1258 | > |
| 1239 | <Tool | 1259 | <Tool |
| 1240 | Name="VCCustomBuildTool" | 1260 | Name="VCCustomBuildTool" |
| 1241 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1261 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1242 | Outputs="$(IntDir)\$(InputName).obj" | 1262 | Outputs="$(IntDir)\$(InputName).obj" |
| 1243 | /> | 1263 | /> |
| 1244 | </FileConfiguration> | 1264 | </FileConfiguration> |
| @@ -1251,7 +1271,7 @@ · 6 unmodified lines | |||
| 1251 | > | 1271 | > |
| 1252 | <Tool | 1272 | <Tool |
| 1253 | Name="VCCustomBuildTool" | 1273 | Name="VCCustomBuildTool" |
| 1254 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1274 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1255 | Outputs="$(IntDir)\$(InputName).obj" | 1275 | Outputs="$(IntDir)\$(InputName).obj" |
| 1256 | /> | 1276 | /> |
| 1257 | </FileConfiguration> | 1277 | </FileConfiguration> |
| @@ -1260,7 +1280,7 @@ · 2 unmodified lines | |||
| 1260 | > | 1280 | > |
| 1261 | <Tool | 1281 | <Tool |
| 1262 | Name="VCCustomBuildTool" | 1282 | Name="VCCustomBuildTool" |
| 1263 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1283 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1264 | Outputs="$(IntDir)\$(InputName).obj" | 1284 | Outputs="$(IntDir)\$(InputName).obj" |
| 1265 | /> | 1285 | /> |
| 1266 | </FileConfiguration> | 1286 | </FileConfiguration> |
| @@ -1269,7 +1289,7 @@ · 2 unmodified lines | |||
| 1269 | > | 1289 | > |
| 1270 | <Tool | 1290 | <Tool |
| 1271 | Name="VCCustomBuildTool" | 1291 | Name="VCCustomBuildTool" |
| 1272 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1292 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1273 | Outputs="$(IntDir)\$(InputName).obj" | 1293 | Outputs="$(IntDir)\$(InputName).obj" |
| 1274 | /> | 1294 | /> |
| 1275 | </FileConfiguration> | 1295 | </FileConfiguration> |
| @@ -1278,7 +1298,7 @@ · 2 unmodified lines | |||
| 1278 | > | 1298 | > |
| 1279 | <Tool | 1299 | <Tool |
| 1280 | Name="VCCustomBuildTool" | 1300 | Name="VCCustomBuildTool" |
| 1281 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1301 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1282 | Outputs="$(IntDir)\$(InputName).obj" | 1302 | Outputs="$(IntDir)\$(InputName).obj" |
| 1283 | /> | 1303 | /> |
| 1284 | </FileConfiguration> | 1304 | </FileConfiguration> |
| @@ -1291,7 +1311,7 @@ · 6 unmodified lines | |||
| 1291 | > | 1311 | > |
| 1292 | <Tool | 1312 | <Tool |
| 1293 | Name="VCCustomBuildTool" | 1313 | Name="VCCustomBuildTool" |
| 1294 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1314 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1295 | Outputs="$(IntDir)\$(InputName).obj" | 1315 | Outputs="$(IntDir)\$(InputName).obj" |
| 1296 | /> | 1316 | /> |
| 1297 | </FileConfiguration> | 1317 | </FileConfiguration> |
| @@ -1300,7 +1320,7 @@ · 2 unmodified lines | |||
| 1300 | > | 1320 | > |
| 1301 | <Tool | 1321 | <Tool |
| 1302 | Name="VCCustomBuildTool" | 1322 | Name="VCCustomBuildTool" |
| 1303 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1323 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1304 | Outputs="$(IntDir)\$(InputName).obj" | 1324 | Outputs="$(IntDir)\$(InputName).obj" |
| 1305 | /> | 1325 | /> |
| 1306 | </FileConfiguration> | 1326 | </FileConfiguration> |
| @@ -1309,7 +1329,7 @@ · 2 unmodified lines | |||
| 1309 | > | 1329 | > |
| 1310 | <Tool | 1330 | <Tool |
| 1311 | Name="VCCustomBuildTool" | 1331 | Name="VCCustomBuildTool" |
| 1312 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1332 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1313 | Outputs="$(IntDir)\$(InputName).obj" | 1333 | Outputs="$(IntDir)\$(InputName).obj" |
| 1314 | /> | 1334 | /> |
| 1315 | </FileConfiguration> | 1335 | </FileConfiguration> |
| @@ -1318,7 +1338,7 @@ · 2 unmodified lines | |||
| 1318 | > | 1338 | > |
| 1319 | <Tool | 1339 | <Tool |
| 1320 | Name="VCCustomBuildTool" | 1340 | Name="VCCustomBuildTool" |
| 1321 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1341 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1322 | Outputs="$(IntDir)\$(InputName).obj" | 1342 | Outputs="$(IntDir)\$(InputName).obj" |
| 1323 | /> | 1343 | /> |
| 1324 | </FileConfiguration> | 1344 | </FileConfiguration> |
| @@ -1331,7 +1351,7 @@ · 6 unmodified lines | |||
| 1331 | > | 1351 | > |
| 1332 | <Tool | 1352 | <Tool |
| 1333 | Name="VCCustomBuildTool" | 1353 | Name="VCCustomBuildTool" |
| 1334 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1354 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1335 | Outputs="$(IntDir)\$(InputName).obj" | 1355 | Outputs="$(IntDir)\$(InputName).obj" |
| 1336 | /> | 1356 | /> |
| 1337 | </FileConfiguration> | 1357 | </FileConfiguration> |
| @@ -1340,7 +1360,7 @@ · 2 unmodified lines | |||
| 1340 | > | 1360 | > |
| 1341 | <Tool | 1361 | <Tool |
| 1342 | Name="VCCustomBuildTool" | 1362 | Name="VCCustomBuildTool" |
| 1343 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1363 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1344 | Outputs="$(IntDir)\$(InputName).obj" | 1364 | Outputs="$(IntDir)\$(InputName).obj" |
| 1345 | /> | 1365 | /> |
| 1346 | </FileConfiguration> | 1366 | </FileConfiguration> |
| @@ -1349,7 +1369,7 @@ · 2 unmodified lines | |||
| 1349 | > | 1369 | > |
| 1350 | <Tool | 1370 | <Tool |
| 1351 | Name="VCCustomBuildTool" | 1371 | Name="VCCustomBuildTool" |
| 1352 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1372 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1353 | Outputs="$(IntDir)\$(InputName).obj" | 1373 | Outputs="$(IntDir)\$(InputName).obj" |
| 1354 | /> | 1374 | /> |
| 1355 | </FileConfiguration> | 1375 | </FileConfiguration> |
| @@ -1358,7 +1378,7 @@ · 2 unmodified lines | |||
| 1358 | > | 1378 | > |
| 1359 | <Tool | 1379 | <Tool |
| 1360 | Name="VCCustomBuildTool" | 1380 | Name="VCCustomBuildTool" |
| 1361 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1381 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1362 | Outputs="$(IntDir)\$(InputName).obj" | 1382 | Outputs="$(IntDir)\$(InputName).obj" |
| 1363 | /> | 1383 | /> |
| 1364 | </FileConfiguration> | 1384 | </FileConfiguration> |
| @@ -1371,7 +1391,7 @@ · 6 unmodified lines | |||
| 1371 | > | 1391 | > |
| 1372 | <Tool | 1392 | <Tool |
| 1373 | Name="VCCustomBuildTool" | 1393 | Name="VCCustomBuildTool" |
| 1374 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1394 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1375 | Outputs="$(IntDir)\$(InputName).obj" | 1395 | Outputs="$(IntDir)\$(InputName).obj" |
| 1376 | /> | 1396 | /> |
| 1377 | </FileConfiguration> | 1397 | </FileConfiguration> |
| @@ -1380,7 +1400,7 @@ · 2 unmodified lines | |||
| 1380 | > | 1400 | > |
| 1381 | <Tool | 1401 | <Tool |
| 1382 | Name="VCCustomBuildTool" | 1402 | Name="VCCustomBuildTool" |
| 1383 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1403 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1384 | Outputs="$(IntDir)\$(InputName).obj" | 1404 | Outputs="$(IntDir)\$(InputName).obj" |
| 1385 | /> | 1405 | /> |
| 1386 | </FileConfiguration> | 1406 | </FileConfiguration> |
| @@ -1389,7 +1409,7 @@ · 2 unmodified lines | |||
| 1389 | > | 1409 | > |
| 1390 | <Tool | 1410 | <Tool |
| 1391 | Name="VCCustomBuildTool" | 1411 | Name="VCCustomBuildTool" |
| 1392 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1412 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win32 -DPREFIX -DX86_32 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1393 | Outputs="$(IntDir)\$(InputName).obj" | 1413 | Outputs="$(IntDir)\$(InputName).obj" |
| 1394 | /> | 1414 | /> |
| 1395 | </FileConfiguration> | 1415 | </FileConfiguration> |
| @@ -1398,7 +1418,7 @@ · 2 unmodified lines | |||
| 1398 | > | 1418 | > |
| 1399 | <Tool | 1419 | <Tool |
| 1400 | Name="VCCustomBuildTool" | 1420 | Name="VCCustomBuildTool" |
| 1401 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath)
" | 1421 | CommandLine="nasm -I$(InputDir) -I$(InputDir)/../../../common/x86/ -f win64 -DWIN64 -o $(IntDir)\$(InputName).obj $(InputPath);" |
| 1402 | Outputs="$(IntDir)\$(InputName).obj" | 1422 | Outputs="$(IntDir)\$(InputName).obj" |
| 1403 | /> | 1423 | /> |
| 1404 | </FileConfiguration> | 1424 | </FileConfiguration> |
| @@ -238,6 +238,8 @@ int ParseConfig (CReadConfig& cRdCfg, SSourcePicture* pSrcPic, SEncParamExt& pSv · 237 unmodified lines | |||
| 238 | pSvcParam.bEnableSSEI = atoi (strTag[1].c_str()) ? true : false; | 238 | pSvcParam.bEnableSSEI = atoi (strTag[1].c_str()) ? true : false; |
| 239 | } else if (strTag[0].compare ("EnableFrameCropping") == 0) { | 239 | } else if (strTag[0].compare ("EnableFrameCropping") == 0) { |
| 240 | pSvcParam.bEnableFrameCroppingFlag = (atoi (strTag[1].c_str()) != 0); | 240 | pSvcParam.bEnableFrameCroppingFlag = (atoi (strTag[1].c_str()) != 0); |
| 241 | } else if (strTag[0].compare ("EntropyCodingModeFlag") == 0) { | ||
| 242 | pSvcParam.iEntropyCodingModeFlag = (atoi (strTag[1].c_str()) != 0); | ||
| 241 | } else if (strTag[0].compare ("LoopFilterDisableIDC") == 0) { | 243 | } else if (strTag[0].compare ("LoopFilterDisableIDC") == 0) { |
| 242 | pSvcParam.iLoopFilterDisableIdc = (int8_t)atoi (strTag[1].c_str()); | 244 | pSvcParam.iLoopFilterDisableIdc = (int8_t)atoi (strTag[1].c_str()); |
| 243 | if (pSvcParam.iLoopFilterDisableIdc > 6 || pSvcParam.iLoopFilterDisableIdc < 0) { | 245 | if (pSvcParam.iLoopFilterDisableIdc > 6 || pSvcParam.iLoopFilterDisableIdc < 0) { |
| @@ -354,6 +356,7 @@ void PrintHelp() { · 110 unmodified lines | |||
| 354 | printf (" -iper Intra period (default: -1) : must be a power of 2 of GOP size (or -1)\n"); | 356 | printf (" -iper Intra period (default: -1) : must be a power of 2 of GOP size (or -1)\n"); |
| 355 | printf (" -nalsize the Maximum NAL size. which should be larger than the each layer slicesize when slice mode equals to SM_DYN_SLICE\n"); | 357 | printf (" -nalsize the Maximum NAL size. which should be larger than the each layer slicesize when slice mode equals to SM_DYN_SLICE\n"); |
| 356 | printf (" -spsid Enable id adding in SPS/PPS per IDR \n"); | 358 | printf (" -spsid Enable id adding in SPS/PPS per IDR \n"); |
| 359 | printf (" -cabac Entropy coding mode(0:cavlc 1:cabac \n"); | ||
| 357 | printf (" -denois Control denoising (default: 0)\n"); | 360 | printf (" -denois Control denoising (default: 0)\n"); |
| 358 | printf (" -scene Control scene change detection (default: 0)\n"); | 361 | printf (" -scene Control scene change detection (default: 0)\n"); |
| 359 | printf (" -bgd Control background detection (default: 0)\n"); | 362 | printf (" -bgd Control background detection (default: 0)\n"); |
| @@ -420,6 +423,9 @@ int ParseCommandLine (int argc, char** argv, SSourcePicture* pSrcPic, SEncParamE · 60 unmodified lines | |||
| 420 | else if (!strcmp (pCommand, "-spsid") && (n < argc)) | 423 | else if (!strcmp (pCommand, "-spsid") && (n < argc)) |
| 421 | pSvcParam.bEnableSpsPpsIdAddition = atoi (argv[n++]) ? true : false; | 424 | pSvcParam.bEnableSpsPpsIdAddition = atoi (argv[n++]) ? true : false; |
| 422 | 425 | ||
| 426 | else if (!strcmp (pCommand, "-cabac") && (n < argc)) | ||
| 427 | pSvcParam.iEntropyCodingModeFlag = atoi (argv[n++]); | ||
| 428 | |||
| 423 | else if (!strcmp (pCommand, "-denois") && (n < argc)) | 429 | else if (!strcmp (pCommand, "-denois") && (n < argc)) |
| 424 | pSvcParam.bEnableDenoise = atoi (argv[n++]) ? true : false; | 430 | pSvcParam.bEnableDenoise = atoi (argv[n++]) ? true : false; |
| 425 | 431 | ||
| @@ -138,7 +138,8 @@ int32_t WelsInitPps (SWelsPPS* pPps, · 137 unmodified lines | |||
| 138 | SSubsetSps* pSubsetSps, | 138 | SSubsetSps* pSubsetSps, |
| 139 | const uint32_t kuiPpsId, | 139 | const uint32_t kuiPpsId, |
| 140 | const bool kbDeblockingFilterPresentFlag, | 140 | const bool kbDeblockingFilterPresentFlag, |
| 141 | const bool kbUsingSubsetSps); | 141 | const bool kbUsingSubsetSps, |
| 142 | const bool kbEntropyCodingModeFlag); | ||
| 142 | int32_t WelsCheckRefFrameLimitation (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam); | 143 | int32_t WelsCheckRefFrameLimitation (SLogContext* pLogCtx, SWelsSvcCodingParam* pParam); |
| 143 | } | 144 | } |
| 144 | #endif//WELS_ACCESS_UNIT_PARSER_H__ | 145 | #endif//WELS_ACCESS_UNIT_PARSER_H__ |
| @@ -70,7 +70,7 @@ int32_t AllocateBsOutputBuffer (CMemoryAlign* pMa, const int32_t iNeededLen, int · 69 unmodified lines | |||
| 70 | * \param pEncCtx sWelsEncCtx* | 70 | * \param pEncCtx sWelsEncCtx* |
| 71 | * \return successful - 0; otherwise none 0 for failed | 71 | * \return successful - 0; otherwise none 0 for failed |
| 72 | */ | 72 | */ |
| 73 | int32_t InitFunctionPointers (SWelsFuncPtrList* pFuncList, SWelsSvcCodingParam* _param, uint32_t uiCpuFlag); | 73 | int32_t InitFunctionPointers (sWelsEncCtx* pEncCtx, SWelsSvcCodingParam* _param, uint32_t uiCpuFlag); |
| 74 | 74 | ||
| 75 | ///*! | 75 | ///*! |
| 76 | // * \brief decide frame type (IDR/P frame) | 76 | // * \brief decide frame type (IDR/P frame) |
| @@ -225,7 +225,7 @@ typedef struct TagWelsEncCtx { · 224 unmodified lines | |||
| 225 | int32_t iEncoderError; | 225 | int32_t iEncoderError; |
| 226 | WELS_MUTEX mutexEncoderError; | 226 | WELS_MUTEX mutexEncoderError; |
| 227 | bool bDeliveryFlag; | 227 | bool bDeliveryFlag; |
| 228 | 228 | SStateCtx sWelsCabacContexts[4][WELS_QP_MAX + 1][WELS_CONTEXT_COUNT]; | |
| 229 | #ifdef ENABLE_FRAME_DUMP | 229 | #ifdef ENABLE_FRAME_DUMP |
| 230 | bool bDependencyRecFlag[MAX_DEPENDENCY_LAYER]; | 230 | bool bDependencyRecFlag[MAX_DEPENDENCY_LAYER]; |
| 231 | bool bRecFlag; | 231 | bool bRecFlag; |
| @@ -157,7 +157,7 @@ typedef struct TagWelsSvcCodingParam: SEncParamExt { · 156 unmodified lines | |||
| 157 | /* Rate Control */ | 157 | /* Rate Control */ |
| 158 | param.iRCMode = RC_QUALITY_MODE; | 158 | param.iRCMode = RC_QUALITY_MODE; |
| 159 | param.iPaddingFlag = 0; | 159 | param.iPaddingFlag = 0; |
| 160 | 160 | param.iEntropyCodingModeFlag = 0; | |
| 161 | param.bEnableDenoise = false; // denoise control | 161 | param.bEnableDenoise = false; // denoise control |
| 162 | param.bEnableSceneChangeDetect = true; // scene change detection control | 162 | param.bEnableSceneChangeDetect = true; // scene change detection control |
| 163 | param.bEnableBackgroundDetection = true; // background detection control | 163 | param.bEnableBackgroundDetection = true; // background detection control |
| @@ -240,7 +240,8 @@ typedef struct TagWelsSvcCodingParam: SEncParamExt { · 76 unmodified lines | |||
| 240 | 240 | ||
| 241 | int8_t iIdxSpatial = 0; | 241 | int8_t iIdxSpatial = 0; |
| 242 | EProfileIdc uiProfileIdc = PRO_BASELINE; | 242 | EProfileIdc uiProfileIdc = PRO_BASELINE; |
| 243 | 243 | if (iEntropyCodingModeFlag) | |
| 244 | uiProfileIdc = PRO_MAIN; | ||
| 244 | SSpatialLayerInternal* pDlp = &sDependencyLayers[0]; | 245 | SSpatialLayerInternal* pDlp = &sDependencyLayers[0]; |
| 245 | 246 | ||
| 246 | while (iIdxSpatial < iSpatialLayerNum) { | 247 | while (iIdxSpatial < iSpatialLayerNum) { |
| @@ -298,7 +299,7 @@ typedef struct TagWelsSvcCodingParam: SEncParamExt { · 51 unmodified lines | |||
| 298 | iLoopFilterDisableIdc = pCodingParam.iLoopFilterDisableIdc; // 0: on, 1: off, 2: on except for slice boundaries, | 299 | iLoopFilterDisableIdc = pCodingParam.iLoopFilterDisableIdc; // 0: on, 1: off, 2: on except for slice boundaries, |
| 299 | iLoopFilterAlphaC0Offset = pCodingParam.iLoopFilterAlphaC0Offset; // AlphaOffset: valid range [-6, 6], default 0 | 300 | iLoopFilterAlphaC0Offset = pCodingParam.iLoopFilterAlphaC0Offset; // AlphaOffset: valid range [-6, 6], default 0 |
| 300 | iLoopFilterBetaOffset = pCodingParam.iLoopFilterBetaOffset; // BetaOffset: valid range [-6, 6], default 0 | 301 | iLoopFilterBetaOffset = pCodingParam.iLoopFilterBetaOffset; // BetaOffset: valid range [-6, 6], default 0 |
| 301 | 302 | iEntropyCodingModeFlag = pCodingParam.iEntropyCodingModeFlag; | |
| 302 | bEnableFrameCroppingFlag = pCodingParam.bEnableFrameCroppingFlag; | 303 | bEnableFrameCroppingFlag = pCodingParam.bEnableFrameCroppingFlag; |
| 303 | 304 | ||
| 304 | /* Rate Control */ | 305 | /* Rate Control */ |
| @@ -459,7 +460,7 @@ typedef struct TagWelsSvcCodingParam: SEncParamExt { · 154 unmodified lines | |||
| 459 | const uint8_t* pTemporalIdList = &g_kuiTemporalIdListTable[iDecStages][0]; | 460 | const uint8_t* pTemporalIdList = &g_kuiTemporalIdListTable[iDecStages][0]; |
| 460 | SSpatialLayerInternal* pDlp = &sDependencyLayers[0]; | 461 | SSpatialLayerInternal* pDlp = &sDependencyLayers[0]; |
| 461 | SSpatialLayerConfig* pSpatialLayer = &sSpatialLayers[0]; | 462 | SSpatialLayerConfig* pSpatialLayer = &sSpatialLayers[0]; |
| 462 | EProfileIdc uiProfileIdc = PRO_BASELINE; | 463 | EProfileIdc uiProfileIdc = iEntropyCodingModeFlag ? PRO_MAIN : PRO_BASELINE; |
| 463 | int8_t i = 0; | 464 | int8_t i = 0; |
| 464 | 465 | ||
| 465 | while (i < iSpatialLayerNum) { | 466 | while (i < iSpatialLayerNum) { |
| @@ -492,7 +493,7 @@ typedef struct TagWelsSvcCodingParam: SEncParamExt { · 26 unmodified lines | |||
| 492 | return ENC_RETURN_INVALIDINPUT; | 493 | return ENC_RETURN_INVALIDINPUT; |
| 493 | } | 494 | } |
| 494 | 495 | ||
| 495 | uiProfileIdc = PRO_SCALABLE_BASELINE; | 496 | uiProfileIdc = iEntropyCodingModeFlag ? PRO_SCALABLE_HIGH : PRO_SCALABLE_BASELINE; |
| 496 | ++ pDlp; | 497 | ++ pDlp; |
| 497 | ++ pSpatialLayer; | 498 | ++ pSpatialLayer; |
| 498 | ++ i; | 499 | ++ i; |
| @@ -147,7 +147,7 @@ uint8_t uiChromaQpIndexOffset; · 146 unmodified lines | |||
| 147 | // /* potential application for High profile */ | 147 | // /* potential application for High profile */ |
| 148 | 148 | ||
| 149 | // bool bPicOrderPresentFlag; | 149 | // bool bPicOrderPresentFlag; |
| 150 | 150 | bool bEntropyCodingModeFlag; | |
| 151 | bool bDeblockingFilterControlPresentFlag; | 151 | bool bDeblockingFilterControlPresentFlag; |
| 152 | 152 | ||
| 153 | // bool bConstainedIntraPredFlag; | 153 | // bool bConstainedIntraPredFlag; |
| @@ -0,0 +1,89 @@ | |||
| 1 | /*! | ||
| 2 | * \copy | ||
| 3 | * Copyright (c) 2009-2013, Cisco Systems | ||
| 4 | * All rights reserved. | ||
| 5 | * | ||
| 6 | * Redistribution and use in source and binary forms, with or without | ||
| 7 | * modification, are permitted provided that the following conditions | ||
| 8 | * are met: | ||
| 9 | * | ||
| 10 | * * Redistributions of source code must retain the above copyright | ||
| 11 | * notice, this list of conditions and the following disclaimer. | ||
| 12 | * | ||
| 13 | * * Redistributions in binary form must reproduce the above copyright | ||
| 14 | * notice, this list of conditions and the following disclaimer in | ||
| 15 | * the documentation and/or other materials provided with the | ||
| 16 | * distribution. | ||
| 17 | * | ||
| 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| 19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
| 21 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
| 22 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
| 24 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 25 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
| 26 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
| 28 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
| 29 | * POSSIBILITY OF SUCH DAMAGE. | ||
| 30 | * | ||
| 31 | * | ||
| 32 | * \file set_mb_syn_cabac.h | ||
| 33 | * | ||
| 34 | * \brief Seting all syntax elements of mb and encoding residual with cabac | ||
| 35 | * | ||
| 36 | * \date 09/27/2014 Created | ||
| 37 | * | ||
| 38 | ************************************************************************************* | ||
| 39 | */ | ||
| 40 | |||
| 41 | #ifndef SET_MB_SYN_CABAC_H_ | ||
| 42 | #define SET_MB_SYN_CABAC_H_ | ||
| 43 | |||
| 44 | #include "typedefs.h" | ||
| 45 | #include "bit_stream.h" | ||
| 46 | |||
| 47 | namespace WelsEnc { | ||
| 48 | |||
| 49 | #define WELS_QP_MAX 51 | ||
| 50 | #define WELS_CONTEXT_COUNT 460 | ||
| 51 | #define CTX_NA 0 | ||
| 52 | |||
| 53 | typedef struct TagStateCtx { | ||
| 54 | uint8_t m_uiState; | ||
| 55 | uint8_t m_uiValMps; | ||
| 56 | } SStateCtx; | ||
| 57 | typedef struct TagCabacCtx { | ||
| 58 | uint32_t m_uiLow; | ||
| 59 | uint32_t m_uiRange; | ||
| 60 | SStateCtx m_sStateCtx[WELS_CONTEXT_COUNT]; | ||
| 61 | uint8_t* m_pBufStart; | ||
| 62 | uint8_t* m_pBufEnd; | ||
| 63 | uint8_t* m_pBufCur; | ||
| 64 | uint8_t m_iBitsOutstanding; | ||
| 65 | uint32_t m_uData; | ||
| 66 | uint32_t m_uiBitsUsed; | ||
| 67 | uint32_t m_iFirstFlag; | ||
| 68 | uint32_t m_uiBinCountsInNalUnits; | ||
| 69 | } SCabacCtx; | ||
| 70 | |||
| 71 | |||
| 72 | extern const uint8_t g_kuiCabacRangeLps[64][4]; | ||
| 73 | extern const int8_t g_kiCabacGlobalContextIdx[WELS_CONTEXT_COUNT][4][2]; | ||
| 74 | extern const uint8_t g_kuiStateTransTable[64][2]; | ||
| 75 | |||
| 76 | void WelsCabacContextInit (void* pCtx,SCabacCtx* pCbCtx,int32_t iModel); | ||
| 77 | void WelsCabacEncodeInit (SCabacCtx* pCbCtx, uint8_t* pBuf, uint8_t* pEnd); | ||
| 78 | void WelsCabacEncodeDecision (SCabacCtx* pCbCtx, int32_t iCtx, uint32_t uiBin); | ||
| 79 | void WelsCabacEncodeBypassOne (SCabacCtx* pCbCtx, uint32_t uiBin); | ||
| 80 | void WelsCabacEncodeTerminate (SCabacCtx* pCbCtx, uint32_t uiBin); | ||
| 81 | void WelsCabacEncodeUeBypass (SCabacCtx* pCbCtx, int32_t iExpBits, uint32_t uiVal); | ||
| 82 | void WelsCabacEncodeFlush (SCabacCtx* pCbCtx); | ||
| 83 | uint8_t* WelsCabacEncodeGetPtr (SCabacCtx* pCbCtx); | ||
| 84 | int32_t WriteBlockResidualCabac (void* pEncCtx, int16_t* pCoffLevel, int32_t iEndIdx, | ||
| 85 | int32_t iCalRunLevelFlag, | ||
| 86 | int32_t iResidualProperty, int8_t iNC, SBitStringAux* pBs); | ||
| 87 | |||
| 88 | } | ||
| 89 | #endif | ||
| @@ -48,30 +48,30 @@ · 47 unmodified lines | |||
| 48 | namespace WelsEnc { | 48 | namespace WelsEnc { |
| 49 | 49 | ||
| 50 | 50 | ||
| 51 | 51 | enum ECtxBlockCat { | |
| 52 | enum EResidualProperty { | 52 | LUMA_DC = 0, |
| 53 | LUMA_DC = 0, | 53 | LUMA_AC = 1, |
| 54 | LUMA_AC = 1, | 54 | LUMA_4x4 = 2, |
| 55 | LUMA_4x4 = 2, | 55 | CHROMA_DC = 3, |
| 56 | CHROMA_DC = 3, | 56 | CHROMA_AC = 4 |
| 57 | CHROMA_AC = 4 | ||
| 58 | }; | 57 | }; |
| 59 | 58 | ||
| 60 | 59 | ||
| 61 | #define LUMA_DC_AC 0x04 | 60 | #define LUMA_DC_AC 0x04 |
| 62 | 61 | ||
| 63 | typedef struct TagCavlcTableItem { | 62 | typedef struct TagCavlcTableItem { |
| 64 | uint16_t uiBits; | 63 | uint16_t uiBits; |
| 65 | uint8_t uiLen; | 64 | uint8_t uiLen; |
| 66 | uint8_t uiSuffixLength; | 65 | uint8_t uiSuffixLength; |
| 67 | } SCavlcTableItem; | 66 | } SCavlcTableItem; |
| 68 | 67 | ||
| 69 | void InitCoeffFunc (SWelsFuncPtrList* pFuncList, const uint32_t uiCpuFlag); | 68 | void InitCoeffFunc (SWelsFuncPtrList* pFuncList, const uint32_t uiCpuFlag,int32_t iEntropyCodingModeFlag); |
| 70 | 69 | ||
| 71 | int32_t WriteBlockResidualCavlc (SWelsFuncPtrList* pFuncList, int16_t* pCoffLevel, int32_t iEndIdx, | 70 | int32_t WriteBlockResidualCavlc (SWelsFuncPtrList* pFuncList, int16_t* pCoffLevel, int32_t iEndIdx, |
| 72 | int32_t iCalRunLevelFlag, | 71 | int32_t iCalRunLevelFlag, |
| 73 | int32_t iResidualProperty, int8_t iNC, SBitStringAux* pBs); | 72 | int32_t iResidualProperty, int8_t iNC, SBitStringAux* pBs); |
| 74 | 73 | ||
| 74 | |||
| 75 | #if defined(__cplusplus) | 75 | #if defined(__cplusplus) |
| 76 | extern "C" { | 76 | extern "C" { |
| 77 | #endif//__cplusplus | 77 | #endif//__cplusplus |
| @@ -42,7 +42,7 @@ · 41 unmodified lines | |||
| 42 | #include "parameter_sets.h" | 42 | #include "parameter_sets.h" |
| 43 | #include "svc_enc_slice_segment.h" | 43 | #include "svc_enc_slice_segment.h" |
| 44 | #include "bit_stream.h" | 44 | #include "bit_stream.h" |
| 45 | 45 | #include "set_mb_syn_cabac.h" | |
| 46 | 46 | ||
| 47 | namespace WelsEnc { | 47 | namespace WelsEnc { |
| 48 | 48 | ||
| @@ -178,6 +178,10 @@ uint8_t uiAssumeLog2BytePerMb; · 129 unmodified lines | |||
| 178 | uint32_t uiSliceFMECostDown;//TODO: for FME switch under MT, to opt after ME final? | 178 | uint32_t uiSliceFMECostDown;//TODO: for FME switch under MT, to opt after ME final? |
| 179 | 179 | ||
| 180 | uint8_t uiReservedFillByte; // reserved to meet 4 bytes alignment | 180 | uint8_t uiReservedFillByte; // reserved to meet 4 bytes alignment |
| 181 | |||
| 182 | SCabacCtx sCabacCtx; | ||
| 183 | int32_t iCabacInitIdc; | ||
| 184 | int32_t iMbSkipRun; | ||
| 181 | } SSlice, *PSlice; | 185 | } SSlice, *PSlice; |
| 182 | 186 | ||
| 183 | } | 187 | } |
| @@ -171,7 +171,6 @@ pBs->pBufPtr += 4 - pBs->iLeftBits / 8; · 170 unmodified lines | |||
| 171 | pBs->iLeftBits = 32; | 171 | pBs->iLeftBits = 32; |
| 172 | pBs->uiCurBits = 0; // for future writing safe, 5/19/2010 | 172 | pBs->uiCurBits = 0; // for future writing safe, 5/19/2010 |
| 173 | } | 173 | } |
| 174 | |||
| 175 | /* | 174 | /* |
| 176 | * Write unsigned exp golomb codes | 175 | * Write unsigned exp golomb codes |
| 177 | */ | 176 | */ |
| @@ -246,5 +245,15 @@ static inline int32_t BsGetBitsPos (SBitStringAux* pBs) { · 68 unmodified lines | |||
| 246 | return (int32_t) (((pBs->pBufPtr - pBs->pBuf) << 3) + 32 - pBs->iLeftBits); | 245 | return (int32_t) (((pBs->pBufPtr - pBs->pBuf) << 3) + 32 - pBs->iLeftBits); |
| 247 | } | 246 | } |
| 248 | 247 | ||
| 248 | static inline void BsAlign( SBitStringAux* pBs ) | ||
| 249 | { | ||
| 250 | if( pBs->iLeftBits&7 ) | ||
| 251 | { | ||
| 252 | pBs->uiCurBits <<= pBs->iLeftBits&7; | ||
| 253 | pBs->uiCurBits |= (1 << (pBs->iLeftBits&7)) - 1; | ||
| 254 | pBs->iLeftBits &= ~7; | ||
| 255 | } | ||
| 256 | BsFlush(pBs ); | ||
| 257 | } | ||
| 249 | } | 258 | } |
| 250 | #endif//WELS_EXPONENTIAL_GOLOMB_ENTROPY_CODING_H__ | 259 | #endif//WELS_EXPONENTIAL_GOLOMB_ENTROPY_CODING_H__ |
| @@ -69,6 +69,10 @@ SMVUnitXY sP16x16Mv; · 68 unmodified lines | |||
| 69 | uint8_t uiLumaQp; // uiLumaQp: pPps->iInitialQp + sSliceHeader->delta_qp + mb->dquant. | 69 | uint8_t uiLumaQp; // uiLumaQp: pPps->iInitialQp + sSliceHeader->delta_qp + mb->dquant. |
| 70 | uint8_t uiChromaQp; | 70 | uint8_t uiChromaQp; |
| 71 | uint8_t uiSliceIdc; // AVC: pFirstMbInSlice?; SVC: (pFirstMbInSlice << 7) | ((uiDependencyId << 4) | uiQualityId); | 71 | uint8_t uiSliceIdc; // AVC: pFirstMbInSlice?; SVC: (pFirstMbInSlice << 7) | ((uiDependencyId << 4) | uiQualityId); |
| 72 | uint32_t uiChromPredMode; | ||
| 73 | int32_t iLumaDQp; | ||
| 74 | SMVUnitXY sMvd[4]; | ||
| 75 | int32_t iCbpDc; | ||
| 72 | uint8_t reserved_filling_bytes[1]; // filling bytes reserved to make structure aligned with 4 bytes, higher cache hit on less structure size by 2 cache lines( 2 * 64 bytes) once hit | 76 | uint8_t reserved_filling_bytes[1]; // filling bytes reserved to make structure aligned with 4 bytes, higher cache hit on less structure size by 2 cache lines( 2 * 64 bytes) once hit |
| 73 | } SMB, *PMb; | 77 | } SMB, *PMb; |
| 74 | 78 | ||
| @@ -46,6 +46,8 @@ · 45 unmodified lines | |||
| 46 | #include "memory_align.h" | 46 | #include "memory_align.h" |
| 47 | 47 | ||
| 48 | #include "codec_app_def.h" | 48 | #include "codec_app_def.h" |
| 49 | #include "set_mb_syn_cabac.h" | ||
| 50 | |||
| 49 | namespace WelsEnc { | 51 | namespace WelsEnc { |
| 50 | 52 | ||
| 51 | 53 | ||
| @@ -90,10 +92,11 @@ typedef struct TagDynamicSlicingStack { · 38 unmodified lines | |||
| 90 | int32_t iStartPos; | 92 | int32_t iStartPos; |
| 91 | int32_t iCurrentPos; | 93 | int32_t iCurrentPos; |
| 92 | 94 | ||
| 93 | uint8_t* pBsStackBufPtr; // current writing position | 95 | uint8_t* pBsStackBufPtr; // current writing position |
| 94 | uint32_t uiBsStackCurBits; | 96 | uint32_t uiBsStackCurBits; |
| 95 | int32_t iBsStackLeftBits; | 97 | int32_t iBsStackLeftBits; |
| 96 | 98 | ||
| 99 | SCabacCtx sStoredCabac; | ||
| 97 | int32_t iMbSkipRunStack; | 100 | int32_t iMbSkipRunStack; |
| 98 | uint8_t uiLastMbQp; | 101 | uint8_t uiLastMbQp; |
| 99 | } SDynamicSlicingStack; | 102 | } SDynamicSlicingStack; |
| @@ -0,0 +1,68 @@ | |||
| 1 | /*! | ||
| 2 | * \copy | ||
| 3 | * Copyright (c) 2009-2013, Cisco Systems | ||
| 4 | * All rights reserved. | ||
| 5 | * | ||
| 6 | * Redistribution and use in source and binary forms, with or without | ||
| 7 | * modification, are permitted provided that the following conditions | ||
| 8 | * are met: | ||
| 9 | * | ||
| 10 | * * Redistributions of source code must retain the above copyright | ||
| 11 | * notice, this list of conditions and the following disclaimer. | ||
| 12 | * | ||
| 13 | * * Redistributions in binary form must reproduce the above copyright | ||
| 14 | * notice, this list of conditions and the following disclaimer in | ||
| 15 | * the documentation and/or other materials provided with the | ||
| 16 | * distribution. | ||
| 17 | * | ||
| 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| 19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
| 21 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
| 22 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
| 24 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 25 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
| 26 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
| 28 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
| 29 | * POSSIBILITY OF SUCH DAMAGE. | ||
| 30 | * | ||
| 31 | * | ||
| 32 | * \file svc_set_mb_syn.h | ||
| 33 | * | ||
| 34 | * \brief Seting all syntax elements of mb and encoding residual with cavlc and cabac | ||
| 35 | * | ||
| 36 | * \date 2009.8.12 Created | ||
| 37 | * | ||
| 38 | ************************************************************************************* | ||
| 39 | */ | ||
| 40 | |||
| 41 | #ifndef SVC_SET_MB_SYN_H_ | ||
| 42 | #define SVC_SET_MB_SYN_H_ | ||
| 43 | |||
| 44 | #include "typedefs.h" | ||
| 45 | #include "wels_common_basis.h" | ||
| 46 | #include "encoder_context.h" | ||
| 47 | #include "md.h" | ||
| 48 | #include "slice.h" | ||
| 49 | #include "set_mb_syn_cavlc.h" | ||
| 50 | #include "set_mb_syn_cabac.h" | ||
| 51 | |||
| 52 | namespace WelsEnc { | ||
| 53 | |||
| 54 | |||
| 55 | |||
| 56 | int32_t WelsWriteMbResidual (SWelsFuncPtrList* pFuncList, SMbCache* sMbCacheInfo, SMB* pCurMb, SBitStringAux* pBs); | ||
| 57 | |||
| 58 | void WelsSpatialWriteSubMbPred (sWelsEncCtx* pEncCtx, SSlice* pSlice, SMB* pCurMb); | ||
| 59 | |||
| 60 | void WelsSpatialWriteMbPred (sWelsEncCtx* pEncCtx, SSlice* pSlice, SMB* pCurMb); | ||
| 61 | void WelsInitSliceCabac(sWelsEncCtx* pEncCtx,SSlice* pSlice); | ||
| 62 | void WelsCabacInit(void *pCtx); | ||
| 63 | void WelsWriteSliceEndSyn(SSlice *pSlice,bool bEntropyCodingModeFlag); | ||
| 64 | //for Base Layer CAVLC writing | ||
| 65 | int32_t WelsSpatialWriteMbSyn (void* Ctx, SSlice* pSlice, SMB* pCurMb); | ||
| 66 | int32_t WelsSpatialWriteMbSynCabac (void* pCtx, SSlice* pSlice, SMB* pCurMb); | ||
| 67 | } | ||
| 68 | #endif | ||
| @@ -37,7 +37,6 @@ · 36 unmodified lines | |||
| 37 | * | 37 | * |
| 38 | ************************************************************************************* | 38 | ************************************************************************************* |
| 39 | */ | 39 | */ |
| 40 | |||
| 41 | #ifndef SVC_SET_MB_SYN_CAVLC_H_ | 40 | #ifndef SVC_SET_MB_SYN_CAVLC_H_ |
| 42 | #define SVC_SET_MB_SYN_CAVLC_H_ | 41 | #define SVC_SET_MB_SYN_CAVLC_H_ |
| 43 | 42 | ||
| @@ -45,19 +44,24 @@ · 1 unmodified line | |||
| 45 | #include "wels_common_basis.h" | 44 | #include "wels_common_basis.h" |
| 46 | #include "encoder_context.h" | 45 | #include "encoder_context.h" |
| 47 | #include "md.h" | 46 | #include "md.h" |
| 48 | 47 | #include "slice.h" | |
| 49 | #include "set_mb_syn_cavlc.h" | 48 | #include "set_mb_syn_cavlc.h" |
| 49 | #include "set_mb_syn_cabac.h" | ||
| 50 | 50 | ||
| 51 | namespace WelsEnc { | 51 | namespace WelsEnc { |
| 52 | 52 | ||
| 53 | |||
| 54 | |||
| 53 | int32_t WelsWriteMbResidual (SWelsFuncPtrList* pFuncList, SMbCache* sMbCacheInfo, SMB* pCurMb, SBitStringAux* pBs); | 55 | int32_t WelsWriteMbResidual (SWelsFuncPtrList* pFuncList, SMbCache* sMbCacheInfo, SMB* pCurMb, SBitStringAux* pBs); |
| 54 | 56 | ||
| 55 | void WelsSpatialWriteSubMbPred (sWelsEncCtx* pEncCtx, SSlice* pSlice, SMB* pCurMb); | 57 | void WelsSpatialWriteSubMbPred (sWelsEncCtx* pEncCtx, SSlice* pSlice, SMB* pCurMb); |
| 56 | 58 | ||
| 57 | void WelsSpatialWriteMbPred (sWelsEncCtx* pEncCtx, SSlice* pSlice, SMB* pCurMb); | 59 | void WelsSpatialWriteMbPred (sWelsEncCtx* pEncCtx, SSlice* pSlice, SMB* pCurMb); |
| 58 | 60 | void WelsInitSliceCabac(sWelsEncCtx* pEncCtx,SSlice* pSlice); | |
| 61 | void WelsWriteSliceEndSyn(SSlice *pSlice,bool bEntropyCodingModeFlag); | ||
| 59 | //for Base Layer CAVLC writing | 62 | //for Base Layer CAVLC writing |
| 60 | int32_t WelsSpatialWriteMbSyn (sWelsEncCtx* pEncCtx, SSlice* pSlice, SMB* pCurMb); | 63 | int32_t WelsSpatialWriteMbSyn (void* Ctx, SSlice* pSlice, SMB* pCurMb); |
| 64 | int32_t WelsSpatialWriteMbSynCabac (void* pCtx, SSlice* pSlice, SMB* pCurMb); | ||
| 61 | 65 | ||
| 62 | } | 66 | } |
| 63 | #endif | 67 | #endif |
| @@ -47,40 +47,45 @@ namespace WelsEnc { · 46 unmodified lines | |||
| 47 | 47 | ||
| 48 | 48 | ||
| 49 | struct SMVUnitXY { // each 4 Bytes | 49 | struct SMVUnitXY { // each 4 Bytes |
| 50 | int16_t iMvX; | 50 | int16_t iMvX; |
| 51 | int16_t iMvY; | 51 | int16_t iMvY; |
| 52 | public: | 52 | public: |
| 53 | SMVUnitXY& sDeltaMv (const SMVUnitXY& _v0, const SMVUnitXY& _v1) { | 53 | SMVUnitXY& sDeltaMv (const SMVUnitXY& _v0, const SMVUnitXY& _v1) { |
| 54 | iMvX = _v0.iMvX - _v1.iMvX; | 54 | iMvX = _v0.iMvX - _v1.iMvX; |
| 55 | iMvY = _v0.iMvY - _v1.iMvY; | 55 | iMvY = _v0.iMvY - _v1.iMvY; |
| 56 | return (*this); | 56 | return (*this); |
| 57 | } | 57 | }; |
| 58 | SMVUnitXY& sAssginMv (const SMVUnitXY& _v0) { | ||
| 59 | iMvX = _v0.iMvX; | ||
| 60 | iMvY = _v0.iMvY; | ||
| 61 | return (*this); | ||
| 62 | }; | ||
| 58 | }; | 63 | }; |
| 59 | 64 | ||
| 60 | typedef struct TagMVComponentUnit { // each LIST_0/LIST_1 | 65 | typedef struct TagMVComponentUnit { // each LIST_0/LIST_1 |
| 61 | SMVUnitXY sMotionVectorCache[5 * 6 - 1]; // Luma only: 5 x 6 - 1 = 29 D-Words | 66 | SMVUnitXY sMotionVectorCache[5 * 6 - 1]; // Luma only: 5 x 6 - 1 = 29 D-Words |
| 62 | int8_t iRefIndexCache[5 * 6]; // Luma only: 5 x 6 = 30 bytes | 67 | int8_t iRefIndexCache[5 * 6]; // Luma only: 5 x 6 = 30 bytes |
| 63 | } SMVComponentUnit, *PMVComponentUnit; | 68 | } SMVComponentUnit, *PMVComponentUnit; |
| 64 | 69 | ||
| 65 | 70 | ||
| 66 | typedef struct TagParaSetOffsetVariable { | 71 | typedef struct TagParaSetOffsetVariable { |
| 67 | int32_t iParaSetIdDelta[MAX_DQ_LAYER_NUM/*+1*/]; //mark delta between SPS_ID_in_bs and sps_id_in_encoder, can be minus, for each dq-layer | 72 | int32_t iParaSetIdDelta[MAX_DQ_LAYER_NUM/*+1*/]; //mark delta between SPS_ID_in_bs and sps_id_in_encoder, can be minus, for each dq-layer |
| 68 | //need not extra +1 due no MGS and FMO case so far | 73 | //need not extra +1 due no MGS and FMO case so far |
| 69 | bool bUsedParaSetIdInBs[MAX_PPS_COUNT]; //mark the used SPS_ID with 1 | 74 | bool bUsedParaSetIdInBs[MAX_PPS_COUNT]; //mark the used SPS_ID with 1 |
| 70 | uint32_t uiNextParaSetIdToUseInBs; //mark the next SPS_ID_in_bs, for all layers | 75 | uint32_t uiNextParaSetIdToUseInBs; //mark the next SPS_ID_in_bs, for all layers |
| 71 | } SParaSetOffsetVariable; | 76 | } SParaSetOffsetVariable; |
| 72 | 77 | ||
| 73 | typedef struct TagParaSetOffset { | 78 | typedef struct TagParaSetOffset { |
| 74 | //in PS0 design, "sParaSetOffsetVariable" record the previous paras before current IDR, AND NEED to be stacked and recover across IDR | 79 | //in PS0 design, "sParaSetOffsetVariable" record the previous paras before current IDR, AND NEED to be stacked and recover across IDR |
| 75 | SParaSetOffsetVariable | 80 | SParaSetOffsetVariable |
| 76 | sParaSetOffsetVariable[PARA_SET_TYPE]; //PARA_SET_TYPE=3; paraset_type = 0: AVC_SPS; =1: Subset_SPS; =2: PPS | 81 | sParaSetOffsetVariable[PARA_SET_TYPE]; //PARA_SET_TYPE=3; paraset_type = 0: AVC_SPS; =1: Subset_SPS; =2: PPS |
| 77 | //in PSO design, "bPpsIdMappingIntoSubsetsps" uses the current para of current IDR period | 82 | //in PSO design, "bPpsIdMappingIntoSubsetsps" uses the current para of current IDR period |
| 78 | bool | 83 | bool |
| 79 | bPpsIdMappingIntoSubsetsps[MAX_DQ_LAYER_NUM/*+1*/]; // need not extra +1 due no MGS and FMO case so far | 84 | bPpsIdMappingIntoSubsetsps[MAX_DQ_LAYER_NUM/*+1*/]; // need not extra +1 due no MGS and FMO case so far |
| 80 | uint16_t | 85 | uint16_t |
| 81 | uiIdrPicId; // IDR picture id: [0, 65535], this one is used for LTR!! Can we just NOT put this into the SParaSetOffset structure?!! | 86 | uiIdrPicId; // IDR picture id: [0, 65535], this one is used for LTR!! Can we just NOT put this into the SParaSetOffset structure?!! |
| 82 | #if _DEBUG | 87 | #if _DEBUG |
| 83 | bool bEnableSpsPpsIdAddition; | 88 | bool bEnableSpsPpsIdAddition; |
| 84 | #endif | 89 | #endif |
| 85 | } SParaSetOffset; | 90 | } SParaSetOffset; |
| 86 | 91 | ||
| @@ -88,32 +93,32 @@ bool bEnableSpsPpsIdAddition; · 1 unmodified line | |||
| 88 | 93 | ||
| 89 | /* Position Offset structure */ | 94 | /* Position Offset structure */ |
| 90 | typedef struct TagCropOffset { | 95 | typedef struct TagCropOffset { |
| 91 | int16_t iCropLeft; | 96 | int16_t iCropLeft; |
| 92 | int16_t iCropRight; | 97 | int16_t iCropRight; |
| 93 | int16_t iCropTop; | 98 | int16_t iCropTop; |
| 94 | int16_t iCropBottom; | 99 | int16_t iCropBottom; |
| 95 | } SCropOffset; | 100 | } SCropOffset; |
| 96 | 101 | ||
| 97 | 102 | ||
| 98 | /* Transform Type */ | 103 | /* Transform Type */ |
| 99 | 104 | ||
| 100 | enum ETransType { | 105 | enum ETransType { |
| 101 | T_4x4 = 0, | 106 | T_4x4 = 0, |
| 102 | T_8x8 = 1, | 107 | T_8x8 = 1, |
| 103 | T_16x16 = 2, | 108 | T_16x16 = 2, |
| 104 | T_PCM = 3 | 109 | T_PCM = 3 |
| 105 | }; | 110 | }; |
| 106 | 111 | ||
| 107 | enum EMbPosition { | 112 | enum EMbPosition { |
| 108 | LEFT_MB_POS = 0x01, // A | 113 | LEFT_MB_POS = 0x01, // A |
| 109 | TOP_MB_POS = 0x02, // B | 114 | TOP_MB_POS = 0x02, // B |
| 110 | TOPRIGHT_MB_POS = 0x04, // C | 115 | TOPRIGHT_MB_POS = 0x04, // C |
| 111 | TOPLEFT_MB_POS = 0x08, // D, | 116 | TOPLEFT_MB_POS = 0x08, // D, |
| 112 | RIGHT_MB_POS = 0x10, // add followed four case to reuse when intra up-sample | 117 | RIGHT_MB_POS = 0x10, // add followed four case to reuse when intra up-sample |
| 113 | BOTTOM_MB_POS = 0x20, // | 118 | BOTTOM_MB_POS = 0x20, // |
| 114 | BOTTOMRIGHT_MB_POS = 0x40, // | 119 | BOTTOMRIGHT_MB_POS = 0x40, // |
| 115 | BOTTOMLEFT_MB_POS = 0x80, // | 120 | BOTTOMLEFT_MB_POS = 0x80, // |
| 116 | MB_POS_A = 0x100 | 121 | MB_POS_A = 0x100 |
| 117 | }; | 122 | }; |
| 118 | #define MB_ON_PIC_BOUNDRY (RIGHT_MB_POS|BOTTOM_MB_POS|LEFT_MB_POS|TOP_MB_POS) | 123 | #define MB_ON_PIC_BOUNDRY (RIGHT_MB_POS|BOTTOM_MB_POS|LEFT_MB_POS|TOP_MB_POS) |
| 119 | 124 | ||
| @@ -180,13 +185,13 @@ typedef uint32_t Mb_Type; · 60 unmodified lines | |||
| 180 | 185 | ||
| 181 | 186 | ||
| 182 | enum { | 187 | enum { |
| 183 | Intra4x4 = 0, | 188 | Intra4x4 = 0, |
| 184 | Intra16x16 = 1, | 189 | Intra16x16 = 1, |
| 185 | Inter16x16 = 2, | 190 | Inter16x16 = 2, |
| 186 | Inter16x8 = 3, | 191 | Inter16x8 = 3, |
| 187 | Inter8x16 = 4, | 192 | Inter8x16 = 4, |
| 188 | Inter8x8 = 5, | 193 | Inter8x8 = 5, |
| 189 | PSkip = 6 | 194 | PSkip = 6 |
| 190 | }; | 195 | }; |
| 191 | 196 | ||
| 192 | 197 | ||
| @@ -160,9 +160,10 @@ typedef void (*PLineFullSearchFunc) (SWelsFuncPtrList* pFuncList, SWelsME* pMe, · 159 unmodified lines | |||
| 160 | const int16_t kiMinMv, const int16_t kiMaxMv, | 160 | const int16_t kiMinMv, const int16_t kiMaxMv, |
| 161 | const bool bVerticalSearch); | 161 | const bool bVerticalSearch); |
| 162 | typedef void (*PInitializeHashforFeatureFunc) (uint32_t* pTimesOfFeatureValue, uint16_t* pBuf, const int32_t kiListSize, | 162 | typedef void (*PInitializeHashforFeatureFunc) (uint32_t* pTimesOfFeatureValue, uint16_t* pBuf, const int32_t kiListSize, |
| 163 | uint16_t** pLocationOfFeature, uint16_t** pFeatureValuePointerList); | 163 | uint16_t** pLocationOfFeature, uint16_t** pFeatureValuePointerList); |
| 164 | typedef void (*PFillQpelLocationByFeatureValueFunc) (uint16_t* pFeatureOfBlock, const int32_t kiWidth, const int32_t kiHeight, | 164 | typedef void (*PFillQpelLocationByFeatureValueFunc) (uint16_t* pFeatureOfBlock, const int32_t kiWidth, |
| 165 | uint16_t** pFeatureValuePointerList); | 165 | const int32_t kiHeight, |
| 166 | uint16_t** pFeatureValuePointerList); | ||
| 166 | typedef void (*PCalculateBlockFeatureOfFrame) (uint8_t* pRef, const int32_t kiWidth, const int32_t kiHeight, | 167 | typedef void (*PCalculateBlockFeatureOfFrame) (uint8_t* pRef, const int32_t kiWidth, const int32_t kiHeight, |
| 167 | const int32_t kiRefStride, | 168 | const int32_t kiRefStride, |
| 168 | uint16_t* pFeatureOfBlock, uint32_t pTimesOfFeatureValue[]); | 169 | uint16_t* pFeatureOfBlock, uint32_t pTimesOfFeatureValue[]); |
| @@ -200,6 +201,9 @@ typedef void (*PAfterBuildRefListFunc) (void* pCtx); · 31 unmodified lines | |||
| 200 | 201 | ||
| 201 | typedef int32_t (*PCavlcParamCalFunc) (int16_t* pCoff, uint8_t* pRun, int16_t* pLevel, int32_t* pTotalCoeffs, | 202 | typedef int32_t (*PCavlcParamCalFunc) (int16_t* pCoff, uint8_t* pRun, int16_t* pLevel, int32_t* pTotalCoeffs, |
| 202 | int32_t iEndIdx); | 203 | int32_t iEndIdx); |
| 204 | typedef int32_t (*PWelsSpatialWriteMbSyn) (void* pCtx, SSlice* pSlice, SMB* pCurMb); | ||
| 205 | typedef void (*PStashMBStatus) (SDynamicSlicingStack* pDss, void* pBuffer, SSlice* pSlice, int32_t iMbSkipRun); | ||
| 206 | typedef int32_t (*PStashPopMBStatus) (SDynamicSlicingStack* pDss, void* pBuffer, SSlice* pSlice); | ||
| 203 | 207 | ||
| 204 | struct TagWelsFuncPointerList { | 208 | struct TagWelsFuncPointerList { |
| 205 | SExpandPicFunc sExpandPicFunc; | 209 | SExpandPicFunc sExpandPicFunc; |
| @@ -297,6 +301,9 @@ struct TagWelsFuncPointerList { · 91 unmodified lines | |||
| 297 | PAfterBuildRefListFunc pAfterBuildRefList; | 301 | PAfterBuildRefListFunc pAfterBuildRefList; |
| 298 | 302 | ||
| 299 | PCavlcParamCalFunc pfCavlcParamCal; | 303 | PCavlcParamCalFunc pfCavlcParamCal; |
| 304 | PWelsSpatialWriteMbSyn pfWelsSpatialWriteMbSyn; | ||
| 305 | PStashMBStatus pfStashMBStatus; | ||
| 306 | PStashPopMBStatus pfStashPopMBStatus; | ||
| 300 | }; | 307 | }; |
| 301 | 308 | ||
| 302 | } //end of namespace WelsEnc { | 309 | } //end of namespace WelsEnc { |
| @@ -266,7 +266,7 @@ int32_t WelsWritePpsSyntax (SWelsPPS* pPps, SBitStringAux* pBitStringAux, SParaS · 265 unmodified lines | |||
| 266 | } | 266 | } |
| 267 | #endif | 267 | #endif |
| 268 | 268 | ||
| 269 | BsWriteOneBit (pLocalBitStringAux, false/*pPps->entropy_coding_mode_flag*/); | 269 | BsWriteOneBit (pLocalBitStringAux, pPps->bEntropyCodingModeFlag); |
| 270 | BsWriteOneBit (pLocalBitStringAux, false/*pPps->bPicOrderPresentFlag*/); | 270 | BsWriteOneBit (pLocalBitStringAux, false/*pPps->bPicOrderPresentFlag*/); |
| 271 | 271 | ||
| 272 | #ifdef DISABLE_FMO_FEATURE | 272 | #ifdef DISABLE_FMO_FEATURE |
| @@ -414,7 +414,8 @@ int32_t WelsInitPps (SWelsPPS* pPps, · 141 unmodified lines | |||
| 414 | SSubsetSps* pSubsetSps, | 414 | SSubsetSps* pSubsetSps, |
| 415 | const uint32_t kuiPpsId, | 415 | const uint32_t kuiPpsId, |
| 416 | const bool kbDeblockingFilterPresentFlag, | 416 | const bool kbDeblockingFilterPresentFlag, |
| 417 | const bool kbUsingSubsetSps) { | 417 | const bool kbUsingSubsetSps, |
| 418 | const bool kbEntropyCodingModeFlag) { | ||
| 418 | SWelsSPS* pUsedSps = NULL; | 419 | SWelsSPS* pUsedSps = NULL; |
| 419 | if (pPps == NULL || (pSps == NULL && pSubsetSps == NULL)) | 420 | if (pPps == NULL || (pSps == NULL && pSubsetSps == NULL)) |
| 420 | return 1; | 421 | return 1; |
| @@ -433,6 +434,7 @@ int32_t WelsInitPps (SWelsPPS* pPps, · 12 unmodified lines | |||
| 433 | /* fill picture parameter set syntax */ | 434 | /* fill picture parameter set syntax */ |
| 434 | pPps->iPpsId = kuiPpsId; | 435 | pPps->iPpsId = kuiPpsId; |
| 435 | pPps->iSpsId = pUsedSps->uiSpsId; | 436 | pPps->iSpsId = pUsedSps->uiSpsId; |
| 437 | pPps->bEntropyCodingModeFlag = kbEntropyCodingModeFlag; | ||
| 436 | #if !defined(DISABLE_FMO_FEATURE) | 438 | #if !defined(DISABLE_FMO_FEATURE) |
| 437 | pPps->uiNumSliceGroups = 1; //param->qos_param.sliceGroupCount; | 439 | pPps->uiNumSliceGroups = 1; //param->qos_param.sliceGroupCount; |
| 438 | if (pPps->uiNumSliceGroups > 1) { | 440 | if (pPps->uiNumSliceGroups > 1) { |
| @@ -0,0 +1,557 @@ | |||
| 1 | /*! | ||
| 2 | * \copy | ||
| 3 | * Copyright (c) 2009-2013, Cisco Systems | ||
| 4 | * All rights reserved. | ||
| 5 | * | ||
| 6 | * Redistribution and use in source and binary forms, with or without | ||
| 7 | * modification, are permitted provided that the following conditions | ||
| 8 | * are met: | ||
| 9 | * | ||
| 10 | * * Redistributions of source code must retain the above copyright | ||
| 11 | * notice, this list of conditions and the following disclaimer. | ||
| 12 | * | ||
| 13 | * * Redistributions in binary form must reproduce the above copyright | ||
| 14 | * notice, this list of conditions and the following disclaimer in | ||
| 15 | * the documentation and/or other materials provided with the | ||
| 16 | * distribution. | ||
| 17 | * | ||
| 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| 19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
| 21 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
| 22 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
| 24 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 25 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
| 26 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
| 28 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
| 29 | * POSSIBILITY OF SUCH DAMAGE. | ||
| 30 | * | ||
| 31 | * | ||
| 32 | * \file cabac.cpp | ||
| 33 | * | ||
| 34 | * \brief cabac table | ||
| 35 | * | ||
| 36 | * \date 10/11/2014 Created | ||
| 37 | * | ||
| 38 | ************************************************************************************* | ||
| 39 | */ | ||
| 40 | #include "typedefs.h" | ||
| 41 | #include "set_mb_syn_cabac.h" | ||
| 42 | |||
| 43 | |||
| 44 | namespace WelsEnc { | ||
| 45 | |||
| 46 | /* this table is from Table9-12 to Table 9-24 */ | ||
| 47 | |||
| 48 | const int8_t g_kiCabacGlobalContextIdx[WELS_CONTEXT_COUNT][4][2] = { | ||
| 49 | //0-10 Table 9-12 | ||
| 50 | {{20, -15}, {20, -15}, {20, -15}, {20, -15}}, | ||
| 51 | {{2, 54}, {2, 54}, {2, 54}, {2, 54}}, | ||
| 52 | {{3, 74}, {3, 74}, {3, 74}, {3, 74}}, | ||
| 53 | {{20, -15}, {20, -15}, {20, -15}, {20, -15}}, | ||
| 54 | {{2, 54}, {2, 54}, {2, 54}, {2, 54}}, | ||
| 55 | {{3, 74}, {3, 74}, {3, 74}, {3, 74}}, | ||
| 56 | {{ -28, 127}, { -28, 127}, { -28, 127}, { -28, 127}}, | ||
| 57 | {{ -23, 104}, { -23, 104}, { -23, 104}, { -23, 104}}, | ||
| 58 | {{ -6, 53}, { -6, 53}, { -6, 53}, { -6, 53}}, | ||
| 59 | {{ -1, 54}, { -1, 54}, { -1, 54}, { -1, 54}}, | ||
| 60 | {{7, 51}, {7, 51}, {7, 51}, {7, 51}}, | ||
| 61 | //11-23 Table 9-13 | ||
| 62 | {{CTX_NA, CTX_NA}, {23, 33}, {22, 25}, {29, 16}}, | ||
| 63 | {{CTX_NA, CTX_NA}, {23, 2}, {34, 0}, {25, 0}}, | ||
| 64 | {{CTX_NA, CTX_NA}, {21, 0}, {16, 0}, {14, 0}}, | ||
| 65 | {{CTX_NA, CTX_NA}, {1, 9}, { -2, 9}, { -10, 51}}, | ||
| 66 | {{CTX_NA, CTX_NA}, {0, 49}, {4, 41}, { -3, 62}}, | ||
| 67 | {{CTX_NA, CTX_NA}, { -37, 118}, { -29, 118}, { -27, 99}}, | ||
| 68 | {{CTX_NA, CTX_NA}, {5, 57}, {2, 65}, {26, 16}}, | ||
| 69 | {{CTX_NA, CTX_NA}, { -13, 78}, { -6, 71}, { -4, 85}}, | ||
| 70 | {{CTX_NA, CTX_NA}, { -11, 65}, { -13, 79}, { -24, 102}}, | ||
| 71 | {{CTX_NA, CTX_NA}, {1, 62}, {5, 52}, {5, 57}}, | ||
| 72 | {{CTX_NA, CTX_NA}, {12, 49}, {9, 50}, {6, 57}}, | ||
| 73 | {{CTX_NA, CTX_NA}, { -4, 73}, { -3, 70}, { -17, 73}}, | ||
| 74 | {{CTX_NA, CTX_NA}, {17, 50}, {10, 54}, {14, 57}}, | ||
| 75 | //24-39 Table9-14 | ||
| 76 | {{CTX_NA, CTX_NA}, {18, 64}, {26, 34}, {20, 40}}, | ||
| 77 | {{CTX_NA, CTX_NA}, {9, 43}, {19, 22}, {20, 10}}, | ||
| 78 | {{CTX_NA, CTX_NA}, {29, 0}, {40, 0}, {29, 0}}, | ||
| 79 | {{CTX_NA, CTX_NA}, {26, 67}, {57, 2}, {54, 0}}, | ||
| 80 | {{CTX_NA, CTX_NA}, {16, 90}, {41, 36}, {37, 42}}, | ||
| 81 | {{CTX_NA, CTX_NA}, {9, 104}, {26, 69}, {12, 97}}, | ||
| 82 | {{CTX_NA, CTX_NA}, { -46, 127}, { -45, 127}, { -32, 127}}, | ||
| 83 | {{CTX_NA, CTX_NA}, { -20, 104}, { -15, 101}, { -22, 117}}, | ||
| 84 | {{CTX_NA, CTX_NA}, {1, 67}, { -4, 76}, { -2, 74}}, | ||
| 85 | {{CTX_NA, CTX_NA}, { -13, 78}, { -6, 71}, { -4, 85}}, | ||
| 86 | {{CTX_NA, CTX_NA}, { -11, 65}, { -13, 79}, { -24, 102}}, | ||
| 87 | {{CTX_NA, CTX_NA}, {1, 62}, {5, 52}, {5, 57}}, | ||
| 88 | {{CTX_NA, CTX_NA}, { -6, 86}, {6, 69}, { -6, 93}}, | ||
| 89 | {{CTX_NA, CTX_NA}, { -17, 95}, { -13, 90}, { -14, 88}}, | ||
| 90 | {{CTX_NA, CTX_NA}, { -6, 61}, {0, 52}, { -6, 44}}, | ||
| 91 | {{CTX_NA, CTX_NA}, {9, 45}, {8, 43}, {4, 55}}, | ||
| 92 | //40-53 Table 9-15 | ||
| 93 | {{CTX_NA, CTX_NA}, { -3, 69}, { -2, 69}, { -11, 89}}, | ||
| 94 | {{CTX_NA, CTX_NA}, { -6, 81}, { -5, 82}, { -15, 103}}, | ||
| 95 | {{CTX_NA, CTX_NA}, { -11, 96}, { -10, 96}, { -21, 116}}, | ||
| 96 | {{CTX_NA, CTX_NA}, {6, 55}, {2, 59}, {19, 57}}, | ||
| 97 | {{CTX_NA, CTX_NA}, {7, 67}, {2, 75}, {20, 58}}, | ||
| 98 | {{CTX_NA, CTX_NA}, { -5, 86}, { -3, 87}, {4, 84}}, | ||
| 99 | {{CTX_NA, CTX_NA}, {2, 88}, { -3, 100}, {6, 96}}, | ||
| 100 | {{CTX_NA, CTX_NA}, {0, 58}, {1, 56}, {1, 63}}, | ||
| 101 | {{CTX_NA, CTX_NA}, { -3, 76}, { -3, 74}, { -5, 85}}, | ||
| 102 | {{CTX_NA, CTX_NA}, { -10, 94}, { -6, 85}, { -13, 106}}, | ||
| 103 | {{CTX_NA, CTX_NA}, {5, 54}, {0, 59}, {5, 63}}, | ||
| 104 | {{CTX_NA, CTX_NA}, {4, 69}, { -3, 81}, {6, 75}}, | ||
| 105 | {{CTX_NA, CTX_NA}, { -3, 81}, { -7, 86}, { -3, 90}}, | ||
| 106 | {{CTX_NA, CTX_NA}, {0, 88}, { -5, 95}, { -1, 101}}, | ||
| 107 | //54-59 Table 9-16 | ||
| 108 | {{CTX_NA, CTX_NA}, { -7, 67}, { -1, 66}, {3, 55}}, | ||
| 109 | {{CTX_NA, CTX_NA}, { -5, 74}, { -1, 77}, { -4, 79}}, | ||
| 110 | {{CTX_NA, CTX_NA}, { -4, 74}, {1, 70}, { -2, 75}}, | ||
| 111 | {{CTX_NA, CTX_NA}, { -5, 80}, { -2, 86}, { -12, 97}}, | ||
| 112 | {{CTX_NA, CTX_NA}, { -7, 72}, { -5, 72}, { -7, 50}}, | ||
| 113 | {{CTX_NA, CTX_NA}, {1, 58}, {0, 61}, {1, 60}}, | ||
| 114 | //60-69 Table 9-17 | ||
| 115 | {{0, 41}, {0, 41}, {0, 41}, {0, 41}}, | ||
| 116 | {{0, 63}, {0, 63}, {0, 63}, {0, 63}}, | ||
| 117 | {{0, 63}, {0, 63}, {0, 63}, {0, 63}}, | ||
| 118 | {{0, 63}, {0, 63}, {0, 63}, {0, 63}}, | ||
| 119 | {{ -9, 83}, { -9, 83}, { -9, 83}, { -9, 83}}, | ||
| 120 | {{4, 86}, {4, 86}, {4, 86}, {4, 86}}, | ||
| 121 | {{0, 97}, {0, 97}, {0, 97}, {0, 97}}, | ||
| 122 | {{ -7, 72}, { -7, 72}, { -7, 72}, { -7, 72}}, | ||
| 123 | {{13, 41}, {13, 41}, {13, 41}, {13, 41}}, | ||
| 124 | {{3, 62}, {3, 62}, {3, 62}, {3, 62}}, | ||
| 125 | //70-104 Table 9-18 | ||
| 126 | {{0, 11}, {0, 45}, {13, 15}, {7, 34}}, | ||
| 127 | {{1, 55}, { -4, 78}, {7, 51}, { -9, 88}}, | ||
| 128 | {{0, 69}, { -3, 96}, {2, 80}, { -20, 127}}, | ||
| 129 | {{ -17, 127}, { -27, 126}, { -39, 127}, { -36, 127}}, | ||
| 130 | {{ -13, 102}, { -28, 98}, { -18, 91}, { -17, 91}}, | ||
| 131 | {{0, 82}, { -25, 101}, { -17, 96}, { -14, 95}}, | ||
| 132 | {{ -7, 74}, { -23, 67}, { -26, 81}, { -25, 84}}, | ||
| 133 | {{ -21, 107}, { -28, 82}, { -35, 98}, { -25, 86}}, | ||
| 134 | {{ -27, 127}, { -20, 94}, { -24, 102}, { -12, 89}}, | ||
| 135 | {{ -31, 127}, { -16, 83}, { -23, 97}, { -17, 91}}, | ||
| 136 | {{ -24, 127}, { -22, 110}, { -27, 119}, { -31, 127}}, | ||
| 137 | {{ -18, 95}, { -21, 91}, { -24, 99}, { -14, 76}}, | ||
| 138 | {{ -27, 127}, { -18, 102}, { -21, 110}, { -18, 103}}, | ||
| 139 | {{ -21, 114}, { -13, 93}, { -18, 102}, { -13, 90}}, | ||
| 140 | {{ -30, 127}, { -29, 127}, { -36, 127}, { -37, 127}}, | ||
| 141 | {{ -17, 123}, { -7, 92}, {0, 80}, {11, 80}}, | ||
| 142 | {{ -12, 115}, { -5, 89}, { -5, 89}, {5, 76}}, | ||
| 143 | {{ -16, 122}, { -7, 96}, { -7, 94}, {2, 84}}, | ||
| 144 | {{ -11, 115}, { -13, 108}, { -4, 92}, {5, 78}}, | ||
| 145 | {{ -12, 63}, { -3, 46}, {0, 39}, { -6, 55}}, | ||
| 146 | {{ -2, 68}, { -1, 65}, {0, 65}, {4, 61}}, | ||
| 147 | {{ -15, 84}, { -1, 57}, { -15, 84}, { -14, 83}}, | ||
| 148 | {{ -13, 104}, { -9, 93}, { -35, 127}, { -37, 127}}, | ||
| 149 | {{ -3, 70}, { -3, 74}, { -2, 73}, { -5, 79}}, | ||
| 150 | {{ -8, 93}, { -9, 92}, { -12, 104}, { -11, 104}}, | ||
| 151 | {{ -10, 90}, { -8, 87}, { -9, 91}, { -11, 91}}, | ||
| 152 | {{ -30, 127}, { -23, 126}, { -31, 127}, { -30, 127}}, | ||
| 153 | {{ -1, 74}, {5, 54}, {3, 55}, {0, 65}}, | ||
| 154 | {{ -6, 97}, {6, 60}, {7, 56}, { -2, 79}}, | ||
| 155 | {{ -7, 91}, {6, 59}, {7, 55}, {0, 72}}, | ||
| 156 | {{ -20, 127}, {6, 69}, {8, 61}, { -4, 92}}, | ||
| 157 | {{ -4, 56}, { -1, 48}, { -3, 53}, { -6, 56}}, | ||
| 158 | {{ -5, 82}, {0, 68}, {0, 68}, {3, 68}}, | ||
| 159 | {{ -7, 76}, { -4, 69}, { -7, 74}, { -8, 71}}, | ||
| 160 | {{ -22, 125}, { -8, 88}, { -9, 88}, { -13, 98}}, | ||
| 161 | //105-165 Table 9-19 | ||
| 162 | {{ -7, 93}, { -2, 85}, { -13, 103}, { -4, 86}}, | ||
| 163 | {{ -11, 87}, { -6, 78}, { -13, 91}, { -12, 88}}, | ||
| 164 | {{ -3, 77}, { -1, 75}, { -9, 89}, { -5, 82}}, | ||
| 165 | {{ -5, 71}, { -7, 77}, { -14, 92}, { -3, 72}}, | ||
| 166 | {{ -4, 63}, {2, 54}, { -8, 76}, { -4, 67}}, | ||
| 167 | {{ -4, 68}, {5, 50}, { -12, 87}, { -8, 72}}, | ||
| 168 | {{ -12, 84}, { -3, 68}, { -23, 110}, { -16, 89}}, | ||
| 169 | {{ -7, 62}, {1, 50}, { -24, 105}, { -9, 69}}, | ||
| 170 | {{ -7, 65}, {6, 42}, { -10, 78}, { -1, 59}}, | ||
| 171 | {{8, 61}, { -4, 81}, { -20, 112}, {5, 66}}, | ||
| 172 | {{5, 56}, {1, 63}, { -17, 99}, {4, 57}}, | ||
| 173 | {{ -2, 66}, { -4, 70}, { -78, 127}, { -4, 71}}, | ||
| 174 | {{1, 64}, {0, 67}, { -70, 127}, { -2, 71}}, | ||
| 175 | {{0, 61}, {2, 57}, { -50, 127}, {2, 58}}, | ||
| 176 | {{ -2, 78}, { -2, 76}, { -46, 127}, { -1, 74}}, | ||
| 177 | {{1, 50}, {11, 35}, { -4, 66}, { -4, 44}}, | ||
| 178 | {{7, 52}, {4, 64}, { -5, 78}, { -1, 69}}, | ||
| 179 | {{10, 35}, {1, 61}, { -4, 71}, {0, 62}}, | ||
| 180 | {{0, 44}, {11, 35}, { -8, 72}, { -7, 51}}, | ||
| 181 | {{11, 38}, {18, 25}, {2, 59}, { -4, 47}}, | ||
| 182 | {{1, 45}, {12, 24}, { -1, 55}, { -6, 42}}, | ||
| 183 | {{0, 46}, {13, 29}, { -7, 70}, { -3, 41}}, | ||
| 184 | {{5, 44}, {13, 36}, { -6, 75}, { -6, 53}}, | ||
| 185 | {{31, 17}, { -10, 93}, { -8, 89}, {8, 76}}, | ||
| 186 | {{1, 51}, { -7, 73}, { -34, 119}, { -9, 78}}, | ||
| 187 | {{7, 50}, { -2, 73}, { -3, 75}, { -11, 83}}, | ||
| 188 | {{28, 19}, {13, 46}, {32, 20}, {9, 52}}, | ||
| 189 | {{16, 33}, {9, 49}, {30, 22}, {0, 67}}, | ||
| 190 | {{14, 62}, { -7, 100}, { -44, 127}, { -5, 90}}, | ||
| 191 | {{ -13, 108}, {9, 53}, {0, 54}, {1, 67}}, | ||
| 192 | {{ -15, 100}, {2, 53}, { -5, 61}, { -15, 72}}, | ||
| 193 | {{ -13, 101}, {5, 53}, {0, 58}, { -5, 75}}, | ||
| 194 | {{ -13, 91}, { -2, 61}, { -1, 60}, { -8, 80}}, | ||
| 195 | {{ -12, 94}, {0, 56}, { -3, 61}, { -21, 83}}, | ||
| 196 | {{ -10, 88}, {0, 56}, { -8, 67}, { -21, 64}}, | ||
| 197 | {{ -16, 84}, { -13, 63}, { -25, 84}, { -13, 31}}, | ||
| 198 | {{ -10, 86}, { -5, 60}, { -14, 74}, { -25, 64}}, | ||
| 199 | {{ -7, 83}, { -1, 62}, { -5, 65}, { -29, 94}}, | ||
| 200 | {{ -13, 87}, {4, 57}, {5, 52}, {9, 75}}, | ||
| 201 | {{ -19, 94}, { -6, 69}, {2, 57}, {17, 63}}, | ||
| 202 | {{1, 70}, {4, 57}, {0, 61}, { -8, 74}}, | ||
| 203 | {{0, 72}, {14, 39}, { -9, 69}, { -5, 35}}, | ||
| 204 | {{ -5, 74}, {4, 51}, { -11, 70}, { -2, 27}}, | ||
| 205 | {{18, 59}, {13, 68}, {18, 55}, {13, 91}}, | ||
| 206 | {{ -8, 102}, {3, 64}, { -4, 71}, {3, 65}}, | ||
| 207 | {{ -15, 100}, {1, 61}, {0, 58}, { -7, 69}}, | ||
| 208 | {{0, 95}, {9, 63}, {7, 61}, {8, 77}}, | ||
| 209 | {{ -4, 75}, {7, 50}, {9, 41}, { -10, 66}}, | ||
| 210 | {{2, 72}, {16, 39}, {18, 25}, {3, 62}}, | ||
| 211 | {{ -11, 75}, {5, 44}, {9, 32}, { -3, 68}}, | ||
| 212 | {{ -3, 71}, {4, 52}, {5, 43}, { -20, 81}}, | ||
| 213 | {{15, 46}, {11, 48}, {9, 47}, {0, 30}}, | ||
| 214 | {{ -13, 69}, { -5, 60}, {0, 44}, {1, 7}}, | ||
| 215 | {{0, 62}, { -1, 59}, {0, 51}, { -3, 23}}, | ||
| 216 | {{0, 65}, {0, 59}, {2, 46}, { -21, 74}}, | ||
| 217 | {{21, 37}, {22, 33}, {19, 38}, {16, 66}}, | ||
| 218 | {{ -15, 72}, {5, 44}, { -4, 66}, { -23, 124}}, | ||
| 219 | {{9, 57}, {14, 43}, {15, 38}, {17, 37}}, | ||
| 220 | {{16, 54}, { -1, 78}, {12, 42}, {44, -18}}, | ||
| 221 | {{0, 62}, {0, 60}, {9, 34}, {50, -34}}, | ||
| 222 | {{12, 72}, {9, 69}, {0, 89}, { -22, 127}}, | ||
| 223 | //166-226 Table 9-20 | ||
| 224 | {{24, 0}, {11, 28}, {4, 45}, {4, 39}}, | ||
| 225 | {{15, 9}, {2, 40}, {10, 28}, {0, 42}}, | ||
| 226 | {{8, 25}, {3, 44}, {10, 31}, {7, 34}}, | ||
| 227 | {{13, 18}, {0, 49}, {33, -11}, {11, 29}}, | ||
| 228 | {{15, 9}, {0, 46}, {52, -43}, {8, 31}}, | ||
| 229 | {{13, 19}, {2, 44}, {18, 15}, {6, 37}}, | ||
| 230 | {{10, 37}, {2, 51}, {28, 0}, {7, 42}}, | ||
| 231 | {{12, 18}, {0, 47}, {35, -22}, {3, 40}}, | ||
| 232 | {{6, 29}, {4, 39}, {38, -25}, {8, 33}}, | ||
| 233 | {{20, 33}, {2, 62}, {34, 0}, {13, 43}}, | ||
| 234 | {{15, 30}, {6, 46}, {39, -18}, {13, 36}}, | ||
| 235 | {{4, 45}, {0, 54}, {32, -12}, {4, 47}}, | ||
| 236 | {{1, 58}, {3, 54}, {102, -94}, {3, 55}}, | ||
| 237 | {{0, 62}, {2, 58}, {0, 0}, {2, 58}}, | ||
| 238 | {{7, 61}, {4, 63}, {56, -15}, {6, 60}}, | ||
| 239 | {{12, 38}, {6, 51}, {33, -4}, {8, 44}}, | ||
| 240 | {{11, 45}, {6, 57}, {29, 10}, {11, 44}}, | ||
| 241 | {{15, 39}, {7, 53}, {37, -5}, {14, 42}}, | ||
| 242 | {{11, 42}, {6, 52}, {51, -29}, {7, 48}}, | ||
| 243 | {{13, 44}, {6, 55}, {39, -9}, {4, 56}}, | ||
| 244 | {{16, 45}, {11, 45}, {52, -34}, {4, 52}}, | ||
| 245 | {{12, 41}, {14, 36}, {69, -58}, {13, 37}}, | ||
| 246 | {{10, 49}, {8, 53}, {67, -63}, {9, 49}}, | ||
| 247 | {{30, 34}, { -1, 82}, {44, -5}, {19, 58}}, | ||
| 248 | {{18, 42}, {7, 55}, {32, 7}, {10, 48}}, | ||
| 249 | {{10, 55}, { -3, 78}, {55, -29}, {12, 45}}, | ||
| 250 | {{17, 51}, {15, 46}, {32, 1}, {0, 69}}, | ||
| 251 | {{17, 46}, {22, 31}, {0, 0}, {20, 33}}, | ||
| 252 | {{0, 89}, { -1, 84}, {27, 36}, {8, 63}}, | ||
| 253 | {{26, -19}, {25, 7}, {33, -25}, {35, -18}}, | ||
| 254 | {{22, -17}, {30, -7}, {34, -30}, {33, -25}}, | ||
| 255 | {{26, -17}, {28, 3}, {36, -28}, {28, -3}}, | ||
| 256 | {{30, -25}, {28, 4}, {38, -28}, {24, 10}}, | ||
| 257 | {{28, -20}, {32, 0}, {38, -27}, {27, 0}}, | ||
| 258 | {{33, -23}, {34, -1}, {34, -18}, {34, -14}}, | ||
| 259 | {{37, -27}, {30, 6}, {35, -16}, {52, -44}}, | ||
| 260 | {{33, -23}, {30, 6}, {34, -14}, {39, -24}}, | ||
| 261 | {{40, -28}, {32, 9}, {32, -8}, {19, 17}}, | ||
| 262 | {{38, -17}, {31, 19}, {37, -6}, {31, 25}}, | ||
| 263 | {{33, -11}, {26, 27}, {35, 0}, {36, 29}}, | ||
| 264 | {{40, -15}, {26, 30}, {30, 10}, {24, 33}}, | ||
| 265 | {{41, -6}, {37, 20}, {28, 18}, {34, 15}}, | ||
| 266 | {{38, 1}, {28, 34}, {26, 25}, {30, 20}}, | ||
| 267 | {{41, 17}, {17, 70}, {29, 41}, {22, 73}}, | ||
| 268 | {{30, -6}, {1, 67}, {0, 75}, {20, 34}}, | ||
| 269 | {{27, 3}, {5, 59}, {2, 72}, {19, 31}}, | ||
| 270 | {{26, 22}, {9, 67}, {8, 77}, {27, 44}}, | ||
| 271 | {{37, -16}, {16, 30}, {14, 35}, {19, 16}}, | ||
| 272 | {{35, -4}, {18, 32}, {18, 31}, {15, 36}}, | ||
| 273 | {{38, -8}, {18, 35}, {17, 35}, {15, 36}}, | ||
| 274 | {{38, -3}, {22, 29}, {21, 30}, {21, 28}}, | ||
| 275 | {{37, 3}, {24, 31}, {17, 45}, {25, 21}}, | ||
| 276 | {{38, 5}, {23, 38}, {20, 42}, {30, 20}}, | ||
| 277 | {{42, 0}, {18, 43}, {18, 45}, {31, 12}}, | ||
| 278 | {{35, 16}, {20, 41}, {27, 26}, {27, 16}}, | ||
| 279 | {{39, 22}, {11, 63}, {16, 54}, {24, 42}}, | ||
| 280 | {{14, 48}, {9, 59}, {7, 66}, {0, 93}}, | ||
| 281 | {{27, 37}, {9, 64}, {16, 56}, {14, 56}}, | ||
| 282 | {{21, 60}, { -1, 94}, {11, 73}, {15, 57}}, | ||
| 283 | {{12, 68}, { -2, 89}, {10, 67}, {26, 38}}, | ||
| 284 | {{2, 97}, { -9, 108}, { -10, 116}, { -24, 127}}, | ||
| 285 | //227-275 Table 9-21 | ||
| 286 | {{ -3, 71}, { -6, 76}, { -23, 112}, { -24, 115}}, | ||
| 287 | {{ -6, 42}, { -2, 44}, { -15, 71}, { -22, 82}}, | ||
| 288 | {{ -5, 50}, {0, 45}, { -7, 61}, { -9, 62}}, | ||
| 289 | {{ -3, 54}, {0, 52}, {0, 53}, {0, 53}}, | ||
| 290 | {{ -2, 62}, { -3, 64}, { -5, 66}, {0, 59}}, | ||
| 291 | {{0, 58}, { -2, 59}, { -11, 77}, { -14, 85}}, | ||
| 292 | {{1, 63}, { -4, 70}, { -9, 80}, { -13, 89}}, | ||
| 293 | {{ -2, 72}, { -4, 75}, { -9, 84}, { -13, 94}}, | ||
| 294 | {{ -1, 74}, { -8, 82}, { -10, 87}, { -11, 92}}, | ||
| 295 | {{ -9, 91}, { -17, 102}, { -34, 127}, { -29, 127}}, | ||
| 296 | {{ -5, 67}, { -9, 77}, { -21, 101}, { -21, 100}}, | ||
| 297 | {{ -5, 27}, {3, 24}, { -3, 39}, { -14, 57}}, | ||
| 298 | {{ -3, 39}, {0, 42}, { -5, 53}, { -12, 67}}, | ||
| 299 | {{ -2, 44}, {0, 48}, { -7, 61}, { -11, 71}}, | ||
| 300 | {{0, 46}, {0, 55}, { -11, 75}, { -10, 77}}, | ||
| 301 | {{ -16, 64}, { -6, 59}, { -15, 77}, { -21, 85}}, | ||
| 302 | {{ -8, 68}, { -7, 71}, { -17, 91}, { -16, 88}}, | ||
| 303 | {{ -10, 78}, { -12, 83}, { -25, 107}, { -23, 104}}, | ||
| 304 | {{ -6, 77}, { -11, 87}, { -25, 111}, { -15, 98}}, | ||
| 305 | {{ -10, 86}, { -30, 119}, { -28, 122}, { -37, 127}}, | ||
| 306 | {{ -12, 92}, {1, 58}, { -11, 76}, { -10, 82}}, | ||
| 307 | {{ -15, 55}, { -3, 29}, { -10, 44}, { -8, 48}}, | ||
| 308 | {{ -10, 60}, { -1, 36}, { -10, 52}, { -8, 61}}, | ||
| 309 | {{ -6, 62}, {1, 38}, { -10, 57}, { -8, 66}}, | ||
| 310 | {{ -4, 65}, {2, 43}, { -9, 58}, { -7, 70}}, | ||
| 311 | {{ -12, 73}, { -6, 55}, { -16, 72}, { -14, 75}}, | ||
| 312 | {{ -8, 76}, {0, 58}, { -7, 69}, { -10, 79}}, | ||
| 313 | {{ -7, 80}, {0, 64}, { -4, 69}, { -9, 83}}, | ||
| 314 | {{ -9, 88}, { -3, 74}, { -5, 74}, { -12, 92}}, | ||
| 315 | {{ -17, 110}, { -10, 90}, { -9, 86}, { -18, 108}}, | ||
| 316 | {{ -11, 97}, {0, 70}, {2, 66}, { -4, 79}}, | ||
| 317 | {{ -20, 84}, { -4, 29}, { -9, 34}, { -22, 69}}, | ||
| 318 | {{ -11, 79}, {5, 31}, {1, 32}, { -16, 75}}, | ||
| 319 | {{ -6, 73}, {7, 42}, {11, 31}, { -2, 58}}, | ||
| 320 | {{ -4, 74}, {1, 59}, {5, 52}, {1, 58}}, | ||
| 321 | {{ -13, 86}, { -2, 58}, { -2, 55}, { -13, 78}}, | ||
| 322 | {{ -13, 96}, { -3, 72}, { -2, 67}, { -9, 83}}, | ||
| 323 | {{ -11, 97}, { -3, 81}, {0, 73}, { -4, 81}}, | ||
| 324 | {{ -19, 117}, { -11, 97}, { -8, 89}, { -13, 99}}, | ||
| 325 | {{ -8, 78}, {0, 58}, {3, 52}, { -13, 81}}, | ||
| 326 | {{ -5, 33}, {8, 5}, {7, 4}, { -6, 38}}, | ||
| 327 | {{ -4, 48}, {10, 14}, {10, 8}, { -13, 62}}, | ||
| 328 | {{ -2, 53}, {14, 18}, {17, 8}, { -6, 58}}, | ||
| 329 | {{ -3, 62}, {13, 27}, {16, 19}, { -2, 59}}, | ||
| 330 | {{ -13, 71}, {2, 40}, {3, 37}, { -16, 73}}, | ||
| 331 | {{ -10, 79}, {0, 58}, { -1, 61}, { -10, 76}}, | ||
| 332 | {{ -12, 86}, { -3, 70}, { -5, 73}, { -13, 86}}, | ||
| 333 | {{ -13, 90}, { -6, 79}, { -1, 70}, { -9, 83}}, | ||
| 334 | {{ -14, 97}, { -8, 85}, { -4, 78}, { -10, 87}}, | ||
| 335 | //276 no use | ||
| 336 | {{CTX_NA, CTX_NA}, {CTX_NA, CTX_NA}, {CTX_NA, CTX_NA}, {CTX_NA, CTX_NA}}, | ||
| 337 | //277-337 Table 9-22 | ||
| 338 | {{ -6, 93}, { -13, 106}, { -21, 126}, { -22, 127}}, | ||
| 339 | {{ -6, 84}, { -16, 106}, { -23, 124}, { -25, 127}}, | ||
| 340 | {{ -8, 79}, { -10, 87}, { -20, 110}, { -25, 120}}, | ||
| 341 | {{0, 66}, { -21, 114}, { -26, 126}, { -27, 127}}, | ||
| 342 | {{ -1, 71}, { -18, 110}, { -25, 124}, { -19, 114}}, | ||
| 343 | {{0, 62}, { -14, 98}, { -17, 105}, { -23, 117}}, | ||
| 344 | {{ -2, 60}, { -22, 110}, { -27, 121}, { -25, 118}}, | ||
| 345 | {{ -2, 59}, { -21, 106}, { -27, 117}, { -26, 117}}, | ||
| 346 | {{ -5, 75}, { -18, 103}, { -17, 102}, { -24, 113}}, | ||
| 347 | {{ -3, 62}, { -21, 107}, { -26, 117}, { -28, 118}}, | ||
| 348 | {{ -4, 58}, { -23, 108}, { -27, 116}, { -31, 120}}, | ||
| 349 | {{ -9, 66}, { -26, 112}, { -33, 122}, { -37, 124}}, | ||
| 350 | {{ -1, 79}, { -10, 96}, { -10, 95}, { -10, 94}}, | ||
| 351 | {{0, 71}, { -12, 95}, { -14, 100}, { -15, 102}}, | ||
| 352 | {{3, 68}, { -5, 91}, { -8, 95}, { -10, 99}}, | ||
| 353 | {{10, 44}, { -9, 93}, { -17, 111}, { -13, 106}}, | ||
| 354 | {{ -7, 62}, { -22, 94}, { -28, 114}, { -50, 127}}, | ||
| 355 | {{15, 36}, { -5, 86}, { -6, 89}, { -5, 92}}, | ||
| 356 | {{14, 40}, {9, 67}, { -2, 80}, {17, 57}}, | ||
| 357 | {{16, 27}, { -4, 80}, { -4, 82}, { -5, 86}}, | ||
| 358 | {{12, 29}, { -10, 85}, { -9, 85}, { -13, 94}}, | ||
| 359 | {{1, 44}, { -1, 70}, { -8, 81}, { -12, 91}}, | ||
| 360 | {{20, 36}, {7, 60}, { -1, 72}, { -2, 77}}, | ||
| 361 | {{18, 32}, {9, 58}, {5, 64}, {0, 71}}, | ||
| 362 | {{5, 42}, {5, 61}, {1, 67}, { -1, 73}}, | ||
| 363 | {{1, 48}, {12, 50}, {9, 56}, {4, 64}}, | ||
| 364 | {{10, 62}, {15, 50}, {0, 69}, { -7, 81}}, | ||
| 365 | {{17, 46}, {18, 49}, {1, 69}, {5, 64}}, | ||
| 366 | {{9, 64}, {17, 54}, {7, 69}, {15, 57}}, | ||
| 367 | {{ -12, 104}, {10, 41}, { -7, 69}, {1, 67}}, | ||
| 368 | {{ -11, 97}, {7, 46}, { -6, 67}, {0, 68}}, | ||
| 369 | {{ -16, 96}, { -1, 51}, { -16, 77}, { -10, 67}}, | ||
| 370 | {{ -7, 88}, {7, 49}, { -2, 64}, {1, 68}}, | ||
| 371 | {{ -8, 85}, {8, 52}, {2, 61}, {0, 77}}, | ||
| 372 | {{ -7, 85}, {9, 41}, { -6, 67}, {2, 64}}, | ||
| 373 | {{ -9, 85}, {6, 47}, { -3, 64}, {0, 68}}, | ||
| 374 | {{ -13, 88}, {2, 55}, {2, 57}, { -5, 78}}, | ||
| 375 | {{4, 66}, {13, 41}, { -3, 65}, {7, 55}}, | ||
| 376 | {{ -3, 77}, {10, 44}, { -3, 66}, {5, 59}}, | ||
| 377 | {{ -3, 76}, {6, 50}, {0, 62}, {2, 65}}, | ||
| 378 | {{ -6, 76}, {5, 53}, {9, 51}, {14, 54}}, | ||
| 379 | {{10, 58}, {13, 49}, { -1, 66}, {15, 44}}, | ||
| 380 | {{ -1, 76}, {4, 63}, { -2, 71}, {5, 60}}, | ||
| 381 | {{ -1, 83}, {6, 64}, { -2, 75}, {2, 70}}, | ||
| 382 | {{ -7, 99}, { -2, 69}, { -1, 70}, { -2, 76}}, | ||
| 383 | {{ -14, 95}, { -2, 59}, { -9, 72}, { -18, 86}}, | ||
| 384 | {{2, 95}, {6, 70}, {14, 60}, {12, 70}}, | ||
| 385 | {{0, 76}, {10, 44}, {16, 37}, {5, 64}}, | ||
| 386 | {{ -5, 74}, {9, 31}, {0, 47}, { -12, 70}}, | ||
| 387 | {{0, 70}, {12, 43}, {18, 35}, {11, 55}}, | ||
| 388 | {{ -11, 75}, {3, 53}, {11, 37}, {5, 56}}, | ||
| 389 | {{1, 68}, {14, 34}, {12, 41}, {0, 69}}, | ||
| 390 | {{0, 65}, {10, 38}, {10, 41}, {2, 65}}, | ||
| 391 | {{ -14, 73}, { -3, 52}, {2, 48}, { -6, 74}}, | ||
| 392 | {{3, 62}, {13, 40}, {12, 41}, {5, 54}}, | ||
| 393 | {{4, 62}, {17, 32}, {13, 41}, {7, 54}}, | ||
| 394 | {{ -1, 68}, {7, 44}, {0, 59}, { -6, 76}}, | ||
| 395 | {{ -13, 75}, {7, 38}, {3, 50}, { -11, 82}}, | ||
| 396 | {{11, 55}, {13, 50}, {19, 40}, { -2, 77}}, | ||
| 397 | {{5, 64}, {10, 57}, {3, 66}, { -2, 77}}, | ||
| 398 | {{12, 70}, {26, 43}, {18, 50}, {25, 42}}, | ||
| 399 | //338-398 Table9-23 | ||
| 400 | {{15, 6}, {14, 11}, {19, -6}, {17, -13}}, | ||
| 401 | {{6, 19}, {11, 14}, {18, -6}, {16, -9}}, | ||
| 402 | {{7, 16}, {9, 11}, {14, 0}, {17, -12}}, | ||
| 403 | {{12, 14}, {18, 11}, {26, -12}, {27, -21}}, | ||
| 404 | {{18, 13}, {21, 9}, {31, -16}, {37, -30}}, | ||
| 405 | {{13, 11}, {23, -2}, {33, -25}, {41, -40}}, | ||
| 406 | {{13, 15}, {32, -15}, {33, -22}, {42, -41}}, | ||
| 407 | {{15, 16}, {32, -15}, {37, -28}, {48, -47}}, | ||
| 408 | {{12, 23}, {34, -21}, {39, -30}, {39, -32}}, | ||
| 409 | {{13, 23}, {39, -23}, {42, -30}, {46, -40}}, | ||
| 410 | {{15, 20}, {42, -33}, {47, -42}, {52, -51}}, | ||
| 411 | {{14, 26}, {41, -31}, {45, -36}, {46, -41}}, | ||
| 412 | {{14, 44}, {46, -28}, {49, -34}, {52, -39}}, | ||
| 413 | {{17, 40}, {38, -12}, {41, -17}, {43, -19}}, | ||
| 414 | {{17, 47}, {21, 29}, {32, 9}, {32, 11}}, | ||
| 415 | {{24, 17}, {45, -24}, {69, -71}, {61, -55}}, | ||
| 416 | {{21, 21}, {53, -45}, {63, -63}, {56, -46}}, | ||
| 417 | {{25, 22}, {48, -26}, {66, -64}, {62, -50}}, | ||
| 418 | {{31, 27}, {65, -43}, {77, -74}, {81, -67}}, | ||
| 419 | {{22, 29}, {43, -19}, {54, -39}, {45, -20}}, | ||
| 420 | {{19, 35}, {39, -10}, {52, -35}, {35, -2}}, | ||
| 421 | {{14, 50}, {30, 9}, {41, -10}, {28, 15}}, | ||
| 422 | {{10, 57}, {18, 26}, {36, 0}, {34, 1}}, | ||
| 423 | {{7, 63}, {20, 27}, {40, -1}, {39, 1}}, | ||
| 424 | {{ -2, 77}, {0, 57}, {30, 14}, {30, 17}}, | ||
| 425 | {{ -4, 82}, { -14, 82}, {28, 26}, {20, 38}}, | ||
| 426 | {{ -3, 94}, { -5, 75}, {23, 37}, {18, 45}}, | ||
| 427 | {{9, 69}, { -19, 97}, {12, 55}, {15, 54}}, | ||
| 428 | {{ -12, 109}, { -35, 125}, {11, 65}, {0, 79}}, | ||
| 429 | {{36, -35}, {27, 0}, {37, -33}, {36, -16}}, | ||
| 430 | {{36, -34}, {28, 0}, {39, -36}, {37, -14}}, | ||
| 431 | {{32, -26}, {31, -4}, {40, -37}, {37, -17}}, | ||
| 432 | {{37, -30}, {27, 6}, {38, -30}, {32, 1}}, | ||
| 433 | {{44, -32}, {34, 8}, {46, -33}, {34, 15}}, | ||
| 434 | {{34, -18}, {30, 10}, {42, -30}, {29, 15}}, | ||
| 435 | {{34, -15}, {24, 22}, {40, -24}, {24, 25}}, | ||
| 436 | {{40, -15}, {33, 19}, {49, -29}, {34, 22}}, | ||
| 437 | {{33, -7}, {22, 32}, {38, -12}, {31, 16}}, | ||
| 438 | {{35, -5}, {26, 31}, {40, -10}, {35, 18}}, | ||
| 439 | {{33, 0}, {21, 41}, {38, -3}, {31, 28}}, | ||
| 440 | {{38, 2}, {26, 44}, {46, -5}, {33, 41}}, | ||
| 441 | {{33, 13}, {23, 47}, {31, 20}, {36, 28}}, | ||
| 442 | {{23, 35}, {16, 65}, {29, 30}, {27, 47}}, | ||
| 443 | {{13, 58}, {14, 71}, {25, 44}, {21, 62}}, | ||
| 444 | {{29, -3}, {8, 60}, {12, 48}, {18, 31}}, | ||
| 445 | {{26, 0}, {6, 63}, {11, 49}, {19, 26}}, | ||
| 446 | {{22, 30}, {17, 65}, {26, 45}, {36, 24}}, | ||
| 447 | {{31, -7}, {21, 24}, {22, 22}, {24, 23}}, | ||
| 448 | {{35, -15}, {23, 20}, {23, 22}, {27, 16}}, | ||
| 449 | {{34, -3}, {26, 23}, {27, 21}, {24, 30}}, | ||
| 450 | {{34, 3}, {27, 32}, {33, 20}, {31, 29}}, | ||
| 451 | {{36, -1}, {28, 23}, {26, 28}, {22, 41}}, | ||
| 452 | {{34, 5}, {28, 24}, {30, 24}, {22, 42}}, | ||
| 453 | {{32, 11}, {23, 40}, {27, 34}, {16, 60}}, | ||
| 454 | {{35, 5}, {24, 32}, {18, 42}, {15, 52}}, | ||
| 455 | {{34, 12}, {28, 29}, {25, 39}, {14, 60}}, | ||
| 456 | {{39, 11}, {23, 42}, {18, 50}, {3, 78}}, | ||
| 457 | {{30, 29}, {19, 57}, {12, 70}, { -16, 123}}, | ||
| 458 | {{34, 26}, {22, 53}, {21, 54}, {21, 53}}, | ||
| 459 | {{29, 39}, {22, 61}, {14, 71}, {22, 56}}, | ||
| 460 | {{19, 66}, {11, 86}, {11, 83}, {25, 61}}, | ||
| 461 | {{31, 21}, {12, 40}, {25, 32}, {21, 33}}, | ||
| 462 | {{31, 31}, {11, 51}, {21, 49}, {19, 50}}, | ||
| 463 | {{25, 50}, {14, 59}, {21, 54}, {17, 61}}, | ||
| 464 | //402-459 Table 9-24 | ||
| 465 | {{ -17, 120}, { -4, 79}, { -5, 85}, { -3, 78}}, | ||
| 466 | {{ -20, 112}, { -7, 71}, { -6, 81}, { -8, 74}}, | ||
| 467 | {{ -18, 114}, { -5, 69}, { -10, 77}, { -9, 72}}, | ||
| 468 | {{ -11, 85}, { -9, 70}, { -7, 81}, { -10, 72}}, | ||
| 469 | {{ -15, 92}, { -8, 66}, { -17, 80}, { -18, 75}}, | ||
| 470 | {{ -14, 89}, { -10, 68}, { -18, 73}, { -12, 71}}, | ||
| 471 | {{ -26, 71}, { -19, 73}, { -4, 74}, { -11, 63}}, | ||
| 472 | {{ -15, 81}, { -12, 69}, { -10, 83}, { -5, 70}}, | ||
| 473 | {{ -14, 80}, { -16, 70}, { -9, 71}, { -17, 75}}, | ||
| 474 | {{0, 68}, { -15, 67}, { -9, 67}, { -14, 72}}, | ||
| 475 | {{ -14, 70}, { -20, 62}, { -1, 61}, { -16, 67}}, | ||
| 476 | {{ -24, 56}, { -19, 70}, { -8, 66}, { -8, 53}}, | ||
| 477 | {{ -23, 68}, { -16, 66}, { -14, 66}, { -14, 59}}, | ||
| 478 | {{ -24, 50}, { -22, 65}, {0, 59}, { -9, 52}}, | ||
| 479 | {{ -11, 74}, { -20, 63}, {2, 59}, { -11, 68}}, | ||
| 480 | {{23, -13}, {9, -2}, {17, -10}, {9, -2}}, | ||
| 481 | {{26, -13}, {26, -9}, {32, -13}, {30, -10}}, | ||
| 482 | {{40, -15}, {33, -9}, {42, -9}, {31, -4}}, | ||
| 483 | {{49, -14}, {39, -7}, {49, -5}, {33, -1}}, | ||
| 484 | {{44, 3}, {41, -2}, {53, 0}, {33, 7}}, | ||
| 485 | {{45, 6}, {45, 3}, {64, 3}, {31, 12}}, | ||
| 486 | {{44, 34}, {49, 9}, {68, 10}, {37, 23}}, | ||
| 487 | {{33, 54}, {45, 27}, {66, 27}, {31, 38}}, | ||
| 488 | {{19, 82}, {36, 59}, {47, 57}, {20, 64}}, | ||
| 489 | {{ -3, 75}, { -6, 66}, { -5, 71}, { -9, 71}}, | ||
| 490 | {{ -1, 23}, { -7, 35}, {0, 24}, { -7, 37}}, | ||
| 491 | {{1, 34}, { -7, 42}, { -1, 36}, { -8, 44}}, | ||
| 492 | {{1, 43}, { -8, 45}, { -2, 42}, { -11, 49}}, | ||
| 493 | {{0, 54}, { -5, 48}, { -2, 52}, { -10, 56}}, | ||
| 494 | {{ -2, 55}, { -12, 56}, { -9, 57}, { -12, 59}}, | ||
| 495 | {{0, 61}, { -6, 60}, { -6, 63}, { -8, 63}}, | ||
| 496 | {{1, 64}, { -5, 62}, { -4, 65}, { -9, 67}}, | ||
| 497 | {{0, 68}, { -8, 66}, { -4, 67}, { -6, 68}}, | ||
| 498 | {{ -9, 92}, { -8, 76}, { -7, 82}, { -10, 79}}, | ||
| 499 | {{ -14, 106}, { -5, 85}, { -3, 81}, { -3, 78}}, | ||
| 500 | {{ -13, 97}, { -6, 81}, { -3, 76}, { -8, 74}}, | ||
| 501 | {{ -15, 90}, { -10, 77}, { -7, 72}, { -9, 72}}, | ||
| 502 | {{ -12, 90}, { -7, 81}, { -6, 78}, { -10, 72}}, | ||
| 503 | {{ -18, 88}, { -17, 80}, { -12, 72}, { -18, 75}}, | ||
| 504 | {{ -10, 73}, { -18, 73}, { -14, 68}, { -12, 71}}, | ||
| 505 | {{ -9, 79}, { -4, 74}, { -3, 70}, { -11, 63}}, | ||
| 506 | {{ -14, 86}, { -10, 83}, { -6, 76}, { -5, 70}}, | ||
| 507 | {{ -10, 73}, { -9, 71}, { -5, 66}, { -17, 75}}, | ||
| 508 | {{ -10, 70}, { -9, 67}, { -5, 62}, { -14, 72}}, | ||
| 509 | {{ -10, 69}, { -1, 61}, {0, 57}, { -16, 67}}, | ||
| 510 | {{ -5, 66}, { -8, 66}, { -4, 61}, { -8, 53}}, | ||
| 511 | {{ -9, 64}, { -14, 66}, { -9, 60}, { -14, 59}}, | ||
| 512 | {{ -5, 58}, {0, 59}, {1, 54}, { -9, 52}}, | ||
| 513 | {{2, 59}, {2, 59}, {2, 58}, { -11, 68}}, | ||
| 514 | {{21, -10}, {21, -13}, {17, -10}, {9, -2}}, | ||
| 515 | {{24, -11}, {33, -14}, {32, -13}, {30, -10}}, | ||
| 516 | {{28, -8}, {39, -7}, {42, -9}, {31, -4}}, | ||
| 517 | {{28, -1}, {46, -2}, {49, -5}, {33, -1}}, | ||
| 518 | {{29, 3}, {51, 2}, {53, 0}, {33, 7}}, | ||
| 519 | {{29, 9}, {60, 6}, {64, 3}, {31, 12}}, | ||
| 520 | {{35, 20}, {61, 17}, {68, 10}, {37, 23}}, | ||
| 521 | {{29, 36}, {55, 34}, {66, 27}, {31, 38}}, | ||
| 522 | {{14, 67}, {42, 62}, {47, 57}, {20, 64}}, | ||
| 523 | }; | ||
| 524 | |||
| 525 | /*Table 9-44 – Specification of rangeTabLPS depending on pStateIdx and qCodIRangeIdx */ | ||
| 526 | |||
| 527 | const uint8_t g_kuiCabacRangeLps[64][4] = { | ||
| 528 | { 128, 176, 208, 240}, { 128, 167, 197, 227}, { 128, 158, 187, 216}, { 123, 150, 178, 205}, { 116, 142, 169, 195}, { 111, 135, 160, 185}, { 105, 128, 152, 175}, { 100, 122, 144, 166}, | ||
| 529 | { 95, 116, 137, 158}, { 90, 110, 130, 150}, { 85, 104, 123, 142}, { 81, 99, 117, 135}, { 77, 94, 111, 128}, { 73, 89, 105, 122}, { 69, 85, 100, 116}, { 66, 80, 95, 110}, | ||
| 530 | { 62, 76, 90, 104}, { 59, 72, 86, 99}, { 56, 69, 81, 94}, { 53, 65, 77, 89}, { 51, 62, 73, 85}, { 48, 59, 69, 80}, { 46, 56, 66, 76}, { 43, 53, 63, 72}, | ||
| 531 | { 41, 50, 59, 69}, { 39, 48, 56, 65}, { 37, 45, 54, 62}, { 35, 43, 51, 59}, { 33, 41, 48, 56}, { 32, 39, 46, 53}, { 30, 37, 43, 50}, { 29, 35, 41, 48}, | ||
| 532 | { 27, 33, 39, 45}, { 26, 31, 37, 43}, { 24, 30, 35, 41}, { 23, 28, 33, 39}, { 22, 27, 32, 37}, { 21, 26, 30, 35}, { 20, 24, 29, 33}, { 19, 23, 27, 31}, | ||
| 533 | { 18, 22, 26, 30}, { 17, 21, 25, 28}, { 16, 20, 23, 27}, { 15, 19, 22, 25}, { 14, 18, 21, 24}, { 14, 17, 20, 23}, { 13, 16, 19, 22}, { 12, 15, 18, 21}, | ||
| 534 | { 12, 14, 17, 20}, { 11, 14, 16, 19}, { 11, 13, 15, 18}, { 10, 12, 15, 17}, { 10, 12, 14, 16}, { 9, 11, 13, 15}, { 9, 11, 12, 14}, { 8, 10, 12, 14}, | ||
| 535 | { 8, 9, 11, 13}, { 7, 9, 11, 12}, { 7, 9, 10, 12}, { 7, 8, 10, 11}, { 6, 8, 9, 11}, { 6, 7, 9, 10}, { 6, 7, 8, 9}, { 2, 2, 2, 2} | ||
| 536 | }; | ||
| 537 | |||
| 538 | /*Table 9-45 – State transition table*/ | ||
| 539 | |||
| 540 | const uint8_t g_kuiStateTransTable[64][2] = { | ||
| 541 | |||
| 542 | {0, 1}, {0, 2}, {1, 3}, {2, 4}, {2, 5}, {4, 6}, {4, 7}, {5, 8}, {6, 9}, {7, 10}, | ||
| 543 | |||
| 544 | {8, 11}, {9, 12}, {9, 13}, {11, 14}, {11, 15}, {12, 16}, {13, 17}, {13, 18}, {15, 19}, {15, 20}, | ||
| 545 | |||
| 546 | {16, 21}, {16, 22}, {18, 23}, {18, 24}, {19, 25}, {19, 26}, {21, 27}, {21, 28}, {22, 29}, {22, 30}, | ||
| 547 | |||
| 548 | {23, 31}, {24, 32}, {24, 33}, {25, 34}, {26, 35}, {26, 36}, {27, 37}, {27, 38}, {28, 39}, {29, 40}, | ||
| 549 | |||
| 550 | {29, 41}, {30, 42}, {30, 43}, {30, 44}, {31, 45}, {32, 46}, {32, 47}, {33, 48}, {33, 49}, {33, 50}, | ||
| 551 | |||
| 552 | {34, 51}, {34, 52}, {35, 53}, {35, 54}, {35, 55}, {36, 56}, {36, 57}, {36, 58}, {37, 59}, {37, 60}, | ||
| 553 | |||
| 554 | {37, 61}, {38, 62}, {38, 62}, {63, 63} | ||
| 555 | |||
| 556 | }; | ||
| 557 | }//end of namespace | ||
| @@ -152,8 +152,9 @@ void WelsInitBGDFunc (SWelsFuncPtrList* pFuncList, const bool kbEnableBackground · 151 unmodified lines | |||
| 152 | * \param pEncCtx sWelsEncCtx* | 152 | * \param pEncCtx sWelsEncCtx* |
| 153 | * \return successful - 0; otherwise none 0 for failed | 153 | * \return successful - 0; otherwise none 0 for failed |
| 154 | */ | 154 | */ |
| 155 | int32_t InitFunctionPointers (SWelsFuncPtrList* pFuncList, SWelsSvcCodingParam* pParam, uint32_t uiCpuFlag) { | 155 | int32_t InitFunctionPointers (sWelsEncCtx* pEncCtx, SWelsSvcCodingParam* pParam, uint32_t uiCpuFlag) { |
| 156 | int32_t iReturn = ENC_RETURN_SUCCESS; | 156 | int32_t iReturn = ENC_RETURN_SUCCESS; |
| 157 | SWelsFuncPtrList* pFuncList = pEncCtx->pFuncList; | ||
| 157 | bool bScreenContent = (SCREEN_CONTENT_REAL_TIME == pParam->iUsageType); | 158 | bool bScreenContent = (SCREEN_CONTENT_REAL_TIME == pParam->iUsageType); |
| 158 | 159 | ||
| 159 | /* Functionality utilization of CPU instructions dependency */ | 160 | /* Functionality utilization of CPU instructions dependency */ |
| @@ -209,7 +210,7 @@ int32_t InitFunctionPointers (SWelsFuncPtrList* pFuncList, SWelsSvcCodingParam* · 49 unmodified lines | |||
| 209 | /*init pixel average function*/ | 210 | /*init pixel average function*/ |
| 210 | /*get one column or row pixel when refinement*/ | 211 | /*get one column or row pixel when refinement*/ |
| 211 | WelsInitMcFuncs (pFuncList, uiCpuFlag); | 212 | WelsInitMcFuncs (pFuncList, uiCpuFlag); |
| 212 | InitCoeffFunc (pFuncList, uiCpuFlag); | 213 | InitCoeffFunc (pFuncList,uiCpuFlag,pParam->iEntropyCodingModeFlag); |
| 213 | 214 | ||
| 214 | WelsInitEncodingFuncs (pFuncList, uiCpuFlag); | 215 | WelsInitEncodingFuncs (pFuncList, uiCpuFlag); |
| 215 | WelsInitReconstructionFuncs (pFuncList, uiCpuFlag); | 216 | WelsInitReconstructionFuncs (pFuncList, uiCpuFlag); |
| @@ -54,6 +54,7 @@ · 53 unmodified lines | |||
| 54 | #include "crt_util_safe_x.h" // Safe CRT routines like utils for cross platforms | 54 | #include "crt_util_safe_x.h" // Safe CRT routines like utils for cross platforms |
| 55 | #include "slice_multi_threading.h" | 55 | #include "slice_multi_threading.h" |
| 56 | #include "measure_time.h" | 56 | #include "measure_time.h" |
| 57 | #include "svc_set_mb_syn.h" | ||
| 57 | 58 | ||
| 58 | namespace WelsEnc { | 59 | namespace WelsEnc { |
| 59 | 60 | ||
| @@ -947,7 +948,7 @@ static inline int32_t InitDqLayers (sWelsEncCtx** ppCtx) { · 887 unmodified lines | |||
| 947 | } | 948 | } |
| 948 | 949 | ||
| 949 | // initialize pPps | 950 | // initialize pPps |
| 950 | WelsInitPps (pPps, pSps, pSubsetSps, iPpsId, true, bUseSubsetSps); | 951 | WelsInitPps (pPps, pSps, pSubsetSps, iPpsId, true, bUseSubsetSps,pParam->iEntropyCodingModeFlag); |
| 951 | 952 | ||
| 952 | // Not using FMO in SVC coding so far, come back if need FMO | 953 | // Not using FMO in SVC coding so far, come back if need FMO |
| 953 | { | 954 | { |
| @@ -2053,7 +2054,7 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar · 1099 unmodified lines | |||
| 2053 | FreeMemorySvc (&pCtx); | 2054 | FreeMemorySvc (&pCtx); |
| 2054 | return 1; | 2055 | return 1; |
| 2055 | } | 2056 | } |
| 2056 | InitFunctionPointers (pCtx->pFuncList, pCtx->pSvcParam, uiCpuFeatureFlags); | 2057 | InitFunctionPointers (pCtx, pCtx->pSvcParam, uiCpuFeatureFlags); |
| 2057 | 2058 | ||
| 2058 | pCtx->iActiveThreadsNum = pCodingParam->iCountThreadsNum; | 2059 | pCtx->iActiveThreadsNum = pCodingParam->iCountThreadsNum; |
| 2059 | pCtx->iMaxSliceCount = iSliceNum; | 2060 | pCtx->iMaxSliceCount = iSliceNum; |
| @@ -2067,6 +2068,8 @@ int32_t WelsInitEncoderExt (sWelsEncCtx** ppCtx, SWelsSvcCodingParam* pCodingPar · 7 unmodified lines | |||
| 2067 | if (pCodingParam->iMultipleThreadIdc > 1) | 2068 | if (pCodingParam->iMultipleThreadIdc > 1) |
| 2068 | iRet = CreateSliceThreads (pCtx); | 2069 | iRet = CreateSliceThreads (pCtx); |
| 2069 | 2070 | ||
| 2071 | if(pCodingParam->iEntropyCodingModeFlag) | ||
| 2072 | WelsCabacInit (pCtx); | ||
| 2070 | WelsRcInitModule (pCtx, pCtx->pSvcParam->iRCMode); | 2073 | WelsRcInitModule (pCtx, pCtx->pSvcParam->iRCMode); |
| 2071 | 2074 | ||
| 2072 | pCtx->pVpp = new CWelsPreProcess (pCtx); | 2075 | pCtx->pVpp = new CWelsPreProcess (pCtx); |
| @@ -0,0 +1,240 @@ | |||
| 1 | /*! | ||
| 2 | * \copy | ||
| 3 | * Copyright (c) 2009-2013, Cisco Systems | ||
| 4 | * All rights reserved. | ||
| 5 | * | ||
| 6 | * Redistribution and use in source and binary forms, with or without | ||
| 7 | * modification, are permitted provided that the following conditions | ||
| 8 | * are met: | ||
| 9 | * | ||
| 10 | * * Redistributions of source code must retain the above copyright | ||
| 11 | * notice, this list of conditions and the following disclaimer. | ||
| 12 | * | ||
| 13 | * * Redistributions in binary form must reproduce the above copyright | ||
| 14 | * notice, this list of conditions and the following disclaimer in | ||
| 15 | * the documentation and/or other materials provided with the | ||
| 16 | * distribution. | ||
| 17 | * | ||
| 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| 19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
| 21 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
| 22 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
| 24 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 25 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
| 26 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
| 28 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
| 29 | * POSSIBILITY OF SUCH DAMAGE. | ||
| 30 | * | ||
| 31 | * | ||
| 32 | * \file set_mb_syn_cabac.cpp | ||
| 33 | * | ||
| 34 | * \brief cabac coding engine | ||
| 35 | * | ||
| 36 | * \date 10/11/2014 Created | ||
| 37 | * | ||
| 38 | ************************************************************************************* | ||
| 39 | */ | ||
| 40 | #include <string.h> | ||
| 41 | #include "typedefs.h" | ||
| 42 | #include "macros.h" | ||
| 43 | #include "wels_common_defs.h" | ||
| 44 | #include "set_mb_syn_cabac.h" | ||
| 45 | #include "encoder.h" | ||
| 46 | |||
| 47 | namespace WelsEnc { | ||
| 48 | |||
| 49 | |||
| 50 | void WelsCabacInit (void* pCtx) { | ||
| 51 | sWelsEncCtx* pEncCtx = (sWelsEncCtx*)pCtx; | ||
| 52 | for (int32_t iModel = 0; iModel < 4; iModel++) { | ||
| 53 | for (int32_t iQp = 0; iQp <= WELS_QP_MAX; iQp++) | ||
| 54 | for (int32_t iIdx = 0; iIdx < WELS_CONTEXT_COUNT; iIdx++) { | ||
| 55 | int32_t m = g_kiCabacGlobalContextIdx[iIdx][iModel][0]; | ||
| 56 | int32_t n = g_kiCabacGlobalContextIdx[iIdx][iModel][1]; | ||
| 57 | int32_t iPreCtxState = WELS_CLIP3 ((((m * iQp) >> 4) + n), 1, 126); | ||
| 58 | uint8_t uiValMps = 0; | ||
| 59 | uint8_t uiStateIdx = 0; | ||
| 60 | if (iPreCtxState <= 63) { | ||
| 61 | uiStateIdx = 63 - iPreCtxState; | ||
| 62 | uiValMps = 0; | ||
| 63 | } else { | ||
| 64 | uiStateIdx = iPreCtxState - 64; | ||
| 65 | uiValMps = 1; | ||
| 66 | } | ||
| 67 | pEncCtx->sWelsCabacContexts[iModel][iQp][iIdx].m_uiState = uiStateIdx; | ||
| 68 | pEncCtx->sWelsCabacContexts[iModel][iQp][iIdx].m_uiValMps = uiValMps; | ||
| 69 | } | ||
| 70 | } | ||
| 71 | } | ||
| 72 | |||
| 73 | void WelsCabacContextInit (void* pCtx, SCabacCtx* pCbCtx, int32_t iModel) { | ||
| 74 | sWelsEncCtx* pEncCtx = (sWelsEncCtx*)pCtx; | ||
| 75 | int32_t iIdx = pEncCtx->eSliceType == WelsCommon::I_SLICE ? 0 : iModel + 1; | ||
| 76 | int32_t iQp = pEncCtx->iGlobalQp; | ||
| 77 | memcpy (pCbCtx->m_sStateCtx, pEncCtx->sWelsCabacContexts[iIdx][iQp], | ||
| 78 | WELS_CONTEXT_COUNT * sizeof (SStateCtx)); | ||
| 79 | } | ||
| 80 | |||
| 81 | void WelsCabacEncodeInit (SCabacCtx* pCbCtx, uint8_t* pBuf, uint8_t* pEnd) { | ||
| 82 | pCbCtx->m_uiLow = 0; | ||
| 83 | pCbCtx->m_uiRange = 510; | ||
| 84 | pCbCtx->m_iBitsOutstanding = 0; | ||
| 85 | pCbCtx->m_uData = 0; | ||
| 86 | pCbCtx->m_uiBitsUsed = 0; | ||
| 87 | pCbCtx->m_iFirstFlag = 1; | ||
| 88 | pCbCtx->m_pBufStart = pBuf; | ||
| 89 | pCbCtx->m_pBufEnd = pEnd; | ||
| 90 | pCbCtx->m_pBufCur = pBuf; | ||
| 91 | pCbCtx->m_uiBinCountsInNalUnits = 0; | ||
| 92 | } | ||
| 93 | |||
| 94 | void WelsCabacPutBit (SCabacCtx* pCbCtx, uint32_t iValue) { | ||
| 95 | if (pCbCtx->m_iFirstFlag != 0) { | ||
| 96 | pCbCtx->m_iFirstFlag = 0; | ||
| 97 | } else { | ||
| 98 | pCbCtx->m_uData = (pCbCtx->m_uData << 1) | iValue; | ||
| 99 | pCbCtx->m_uiBitsUsed++; | ||
| 100 | } | ||
| 101 | if (pCbCtx->m_iBitsOutstanding == 0) { | ||
| 102 | while (pCbCtx->m_uiBitsUsed >= 8) { | ||
| 103 | pCbCtx->m_uiBitsUsed -= 8; | ||
| 104 | uint32_t uiByte = pCbCtx->m_uData >> (pCbCtx->m_uiBitsUsed); | ||
| 105 | if (pCbCtx->m_uiBitsUsed == 0) | ||
| 106 | pCbCtx->m_uData = 0; | ||
| 107 | else | ||
| 108 | pCbCtx->m_uData &= (uint32_t) ((0xFFFFFFFF) >> (32 - pCbCtx->m_uiBitsUsed)); | ||
| 109 | *pCbCtx->m_pBufCur ++ = uiByte; | ||
| 110 | } | ||
| 111 | } else { | ||
| 112 | |||
| 113 | while (pCbCtx->m_iBitsOutstanding > 0) { | ||
| 114 | pCbCtx->m_uData = (pCbCtx->m_uData << 1) | (1 - iValue); | ||
| 115 | pCbCtx->m_iBitsOutstanding--; | ||
| 116 | pCbCtx->m_uiBitsUsed++; | ||
| 117 | while (pCbCtx->m_uiBitsUsed >= 8) { | ||
| 118 | pCbCtx->m_uiBitsUsed -= 8; | ||
| 119 | uint32_t uiByte = pCbCtx->m_uData >> (pCbCtx->m_uiBitsUsed); | ||
| 120 | if (pCbCtx->m_uiBitsUsed == 0) | ||
| 121 | pCbCtx->m_uData = 0; | ||
| 122 | else | ||
| 123 | pCbCtx->m_uData &= (uint32_t) ((0xFFFFFFFF) >> (32 - pCbCtx->m_uiBitsUsed)); | ||
| 124 | *pCbCtx->m_pBufCur ++ = uiByte; | ||
| 125 | } | ||
| 126 | } | ||
| 127 | } | ||
| 128 | } | ||
| 129 | void WelsCabacEncodeRenorm (SCabacCtx* pCbCtx) { | ||
| 130 | while (pCbCtx->m_uiRange < 256) { | ||
| 131 | if (pCbCtx->m_uiLow < 256) { | ||
| 132 | WelsCabacPutBit (pCbCtx, 0); | ||
| 133 | } else { | ||
| 134 | if (pCbCtx->m_uiLow >= 512) { | ||
| 135 | pCbCtx->m_uiLow -= 512; | ||
| 136 | WelsCabacPutBit (pCbCtx, 1); | ||
| 137 | } else { | ||
| 138 | pCbCtx->m_uiLow -= 256; | ||
| 139 | pCbCtx->m_iBitsOutstanding++; | ||
| 140 | } | ||
| 141 | } | ||
| 142 | pCbCtx->m_uiRange <<= 1; | ||
| 143 | pCbCtx->m_uiLow <<= 1; | ||
| 144 | } | ||
| 145 | } | ||
| 146 | void WelsCabacEncodeDecision (SCabacCtx* pCbCtx, int32_t iCtx, uint32_t uiBin) { | ||
| 147 | uint8_t uiState = pCbCtx->m_sStateCtx[iCtx].m_uiState; | ||
| 148 | uint8_t uiValMps = pCbCtx->m_sStateCtx[iCtx].m_uiValMps; | ||
| 149 | uint32_t uiRangeLps = g_kuiCabacRangeLps[uiState][ (pCbCtx->m_uiRange >> 6) & 3]; | ||
| 150 | |||
| 151 | pCbCtx->m_uiRange -= uiRangeLps; | ||
| 152 | if (uiBin != uiValMps) { //LPS | ||
| 153 | pCbCtx->m_uiLow += pCbCtx->m_uiRange; | ||
| 154 | pCbCtx->m_uiRange = uiRangeLps; | ||
| 155 | if (uiState == 0) | ||
| 156 | uiValMps = 1 - uiValMps; | ||
| 157 | pCbCtx->m_sStateCtx[iCtx].m_uiState = g_kuiStateTransTable[uiState][0]; | ||
| 158 | pCbCtx->m_sStateCtx[iCtx].m_uiValMps = uiValMps; | ||
| 159 | } else { | ||
| 160 | pCbCtx->m_sStateCtx[iCtx].m_uiState = g_kuiStateTransTable[uiState][1]; | ||
| 161 | } | ||
| 162 | WelsCabacEncodeRenorm (pCbCtx); | ||
| 163 | pCbCtx->m_uiBinCountsInNalUnits++; | ||
| 164 | } | ||
| 165 | |||
| 166 | void WelsCabacEncodeBypassOne (SCabacCtx* pCbCtx, uint32_t uiBin) { | ||
| 167 | pCbCtx->m_uiLow <<= 1; | ||
| 168 | if (uiBin) { | ||
| 169 | pCbCtx->m_uiLow += pCbCtx->m_uiRange; | ||
| 170 | } | ||
| 171 | if (pCbCtx->m_uiLow >= 1024) { | ||
| 172 | WelsCabacPutBit (pCbCtx, 1); | ||
| 173 | pCbCtx->m_uiLow -= 1024; | ||
| 174 | } else { | ||
| 175 | if (pCbCtx->m_uiLow < 512) | ||
| 176 | WelsCabacPutBit (pCbCtx, 0); | ||
| 177 | else { | ||
| 178 | pCbCtx->m_uiLow -= 512; | ||
| 179 | pCbCtx->m_iBitsOutstanding++; | ||
| 180 | } | ||
| 181 | } | ||
| 182 | pCbCtx->m_uiBinCountsInNalUnits++; | ||
| 183 | } | ||
| 184 | void WelsCabacEncodeTerminate (SCabacCtx* pCbCtx, uint32_t uiBin) { | ||
| 185 | pCbCtx->m_uiRange -= 2; | ||
| 186 | if (uiBin) { | ||
| 187 | pCbCtx->m_uiLow += pCbCtx->m_uiRange; | ||
| 188 | pCbCtx->m_uiRange = 2; | ||
| 189 | WelsCabacEncodeRenorm (pCbCtx); | ||
| 190 | WelsCabacPutBit (pCbCtx, ((pCbCtx->m_uiLow >> 9) & 1)); | ||
| 191 | int32_t iLastTwoBits = (((pCbCtx->m_uiLow >> 7) & 3) | 1); | ||
| 192 | pCbCtx->m_uData = (pCbCtx->m_uData << 2) | iLastTwoBits; | ||
| 193 | pCbCtx->m_uiBitsUsed += 2; | ||
| 194 | } else { | ||
| 195 | WelsCabacEncodeRenorm (pCbCtx); | ||
| 196 | } | ||
| 197 | pCbCtx->m_uiBinCountsInNalUnits++; | ||
| 198 | } | ||
| 199 | void WelsCabacEncodeUeBypass (SCabacCtx* pCbCtx, int32_t iExpBits, uint32_t uiVal) { | ||
| 200 | int32_t iSufS = uiVal; | ||
| 201 | int32_t iStopLoop = 0; | ||
| 202 | int32_t k = iExpBits; | ||
| 203 | do { | ||
| 204 | if (iSufS >= (1 << k)) { | ||
| 205 | WelsCabacEncodeBypassOne (pCbCtx, 1); | ||
| 206 | iSufS = iSufS - (1 << k); | ||
| 207 | k++; | ||
| 208 | } else { | ||
| 209 | WelsCabacEncodeBypassOne (pCbCtx, 0); | ||
| 210 | while (k--) | ||
| 211 | WelsCabacEncodeBypassOne (pCbCtx, (iSufS >> k) & 1); | ||
| 212 | iStopLoop = 1; | ||
| 213 | } | ||
| 214 | } while (!iStopLoop); | ||
| 215 | } | ||
| 216 | |||
| 217 | void WelsCabacEncodeFlush (SCabacCtx* pCbCtx) { | ||
| 218 | WelsCabacEncodeTerminate (pCbCtx, 1); | ||
| 219 | while (pCbCtx->m_uiBitsUsed > 0) { | ||
| 220 | if (pCbCtx->m_uiBitsUsed > 8) { | ||
| 221 | pCbCtx->m_uiBitsUsed -= 8; | ||
| 222 | uint32_t uiByte = pCbCtx->m_uData >> (pCbCtx->m_uiBitsUsed); | ||
| 223 | pCbCtx->m_uData &= (uint32_t) ((0xFFFFFFFF) >> (32 - pCbCtx->m_uiBitsUsed)); | ||
| 224 | *pCbCtx->m_pBufCur ++ = uiByte; | ||
| 225 | } else { | ||
| 226 | if (pCbCtx->m_uiBitsUsed == 8) { | ||
| 227 | *pCbCtx->m_pBufCur ++ = pCbCtx->m_uData & 0xff; | ||
| 228 | } else { | ||
| 229 | *pCbCtx->m_pBufCur ++ = (pCbCtx->m_uData << (8 - pCbCtx->m_uiBitsUsed)); | ||
| 230 | } | ||
| 231 | pCbCtx->m_uiBitsUsed = 0; | ||
| 232 | } | ||
| 233 | } | ||
| 234 | |||
| 235 | } | ||
| 236 | |||
| 237 | uint8_t* WelsCabacEncodeGetPtr (SCabacCtx* pCbCtx) { | ||
| 238 | return pCbCtx->m_pBufCur; | ||
| 239 | } | ||
| 240 | } | ||
| @@ -38,7 +38,7 @@ · 37 unmodified lines | |||
| 38 | ************************************************************************************* | 38 | ************************************************************************************* |
| 39 | */ | 39 | */ |
| 40 | 40 | ||
| 41 | #include "set_mb_syn_cavlc.h" | 41 | #include "svc_set_mb_syn.h" |
| 42 | #include "vlc_encoder.h" | 42 | #include "vlc_encoder.h" |
| 43 | #include "cpu_core.h" | 43 | #include "cpu_core.h" |
| 44 | #include "wels_const.h" | 44 | #include "wels_const.h" |
| @@ -199,8 +199,47 @@ int32_t WriteBlockResidualCavlc (SWelsFuncPtrList* pFuncList, int16_t* pCoffLev · 154 unmodified lines | |||
| 199 | return ENC_RETURN_SUCCESS; | 199 | return ENC_RETURN_SUCCESS; |
| 200 | } | 200 | } |
| 201 | 201 | ||
| 202 | void StashMBStatusCavlc (SDynamicSlicingStack* pDss, void* pBuffer, SSlice* pSlice, int32_t iMbSkipRun) { | ||
| 203 | SBitStringAux* pBs = (SBitStringAux*)pBuffer; | ||
| 204 | pDss->pBsStackBufPtr = pBs->pBufPtr; | ||
| 205 | pDss->uiBsStackCurBits = pBs->uiCurBits; | ||
| 206 | pDss->iBsStackLeftBits = pBs->iLeftBits; | ||
| 207 | pDss->uiLastMbQp = pSlice->uiLastMbQp; | ||
| 208 | pDss->iMbSkipRunStack = iMbSkipRun; | ||
| 209 | } | ||
| 210 | int32_t StashPopMBStatusCavlc (SDynamicSlicingStack* pDss, void* pBuffer, SSlice* pSlice) { | ||
| 211 | SBitStringAux* pBs = (SBitStringAux*)pBuffer; | ||
| 212 | pBs->pBufPtr = pDss->pBsStackBufPtr; | ||
| 213 | pBs->uiCurBits = pDss->uiBsStackCurBits; | ||
| 214 | pBs->iLeftBits = pDss->iBsStackLeftBits; | ||
| 215 | pSlice->uiLastMbQp = pDss->uiLastMbQp; | ||
| 216 | return pDss->iMbSkipRunStack; | ||
| 217 | } | ||
| 218 | void StashMBStatusCabac (SDynamicSlicingStack* pDss, void* pBuffer, SSlice* pSlice, int32_t iMbSkipRun) { | ||
| 219 | SCabacCtx* pCtx = (SCabacCtx*)pBuffer; | ||
| 220 | memcpy (&pDss->sStoredCabac, pCtx, sizeof (SCabacCtx)); | ||
| 221 | pDss->uiLastMbQp = pSlice->uiLastMbQp; | ||
| 222 | pDss->iMbSkipRunStack = iMbSkipRun; | ||
| 223 | } | ||
| 224 | int32_t StashPopMBStatusCabac (SDynamicSlicingStack* pDss, void* pBuffer, SSlice* pSlice) { | ||
| 225 | SCabacCtx* pCtx = (SCabacCtx*)pBuffer; | ||
| 226 | memcpy (pCtx, &pDss->sStoredCabac, sizeof (SCabacCtx)); | ||
| 227 | pSlice->uiLastMbQp = pDss->uiLastMbQp; | ||
| 228 | return pDss->iMbSkipRunStack; | ||
| 229 | } | ||
| 230 | |||
| 231 | void WelsWriteSliceEndSyn (SSlice* pSlice, bool bEntropyCodingModeFlag) { | ||
| 232 | SBitStringAux* pBs = pSlice->pSliceBsa; | ||
| 233 | if (bEntropyCodingModeFlag) { | ||
| 234 | WelsCabacEncodeFlush (&pSlice->sCabacCtx); | ||
| 235 | pBs->pBufPtr = WelsCabacEncodeGetPtr (&pSlice->sCabacCtx); | ||
| 202 | 236 | ||
| 203 | void InitCoeffFunc (SWelsFuncPtrList* pFuncList, const uint32_t uiCpuFlag) { | 237 | } else { |
| 238 | BsRbspTrailingBits (pBs); | ||
| 239 | BsFlush (pBs); | ||
| 240 | } | ||
| 241 | } | ||
| 242 | void InitCoeffFunc (SWelsFuncPtrList* pFuncList, const uint32_t uiCpuFlag,int32_t iEntropyCodingModeFlag) { | ||
| 204 | pFuncList->pfCavlcParamCal = CavlcParamCal_c; | 243 | pFuncList->pfCavlcParamCal = CavlcParamCal_c; |
| 205 | 244 | ||
| 206 | #if defined(X86_ASM) | 245 | #if defined(X86_ASM) |
| @@ -208,6 +247,17 @@ void InitCoeffFunc (SWelsFuncPtrList* pFuncList, const uint32_t uiCpuFlag) { · 1 unmodified line | |||
| 208 | // pFuncList->pfCavlcParamCal = CavlcParamCal_sse2; | 247 | // pFuncList->pfCavlcParamCal = CavlcParamCal_sse2; |
| 209 | } | 248 | } |
| 210 | #endif | 249 | #endif |
| 250 | if (iEntropyCodingModeFlag) { | ||
| 251 | pFuncList->pfStashMBStatus = StashMBStatusCabac; | ||
| 252 | pFuncList->pfStashPopMBStatus = StashPopMBStatusCabac; | ||
| 253 | pFuncList->pfWelsSpatialWriteMbSyn = WelsSpatialWriteMbSynCabac; | ||
| 254 | } else { | ||
| 255 | pFuncList->pfStashMBStatus = StashMBStatusCavlc; | ||
| 256 | pFuncList->pfStashPopMBStatus = StashPopMBStatusCavlc; | ||
| 257 | pFuncList->pfWelsSpatialWriteMbSyn = WelsSpatialWriteMbSyn; | ||
| 258 | |||
| 259 | } | ||
| 211 | } | 260 | } |
| 212 | 261 | ||
| 262 | |||
| 213 | } // namespace WelsEnc | 263 | } // namespace WelsEnc |
| @@ -1617,7 +1617,7 @@ bool WelsMdFirstIntraMode (void* pEnc, void* pMd, SMB* pCurMb, SMbCache* pMbCach · 1616 unmodified lines | |||
| 1617 | //chroma | 1617 | //chroma |
| 1618 | pWelsMd->iCostChroma = WelsMdIntraChroma (pFunc, pEncCtx->pCurDqLayer, pMbCache, pWelsMd->iLambda); | 1618 | pWelsMd->iCostChroma = WelsMdIntraChroma (pFunc, pEncCtx->pCurDqLayer, pMbCache, pWelsMd->iLambda); |
| 1619 | WelsIMbChromaEncode (pEncCtx, pCurMb, pMbCache); //add pEnc&rec to MD--2010.3.15 | 1619 | WelsIMbChromaEncode (pEncCtx, pCurMb, pMbCache); //add pEnc&rec to MD--2010.3.15 |
| 1620 | 1620 | pCurMb->uiChromPredMode = pMbCache->uiChmaI8x8Mode; | |
| 1621 | pCurMb->pSadCost[0] = 0; | 1621 | pCurMb->pSadCost[0] = 0; |
| 1622 | return true; //intra_mb_type is best | 1622 | return true; //intra_mb_type is best |
| 1623 | } | 1623 | } |
| @@ -1806,6 +1806,7 @@ void WelsMdIntraSecondaryModesEnc (sWelsEncCtx* pEncCtx, SWelsMD* pWelsMd, SMB* · 182 unmodified lines | |||
| 1806 | //chroma | 1806 | //chroma |
| 1807 | pWelsMd->iCostChroma = WelsMdIntraChroma (pFunc, pEncCtx->pCurDqLayer, pMbCache, pWelsMd->iLambda); | 1807 | pWelsMd->iCostChroma = WelsMdIntraChroma (pFunc, pEncCtx->pCurDqLayer, pMbCache, pWelsMd->iLambda); |
| 1808 | WelsIMbChromaEncode (pEncCtx, pCurMb, pMbCache); //add pEnc&rec to MD--2010.3.15 | 1808 | WelsIMbChromaEncode (pEncCtx, pCurMb, pMbCache); //add pEnc&rec to MD--2010.3.15 |
| 1809 | pCurMb->uiChromPredMode = pMbCache->uiChmaI8x8Mode; | ||
| 1809 | pCurMb->pSadCost[0] = 0; | 1810 | pCurMb->pSadCost[0] = 0; |
| 1810 | } | 1811 | } |
| 1811 | 1812 | ||
| @@ -43,7 +43,7 @@ · 42 unmodified lines | |||
| 43 | #include "svc_enc_golomb.h" | 43 | #include "svc_enc_golomb.h" |
| 44 | #include "svc_base_layer_md.h" | 44 | #include "svc_base_layer_md.h" |
| 45 | #include "svc_encode_mb.h" | 45 | #include "svc_encode_mb.h" |
| 46 | #include "svc_set_mb_syn_cavlc.h" | 46 | #include "svc_set_mb_syn.h" |
| 47 | #include "decode_mb_aux.h" | 47 | #include "decode_mb_aux.h" |
| 48 | #include "svc_mode_decision.h" | 48 | #include "svc_mode_decision.h" |
| 49 | 49 | ||
| @@ -270,6 +270,9 @@ void WelsSliceHeaderWrite (SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* pSli · 220 unmodified lines | |||
| 270 | WriteRefPicMarking (pBs, pSliceHeader, pNalHead); | 270 | WriteRefPicMarking (pBs, pSliceHeader, pNalHead); |
| 271 | } | 271 | } |
| 272 | 272 | ||
| 273 | if (pPps->bEntropyCodingModeFlag && pSliceHeader->eSliceType != I_SLICE) { | ||
| 274 | BsWriteUE (pBs, pSlice->iCabacInitIdc); | ||
| 275 | } | ||
| 273 | BsWriteSE (pBs, pSliceHeader->iSliceQpDelta); /* pSlice qp delta */ | 276 | BsWriteSE (pBs, pSliceHeader->iSliceQpDelta); /* pSlice qp delta */ |
| 274 | 277 | ||
| 275 | if (pPps->bDeblockingFilterControlPresentFlag) { | 278 | if (pPps->bDeblockingFilterControlPresentFlag) { |
| @@ -338,6 +341,11 @@ void WelsSliceHeaderExtWrite (SBitStringAux* pBs, SDqLayer* pCurLayer, SSlice* p · 62 unmodified lines | |||
| 338 | } | 341 | } |
| 339 | // } | 342 | // } |
| 340 | 343 | ||
| 344 | |||
| 345 | if (pPps->bEntropyCodingModeFlag && pSliceHeader->eSliceType != I_SLICE) { | ||
| 346 | BsWriteUE (pBs, pSlice->iCabacInitIdc); | ||
| 347 | } | ||
| 348 | |||
| 341 | BsWriteSE (pBs, pSliceHeader->iSliceQpDelta); /* pSlice qp delta */ | 349 | BsWriteSE (pBs, pSliceHeader->iSliceQpDelta); /* pSlice qp delta */ |
| 342 | 350 | ||
| 343 | if (pPps->bDeblockingFilterControlPresentFlag) { | 351 | if (pPps->bDeblockingFilterControlPresentFlag) { |
| @@ -460,21 +468,7 @@ void OutputPMbWithoutConstructCsRsNoCopy (sWelsEncCtx* pCtx, SDqLayer* pDq, SSli · 116 unmodified lines | |||
| 460 | pfIdctFour4x4 (pDecV, kiDecStrideChroma, pDecV, kiDecStrideChroma, pScaledTcoeff + 320); | 468 | pfIdctFour4x4 (pDecV, kiDecStrideChroma, pDecV, kiDecStrideChroma, pScaledTcoeff + 320); |
| 461 | } | 469 | } |
| 462 | } | 470 | } |
| 463 | inline void StashMBStatus (SDynamicSlicingStack* pDss, SBitStringAux* pBs, SSlice* pSlice, int32_t iMbSkipRun = 0) { | 471 | |
| 464 | pDss->pBsStackBufPtr = pBs->pBufPtr; | ||
| 465 | pDss->uiBsStackCurBits = pBs->uiCurBits; | ||
| 466 | pDss->iBsStackLeftBits = pBs->iLeftBits; | ||
| 467 | pDss->uiLastMbQp = pSlice->uiLastMbQp; | ||
| 468 | pDss->iMbSkipRunStack = iMbSkipRun; | ||
| 469 | } | ||
| 470 | void StashPopMBStatus (SDynamicSlicingStack* pDss, SBitStringAux* pBs, SSlice* pSlice, int32_t* pMbSkipRun = 0) { | ||
| 471 | pBs->pBufPtr = pDss->pBsStackBufPtr; | ||
| 472 | pBs->uiCurBits = pDss->uiBsStackCurBits; | ||
| 473 | pBs->iLeftBits = pDss->iBsStackLeftBits; | ||
| 474 | pSlice->uiLastMbQp = pDss->uiLastMbQp; | ||
| 475 | if (pMbSkipRun) | ||
| 476 | *pMbSkipRun = pDss->iMbSkipRunStack; | ||
| 477 | } | ||
| 478 | void UpdateQpForOverflow (SMB* pCurMb, uint8_t kuiChromaQpIndexOffset) { | 472 | void UpdateQpForOverflow (SMB* pCurMb, uint8_t kuiChromaQpIndexOffset) { |
| 479 | pCurMb->uiLumaQp += DELTA_QP; | 473 | pCurMb->uiLumaQp += DELTA_QP; |
| 480 | pCurMb->uiChromaQp = g_kuiChromaQpTable[CLIP3_QP_0_51 (pCurMb->uiLumaQp + kuiChromaQpIndexOffset)]; | 474 | pCurMb->uiChromaQp = g_kuiChromaQpTable[CLIP3_QP_0_51 (pCurMb->uiLumaQp + kuiChromaQpIndexOffset)]; |
| @@ -501,8 +495,11 @@ int32_t WelsISliceMdEnc (sWelsEncCtx* pEncCtx, SSlice* pSlice) { //pMd + encodin · 20 unmodified lines | |||
| 501 | int32_t iEncReturn = ENC_RETURN_SUCCESS; | 495 | int32_t iEncReturn = ENC_RETURN_SUCCESS; |
| 502 | SBitStringAux* pBs = pSlice->pSliceBsa; | 496 | SBitStringAux* pBs = pSlice->pSliceBsa; |
| 503 | SDynamicSlicingStack sDss; | 497 | SDynamicSlicingStack sDss; |
| 498 | if (pEncCtx->pSvcParam->iEntropyCodingModeFlag) { | ||
| 499 | WelsInitSliceCabac (pEncCtx, pSlice); | ||
| 500 | } | ||
| 504 | for (; ;) { | 501 | for (; ;) { |
| 505 | StashMBStatus (&sDss, pBs, pSlice); | 502 | pEncCtx->pFuncList->pfStashMBStatus (&sDss, pBs, pSlice, 0); |
| 506 | iCurMbIdx = iNextMbIdx; | 503 | iCurMbIdx = iNextMbIdx; |
| 507 | pCurMb = &pMbList[ iCurMbIdx ]; | 504 | pCurMb = &pMbList[ iCurMbIdx ]; |
| 508 | 505 | ||
| @@ -514,9 +511,10 @@ TRY_REENCODING: · 5 unmodified lines | |||
| 514 | WelsMdIntraMb (pEncCtx, &sMd, pCurMb, pMbCache); | 511 | WelsMdIntraMb (pEncCtx, &sMd, pCurMb, pMbCache); |
| 515 | UpdateNonZeroCountCache (pCurMb, pMbCache); | 512 | UpdateNonZeroCountCache (pCurMb, pMbCache); |
| 516 | 513 | ||
| 517 | iEncReturn = WelsSpatialWriteMbSyn (pEncCtx, pSlice, pCurMb); | 514 | |
| 515 | iEncReturn = pEncCtx->pFuncList->pfWelsSpatialWriteMbSyn (pEncCtx, pSlice, pCurMb); | ||
| 518 | if (iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND) { | 516 | if (iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND) { |
| 519 | StashPopMBStatus (&sDss, pBs, pSlice); | 517 | pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pBs, pSlice); |
| 520 | UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset); | 518 | UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset); |
| 521 | goto TRY_REENCODING; | 519 | goto TRY_REENCODING; |
| 522 | } | 520 | } |
| @@ -562,12 +560,14 @@ int32_t WelsISliceMdEncDynamic (sWelsEncCtx* pEncCtx, SSlice* pSlice) { //pMd + · 39 unmodified lines | |||
| 562 | SWelsMD sMd; | 560 | SWelsMD sMd; |
| 563 | SDynamicSlicingStack sDss; | 561 | SDynamicSlicingStack sDss; |
| 564 | sDss.iStartPos = BsGetBitsPos (pBs); | 562 | sDss.iStartPos = BsGetBitsPos (pBs); |
| 565 | 563 | if (pEncCtx->pSvcParam->iEntropyCodingModeFlag) { | |
| 564 | WelsInitSliceCabac (pEncCtx, pSlice); | ||
| 565 | } | ||
| 566 | for (; ;) { | 566 | for (; ;) { |
| 567 | iCurMbIdx = iNextMbIdx; | 567 | iCurMbIdx = iNextMbIdx; |
| 568 | pCurMb = &pMbList[ iCurMbIdx ]; | 568 | pCurMb = &pMbList[ iCurMbIdx ]; |
| 569 | 569 | ||
| 570 | StashMBStatus (&sDss, pBs, pSlice); | 570 | pEncCtx->pFuncList->pfStashMBStatus (&sDss, pBs, pSlice, 0); |
| 571 | pEncCtx->pFuncList->pfRc.pfWelsRcMbInit (pEncCtx, pCurMb, pSlice); | 571 | pEncCtx->pFuncList->pfRc.pfWelsRcMbInit (pEncCtx, pCurMb, pSlice); |
| 572 | // if already reaches the largest number of slices, set QPs to the upper bound | 572 | // if already reaches the largest number of slices, set QPs to the upper bound |
| 573 | if (pSlice->bDynamicSlicingSliceSizeCtrlFlag) { | 573 | if (pSlice->bDynamicSlicingSliceSizeCtrlFlag) { |
| @@ -581,9 +581,9 @@ TRY_REENCODING: · 7 unmodified lines | |||
| 581 | WelsMdIntraMb (pEncCtx, &sMd, pCurMb, pMbCache); | 581 | WelsMdIntraMb (pEncCtx, &sMd, pCurMb, pMbCache); |
| 582 | UpdateNonZeroCountCache (pCurMb, pMbCache); | 582 | UpdateNonZeroCountCache (pCurMb, pMbCache); |
| 583 | 583 | ||
| 584 | iEncReturn = WelsSpatialWriteMbSyn (pEncCtx, pSlice, pCurMb); | 584 | iEncReturn = pEncCtx->pFuncList->pfWelsSpatialWriteMbSyn (pEncCtx, pSlice, pCurMb); |
| 585 | if (iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND) { | 585 | if (iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND) { |
| 586 | StashPopMBStatus (&sDss, pBs, pSlice); | 586 | pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pBs, pSlice); |
| 587 | UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset); | 587 | UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset); |
| 588 | goto TRY_REENCODING; | 588 | goto TRY_REENCODING; |
| 589 | } | 589 | } |
| @@ -593,7 +593,7 @@ TRY_REENCODING: · 3 unmodified lines | |||
| 593 | sDss.iCurrentPos = BsGetBitsPos (pBs); | 593 | sDss.iCurrentPos = BsGetBitsPos (pBs); |
| 594 | 594 | ||
| 595 | if (DynSlcJudgeSliceBoundaryStepBack (pEncCtx, pSlice, pSliceCtx, pCurMb, &sDss)) { //islice | 595 | if (DynSlcJudgeSliceBoundaryStepBack (pEncCtx, pSlice, pSliceCtx, pCurMb, &sDss)) { //islice |
| 596 | StashPopMBStatus (&sDss, pBs, pSlice); | 596 | pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pBs, pSlice); |
| 597 | pCurLayer->pLastCodedMbIdxOfPartition[kiPartitionId] = iCurMbIdx - | 597 | pCurLayer->pLastCodedMbIdxOfPartition[kiPartitionId] = iCurMbIdx - |
| 598 | 1; // update pLastCodedMbIdxOfPartition, need to -1 due to stepping back | 598 | 1; // update pLastCodedMbIdxOfPartition, need to -1 due to stepping back |
| 599 | ++ pCurLayer->pNumSliceCodedOfPartition[kiPartitionId]; | 599 | ++ pCurLayer->pNumSliceCodedOfPartition[kiPartitionId]; |
| @@ -749,7 +749,7 @@ int32_t WelsCodeOneSlice (sWelsEncCtx* pEncCtx, const int32_t kiSliceIdx, const · 149 unmodified lines | |||
| 749 | if (ENC_RETURN_SUCCESS != iEncReturn) | 749 | if (ENC_RETURN_SUCCESS != iEncReturn) |
| 750 | return iEncReturn; | 750 | return iEncReturn; |
| 751 | 751 | ||
| 752 | BsRbspTrailingBits (pBs); | 752 | WelsWriteSliceEndSyn (pCurSlice, pEncCtx->pSvcParam->iEntropyCodingModeFlag); |
| 753 | 753 | ||
| 754 | return ENC_RETURN_SUCCESS; | 754 | return ENC_RETURN_SUCCESS; |
| 755 | } | 755 | } |
| @@ -942,7 +942,6 @@ int32_t WelsMdInterMbLoop (sWelsEncCtx* pEncCtx, SSlice* pSlice, void* pWelsMd, · 186 unmodified lines | |||
| 942 | int32_t iNumMbCoded = 0; | 942 | int32_t iNumMbCoded = 0; |
| 943 | int32_t iNextMbIdx = kiSliceFirstMbXY; | 943 | int32_t iNextMbIdx = kiSliceFirstMbXY; |
| 944 | int32_t iCurMbIdx = -1; | 944 | int32_t iCurMbIdx = -1; |
| 945 | int32_t iMbSkipRun = 0; | ||
| 946 | const int32_t kiTotalNumMb = pCurLayer->iMbWidth * pCurLayer->iMbHeight; | 945 | const int32_t kiTotalNumMb = pCurLayer->iMbWidth * pCurLayer->iMbHeight; |
| 947 | const int32_t kiMvdInterTableStride = pEncCtx->iMvdCostTableStride; | 946 | const int32_t kiMvdInterTableStride = pEncCtx->iMvdCostTableStride; |
| 948 | uint16_t* pMvdCostTable = &pEncCtx->pMvdCostTable[pEncCtx->iMvdCostTableSize]; | 947 | uint16_t* pMvdCostTable = &pEncCtx->pMvdCostTable[pEncCtx->iMvdCostTableSize]; |
| @@ -950,8 +949,12 @@ int32_t WelsMdInterMbLoop (sWelsEncCtx* pEncCtx, SSlice* pSlice, void* pWelsMd, · 1 unmodified line | |||
| 950 | const uint8_t kuiChromaQpIndexOffset = pCurLayer->sLayerInfo.pPpsP->uiChromaQpIndexOffset; | 949 | const uint8_t kuiChromaQpIndexOffset = pCurLayer->sLayerInfo.pPpsP->uiChromaQpIndexOffset; |
| 951 | int32_t iEncReturn = ENC_RETURN_SUCCESS; | 950 | int32_t iEncReturn = ENC_RETURN_SUCCESS; |
| 952 | SDynamicSlicingStack sDss; | 951 | SDynamicSlicingStack sDss; |
| 952 | if (pEncCtx->pSvcParam->iEntropyCodingModeFlag) { | ||
| 953 | WelsInitSliceCabac (pEncCtx, pSlice); | ||
| 954 | } | ||
| 955 | pSlice->iMbSkipRun = 0; | ||
| 953 | for (;;) { | 956 | for (;;) { |
| 954 | StashMBStatus (&sDss, pBs, pSlice, iMbSkipRun); | 957 | pEncCtx->pFuncList->pfStashMBStatus (&sDss, pBs, pSlice, pSlice->iMbSkipRun); |
| 955 | //point to current pMb | 958 | //point to current pMb |
| 956 | iCurMbIdx = iNextMbIdx; | 959 | iCurMbIdx = iNextMbIdx; |
| 957 | pCurMb = &pMbList[ iCurMbIdx ]; | 960 | pCurMb = &pMbList[ iCurMbIdx ]; |
| @@ -979,23 +982,16 @@ TRY_REENCODING: · 21 unmodified lines | |||
| 979 | UpdateNonZeroCountCache (pCurMb, pMbCache); | 982 | UpdateNonZeroCountCache (pCurMb, pMbCache); |
| 980 | 983 | ||
| 981 | //step (6): begin to write bit stream; if the pSlice size is controlled, the writing may be skipped | 984 | //step (6): begin to write bit stream; if the pSlice size is controlled, the writing may be skipped |
| 982 | if (IS_SKIP (pCurMb->uiMbType)) { | ||
| 983 | pCurMb->uiLumaQp = pSlice->uiLastMbQp; | ||
| 984 | pCurMb->uiChromaQp = g_kuiChromaQpTable[CLIP3_QP_0_51 (pCurMb->uiLumaQp + kuiChromaQpIndexOffset)]; | ||
| 985 | 985 | ||
| 986 | iMbSkipRun++; | 986 | iEncReturn = pEncCtx->pFuncList->pfWelsSpatialWriteMbSyn (pEncCtx, pSlice, pCurMb); |
| 987 | } else { | 987 | if (iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND) { |
| 988 | BsWriteUE (pBs, iMbSkipRun); | 988 | pSlice->iMbSkipRun = pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pBs, pSlice); |
| 989 | iMbSkipRun = 0; | 989 | UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset); |
| 990 | iEncReturn = WelsSpatialWriteMbSyn (pEncCtx, pSlice, pCurMb); | 990 | goto TRY_REENCODING; |
| 991 | if (iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND) { | ||
| 992 | StashPopMBStatus (&sDss, pBs, pSlice, &iMbSkipRun); | ||
| 993 | UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset); | ||
| 994 | goto TRY_REENCODING; | ||
| 995 | } | ||
| 996 | if (ENC_RETURN_SUCCESS != iEncReturn) | ||
| 997 | return iEncReturn; | ||
| 998 | } | 991 | } |
| 992 | if (ENC_RETURN_SUCCESS != iEncReturn) | ||
| 993 | return iEncReturn; | ||
| 994 | |||
| 999 | 995 | ||
| 1000 | //step (7): reconstruct current MB | 996 | //step (7): reconstruct current MB |
| 1001 | pCurMb->uiSliceIdc = kiSliceIdx; | 997 | pCurMb->uiSliceIdc = kiSliceIdx; |
| @@ -1017,8 +1013,8 @@ TRY_REENCODING: · 15 unmodified lines | |||
| 1017 | } | 1013 | } |
| 1018 | } | 1014 | } |
| 1019 | 1015 | ||
| 1020 | if (iMbSkipRun) { | 1016 | if (pSlice->iMbSkipRun) { |
| 1021 | BsWriteUE (pBs, iMbSkipRun); | 1017 | BsWriteUE (pBs, pSlice->iMbSkipRun); |
| 1022 | } | 1018 | } |
| 1023 | 1019 | ||
| 1024 | return iEncReturn; | 1020 | return iEncReturn; |
| @@ -1038,7 +1034,6 @@ int32_t WelsMdInterMbLoopOverDynamicSlice (sWelsEncCtx* pEncCtx, SSlice* pSlice, · 13 unmodified lines | |||
| 1038 | const int32_t kiTotalNumMb = pCurLayer->iMbWidth * pCurLayer->iMbHeight; | 1034 | const int32_t kiTotalNumMb = pCurLayer->iMbWidth * pCurLayer->iMbHeight; |
| 1039 | int32_t iNextMbIdx = kiSliceFirstMbXY; | 1035 | int32_t iNextMbIdx = kiSliceFirstMbXY; |
| 1040 | int32_t iCurMbIdx = -1; | 1036 | int32_t iCurMbIdx = -1; |
| 1041 | int32_t iMbSkipRun = 0; | ||
| 1042 | const int32_t kiMvdInterTableStride = pEncCtx->iMvdCostTableStride; | 1037 | const int32_t kiMvdInterTableStride = pEncCtx->iMvdCostTableStride; |
| 1043 | uint16_t* pMvdCostTable = &pEncCtx->pMvdCostTable[pEncCtx->iMvdCostTableSize]; | 1038 | uint16_t* pMvdCostTable = &pEncCtx->pMvdCostTable[pEncCtx->iMvdCostTableSize]; |
| 1044 | const int32_t kiSliceIdx = pSlice->uiSliceIdx; | 1039 | const int32_t kiSliceIdx = pSlice->uiSliceIdx; |
| @@ -1048,10 +1043,14 @@ int32_t WelsMdInterMbLoopOverDynamicSlice (sWelsEncCtx* pEncCtx, SSlice* pSlice, · 3 unmodified lines | |||
| 1048 | 1043 | ||
| 1049 | SDynamicSlicingStack sDss; | 1044 | SDynamicSlicingStack sDss; |
| 1050 | sDss.iStartPos = BsGetBitsPos (pBs); | 1045 | sDss.iStartPos = BsGetBitsPos (pBs); |
| 1046 | if (pEncCtx->pSvcParam->iEntropyCodingModeFlag) { | ||
| 1047 | WelsInitSliceCabac (pEncCtx, pSlice); | ||
| 1048 | } | ||
| 1049 | pSlice->iMbSkipRun = 0; | ||
| 1051 | for (;;) { | 1050 | for (;;) { |
| 1052 | //DYNAMIC_SLICING_ONE_THREAD - MultiD | 1051 | //DYNAMIC_SLICING_ONE_THREAD - MultiD |
| 1053 | //stack pBs pointer | 1052 | //stack pBs pointer |
| 1054 | StashMBStatus (&sDss, pBs, pSlice, iMbSkipRun); | 1053 | pEncCtx->pFuncList->pfStashMBStatus (&sDss, pBs, pSlice, pSlice->iMbSkipRun); |
| 1055 | 1054 | ||
| 1056 | //point to current pMb | 1055 | //point to current pMb |
| 1057 | iCurMbIdx = iNextMbIdx; | 1056 | iCurMbIdx = iNextMbIdx; |
| @@ -1088,28 +1087,22 @@ TRY_REENCODING: · 30 unmodified lines | |||
| 1088 | 1087 | ||
| 1089 | //step (6): begin to write bit stream; if the pSlice size is controlled, the writing may be skipped | 1088 | //step (6): begin to write bit stream; if the pSlice size is controlled, the writing may be skipped |
| 1090 | 1089 | ||
| 1091 | if (IS_SKIP (pCurMb->uiMbType)) { | ||
| 1092 | pCurMb->uiLumaQp = pSlice->uiLastMbQp; | ||
| 1093 | pCurMb->uiChromaQp = g_kuiChromaQpTable[CLIP3_QP_0_51 (pCurMb->uiLumaQp + kuiChromaQpIndexOffset)]; | ||
| 1094 | 1090 | ||
| 1095 | iMbSkipRun++; | 1091 | |
| 1096 | } else { | 1092 | iEncReturn = pEncCtx->pFuncList->pfWelsSpatialWriteMbSyn (pEncCtx, pSlice, pCurMb); |
| 1097 | BsWriteUE (pBs, iMbSkipRun); | 1093 | if (iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND) { |
| 1098 | iMbSkipRun = 0; | 1094 | pSlice->iMbSkipRun = pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pBs, pSlice); |
| 1099 | iEncReturn = WelsSpatialWriteMbSyn (pEncCtx, pSlice, pCurMb); | 1095 | UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset); |
| 1100 | if (iEncReturn == ENC_RETURN_VLCOVERFLOWFOUND) { | 1096 | goto TRY_REENCODING; |
| 1101 | StashPopMBStatus (&sDss, pBs, pSlice, &iMbSkipRun); | ||
| 1102 | UpdateQpForOverflow (pCurMb, kuiChromaQpIndexOffset); | ||
| 1103 | goto TRY_REENCODING; | ||
| 1104 | } | ||
| 1105 | if (ENC_RETURN_SUCCESS != iEncReturn) | ||
| 1106 | return iEncReturn; | ||
| 1107 | } | 1097 | } |
| 1098 | if (ENC_RETURN_SUCCESS != iEncReturn) | ||
| 1099 | return iEncReturn; | ||
| 1100 | |||
| 1108 | 1101 | ||
| 1109 | //DYNAMIC_SLICING_ONE_THREAD - MultiD | 1102 | //DYNAMIC_SLICING_ONE_THREAD - MultiD |
| 1110 | sDss.iCurrentPos = BsGetBitsPos (pBs); | 1103 | sDss.iCurrentPos = BsGetBitsPos (pBs); |
| 1111 | if (DynSlcJudgeSliceBoundaryStepBack (pEncCtx, pSlice, pSliceCtx, pCurMb, &sDss)) { | 1104 | if (DynSlcJudgeSliceBoundaryStepBack (pEncCtx, pSlice, pSliceCtx, pCurMb, &sDss)) { |
| 1112 | StashPopMBStatus (&sDss, pBs, pSlice, &iMbSkipRun); | 1105 | pSlice->iMbSkipRun = pEncCtx->pFuncList->pfStashPopMBStatus (&sDss, pBs, pSlice); |
| 1113 | pCurLayer->pLastCodedMbIdxOfPartition[kiPartitionId] = iCurMbIdx - | 1106 | pCurLayer->pLastCodedMbIdxOfPartition[kiPartitionId] = iCurMbIdx - |
| 1114 | 1; // update pLastCodedMbIdxOfPartition, need to -1 due to stepping back | 1107 | 1; // update pLastCodedMbIdxOfPartition, need to -1 due to stepping back |
| 1115 | ++ pCurLayer->pNumSliceCodedOfPartition[kiPartitionId]; | 1108 | ++ pCurLayer->pNumSliceCodedOfPartition[kiPartitionId]; |
| @@ -1139,8 +1132,8 @@ TRY_REENCODING: · 23 unmodified lines | |||
| 1139 | } | 1132 | } |
| 1140 | } | 1133 | } |
| 1141 | 1134 | ||
| 1142 | if (iMbSkipRun) { | 1135 | if (pSlice->iMbSkipRun) { |
| 1143 | BsWriteUE (pBs, iMbSkipRun); | 1136 | BsWriteUE (pBs, pSlice->iMbSkipRun); |
| 1144 | } | 1137 | } |
| 1145 | 1138 | ||
| 1146 | return iEncReturn; | 1139 | return iEncReturn; |
| @@ -0,0 +1,691 @@ | |||
| 1 | /*! | ||
| 2 | * \copy | ||
| 3 | * Copyright (c) 2009-2013, Cisco Systems | ||
| 4 | * All rights reserved. | ||
| 5 | * | ||
| 6 | * Redistribution and use in source and binary forms, with or without | ||
| 7 | * modification, are permitted provided that the following conditions | ||
| 8 | * are met: | ||
| 9 | * | ||
| 10 | * * Redistributions of source code must retain the above copyright | ||
| 11 | * notice, this list of conditions and the following disclaimer. | ||
| 12 | * | ||
| 13 | * * Redistributions in binary form must reproduce the above copyright | ||
| 14 | * notice, this list of conditions and the following disclaimer in | ||
| 15 | * the documentation and/or other materials provided with the | ||
| 16 | * distribution. | ||
| 17 | * | ||
| 18 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS | ||
| 19 | * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT | ||
| 20 | * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS | ||
| 21 | * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE | ||
| 22 | * COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, | ||
| 23 | * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, | ||
| 24 | * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; | ||
| 25 | * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER | ||
| 26 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT | ||
| 27 | * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN | ||
| 28 | * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | ||
| 29 | * POSSIBILITY OF SUCH DAMAGE. | ||
| 30 | * | ||
| 31 | * | ||
| 32 | * \file svc_set_mb_syn_cabac.cpp | ||
| 33 | * | ||
| 34 | * \brief wrtie cabac syntax | ||
| 35 | * | ||
| 36 | * \date 9/28/2014 Created | ||
| 37 | * | ||
| 38 | ************************************************************************************* | ||
| 39 | */ | ||
| 40 | #include "svc_set_mb_syn.h" | ||
| 41 | #include "set_mb_syn_cabac.h" | ||
| 42 | #include "svc_enc_golomb.h" | ||
| 43 | |||
| 44 | namespace WelsEnc { | ||
| 45 | |||
| 46 | static const uint16_t uiSignificantCoeffFlagOffset[5] = {0, 15, 29, 44, 47}; | ||
| 47 | static const uint16_t uiLastCoeffFlagOffset[5] = {0, 15, 29, 44, 47}; | ||
| 48 | static const uint16_t uiCoeffAbsLevelMinus1Offset[5] = {0, 10, 20, 30, 39}; | ||
| 49 | static const uint16_t uiCodecBlockFlagOffset[5] = {0, 4, 8, 12, 16}; | ||
| 50 | |||
| 51 | |||
| 52 | static void WelsCabacMbType (SCabacCtx* pCabacCtx, SMB* pCurMb, SMbCache* pMbCache, int32_t iMbWidth, | ||
| 53 | EWelsSliceType eSliceType) { | ||
| 54 | |||
| 55 | if (eSliceType == I_SLICE) { | ||
| 56 | uint32_t uiNeighborAvail = pCurMb->uiNeighborAvail; | ||
| 57 | SMB* pLeftMb = pCurMb - 1 ; | ||
| 58 | SMB* pTopMb = pCurMb - iMbWidth; | ||
| 59 | int32_t iCtx = 3; | ||
| 60 | if ((uiNeighborAvail & LEFT_MB_POS) && !IS_INTRA4x4 (pLeftMb->uiMbType)) | ||
| 61 | iCtx++; | ||
| 62 | if ((uiNeighborAvail & TOP_MB_POS) && !IS_INTRA4x4 (pTopMb->uiMbType)) //TOP MB | ||
| 63 | iCtx++; | ||
| 64 | |||
| 65 | if (pCurMb->uiMbType == MB_TYPE_INTRA4x4) { | ||
| 66 | WelsCabacEncodeDecision (pCabacCtx, iCtx, 0); | ||
| 67 | } else { | ||
| 68 | int32_t iCbpChroma = pCurMb->uiCbp >> 4; | ||
| 69 | int32_t iCbpLuma = pCurMb->uiCbp & 15; | ||
| 70 | int32_t iPredMode = g_kiMapModeI16x16[pMbCache->uiLumaI16x16Mode]; | ||
| 71 | |||
| 72 | WelsCabacEncodeDecision (pCabacCtx, iCtx, 1); | ||
| 73 | WelsCabacEncodeTerminate (pCabacCtx, 0); | ||
| 74 | if (iCbpLuma) | ||
| 75 | WelsCabacEncodeDecision (pCabacCtx, 6, 1); | ||
| 76 | else | ||
| 77 | WelsCabacEncodeDecision (pCabacCtx, 6, 0); | ||
| 78 | |||
| 79 | if (iCbpChroma == 0) | ||
| 80 | WelsCabacEncodeDecision (pCabacCtx, 7, 0); | ||
| 81 | else { | ||
| 82 | WelsCabacEncodeDecision (pCabacCtx, 7, 1); | ||
| 83 | WelsCabacEncodeDecision (pCabacCtx, 8, iCbpChroma >> 1); | ||
| 84 | } | ||
| 85 | WelsCabacEncodeDecision (pCabacCtx, 9, iPredMode >> 1); | ||
| 86 | WelsCabacEncodeDecision (pCabacCtx, 10, iPredMode & 1); | ||
| 87 | } | ||
| 88 | } else if (eSliceType == P_SLICE) { | ||
| 89 | uint32_t uiMbType = pCurMb->uiMbType; | ||
| 90 | if (uiMbType == MB_TYPE_16x16) { | ||
| 91 | WelsCabacEncodeDecision (pCabacCtx, 14, 0); | ||
| 92 | WelsCabacEncodeDecision (pCabacCtx, 15, 0); | ||
| 93 | WelsCabacEncodeDecision (pCabacCtx, 16, 0); | ||
| 94 | } else if ((uiMbType == MB_TYPE_16x8) || (uiMbType == MB_TYPE_8x16)) { | ||
| 95 | |||
| 96 | WelsCabacEncodeDecision (pCabacCtx, 14, 0); | ||
| 97 | WelsCabacEncodeDecision (pCabacCtx, 15, 1); | ||
| 98 | WelsCabacEncodeDecision (pCabacCtx, 17, pCurMb->uiMbType == MB_TYPE_16x8); | ||
| 99 | |||
| 100 | } else if ((uiMbType == MB_TYPE_8x8) || (uiMbType == MB_TYPE_8x8_REF0)) { | ||
| 101 | WelsCabacEncodeDecision (pCabacCtx, 14, 0); | ||
| 102 | WelsCabacEncodeDecision (pCabacCtx, 15, 0); | ||
| 103 | WelsCabacEncodeDecision (pCabacCtx, 16, 1); | ||
| 104 | } else if (pCurMb->uiMbType == MB_TYPE_INTRA4x4) { | ||
| 105 | WelsCabacEncodeDecision (pCabacCtx, 14, 1); | ||
| 106 | WelsCabacEncodeDecision (pCabacCtx, 17, 0); | ||
| 107 | } else { | ||
| 108 | |||
| 109 | int32_t iCbpChroma = pCurMb->uiCbp >> 4; | ||
| 110 | int32_t iCbpLuma = pCurMb->uiCbp & 15; | ||
| 111 | int32_t iPredMode = g_kiMapModeI16x16[pMbCache->uiLumaI16x16Mode]; | ||
| 112 | //prefix | ||
| 113 | WelsCabacEncodeDecision (pCabacCtx, 14, 1); | ||
| 114 | |||
| 115 | //suffix | ||
| 116 | WelsCabacEncodeDecision (pCabacCtx, 17, 1); | ||
| 117 | WelsCabacEncodeTerminate (pCabacCtx, 0); | ||
| 118 | if (iCbpLuma) | ||
| 119 | WelsCabacEncodeDecision (pCabacCtx, 18, 1); | ||
| 120 | else | ||
| 121 | WelsCabacEncodeDecision (pCabacCtx, 18, 0); | ||
| 122 | if (iCbpChroma == 0) | ||
| 123 | WelsCabacEncodeDecision (pCabacCtx, 19, 0); | ||
| 124 | else { | ||
| 125 | WelsCabacEncodeDecision (pCabacCtx, 19, 1); | ||
| 126 | WelsCabacEncodeDecision (pCabacCtx, 19, iCbpChroma >> 1); | ||
| 127 | } | ||
| 128 | WelsCabacEncodeDecision (pCabacCtx, 20, iPredMode >> 1); | ||
| 129 | WelsCabacEncodeDecision (pCabacCtx, 20, iPredMode & 1); | ||
| 130 | |||
| 131 | } | ||
| 132 | } | ||
| 133 | |||
| 134 | } | ||
| 135 | void WelsCabacMbIntra4x4PredMode (SCabacCtx* pCabacCtx, SMbCache* pMbCache) { | ||
| 136 | |||
| 137 | for (int32_t iMode = 0; iMode < 16; iMode++) { | ||
| 138 | |||
| 139 | bool bPredFlag = pMbCache->pPrevIntra4x4PredModeFlag[iMode]; | ||
| 140 | int8_t iRemMode = pMbCache->pRemIntra4x4PredModeFlag[iMode]; | ||
| 141 | |||
| 142 | if (bPredFlag) | ||
| 143 | WelsCabacEncodeDecision (pCabacCtx, 68, 1); | ||
| 144 | else { | ||
| 145 | WelsCabacEncodeDecision (pCabacCtx, 68, 0); | ||
| 146 | |||
| 147 | WelsCabacEncodeDecision (pCabacCtx, 69, iRemMode & 0x01); | ||
| 148 | WelsCabacEncodeDecision (pCabacCtx, 69, (iRemMode >> 1) & 0x01); | ||
| 149 | WelsCabacEncodeDecision (pCabacCtx, 69, (iRemMode >> 2)); | ||
| 150 | } | ||
| 151 | } | ||
| 152 | } | ||
| 153 | |||
| 154 | void WelsCabacMbIntraChromaPredMode (SCabacCtx* pCabacCtx, SMB* pCurMb, SMbCache* pMbCache, int32_t iMbWidth) { | ||
| 155 | uint32_t uiNeighborAvail = pCurMb->uiNeighborAvail; | ||
| 156 | SMB* pLeftMb = pCurMb - 1 ; | ||
| 157 | SMB* pTopMb = pCurMb - iMbWidth; | ||
| 158 | |||
| 159 | int32_t iPredMode = g_kiMapModeIntraChroma[pMbCache->uiChmaI8x8Mode]; | ||
| 160 | int32_t iCtx = 64; | ||
| 161 | if ((uiNeighborAvail & LEFT_MB_POS) && g_kiMapModeIntraChroma[pLeftMb->uiChromPredMode] != 0) | ||
| 162 | iCtx++; | ||
| 163 | if ((uiNeighborAvail & TOP_MB_POS) && g_kiMapModeIntraChroma[pTopMb->uiChromPredMode] != 0) | ||
| 164 | iCtx++; | ||
| 165 | |||
| 166 | if (iPredMode == 0) { | ||
| 167 | WelsCabacEncodeDecision (pCabacCtx, iCtx, 0); | ||
| 168 | } else if (iPredMode == 1) { | ||
| 169 | WelsCabacEncodeDecision (pCabacCtx, iCtx, 1); | ||
| 170 | WelsCabacEncodeDecision (pCabacCtx, 67, 0); | ||
| 171 | } else if (iPredMode == 2) { | ||
| 172 | WelsCabacEncodeDecision (pCabacCtx, iCtx, 1); | ||
| 173 | WelsCabacEncodeDecision (pCabacCtx, 67, 1); | ||
| 174 | WelsCabacEncodeDecision (pCabacCtx, 67, 0); | ||
| 175 | } else { | ||
| 176 | WelsCabacEncodeDecision (pCabacCtx, iCtx, 1); | ||
| 177 | WelsCabacEncodeDecision (pCabacCtx, 67, 1); | ||
| 178 | WelsCabacEncodeDecision (pCabacCtx, 67, 1); | ||
| 179 | } | ||
| 180 | } | ||
| 181 | |||
| 182 | void WelsCabacMbCbp (SMB* pCurMb, int32_t iMbWidth, SCabacCtx* pCabacCtx) { | ||
| 183 | int32_t iCbpBlockLuma[4] = { (pCurMb->uiCbp) & 1, (pCurMb->uiCbp >> 1) & 1, (pCurMb->uiCbp >> 2) & 1, (pCurMb->uiCbp >> 3) & 1}; | ||
| 184 | int32_t iCbpChroma = pCurMb->uiCbp >> 4; | ||
| 185 | int32_t iCbpBlockLeft[4] = {0, 0, 0, 0}; | ||
| 186 | int32_t iCbpBlockTop[4] = {0, 0, 0, 0}; | ||
| 187 | int32_t iCbpLeftChroma = 0; | ||
| 188 | int32_t iCbpTopChroma = 0; | ||
| 189 | int32_t iCbp = 0; | ||
| 190 | int32_t iCtx = 0; | ||
| 191 | uint32_t uiNeighborAvail = pCurMb->uiNeighborAvail; | ||
| 192 | if (uiNeighborAvail & LEFT_MB_POS) { | ||
| 193 | iCbp = (pCurMb - 1)->uiCbp; | ||
| 194 | iCbpBlockLeft[0] = ! (iCbp & 1); | ||
| 195 | iCbpBlockLeft[1] = ! ((iCbp >> 1) & 1); | ||
| 196 | iCbpBlockLeft[2] = ! ((iCbp >> 2) & 1); | ||
| 197 | iCbpBlockLeft[3] = ! ((iCbp >> 3) & 1); | ||
| 198 | iCbpLeftChroma = iCbp >> 4; | ||
| 199 | if (iCbpLeftChroma) | ||
| 200 | iCtx += 1; | ||
| 201 | } | ||
| 202 | if (uiNeighborAvail & TOP_MB_POS) { | ||
| 203 | iCbp = (pCurMb - iMbWidth)->uiCbp; | ||
| 204 | iCbpBlockTop[0] = ! (iCbp & 1); | ||
| 205 | iCbpBlockTop[1] = ! ((iCbp >> 1) & 1); | ||
| 206 | iCbpBlockTop[2] = ! ((iCbp >> 2) & 1); | ||
| 207 | iCbpBlockTop[3] = ! ((iCbp >> 3) & 1); | ||
| 208 | iCbpTopChroma = iCbp >> 4; | ||
| 209 | if (iCbpTopChroma) | ||
| 210 | iCtx += 2; | ||
| 211 | } | ||
| 212 | WelsCabacEncodeDecision (pCabacCtx, 73 + iCbpBlockLeft[1] + iCbpBlockTop[2] * 2, iCbpBlockLuma[0]); | ||
| 213 | WelsCabacEncodeDecision (pCabacCtx, 73 + !iCbpBlockLuma[0] + iCbpBlockTop[3] * 2, iCbpBlockLuma[1]); | ||
| 214 | WelsCabacEncodeDecision (pCabacCtx, 73 + iCbpBlockLeft[3] + (!iCbpBlockLuma[0]) * 2 , iCbpBlockLuma[2]); | ||
| 215 | WelsCabacEncodeDecision (pCabacCtx, 73 + !iCbpBlockLuma[2] + (!iCbpBlockLuma[1]) * 2, iCbpBlockLuma[3]); | ||
| 216 | |||
| 217 | |||
| 218 | //chroma | ||
| 219 | if (iCbpChroma) { | ||
| 220 | WelsCabacEncodeDecision (pCabacCtx, 77 + iCtx, 1); | ||
| 221 | WelsCabacEncodeDecision (pCabacCtx, 81 + (iCbpLeftChroma >> 1) + ((iCbpTopChroma >> 1) * 2), iCbpChroma > 1); | ||
| 222 | } else { | ||
| 223 | WelsCabacEncodeDecision (pCabacCtx, 77 + iCtx, 0); | ||
| 224 | } | ||
| 225 | } | ||
| 226 | |||
| 227 | void WelsCabacMbDeltaQp (SMB* pCurMb, SCabacCtx* pCabacCtx) { | ||
| 228 | SMB* pPrevMb = NULL; | ||
| 229 | int32_t iCtx = 0; | ||
| 230 | uint32_t uiNeighborAvail = pCurMb->uiNeighborAvail; | ||
| 231 | |||
| 232 | if ((uiNeighborAvail & LEFT_MB_POS) || (uiNeighborAvail & TOP_MB_POS)) { | ||
| 233 | pPrevMb = pCurMb - 1; | ||
| 234 | pCurMb->iLumaDQp = pCurMb->uiLumaQp - pPrevMb->uiLumaQp; | ||
| 235 | |||
| 236 | if (IS_SKIP (pPrevMb->uiMbType) || ((pPrevMb->uiMbType != MB_TYPE_INTRA16x16) && (!pPrevMb->uiCbp)) | ||
| 237 | || (!pPrevMb->iLumaDQp)) | ||
| 238 | iCtx = 0; | ||
| 239 | else | ||
| 240 | iCtx = 1; | ||
| 241 | } | ||
| 242 | |||
| 243 | if (pCurMb->iLumaDQp) { | ||
| 244 | int32_t iValue = pCurMb->iLumaDQp < 0 ? (-2 * pCurMb->iLumaDQp) : (2 * pCurMb->iLumaDQp - 1); | ||
| 245 | WelsCabacEncodeDecision (pCabacCtx, 60 + iCtx, 1); | ||
| 246 | if (iValue == 1) { | ||
| 247 | WelsCabacEncodeDecision (pCabacCtx, 60 + 2, 0); | ||
| 248 | } else { | ||
| 249 | WelsCabacEncodeDecision (pCabacCtx, 60 + 2, 1); | ||
| 250 | iValue--; | ||
| 251 | while ((--iValue) > 0) | ||
| 252 | WelsCabacEncodeDecision (pCabacCtx, 60 + 3, 1); | ||
| 253 | WelsCabacEncodeDecision (pCabacCtx, 60 + 3, 0); | ||
| 254 | } | ||
| 255 | } else { | ||
| 256 | WelsCabacEncodeDecision (pCabacCtx, 60 + iCtx, 0); | ||
| 257 | } | ||
| 258 | } | ||
| 259 | |||
| 260 | void WelsMbSkipCabac (SCabacCtx* pCabacCtx, SMB* pCurMb, int32_t iMbWidth, EWelsSliceType eSliceType, | ||
| 261 | int16_t bSkipFlag) { | ||
| 262 | int32_t iCtx = (eSliceType == P_SLICE) ? 11 : 24; | ||
| 263 | uint32_t uiNeighborAvail = pCurMb->uiNeighborAvail; | ||
| 264 | if (uiNeighborAvail & LEFT_MB_POS) { //LEFT MB | ||
| 265 | if (!IS_SKIP ((pCurMb - 1)->uiMbType)) | ||
| 266 | iCtx++; | ||
| 267 | } | ||
| 268 | if (uiNeighborAvail & TOP_MB_POS) { //TOP MB | ||
| 269 | if (!IS_SKIP ((pCurMb - iMbWidth)->uiMbType)) | ||
| 270 | iCtx++; | ||
| 271 | } | ||
| 272 | WelsCabacEncodeDecision (pCabacCtx, iCtx, bSkipFlag); | ||
| 273 | |||
| 274 | if (bSkipFlag) { | ||
| 275 | for (int i = 0; i < 4; i++) { | ||
| 276 | |||
| 277 | pCurMb->sMvd[i].iMvX = 0; | ||
| 278 | pCurMb->sMvd[i].iMvY = 0; | ||
| 279 | } | ||
| 280 | pCurMb->uiCbp = pCurMb->iCbpDc = 0; | ||
| 281 | } | ||
| 282 | } | ||
| 283 | |||
| 284 | void WelsCabacMbRef (SCabacCtx* pCabacCtx, SMB* pCurMb, SMbCache* pMbCache, int16_t iIdx) { | ||
| 285 | SMVComponentUnit* pMvComp = &pMbCache->sMvComponents; | ||
| 286 | const int16_t iRefIdxA = pMvComp->iRefIndexCache[iIdx + 6]; | ||
| 287 | const int16_t iRefIdxB = pMvComp->iRefIndexCache[iIdx + 1]; | ||
| 288 | int16_t iRefIdx = pMvComp->iRefIndexCache[iIdx + 7]; | ||
| 289 | int16_t iCtx = 0; | ||
| 290 | |||
| 291 | if ((iRefIdxA > 0) && (!pMbCache->bMbTypeSkip[3])) | ||
| 292 | iCtx++; | ||
| 293 | if ((iRefIdxB > 0) && (!pMbCache->bMbTypeSkip[1])) | ||
| 294 | iCtx += 2; | ||
| 295 | |||
| 296 | while (iRefIdx > 0) { | ||
| 297 | WelsCabacEncodeDecision (pCabacCtx, 54 + iCtx, 1); | ||
| 298 | iCtx = (iCtx >> 2) + 4; | ||
| 299 | iRefIdx--; | ||
| 300 | } | ||
| 301 | WelsCabacEncodeDecision (pCabacCtx, 54 + iCtx, 0); | ||
| 302 | } | ||
| 303 | |||
| 304 | inline void WelsCabacMbMvdLx (SCabacCtx* pCabacCtx, int32_t sMvd, int32_t iCtx, int32_t iPredMvd) { | ||
| 305 | const int32_t iAbsMvd = WELS_ABS (sMvd); | ||
| 306 | int32_t iCtxInc = 0; | ||
| 307 | int32_t iPrefix = WELS_MIN (iAbsMvd, 9); | ||
| 308 | int32_t i = 0; | ||
| 309 | |||
| 310 | if (iPredMvd > 32) | ||
| 311 | iCtxInc += 2; | ||
| 312 | else if (iPredMvd > 2) | ||
| 313 | iCtxInc += 1; | ||
| 314 | |||
| 315 | if (iPrefix) { | ||
| 316 | if (iPrefix < 9) { | ||
| 317 | WelsCabacEncodeDecision (pCabacCtx, iCtx + iCtxInc, 1); | ||
| 318 | iCtxInc = 3; | ||
| 319 | for (i = 0; i < iPrefix - 1; i++) { | ||
| 320 | WelsCabacEncodeDecision (pCabacCtx, iCtx + iCtxInc, 1); | ||
| 321 | if (i < 3) | ||
| 322 | iCtxInc++; | ||
| 323 | } | ||
| 324 | WelsCabacEncodeDecision (pCabacCtx, iCtx + iCtxInc, 0); | ||
| 325 | WelsCabacEncodeBypassOne (pCabacCtx, sMvd < 0); | ||
| 326 | } else { | ||
| 327 | WelsCabacEncodeDecision (pCabacCtx, iCtx + iCtxInc, 1); | ||
| 328 | iCtxInc = 3; | ||
| 329 | for (i = 0; i < (9 - 1); i++) { | ||
| 330 | WelsCabacEncodeDecision (pCabacCtx, iCtx + iCtxInc, 1); | ||
| 331 | if (i < 3) | ||
| 332 | iCtxInc++; | ||
| 333 | } | ||
| 334 | WelsCabacEncodeUeBypass (pCabacCtx, 3, iAbsMvd - 9); | ||
| 335 | WelsCabacEncodeBypassOne (pCabacCtx, sMvd < 0); | ||
| 336 | } | ||
| 337 | } else { | ||
| 338 | WelsCabacEncodeDecision (pCabacCtx, iCtx + iCtxInc, 0); | ||
| 339 | } | ||
| 340 | } | ||
| 341 | SMVUnitXY WelsCabacMbMvd (SCabacCtx* pCabacCtx, SMB* pCurMb, uint32_t iMbWidth, | ||
| 342 | SMVUnitXY sCurMv, SMVUnitXY sPredMv, int16_t iBlockIdx) { | ||
| 343 | uint32_t iAbsMvd0, iAbsMvd1; | ||
| 344 | uint8_t uiNeighborAvail = pCurMb->uiNeighborAvail; | ||
| 345 | SMVUnitXY sMvd; | ||
| 346 | SMVUnitXY sMvdLeft; | ||
| 347 | SMVUnitXY sMvdTop; | ||
| 348 | |||
| 349 | sMvdLeft.iMvX = sMvdLeft.iMvY = sMvdTop.iMvX = sMvdTop.iMvY = 0; | ||
| 350 | sMvd.sDeltaMv (sCurMv, sPredMv); | ||
| 351 | |||
| 352 | if (((iBlockIdx == 0) || (iBlockIdx == 1)) && (uiNeighborAvail & TOP_MB_POS)) { | ||
| 353 | sMvdTop.sAssginMv ((pCurMb - iMbWidth)->sMvd[iBlockIdx + 2]); | ||
| 354 | } | ||
| 355 | if ((iBlockIdx == 2) || (iBlockIdx == 3)) { | ||
| 356 | sMvdTop.sAssginMv (pCurMb->sMvd[iBlockIdx - 2]); | ||
| 357 | } | ||
| 358 | if (((iBlockIdx == 0) || (iBlockIdx == 2)) && (uiNeighborAvail & LEFT_MB_POS)) { | ||
| 359 | sMvdLeft.sAssginMv ((pCurMb - 1)->sMvd[iBlockIdx + 1]); | ||
| 360 | } | ||
| 361 | if ((iBlockIdx == 1) || (iBlockIdx == 3)) { | ||
| 362 | sMvdLeft.sAssginMv (pCurMb->sMvd[iBlockIdx - 1]); | ||
| 363 | } | ||
| 364 | |||
| 365 | iAbsMvd0 = WELS_ABS (sMvdLeft.iMvX) + WELS_ABS (sMvdTop.iMvX); | ||
| 366 | iAbsMvd1 = WELS_ABS (sMvdLeft.iMvY) + WELS_ABS (sMvdTop.iMvY); | ||
| 367 | |||
| 368 | WelsCabacMbMvdLx (pCabacCtx, sMvd.iMvX, 40, iAbsMvd0); | ||
| 369 | WelsCabacMbMvdLx (pCabacCtx, sMvd.iMvY, 47, iAbsMvd1); | ||
| 370 | return sMvd; | ||
| 371 | } | ||
| 372 | |||
| 373 | int16_t WelsGetMbCtxCabac (SMbCache* pMbCache, SMB* pCurMb, uint32_t iMbWidth, ECtxBlockCat eCtxBlockCat, | ||
| 374 | int16_t iIdx) { | ||
| 375 | int16_t iNzA = -1, iNzB = -1; | ||
| 376 | int8_t* pNonZeroCoeffCount = pMbCache->iNonZeroCoeffCount; | ||
| 377 | int32_t bIntra = IS_INTRA (pCurMb->uiMbType); | ||
| 378 | int32_t iCtxInc = 0; | ||
| 379 | switch (eCtxBlockCat) { | ||
| 380 | case LUMA_AC: | ||
| 381 | case CHROMA_AC: | ||
| 382 | case LUMA_4x4: | ||
| 383 | iNzA = pNonZeroCoeffCount[iIdx - 1]; | ||
| 384 | iNzB = pNonZeroCoeffCount[iIdx - 8]; | ||
| 385 | break; | ||
| 386 | case LUMA_DC: | ||
| 387 | case CHROMA_DC: | ||
| 388 | if (pCurMb->uiNeighborAvail & LEFT_MB_POS) | ||
| 389 | iNzA = (pCurMb - 1)->iCbpDc & (1 << iIdx); | ||
| 390 | if (pCurMb->uiNeighborAvail & TOP_MB_POS) | ||
| 391 | iNzB = (pCurMb - iMbWidth)->iCbpDc & (1 << iIdx); | ||
| 392 | break; | ||
| 393 | default: | ||
| 394 | break; | ||
| 395 | } | ||
| 396 | if (((iNzA == -1) && bIntra) || (iNzA > 0)) | ||
| 397 | iCtxInc += 1; | ||
| 398 | if (((iNzB == -1) && bIntra) || (iNzB > 0)) | ||
| 399 | iCtxInc += 2; | ||
| 400 | return 85 + uiCodecBlockFlagOffset[eCtxBlockCat] + iCtxInc; | ||
| 401 | } | ||
| 402 | |||
| 403 | void WelsWriteBlockResidualCabac (SMbCache* pMbCache, SMB* pCurMb, uint32_t iMbWidth, SCabacCtx* pCabacCtx, | ||
| 404 | ECtxBlockCat eCtxBlockCat, int16_t iIdx, int16_t iNonZeroCount, int16_t* pBlock, int16_t iEndIdx) { | ||
| 405 | int32_t iCtx = WelsGetMbCtxCabac (pMbCache, pCurMb, iMbWidth, eCtxBlockCat, iIdx); | ||
| 406 | if (iNonZeroCount) { | ||
| 407 | ENFORCE_STACK_ALIGN_1D (int16_t, iAbsLevel, 16, 16); | ||
| 408 | ENFORCE_STACK_ALIGN_1D (int16_t, iSignLevel, 16, 16); | ||
| 409 | const int32_t iCtxSig = 105 + uiSignificantCoeffFlagOffset[eCtxBlockCat]; | ||
| 410 | const int32_t iCtxLast = 166 + uiLastCoeffFlagOffset[eCtxBlockCat]; | ||
| 411 | const int32_t iCtxLevel = 227 + uiCoeffAbsLevelMinus1Offset[eCtxBlockCat]; | ||
| 412 | int32_t iNonZeroIdx = 0; | ||
| 413 | int32_t i = 0; | ||
| 414 | int32_t iNumAbsLevelEq1 = 0; | ||
| 415 | int32_t iNumAbsLevelGt1 = 0; | ||
| 416 | |||
| 417 | WelsCabacEncodeDecision (pCabacCtx, iCtx, 1); | ||
| 418 | while (1) { | ||
| 419 | if (pBlock[i]) { | ||
| 420 | iSignLevel[iNonZeroIdx] = pBlock[i] < 0; | ||
| 421 | iAbsLevel[iNonZeroIdx] = WELS_ABS (pBlock[i]) - 1; | ||
| 422 | |||
| 423 | iNonZeroIdx++; | ||
| 424 | WelsCabacEncodeDecision (pCabacCtx, iCtxSig + i, 1); | ||
| 425 | if (iNonZeroIdx != iNonZeroCount) | ||
| 426 | WelsCabacEncodeDecision (pCabacCtx, iCtxLast + i, 0); | ||
| 427 | else { | ||
| 428 | WelsCabacEncodeDecision (pCabacCtx, iCtxLast + i, 1); | ||
| 429 | break; | ||
| 430 | } | ||
| 431 | } else | ||
| 432 | WelsCabacEncodeDecision (pCabacCtx, iCtxSig + i, 0); | ||
| 433 | i++; | ||
| 434 | if (i == iEndIdx) { | ||
| 435 | iSignLevel[iNonZeroIdx] = pBlock[i] < 0; | ||
| 436 | iAbsLevel[iNonZeroIdx] = WELS_ABS (pBlock[i]) - 1; | ||
| 437 | iNonZeroIdx++; | ||
| 438 | break; | ||
| 439 | } | ||
| 440 | } | ||
| 441 | do { | ||
| 442 | int32_t iPrefix = 0; | ||
| 443 | iNonZeroIdx--; | ||
| 444 | iPrefix = WELS_MIN (iAbsLevel[iNonZeroIdx], 14); | ||
| 445 | if (iPrefix) { | ||
| 446 | iCtx = iCtxLevel + ((iNumAbsLevelGt1 != 0) ? 0 : WELS_MIN (4, 1 + iNumAbsLevelEq1)); | ||
| 447 | WelsCabacEncodeDecision (pCabacCtx, iCtx, 1); | ||
| 448 | iCtx = iCtxLevel + 5 + WELS_MIN (4 - (eCtxBlockCat == CHROMA_DC), iNumAbsLevelGt1); | ||
| 449 | for (i = 0; i < iPrefix - 1; i++) | ||
| 450 | WelsCabacEncodeDecision (pCabacCtx, iCtx, 1); | ||
| 451 | if (iPrefix < 14) | ||
| 452 | WelsCabacEncodeDecision (pCabacCtx, iCtx, 0); | ||
| 453 | else | ||
| 454 | WelsCabacEncodeUeBypass (pCabacCtx, 0, iAbsLevel[iNonZeroIdx] - 14); | ||
| 455 | iNumAbsLevelGt1++; | ||
| 456 | } else { | ||
| 457 | iCtx = iCtxLevel + ((iNumAbsLevelGt1 != 0) ? 0 : WELS_MIN (4, 1 + iNumAbsLevelEq1)); | ||
| 458 | WelsCabacEncodeDecision (pCabacCtx, iCtx, 0); | ||
| 459 | iNumAbsLevelEq1++; | ||
| 460 | } | ||
| 461 | WelsCabacEncodeBypassOne (pCabacCtx, iSignLevel[iNonZeroIdx]); | ||
| 462 | } while (iNonZeroIdx > 0); | ||
| 463 | |||
| 464 | } else { | ||
| 465 | WelsCabacEncodeDecision (pCabacCtx, iCtx, 0); | ||
| 466 | } | ||
| 467 | |||
| 468 | |||
| 469 | } | ||
| 470 | int32_t WelsCalNonZeroCount (int16_t* pBlock, int16_t iNum) { | ||
| 471 | int32_t iCount = 0; | ||
| 472 | for (int16_t i = 0; i < iNum; i++) { | ||
| 473 | if (pBlock[i]) | ||
| 474 | iCount++; | ||
| 475 | } | ||
| 476 | return iCount; | ||
| 477 | } | ||
| 478 | int32_t WelsWriteMbResidualCabac (SSlice* pSlice, SMbCache* sMbCacheInfo, SMB* pCurMb, SCabacCtx* pCabacCtx, | ||
| 479 | int16_t iMbWidth, uint32_t uiChromaQpIndexOffset) { | ||
| 480 | |||
| 481 | const uint16_t uiMbType = pCurMb->uiMbType; | ||
| 482 | SMbCache* pMbCache = &pSlice->sMbCacheInfo; | ||
| 483 | int16_t i = 0; | ||
| 484 | int8_t* pNonZeroCoeffCount = pMbCache->iNonZeroCoeffCount; | ||
| 485 | |||
| 486 | |||
| 487 | pCurMb->iCbpDc = 0; | ||
| 488 | pCurMb->iLumaDQp = 0; | ||
| 489 | |||
| 490 | if ((pCurMb->uiCbp > 0) || (uiMbType == MB_TYPE_INTRA16x16)) { | ||
| 491 | int32_t iCbpChroma = pCurMb->uiCbp >> 4; | ||
| 492 | int32_t iCbpLuma = pCurMb->uiCbp & 15; | ||
| 493 | |||
| 494 | pCurMb->iLumaDQp = pCurMb->uiLumaQp - pSlice->uiLastMbQp; | ||
| 495 | WelsCabacMbDeltaQp (pCurMb, pCabacCtx); | ||
| 496 | pSlice->uiLastMbQp = pCurMb->uiLumaQp; | ||
| 497 | |||
| 498 | if (uiMbType == MB_TYPE_INTRA16x16) { | ||
| 499 | //Luma DC | ||
| 500 | int iNonZeroCount = WelsCalNonZeroCount (pMbCache->pDct->iLumaI16x16Dc, 16); | ||
| 501 | WelsWriteBlockResidualCabac (pMbCache, pCurMb, iMbWidth, pCabacCtx, LUMA_DC, 0, iNonZeroCount, | ||
| 502 | pMbCache->pDct->iLumaI16x16Dc, 15); | ||
| 503 | if (iNonZeroCount) | ||
| 504 | pCurMb->iCbpDc |= 1; | ||
| 505 | //Luma AC | ||
| 506 | |||
| 507 | if (iCbpLuma) { | ||
| 508 | for (i = 0; i < 16; i++) { | ||
| 509 | int32_t iIdx = g_kuiCache48CountScan4Idx[i]; | ||
| 510 | WelsWriteBlockResidualCabac (pMbCache, pCurMb, iMbWidth, pCabacCtx, LUMA_AC, iIdx, | ||
| 511 | pNonZeroCoeffCount[iIdx], pMbCache->pDct->iLumaBlock[i], 14); | ||
| 512 | } | ||
| 513 | } | ||
| 514 | } else { | ||
| 515 | //Luma AC | ||
| 516 | for (i = 0; i < 16; i++) { | ||
| 517 | if (iCbpLuma & (1 << (i >> 2))) { | ||
| 518 | int32_t iIdx = g_kuiCache48CountScan4Idx[i]; | ||
| 519 | WelsWriteBlockResidualCabac (pMbCache, pCurMb, iMbWidth, pCabacCtx, LUMA_4x4, iIdx, | ||
| 520 | pNonZeroCoeffCount[iIdx], pMbCache->pDct->iLumaBlock[i], 15); | ||
| 521 | } | ||
| 522 | |||
| 523 | } | ||
| 524 | } | ||
| 525 | |||
| 526 | if (iCbpChroma) { | ||
| 527 | int32_t iNonZeroCount = 0; | ||
| 528 | //chroma DC | ||
| 529 | iNonZeroCount = WelsCalNonZeroCount (pMbCache->pDct->iChromaDc[0], 4); | ||
| 530 | if (iNonZeroCount) | ||
| 531 | pCurMb->iCbpDc |= 0x2; | ||
| 532 | WelsWriteBlockResidualCabac (pMbCache, pCurMb, iMbWidth, pCabacCtx, CHROMA_DC, 1, iNonZeroCount, | ||
| 533 | pMbCache->pDct->iChromaDc[0], 3); | ||
| 534 | |||
| 535 | iNonZeroCount = WelsCalNonZeroCount (pMbCache->pDct->iChromaDc[1], 4); | ||
| 536 | if (iNonZeroCount) | ||
| 537 | pCurMb->iCbpDc |= 0x4; | ||
| 538 | WelsWriteBlockResidualCabac (pMbCache, pCurMb, iMbWidth, pCabacCtx, CHROMA_DC, 2, iNonZeroCount, | ||
| 539 | pMbCache->pDct->iChromaDc[1], 3); | ||
| 540 | if (iCbpChroma & 0x02) { | ||
| 541 | const uint8_t* g_kuiCache48CountScan4Idx_16base = &g_kuiCache48CountScan4Idx[16]; | ||
| 542 | //Cb AC | ||
| 543 | for (i = 0; i < 4; i++) { | ||
| 544 | int32_t iIdx = g_kuiCache48CountScan4Idx_16base[i]; | ||
| 545 | WelsWriteBlockResidualCabac (pMbCache, pCurMb, iMbWidth, pCabacCtx, CHROMA_AC, iIdx, | ||
| 546 | pNonZeroCoeffCount[iIdx], pMbCache->pDct->iChromaBlock[i], 14); | ||
| 547 | |||
| 548 | } | ||
| 549 | |||
| 550 | //Cr AC | ||
| 551 | |||
| 552 | for (i = 0; i < 4; i++) { | ||
| 553 | int32_t iIdx = 24 + g_kuiCache48CountScan4Idx_16base[i]; | ||
| 554 | WelsWriteBlockResidualCabac (pMbCache, pCurMb, iMbWidth, pCabacCtx, CHROMA_AC, iIdx, | ||
| 555 | pNonZeroCoeffCount[iIdx], pMbCache->pDct->iChromaBlock[4 + i], 14); | ||
| 556 | } | ||
| 557 | } | ||
| 558 | } | ||
| 559 | } else { | ||
| 560 | pCurMb->uiLumaQp = pSlice->uiLastMbQp; | ||
| 561 | pCurMb->uiChromaQp = g_kuiChromaQpTable[CLIP3_QP_0_51 (pCurMb->uiLumaQp + uiChromaQpIndexOffset)]; | ||
| 562 | } | ||
| 563 | return 0; | ||
| 564 | } | ||
| 565 | |||
| 566 | void WelsInitSliceCabac (sWelsEncCtx* pEncCtx, SSlice* pSlice) { | ||
| 567 | /* alignment needed */ | ||
| 568 | SBitStringAux* pBs = pSlice->pSliceBsa; | ||
| 569 | BsAlign (pBs); | ||
| 570 | |||
| 571 | /* init cabac */ | ||
| 572 | WelsCabacContextInit (pEncCtx, &pSlice->sCabacCtx, pSlice->iCabacInitIdc); | ||
| 573 | WelsCabacEncodeInit (&pSlice->sCabacCtx, pBs->pBufPtr, pBs->pBufEnd); | ||
| 574 | } | ||
| 575 | |||
| 576 | int32_t WelsSpatialWriteMbSynCabac (void* pCtx, SSlice* pSlice, SMB* pCurMb) { | ||
| 577 | sWelsEncCtx* pEncCtx = (sWelsEncCtx*)pCtx; | ||
| 578 | SCabacCtx* pCabacCtx = &pSlice->sCabacCtx; | ||
| 579 | SMbCache* pMbCache = &pSlice->sMbCacheInfo; | ||
| 580 | const uint16_t uiMbType = pCurMb->uiMbType; | ||
| 581 | SSliceHeaderExt* pSliceHeadExt = &pSlice->sSliceHeaderExt; | ||
| 582 | uint32_t uiNumRefIdxL0Active = pSliceHeadExt->sSliceHeader.uiNumRefIdxL0Active - 1; | ||
| 583 | const int32_t iSliceFirstMbXY = pSliceHeadExt->sSliceHeader.iFirstMbInSlice; | ||
| 584 | int16_t i = 0; | ||
| 585 | int16_t iMbWidth = pEncCtx->pCurDqLayer->iMbWidth; | ||
| 586 | uint32_t uiChromaQpIndexOffset = pEncCtx->pCurDqLayer->sLayerInfo.pPpsP->uiChromaQpIndexOffset; | ||
| 587 | SMVUnitXY sMvd; | ||
| 588 | int32_t iRet = 0; | ||
| 589 | if (pCurMb->iMbXY > iSliceFirstMbXY) | ||
| 590 | WelsCabacEncodeTerminate (&pSlice->sCabacCtx, 0); | ||
| 591 | |||
| 592 | if (IS_SKIP (pCurMb->uiMbType)) { | ||
| 593 | pCurMb->uiLumaQp = pSlice->uiLastMbQp; | ||
| 594 | pCurMb->uiChromaQp = g_kuiChromaQpTable[CLIP3_QP_0_51 (pCurMb->uiLumaQp + uiChromaQpIndexOffset)]; | ||
| 595 | WelsMbSkipCabac (&pSlice->sCabacCtx, pCurMb, iMbWidth, pEncCtx->eSliceType, 1); | ||
| 596 | |||
| 597 | } else { | ||
| 598 | //skip flag | ||
| 599 | if (pEncCtx->eSliceType != I_SLICE) | ||
| 600 | WelsMbSkipCabac (&pSlice->sCabacCtx, pCurMb, iMbWidth, pEncCtx->eSliceType, 0); | ||
| 601 | |||
| 602 | //write mb type | ||
| 603 | WelsCabacMbType (pCabacCtx, pCurMb, pMbCache, iMbWidth, pEncCtx->eSliceType); | ||
| 604 | |||
| 605 | if (IS_INTRA (uiMbType)) { | ||
| 606 | if (uiMbType == MB_TYPE_INTRA4x4) { | ||
| 607 | WelsCabacMbIntra4x4PredMode (pCabacCtx, pMbCache); | ||
| 608 | } | ||
| 609 | WelsCabacMbIntraChromaPredMode (pCabacCtx, pCurMb, pMbCache, iMbWidth); | ||
| 610 | sMvd.iMvX = sMvd.iMvY = 0; | ||
| 611 | pCurMb->sMvd[0].sAssginMv (sMvd); | ||
| 612 | pCurMb->sMvd[1].sAssginMv (sMvd); | ||
| 613 | pCurMb->sMvd[2].sAssginMv (sMvd); | ||
| 614 | pCurMb->sMvd[3].sAssginMv (sMvd); | ||
| 615 | |||
| 616 | } else if (uiMbType == MB_TYPE_16x16) { | ||
| 617 | |||
| 618 | if (uiNumRefIdxL0Active > 0) { | ||
| 619 | WelsCabacMbRef (pCabacCtx, pCurMb, pMbCache, 0); | ||
| 620 | } | ||
| 621 | sMvd = WelsCabacMbMvd (pCabacCtx, pCurMb, iMbWidth, pCurMb->sMv[0], pMbCache->sMbMvp[0], 0); | ||
| 622 | |||
| 623 | pCurMb->sMvd[0].sAssginMv (sMvd); | ||
| 624 | pCurMb->sMvd[1].sAssginMv (sMvd); | ||
| 625 | pCurMb->sMvd[2].sAssginMv (sMvd); | ||
| 626 | pCurMb->sMvd[3].sAssginMv (sMvd); | ||
| 627 | |||
| 628 | } else if (uiMbType == MB_TYPE_16x8) { | ||
| 629 | if (uiNumRefIdxL0Active > 0) { | ||
| 630 | WelsCabacMbRef (pCabacCtx, pCurMb, pMbCache, 0); | ||
| 631 | WelsCabacMbRef (pCabacCtx, pCurMb, pMbCache, 12); | ||
| 632 | } | ||
| 633 | sMvd = WelsCabacMbMvd (pCabacCtx, pCurMb, iMbWidth , pCurMb->sMv[0], pMbCache->sMbMvp[0], 0); | ||
| 634 | pCurMb->sMvd[0].sAssginMv (sMvd); | ||
| 635 | pCurMb->sMvd[1].sAssginMv (sMvd); | ||
| 636 | |||
| 637 | |||
| 638 | sMvd = WelsCabacMbMvd (pCabacCtx, pCurMb, iMbWidth, pCurMb->sMv[8], pMbCache->sMbMvp[1], 2); | ||
| 639 | pCurMb->sMvd[2].sAssginMv (sMvd); | ||
| 640 | pCurMb->sMvd[3].sAssginMv (sMvd); | ||
| 641 | |||
| 642 | } else if (uiMbType == MB_TYPE_8x16) { | ||
| 643 | if (uiNumRefIdxL0Active > 0) { | ||
| 644 | WelsCabacMbRef (pCabacCtx, pCurMb, pMbCache, 0); | ||
| 645 | WelsCabacMbRef (pCabacCtx, pCurMb, pMbCache, 2); | ||
| 646 | } | ||
| 647 | sMvd = WelsCabacMbMvd (pCabacCtx, pCurMb, iMbWidth, pCurMb->sMv[0], pMbCache->sMbMvp[0], 0); | ||
| 648 | pCurMb->sMvd[0].sAssginMv (sMvd); | ||
| 649 | pCurMb->sMvd[2].sAssginMv (sMvd); | ||
| 650 | |||
| 651 | sMvd = WelsCabacMbMvd (pCabacCtx, pCurMb, iMbWidth, pCurMb->sMv[2], pMbCache->sMbMvp[1], 1); | ||
| 652 | pCurMb->sMvd[1].sAssginMv (sMvd); | ||
| 653 | pCurMb->sMvd[3].sAssginMv (sMvd); | ||
| 654 | |||
| 655 | } else if ((uiMbType == MB_TYPE_8x8) || (uiMbType == MB_TYPE_8x8_REF0)) { | ||
| 656 | for (i = 0; i < 4; i++) | ||
| 657 | WelsCabacEncodeDecision (pCabacCtx, 21, 1); | ||
| 658 | |||
| 659 | if (uiNumRefIdxL0Active > 0) { | ||
| 660 | WelsCabacMbRef (pCabacCtx, pCurMb, pMbCache, 0); | ||
| 661 | WelsCabacMbRef (pCabacCtx, pCurMb, pMbCache, 2); | ||
| 662 | WelsCabacMbRef (pCabacCtx, pCurMb, pMbCache, 12); | ||
| 663 | WelsCabacMbRef (pCabacCtx, pCurMb, pMbCache, 14); | ||
| 664 | } | ||
| 665 | |||
| 666 | |||
| 667 | sMvd = WelsCabacMbMvd (pCabacCtx, pCurMb, iMbWidth, pCurMb->sMv[0], pMbCache->sMbMvp[0], 0); | ||
| 668 | pCurMb->sMvd[0].sAssginMv (sMvd); | ||
| 669 | |||
| 670 | sMvd = WelsCabacMbMvd (pCabacCtx, pCurMb, iMbWidth, pCurMb->sMv[2], pMbCache->sMbMvp[1], 1); | ||
| 671 | pCurMb->sMvd[1].sAssginMv (sMvd); | ||
| 672 | |||
| 673 | sMvd = WelsCabacMbMvd (pCabacCtx, pCurMb, iMbWidth, pCurMb->sMv[8], pMbCache->sMbMvp[2], 2); | ||
| 674 | pCurMb->sMvd[2].sAssginMv (sMvd); | ||
| 675 | |||
| 676 | sMvd = WelsCabacMbMvd (pCabacCtx, pCurMb, iMbWidth, pCurMb->sMv[10], pMbCache->sMbMvp[3], 3); | ||
| 677 | pCurMb->sMvd[3].sAssginMv (sMvd); | ||
| 678 | } | ||
| 679 | if (uiMbType != MB_TYPE_INTRA16x16) { | ||
| 680 | WelsCabacMbCbp (pCurMb, iMbWidth, pCabacCtx); | ||
| 681 | } | ||
| 682 | iRet = WelsWriteMbResidualCabac (pSlice, pMbCache, pCurMb, pCabacCtx, iMbWidth, uiChromaQpIndexOffset); | ||
| 683 | } | ||
| 684 | if (!IS_INTRA (pCurMb->uiMbType)) | ||
| 685 | pCurMb->uiChromPredMode = 0; | ||
| 686 | |||
| 687 | return iRet; | ||
| 688 | } | ||
| 689 | |||
| 690 | |||
| 691 | } | ||
| @@ -40,7 +40,7 @@ · 39 unmodified lines | |||
| 40 | 40 | ||
| 41 | #include "vlc_encoder.h" | 41 | #include "vlc_encoder.h" |
| 42 | #include "ls_defines.h" | 42 | #include "ls_defines.h" |
| 43 | #include "svc_set_mb_syn_cavlc.h" | 43 | #include "svc_set_mb_syn.h" |
| 44 | 44 | ||
| 45 | namespace WelsEnc { | 45 | namespace WelsEnc { |
| 46 | const uint32_t g_kuiIntra4x4CbpMap[48] = { | 46 | const uint32_t g_kuiIntra4x4CbpMap[48] = { |
| @@ -220,40 +220,54 @@ int32_t CheckBitstreamBuffer (const uint32_t kuiSliceIdx, sWelsEncCtx* pEncCtx, · 173 unmodified lines | |||
| 220 | } | 220 | } |
| 221 | 221 | ||
| 222 | //============================Base Layer CAVLC Writing=============================== | 222 | //============================Base Layer CAVLC Writing=============================== |
| 223 | int32_t WelsSpatialWriteMbSyn (sWelsEncCtx* pEncCtx, SSlice* pSlice, SMB* pCurMb) { | 223 | int32_t WelsSpatialWriteMbSyn (void* pCtx, SSlice* pSlice, SMB* pCurMb) { |
| 224 | sWelsEncCtx* pEncCtx = (sWelsEncCtx*)pCtx; | ||
| 224 | SBitStringAux* pBs = pSlice->pSliceBsa; | 225 | SBitStringAux* pBs = pSlice->pSliceBsa; |
| 225 | SMbCache* pMbCache = &pSlice->sMbCacheInfo; | 226 | SMbCache* pMbCache = &pSlice->sMbCacheInfo; |
| 227 | const uint8_t kuiChromaQpIndexOffset = pEncCtx->pCurDqLayer->sLayerInfo.pPpsP->uiChromaQpIndexOffset; | ||
| 226 | 228 | ||
| 227 | /* Step 1: write mb type and pred */ | 229 | if (IS_SKIP (pCurMb->uiMbType)) { |
| 228 | if (IS_Inter_8x8 (pCurMb->uiMbType)) { | 230 | pCurMb->uiLumaQp = pSlice->uiLastMbQp; |
| 229 | WelsSpatialWriteSubMbPred (pEncCtx, pSlice, pCurMb); | 231 | pCurMb->uiChromaQp = g_kuiChromaQpTable[CLIP3_QP_0_51 (pCurMb->uiLumaQp + kuiChromaQpIndexOffset)]; |
| 232 | |||
| 233 | pSlice->iMbSkipRun++; | ||
| 234 | return ENC_RETURN_SUCCESS; | ||
| 230 | } else { | 235 | } else { |
| 231 | WelsSpatialWriteMbPred (pEncCtx, pSlice, pCurMb); | 236 | if (pEncCtx->eSliceType != I_SLICE) { |
| 232 | } | 237 | BsWriteUE (pBs, pSlice->iMbSkipRun); |
| 238 | pSlice->iMbSkipRun = 0; | ||
| 239 | } | ||
| 240 | /* Step 1: write mb type and pred */ | ||
| 241 | if (IS_Inter_8x8 (pCurMb->uiMbType)) { | ||
| 242 | WelsSpatialWriteSubMbPred (pEncCtx, pSlice, pCurMb); | ||
| 243 | } else { | ||
| 244 | WelsSpatialWriteMbPred (pEncCtx, pSlice, pCurMb); | ||
| 245 | } | ||
| 233 | 246 | ||
| 234 | /* Step 2: write coded block patern */ | 247 | /* Step 2: write coded block patern */ |
| 235 | if (IS_INTRA4x4 (pCurMb->uiMbType)) { | 248 | if (IS_INTRA4x4 (pCurMb->uiMbType)) { |
| 236 | BsWriteUE (pBs, g_kuiIntra4x4CbpMap[pCurMb->uiCbp]); | 249 | BsWriteUE (pBs, g_kuiIntra4x4CbpMap[pCurMb->uiCbp]); |
| 237 | } else if (!IS_INTRA16x16 (pCurMb->uiMbType)) { | 250 | } else if (!IS_INTRA16x16 (pCurMb->uiMbType)) { |
| 238 | BsWriteUE (pBs, g_kuiInterCbpMap[pCurMb->uiCbp]); | 251 | BsWriteUE (pBs, g_kuiInterCbpMap[pCurMb->uiCbp]); |
| 239 | } | 252 | } |
| 240 | 253 | ||
| 241 | /* Step 3: write QP and residual */ | 254 | /* Step 3: write QP and residual */ |
| 242 | if (pCurMb->uiCbp > 0 || IS_INTRA16x16 (pCurMb->uiMbType)) { | 255 | if (pCurMb->uiCbp > 0 || IS_INTRA16x16 (pCurMb->uiMbType)) { |
| 243 | const int32_t kiDeltaQp = pCurMb->uiLumaQp - pSlice->uiLastMbQp; | 256 | const int32_t kiDeltaQp = pCurMb->uiLumaQp - pSlice->uiLastMbQp; |
| 244 | pSlice->uiLastMbQp = pCurMb->uiLumaQp; | 257 | pSlice->uiLastMbQp = pCurMb->uiLumaQp; |
| 258 | |||
| 259 | BsWriteSE (pBs, kiDeltaQp); | ||
| 260 | if (WelsWriteMbResidual (pEncCtx->pFuncList, pMbCache, pCurMb, pBs)) | ||
| 261 | return ENC_RETURN_VLCOVERFLOWFOUND; | ||
| 262 | } else { | ||
| 263 | pCurMb->uiLumaQp = pSlice->uiLastMbQp; | ||
| 264 | pCurMb->uiChromaQp = g_kuiChromaQpTable[CLIP3_QP_0_51 (pCurMb->uiLumaQp + | ||
| 265 | pEncCtx->pCurDqLayer->sLayerInfo.pPpsP->uiChromaQpIndexOffset)]; | ||
| 266 | } | ||
| 245 | 267 | ||
| 246 | BsWriteSE (pBs, kiDeltaQp); | 268 | /* Step 4: Check the left buffer */ |
| 247 | if (WelsWriteMbResidual (pEncCtx->pFuncList, pMbCache, pCurMb, pBs)) | 269 | return CheckBitstreamBuffer (pSlice->uiSliceIdx, pEncCtx, pBs); |
| 248 | return ENC_RETURN_VLCOVERFLOWFOUND; | ||
| 249 | } else { | ||
| 250 | pCurMb->uiLumaQp = pSlice->uiLastMbQp; | ||
| 251 | pCurMb->uiChromaQp = g_kuiChromaQpTable[CLIP3_QP_0_51 (pCurMb->uiLumaQp + | ||
| 252 | pEncCtx->pCurDqLayer->sLayerInfo.pPpsP->uiChromaQpIndexOffset)]; | ||
| 253 | } | 270 | } |
| 254 | |||
| 255 | /* Step 4: Check the left buffer */ | ||
| 256 | return CheckBitstreamBuffer (pSlice->uiSliceIdx, pEncCtx, pBs); | ||
| 257 | } | 271 | } |
| 258 | 272 | ||
| 259 | int32_t WelsWriteMbResidual (SWelsFuncPtrList* pFuncList, SMbCache* sMbCacheInfo, SMB* pCurMb, SBitStringAux* pBs) { | 273 | int32_t WelsWriteMbResidual (SWelsFuncPtrList* pFuncList, SMbCache* sMbCacheInfo, SMB* pCurMb, SBitStringAux* pBs) { |
| @@ -1,6 +1,7 @@ | |||
| 1 | ENCODER_SRCDIR=codec/encoder | 1 | ENCODER_SRCDIR=codec/encoder |
| 2 | ENCODER_CPP_SRCS=\ | 2 | ENCODER_CPP_SRCS=\ |
| 3 | $(ENCODER_SRCDIR)/core/src/au_set.cpp\ | 3 | $(ENCODER_SRCDIR)/core/src/au_set.cpp\ |
| 4 | $(ENCODER_SRCDIR)/core/src/cabac.cpp\ | ||
| 4 | $(ENCODER_SRCDIR)/core/src/deblocking.cpp\ | 5 | $(ENCODER_SRCDIR)/core/src/deblocking.cpp\ |
| 5 | $(ENCODER_SRCDIR)/core/src/decode_mb_aux.cpp\ | 6 | $(ENCODER_SRCDIR)/core/src/decode_mb_aux.cpp\ |
| 6 | $(ENCODER_SRCDIR)/core/src/encode_mb_aux.cpp\ | 7 | $(ENCODER_SRCDIR)/core/src/encode_mb_aux.cpp\ |
| @@ -18,6 +19,7 @@ ENCODER_CPP_SRCS=\ · 11 unmodified lines | |||
| 18 | $(ENCODER_SRCDIR)/core/src/ratectl.cpp\ | 19 | $(ENCODER_SRCDIR)/core/src/ratectl.cpp\ |
| 19 | $(ENCODER_SRCDIR)/core/src/ref_list_mgr_svc.cpp\ | 20 | $(ENCODER_SRCDIR)/core/src/ref_list_mgr_svc.cpp\ |
| 20 | $(ENCODER_SRCDIR)/core/src/sample.cpp\ | 21 | $(ENCODER_SRCDIR)/core/src/sample.cpp\ |
| 22 | $(ENCODER_SRCDIR)/core/src/set_mb_syn_cabac.cpp\ | ||
| 21 | $(ENCODER_SRCDIR)/core/src/set_mb_syn_cavlc.cpp\ | 23 | $(ENCODER_SRCDIR)/core/src/set_mb_syn_cavlc.cpp\ |
| 22 | $(ENCODER_SRCDIR)/core/src/slice_multi_threading.cpp\ | 24 | $(ENCODER_SRCDIR)/core/src/slice_multi_threading.cpp\ |
| 23 | $(ENCODER_SRCDIR)/core/src/svc_base_layer_md.cpp\ | 25 | $(ENCODER_SRCDIR)/core/src/svc_base_layer_md.cpp\ |
| @@ -26,6 +28,7 @@ ENCODER_CPP_SRCS=\ · 2 unmodified lines | |||
| 26 | $(ENCODER_SRCDIR)/core/src/svc_encode_slice.cpp\ | 28 | $(ENCODER_SRCDIR)/core/src/svc_encode_slice.cpp\ |
| 27 | $(ENCODER_SRCDIR)/core/src/svc_mode_decision.cpp\ | 29 | $(ENCODER_SRCDIR)/core/src/svc_mode_decision.cpp\ |
| 28 | $(ENCODER_SRCDIR)/core/src/svc_motion_estimate.cpp\ | 30 | $(ENCODER_SRCDIR)/core/src/svc_motion_estimate.cpp\ |
| 31 | $(ENCODER_SRCDIR)/core/src/svc_set_mb_syn_cabac.cpp\ | ||
| 29 | $(ENCODER_SRCDIR)/core/src/svc_set_mb_syn_cavlc.cpp\ | 32 | $(ENCODER_SRCDIR)/core/src/svc_set_mb_syn_cavlc.cpp\ |
| 30 | $(ENCODER_SRCDIR)/core/src/wels_preprocess.cpp\ | 33 | $(ENCODER_SRCDIR)/core/src/wels_preprocess.cpp\ |
| 31 | $(ENCODER_SRCDIR)/plus/src/welsEncoderExt.cpp\ | 34 | $(ENCODER_SRCDIR)/plus/src/welsEncoderExt.cpp\ |
| @@ -15,9 +15,9 @@ class BaseEncoderTest { · 14 unmodified lines | |||
| 15 | void SetUp(); | 15 | void SetUp(); |
| 16 | void TearDown(); | 16 | void TearDown(); |
| 17 | void EncodeFile (const char* fileName, EUsageType usageType, int width, int height, float frameRate, | 17 | void EncodeFile (const char* fileName, EUsageType usageType, int width, int height, float frameRate, |
| 18 | SliceModeEnum slices, bool denoise, int layers, bool losslessLink, bool enableLtr, Callback* cbk); | 18 | SliceModeEnum slices, bool denoise, int layers, bool losslessLink, bool enableLtr, bool cabac, Callback* cbk); |
| 19 | void EncodeStream (InputStream* in, EUsageType usageType, int width, int height, float frameRate, SliceModeEnum slices, | 19 | void EncodeStream (InputStream* in, EUsageType usageType, int width, int height, float frameRate, SliceModeEnum slices, |
| 20 | bool denoise, int layers, bool losslessLink, bool enableLtr, Callback* cbk); | 20 | bool denoise, int layers, bool losslessLink, bool enableLtr, bool cabac, Callback* cbk); |
| 21 | 21 | ||
| 22 | ISVCEncoder* encoder_; | 22 | ISVCEncoder* encoder_; |
| 23 | private: | 23 | private: |
| @@ -6,8 +6,8 @@ · 5 unmodified lines | |||
| 6 | #include "BaseEncoderTest.h" | 6 | #include "BaseEncoderTest.h" |
| 7 | 7 | ||
| 8 | static int InitWithParam (ISVCEncoder* encoder, EUsageType usageType, int width, | 8 | static int InitWithParam (ISVCEncoder* encoder, EUsageType usageType, int width, |
| 9 | int height, float frameRate, SliceModeEnum sliceMode, bool denoise, int layers, bool losslessLink, bool enableLtr) { | 9 | int height, float frameRate, SliceModeEnum sliceMode, bool denoise, int layers, bool losslessLink, bool enableLtr,bool cabac) { |
| 10 | if (SM_SINGLE_SLICE == sliceMode && !denoise && layers == 1 && !losslessLink && !enableLtr) { | 10 | if (SM_SINGLE_SLICE == sliceMode && !denoise && layers == 1 && !losslessLink && !enableLtr &&!cabac) { |
| 11 | SEncParamBase param; | 11 | SEncParamBase param; |
| 12 | memset (¶m, 0, sizeof (SEncParamBase)); | 12 | memset (¶m, 0, sizeof (SEncParamBase)); |
| 13 | 13 | ||
| @@ -31,7 +31,7 @@ static int InitWithParam (ISVCEncoder* encoder, EUsageType usageType, int width, · 17 unmodified lines | |||
| 31 | param.iSpatialLayerNum = layers; | 31 | param.iSpatialLayerNum = layers; |
| 32 | param.bIsLosslessLink = losslessLink; | 32 | param.bIsLosslessLink = losslessLink; |
| 33 | param.bEnableLongTermReference = enableLtr; | 33 | param.bEnableLongTermReference = enableLtr; |
| 34 | 34 | param.iEntropyCodingModeFlag = cabac?1:0; | |
| 35 | if (sliceMode != SM_SINGLE_SLICE && sliceMode != SM_DYN_SLICE) //SM_DYN_SLICE don't support multi-thread now | 35 | if (sliceMode != SM_SINGLE_SLICE && sliceMode != SM_DYN_SLICE) //SM_DYN_SLICE don't support multi-thread now |
| 36 | param.iMultipleThreadIdc = 2; | 36 | param.iMultipleThreadIdc = 2; |
| 37 | 37 | ||
| @@ -69,9 +69,8 @@ void BaseEncoderTest::TearDown() { · 31 unmodified lines | |||
| 69 | } | 69 | } |
| 70 | 70 | ||
| 71 | void BaseEncoderTest::EncodeStream (InputStream* in, EUsageType usageType, int width, int height, | 71 | void BaseEncoderTest::EncodeStream (InputStream* in, EUsageType usageType, int width, int height, |
| 72 | float frameRate, SliceModeEnum slices, bool denoise, int layers, bool losslessLink, bool enableLtr, Callback* cbk) { | 72 | float frameRate, SliceModeEnum slices, bool denoise, int layers, bool losslessLink, bool enableLtr, bool cabac,Callback* cbk) { |
| 73 | int rv = InitWithParam (encoder_, usageType, width, height, frameRate, slices, denoise, layers, losslessLink, | 73 | int rv = InitWithParam (encoder_, usageType, width, height, frameRate, slices, denoise, layers, losslessLink, enableLtr,cabac); |
| 74 | enableLtr); | ||
| 75 | ASSERT_TRUE (rv == cmResultSuccess); | 74 | ASSERT_TRUE (rv == cmResultSuccess); |
| 76 | 75 | ||
| 77 | // I420: 1(Y) + 1/4(U) + 1/4(V) | 76 | // I420: 1(Y) + 1/4(U) + 1/4(V) |
| @@ -104,8 +103,8 @@ void BaseEncoderTest::EncodeStream (InputStream* in, EUsageType usageType, int w · 26 unmodified lines | |||
| 104 | } | 103 | } |
| 105 | 104 | ||
| 106 | void BaseEncoderTest::EncodeFile (const char* fileName, EUsageType usageType, int width, int height, | 105 | void BaseEncoderTest::EncodeFile (const char* fileName, EUsageType usageType, int width, int height, |
| 107 | float frameRate, SliceModeEnum slices, bool denoise, int layers, bool losslessLink, bool enableLtr, Callback* cbk) { | 106 | float frameRate, SliceModeEnum slices, bool denoise, int layers, bool losslessLink, bool enableLtr, bool cabac,Callback* cbk) { |
| 108 | FileInputStream fileStream; | 107 | FileInputStream fileStream; |
| 109 | ASSERT_TRUE (fileStream.Open (fileName)); | 108 | ASSERT_TRUE (fileStream.Open (fileName)); |
| 110 | EncodeStream (&fileStream, usageType, width, height, frameRate, slices, denoise, layers, losslessLink, enableLtr, cbk); | 109 | EncodeStream (&fileStream, usageType, width, height, frameRate, slices, denoise, layers, losslessLink, enableLtr, cabac,cbk); |
| 111 | } | 110 | } |
| @@ -99,8 +99,7 @@ TEST_P (DecodeEncodeTest, CompareOutput) { · 98 unmodified lines | |||
| 99 | #else | 99 | #else |
| 100 | ASSERT_TRUE (Open (p.fileName)); | 100 | ASSERT_TRUE (Open (p.fileName)); |
| 101 | #endif | 101 | #endif |
| 102 | EncodeStream (this, CAMERA_VIDEO_REAL_TIME, p.width, p.height, p.frameRate, SM_SINGLE_SLICE, false, 1, false, false, | 102 | EncodeStream (this, CAMERA_VIDEO_REAL_TIME, p.width, p.height, p.frameRate, SM_SINGLE_SLICE, false, 1, false, false,false, this); |
| 103 | this); | ||
| 104 | unsigned char digest[SHA_DIGEST_LENGTH]; | 103 | unsigned char digest[SHA_DIGEST_LENGTH]; |
| 105 | SHA1Result (&ctx_, digest); | 104 | SHA1Result (&ctx_, digest); |
| 106 | if (!HasFatalFailure()) { | 105 | if (!HasFatalFailure()) { |
| @@ -37,6 +37,7 @@ struct EncodeFileParam { · 36 unmodified lines | |||
| 37 | int layers; | 37 | int layers; |
| 38 | bool isLossless; | 38 | bool isLossless; |
| 39 | bool enableLtr; | 39 | bool enableLtr; |
| 40 | bool cabac; | ||
| 40 | }; | 41 | }; |
| 41 | 42 | ||
| 42 | class EncoderOutputTest : public ::testing::WithParamInterface<EncodeFileParam>, | 43 | class EncoderOutputTest : public ::testing::WithParamInterface<EncodeFileParam>, |
| @@ -62,10 +63,10 @@ TEST_P (EncoderOutputTest, CompareOutput) { · 19 unmodified lines | |||
| 62 | #if defined(ANDROID_NDK) | 63 | #if defined(ANDROID_NDK) |
| 63 | std::string filename = std::string ("/sdcard/") + p.fileName; | 64 | std::string filename = std::string ("/sdcard/") + p.fileName; |
| 64 | EncodeFile (filename.c_str(), p.usageType , p.width, p.height, p.frameRate, p.slices, p.denoise, p.layers, p.isLossless, | 65 | EncodeFile (filename.c_str(), p.usageType , p.width, p.height, p.frameRate, p.slices, p.denoise, p.layers, p.isLossless, |
| 65 | p.enableLtr, this); | 66 | p.enableLtr,p.cabac, this); |
| 66 | #else | 67 | #else |
| 67 | EncodeFile (p.fileName, p.usageType , p.width, p.height, p.frameRate, p.slices, p.denoise, p.layers, p.isLossless, | 68 | EncodeFile (p.fileName, p.usageType , p.width, p.height, p.frameRate, p.slices, p.denoise, p.layers, p.isLossless, |
| 68 | p.enableLtr, this); | 69 | p.enableLtr, p.cabac, this); |
| 69 | #endif | 70 | #endif |
| 70 | //will remove this after screen content algorithms are ready, | 71 | //will remove this after screen content algorithms are ready, |
| 71 | //because the bitstream output will vary when the different algorithms are added. | 72 | //because the bitstream output will vary when the different algorithms are added. |
| @@ -78,57 +79,65 @@ TEST_P (EncoderOutputTest, CompareOutput) { · 6 unmodified lines | |||
| 78 | static const EncodeFileParam kFileParamArray[] = { | 79 | static const EncodeFileParam kFileParamArray[] = { |
| 79 | { | 80 | { |
| 80 | "res/CiscoVT2people_320x192_12fps.yuv", | 81 | "res/CiscoVT2people_320x192_12fps.yuv", |
| 81 | "0a36b75e423fc6b49f6adf7eee12c039a096f538", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 1, false, false | 82 | "0a36b75e423fc6b49f6adf7eee12c039a096f538", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 1, false, false, false |
| 82 | }, | 83 | }, |
| 83 | { | 84 | { |
| 84 | "res/CiscoVT2people_160x96_6fps.yuv", | 85 | "res/CiscoVT2people_160x96_6fps.yuv", |
| 85 | "73981e6ea5b62f7338212c538a7cc755e7c9c030", CAMERA_VIDEO_REAL_TIME, 160, 96, 6.0f, SM_SINGLE_SLICE, false, 1, false, false | 86 | "73981e6ea5b62f7338212c538a7cc755e7c9c030", CAMERA_VIDEO_REAL_TIME, 160, 96, 6.0f, SM_SINGLE_SLICE, false, 1, false, false, false |
| 86 | }, | 87 | }, |
| 87 | { | 88 | { |
| 88 | "res/Static_152_100.yuv", | 89 | "res/Static_152_100.yuv", |
| 89 | "02bbff550ee0630e44e46e14dc459d3686f2a360", CAMERA_VIDEO_REAL_TIME, 152, 100, 6.0f, SM_SINGLE_SLICE, false, 1, false, false | 90 | "02bbff550ee0630e44e46e14dc459d3686f2a360", CAMERA_VIDEO_REAL_TIME, 152, 100, 6.0f, SM_SINGLE_SLICE, false, 1, false, false, false |
| 90 | }, | 91 | }, |
| 91 | { | 92 | { |
| 92 | "res/CiscoVT2people_320x192_12fps.yuv", | 93 | "res/CiscoVT2people_320x192_12fps.yuv", |
| 93 | "c8b759bcec7ffa048f1d3ded594b8815bed0aead", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_ROWMB_SLICE, false, 1, false, false // One slice per MB row | 94 | "c8b759bcec7ffa048f1d3ded594b8815bed0aead", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_ROWMB_SLICE, false, 1, false, false, false // One slice per MB row |
| 94 | }, | 95 | }, |
| 95 | { | 96 | { |
| 96 | "res/CiscoVT2people_320x192_12fps.yuv", | 97 | "res/CiscoVT2people_320x192_12fps.yuv", |
| 97 | "e64ba75456c821ca35a949eda89f85bff8ee69fa", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, true, 1, false, false | 98 | "e64ba75456c821ca35a949eda89f85bff8ee69fa", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, true, 1, false, false, false |
| 98 | }, | 99 | }, |
| 99 | { | 100 | { |
| 100 | "res/CiscoVT2people_320x192_12fps.yuv", | 101 | "res/CiscoVT2people_320x192_12fps.yuv", |
| 101 | "684e6d141ada776892bdb01ee93efe475983ed36", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 2, false, false | 102 | "684e6d141ada776892bdb01ee93efe475983ed36", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 2, false, false, false |
| 102 | }, | 103 | }, |
| 103 | { | 104 | { |
| 104 | "res/Cisco_Absolute_Power_1280x720_30fps.yuv", | 105 | "res/Cisco_Absolute_Power_1280x720_30fps.yuv", |
| 105 | "2bc06262d87fa0897ad4c336cc4047d5a67f7203", CAMERA_VIDEO_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1, false, false | 106 | "2bc06262d87fa0897ad4c336cc4047d5a67f7203", CAMERA_VIDEO_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1, false, false, false |
| 106 | }, | 107 | }, |
| 107 | { | 108 | { |
| 108 | "res/Cisco_Absolute_Power_1280x720_30fps.yuv", | 109 | "res/Cisco_Absolute_Power_1280x720_30fps.yuv", |
| 109 | "68c3220e49b7a57d563faf7c99a870ab34a23400", CAMERA_VIDEO_REAL_TIME, 1280, 720, 30.0f, SM_SINGLE_SLICE, false, 4, false, false | 110 | "68c3220e49b7a57d563faf7c99a870ab34a23400", CAMERA_VIDEO_REAL_TIME, 1280, 720, 30.0f, SM_SINGLE_SLICE, false, 4, false, false, false |
| 110 | }, | 111 | }, |
| 111 | // the following values may be adjusted for times since we start tuning the strategy | 112 | // the following values may be adjusted for times since we start tuning the strategy |
| 112 | { | 113 | { |
| 113 | "res/CiscoVT2people_320x192_12fps.yuv", | 114 | "res/CiscoVT2people_320x192_12fps.yuv", |
| 114 | "3ce65d9c326657b845cd00b22ce76128c29f8347", SCREEN_CONTENT_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 1, false, false | 115 | "3ce65d9c326657b845cd00b22ce76128c29f8347", SCREEN_CONTENT_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 1, false, false, false |
| 115 | }, | 116 | }, |
| 116 | { | 117 | { |
| 117 | "res/CiscoVT2people_160x96_6fps.yuv", | 118 | "res/CiscoVT2people_160x96_6fps.yuv", |
| 118 | "2b57e1cc7a4db6258116c302eada3bf870ee94a1", SCREEN_CONTENT_REAL_TIME, 160, 96, 6.0f, SM_SINGLE_SLICE, false, 1, false, false | 119 | "2b57e1cc7a4db6258116c302eada3bf870ee94a1", SCREEN_CONTENT_REAL_TIME, 160, 96, 6.0f, SM_SINGLE_SLICE, false, 1, false, false, false |
| 119 | }, | 120 | }, |
| 120 | { | 121 | { |
| 121 | "res/Static_152_100.yuv", | 122 | "res/Static_152_100.yuv", |
| 122 | "bad065da4564d0580a1722d91463fa0f9fd947c8", SCREEN_CONTENT_REAL_TIME, 152, 100, 6.0f, SM_SINGLE_SLICE, false, 1, false, false | 123 | "bad065da4564d0580a1722d91463fa0f9fd947c8", SCREEN_CONTENT_REAL_TIME, 152, 100, 6.0f, SM_SINGLE_SLICE, false, 1, false, false, false |
| 123 | }, | 124 | }, |
| 124 | { | 125 | { |
| 125 | "res/Cisco_Absolute_Power_1280x720_30fps.yuv", | 126 | "res/Cisco_Absolute_Power_1280x720_30fps.yuv", |
| 126 | "8ee6cd375b58e9877f6145fb72da844e65162b14", SCREEN_CONTENT_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1, false, false | 127 | "8ee6cd375b58e9877f6145fb72da844e65162b14", SCREEN_CONTENT_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1, false, false, false |
| 127 | }, | 128 | }, |
| 128 | //for different strategy | 129 | //for different strategy |
| 129 | { | 130 | { |
| 130 | "res/Cisco_Absolute_Power_1280x720_30fps.yuv", | 131 | "res/Cisco_Absolute_Power_1280x720_30fps.yuv", |
| 131 | "868f327765dc8e705ad6a9a942bfc7e32c03c791", SCREEN_CONTENT_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1, true, true | 132 | "868f327765dc8e705ad6a9a942bfc7e32c03c791", SCREEN_CONTENT_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1, true, true, false |
| 133 | }, | ||
| 134 | { | ||
| 135 | "res/CiscoVT2people_320x192_12fps.yuv", | ||
| 136 | "fc6faa6409150cce304bcdefb486fee4b4a70e1d", CAMERA_VIDEO_REAL_TIME, 320, 192, 12.0f, SM_SINGLE_SLICE, false, 1, false, false, true //turn on cabac | ||
| 137 | }, | ||
| 138 | { | ||
| 139 | "res/Cisco_Absolute_Power_1280x720_30fps.yuv", | ||
| 140 | "7b166367ece61cf489c793872c40c37d4047b7aa", CAMERA_VIDEO_REAL_TIME, 1280, 720, 30.0f, SM_DYN_SLICE, false, 1, false, false, true | ||
| 132 | }, | 141 | }, |
| 133 | }; | 142 | }; |
| 134 | 143 | ||
| @@ -14,7 +14,7 @@ IntraPeriod 0 # Intra Period ( multipler of GoP si · 13 unmodified lines | |||
| 14 | EnableSpsPpsIDAddition 1 | 14 | EnableSpsPpsIDAddition 1 |
| 15 | 15 | ||
| 16 | EnableFrameCropping 1 # enable frame cropping flag | 16 | EnableFrameCropping 1 # enable frame cropping flag |
| 17 | 17 | EntropyCodingModeFlag 0 #0:cavlc 1:cabac | |
| 18 | MaxNalSize 0 # Unit:Byte, Maximum Nal size | 18 | MaxNalSize 0 # Unit:Byte, Maximum Nal size |
| 19 | #============================== LOOP FILTER ============================== | 19 | #============================== LOOP FILTER ============================== |
| 20 | LoopFilterDisableIDC 0 # Loop filter idc (0: on, 1: off, | 20 | LoopFilterDisableIDC 0 # Loop filter idc (0: on, 1: off, |
| @@ -14,7 +14,7 @@ IntraPeriod 0 # Intra Period ( multiple of GoP siz · 13 unmodified lines | |||
| 14 | EnableSpsPpsIDAddition 1 | 14 | EnableSpsPpsIDAddition 1 |
| 15 | 15 | ||
| 16 | EnableFrameCropping 1 # enable frame cropping flag | 16 | EnableFrameCropping 1 # enable frame cropping flag |
| 17 | 17 | EntropyCodingModeFlag 0 #0:cavlc 1:cabac | |
| 18 | MaxNalSize 0 # Unit:Byte, Maximum Nal size | 18 | MaxNalSize 0 # Unit:Byte, Maximum Nal size |
| 19 | #============================== LOOP FILTER ============================== | 19 | #============================== LOOP FILTER ============================== |
| 20 | LoopFilterDisableIDC 0 # Loop filter idc (0: on, 1: off, | 20 | LoopFilterDisableIDC 0 # Loop filter idc (0: on, 1: off, |
| @@ -14,7 +14,7 @@ IntraPeriod 0 # Intra Period ( multipler of GoP si · 13 unmodified lines | |||
| 14 | EnableSpsPpsIDAddition 1 | 14 | EnableSpsPpsIDAddition 1 |
| 15 | 15 | ||
| 16 | EnableFrameCropping 1 # enable frame cropping flag | 16 | EnableFrameCropping 1 # enable frame cropping flag |
| 17 | 17 | EntropyCodingModeFlag 0 #0:cavlc 1:cabac | |
| 18 | MaxNalSize 0 # Unit:Byte, Maximum Nal size | 18 | MaxNalSize 0 # Unit:Byte, Maximum Nal size |
| 19 | #============================== LOOP FILTER ============================== | 19 | #============================== LOOP FILTER ============================== |
| 20 | LoopFilterDisableIDC 0 # Loop filter idc (0: on, 1: off, | 20 | LoopFilterDisableIDC 0 # Loop filter idc (0: on, 1: off, |
| @@ -14,7 +14,7 @@ IntraPeriod 0 # Intra Period ( multipler of GoP si · 13 unmodified lines | |||
| 14 | EnableSpsPpsIDAddition 1 | 14 | EnableSpsPpsIDAddition 1 |
| 15 | 15 | ||
| 16 | EnableFrameCropping 1 # enable frame cropping flag | 16 | EnableFrameCropping 1 # enable frame cropping flag |
| 17 | 17 | EntropyCodingModeFlag 0 #0:cavlc 1:cabac | |
| 18 | MaxNalSize 0 # Unit:Byte, Maximum Nal size | 18 | MaxNalSize 0 # Unit:Byte, Maximum Nal size |
| 19 | #============================== LOOP FILTER ============================== | 19 | #============================== LOOP FILTER ============================== |
| 20 | LoopFilterDisableIDC 0 # Loop filter idc (0: on, 1: off, | 20 | LoopFilterDisableIDC 0 # Loop filter idc (0: on, 1: off, |
| @@ -14,7 +14,7 @@ IntraPeriod 0 # Intra Period ( multipler of GoP si · 13 unmodified lines | |||
| 14 | EnableSpsPpsIDAddition 1 | 14 | EnableSpsPpsIDAddition 1 |
| 15 | 15 | ||
| 16 | EnableFrameCropping 1 # enable frame cropping flag | 16 | EnableFrameCropping 1 # enable frame cropping flag |
| 17 | 17 | EntropyCodingModeFlag 0 #0:cavlc 1:cabac | |
| 18 | MaxNalSize 0 # Unit:Byte, Maximum Nal size | 18 | MaxNalSize 0 # Unit:Byte, Maximum Nal size |
| 19 | #============================== LOOP FILTER ============================== | 19 | #============================== LOOP FILTER ============================== |
| 20 | LoopFilterDisableIDC 0 # Loop filter idc (0: on, 1: off, | 20 | LoopFilterDisableIDC 0 # Loop filter idc (0: on, 1: off, |