mirror of
https://github.com/ittiam-systems/libhevc.git
synced 2026-04-02 20:30:49 +07:00
Compare commits
91 commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cbd0e91d89 | ||
|
|
1e08a022f7 | ||
|
|
b9c1bf8bbf | ||
|
|
a960c019e0 | ||
|
|
b77a7babd3 | ||
|
|
4740ca60b9 | ||
|
|
ccf2f2207b | ||
|
|
5ab6d44ef9 | ||
|
|
55ec61cdcb | ||
|
|
ae4f658437 | ||
|
|
dd5b066300 | ||
|
|
e0aec79c0d | ||
|
|
e8624b5c8f | ||
|
|
646f97bcd2 | ||
|
|
811fa89f0e | ||
|
|
38e622bf6a | ||
|
|
141e971581 | ||
|
|
c8327aa960 | ||
|
|
87962d6818 | ||
|
|
90f29517ee | ||
|
|
ad0a6d8688 | ||
|
|
aea272ecb6 | ||
|
|
2cf1cc917d | ||
|
|
ab4dd06386 | ||
|
|
d3beb01a0d | ||
|
|
3d63430b77 | ||
|
|
2626e0b4d6 | ||
|
|
e563dd60af | ||
|
|
934d05f42b | ||
|
|
092312e4d7 | ||
|
|
29611400fa | ||
|
|
135285ae8a | ||
|
|
f2176d3b9c | ||
|
|
90d0777cc9 | ||
|
|
546576fa3d | ||
|
|
4e7799d665 | ||
|
|
04e7eb5698 | ||
|
|
50d6c2a175 | ||
|
|
7546da6a56 | ||
|
|
8cbcc58d4a | ||
|
|
eb20a6ddbe | ||
|
|
c4245ca34c | ||
|
|
464af74ef0 | ||
|
|
09bc53ec53 | ||
|
|
67635193fb | ||
|
|
fa39f45858 | ||
|
|
789320b76c | ||
|
|
c684b4fd98 | ||
|
|
657c95afd9 | ||
|
|
fde75babbc | ||
|
|
e38e75d666 | ||
|
|
25a7fafb00 | ||
|
|
45340a66f0 | ||
|
|
05ddb36185 | ||
|
|
05bce9147a | ||
|
|
10ef80a814 | ||
|
|
073a779c34 | ||
|
|
fe60fa35af | ||
|
|
947ba91fa5 | ||
|
|
45c10b2003 | ||
|
|
8dd2b3392a | ||
|
|
95929e6021 | ||
|
|
5fa218d639 | ||
|
|
a88affe6f1 | ||
|
|
05d4214bef | ||
|
|
b2b115e957 | ||
|
|
dc225332d0 | ||
|
|
d0897deaf8 | ||
|
|
bf58c9a885 | ||
|
|
a7874ebcf8 | ||
|
|
f47d8da8ab | ||
|
|
1fc3851045 | ||
|
|
d819e51e11 | ||
|
|
3c03b2bcf7 | ||
|
|
90aefb438b | ||
|
|
a0898d5415 | ||
|
|
3f937636db | ||
|
|
dfe6a9c346 | ||
|
|
2f24f2706f | ||
|
|
545b769b83 | ||
|
|
a3a680224d | ||
|
|
2f18911961 | ||
|
|
43867a6e8b | ||
|
|
0564b7a28a | ||
|
|
33fc15e160 | ||
|
|
72558e3be0 | ||
|
|
4cd4edc0f6 | ||
|
|
d7b7ccc4cd | ||
|
|
e4b160c9e5 | ||
|
|
42f5600e24 | ||
|
|
8263641644 |
122 changed files with 10932 additions and 4132 deletions
2
.github/workflows/cifuzz.yml
vendored
2
.github/workflows/cifuzz.yml
vendored
|
|
@ -20,7 +20,7 @@ jobs:
|
|||
language: c++
|
||||
fuzz-seconds: 600
|
||||
- name: Upload Crash
|
||||
uses: actions/upload-artifact@v3
|
||||
uses: actions/upload-artifact@v4
|
||||
if: failure() && steps.build.outcome == 'success'
|
||||
with:
|
||||
name: artifacts
|
||||
|
|
|
|||
88
.github/workflows/cmake.yml
vendored
88
.github/workflows/cmake.yml
vendored
|
|
@ -2,22 +2,100 @@ name: CMake
|
|||
|
||||
on:
|
||||
push:
|
||||
branches: [ "main" ]
|
||||
pull_request:
|
||||
branches: [ "main" ]
|
||||
|
||||
env:
|
||||
BUILD_TYPE: Release
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
matrix:
|
||||
include:
|
||||
- name: ubuntu-latest-gcc-cmake
|
||||
os: ubuntu-latest
|
||||
cc: gcc
|
||||
cxx: g++
|
||||
build-system: cmake
|
||||
cmake-opts: ''
|
||||
|
||||
- name: ubuntu-latest-clang-cmake
|
||||
os: ubuntu-latest
|
||||
cc: clang
|
||||
cxx: clang++
|
||||
build-system: cmake
|
||||
cmake-opts: ''
|
||||
|
||||
- name: ubuntu-24.04-arm-clang-cmake
|
||||
os: ubuntu-24.04-arm
|
||||
cc: clang
|
||||
cxx: clang++
|
||||
build-system: cmake
|
||||
cmake-opts: ''
|
||||
|
||||
- name: ubuntu-latest-clang-cmake-asan-fuzzer
|
||||
os: ubuntu-latest
|
||||
cc: clang
|
||||
cxx: clang++
|
||||
build-system: cmake
|
||||
cmake-opts: '-DSANITIZE=fuzzer-no-link,address'
|
||||
|
||||
- name: ubuntu-latest-clang-cmake-ninja
|
||||
os: ubuntu-latest
|
||||
cc: clang
|
||||
cxx: clang++
|
||||
build-system: cmake
|
||||
cmake-opts: '-G Ninja'
|
||||
|
||||
- name: macos-latest-clang-cmake
|
||||
os: macos-latest
|
||||
cc: clang
|
||||
cxx: clang++
|
||||
build-system: cmake
|
||||
cmake-opts: ''
|
||||
|
||||
- name: ubuntu-latest-cross-aarch64-cmake
|
||||
os: ubuntu-latest
|
||||
cc: aarch64-linux-gnu-gcc
|
||||
cxx: aarch64-linux-gnu-g++
|
||||
build-system: cmake
|
||||
cmake-opts: '-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch64_toolchain.cmake'
|
||||
|
||||
- name: ubuntu-latest-cross-aarch32-cmake
|
||||
os: ubuntu-latest
|
||||
cc: arm-linux-gnueabihf-gcc
|
||||
cxx: arm-linux-gnueabihf-g++
|
||||
build-system: cmake
|
||||
cmake-opts: '-DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake'
|
||||
|
||||
runs-on: ${{ matrix.os }}
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Install Linux dependencies
|
||||
if: startsWith(matrix.os,'ubuntu') && contains(matrix.cmake-opts,'-G Ninja')
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install -y ninja-build
|
||||
|
||||
- name: Install cross-aarch64 dependencies
|
||||
if: startsWith(matrix.os,'ubuntu') && contains(matrix.cmake-opts,'aarch64')
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install gcc-aarch64-linux-gnu g++-aarch64-linux-gnu
|
||||
|
||||
- name: Install cross-arm dependencies
|
||||
if: startsWith(matrix.os,'ubuntu') && contains(matrix.cmake-opts,'aarch32')
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf
|
||||
|
||||
- name: Configure CMake
|
||||
run: cmake -B ${{github.workspace}}/out -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++
|
||||
env:
|
||||
CC: ${{ matrix.cc }}
|
||||
CXX: ${{ matrix.cxx }}
|
||||
run: cmake -B ${{github.workspace}}/out -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} ${{ matrix.cmake-opts }}
|
||||
|
||||
- name: Build
|
||||
run: cmake --build ${{github.workspace}}/out --config ${{env.BUILD_TYPE}}
|
||||
|
|
|
|||
18
.vscode/c_cpp_properties.json
vendored
Normal file
18
.vscode/c_cpp_properties.json
vendored
Normal file
|
|
@ -0,0 +1,18 @@
|
|||
{
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Native",
|
||||
"includePath": [
|
||||
"${workspaceFolder}/**",
|
||||
"${workspaceFolder}/common",
|
||||
"${workspaceFolder}/decoder",
|
||||
"${workspaceFolder}/encoder"
|
||||
],
|
||||
"defines": [],
|
||||
"cStandard": "c17",
|
||||
"cppStandard": "c++17",
|
||||
"configurationProvider": "ms-vscode.cmake-tools"
|
||||
}
|
||||
],
|
||||
"version": 4
|
||||
}
|
||||
81
.vscode/launch.json
vendored
Normal file
81
.vscode/launch.json
vendored
Normal file
|
|
@ -0,0 +1,81 @@
|
|||
{
|
||||
"version": "0.2.0",
|
||||
"configurations": [
|
||||
{
|
||||
"name": "Run hevcenc - Linux",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/build/hevcenc",
|
||||
"args": ["../test/encoder/vid_enc_cfg.txt"],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/build",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Run hevcdec - Linux",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/build/hevcdec",
|
||||
"args": ["../test/decoder/test.cfg"],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/build",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "gdb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for gdb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Run hevcenc - Mac",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/build/hevcenc",
|
||||
"args": ["../test/encoder/vid_enc_cfg.txt"],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/build",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "lldb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for lldb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "Run hevcdec - Mac",
|
||||
"type": "cppdbg",
|
||||
"request": "launch",
|
||||
"program": "${workspaceFolder}/build/hevcdec",
|
||||
"args": ["../test/decoder/test.cfg"],
|
||||
"stopAtEntry": false,
|
||||
"cwd": "${workspaceFolder}/build",
|
||||
"environment": [],
|
||||
"externalConsole": false,
|
||||
"MIMode": "lldb",
|
||||
"setupCommands": [
|
||||
{
|
||||
"description": "Enable pretty-printing for lldb",
|
||||
"text": "-enable-pretty-printing",
|
||||
"ignoreFailures": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
19
.vscode/settings.json
vendored
Normal file
19
.vscode/settings.json
vendored
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{
|
||||
"cmake.buildDirectory": "${workspaceFolder}/build",
|
||||
"cmake.sourceDirectory": "${workspaceFolder}",
|
||||
"cmake.configureArgs": [
|
||||
"-DENABLE_MVC=OFF",
|
||||
"-DENABLE_SVC=OFF",
|
||||
"-DENABLE_TESTS=OFF",
|
||||
"-DCMAKE_C_COMPILER=clang",
|
||||
"-DCMAKE_CXX_COMPILER=clang++"
|
||||
],
|
||||
"cmake.preferredGenerators": [
|
||||
"Unix Makefiles"
|
||||
],
|
||||
"cmake.debugConfig": {
|
||||
"hevcenc": "hevcenc",
|
||||
"hevcdec": "hevcdec"
|
||||
},
|
||||
"C_Cpp.default.configurationProvider": "ms-vscode.cmake-tools"
|
||||
}
|
||||
29
.vscode/tasks.json
vendored
Normal file
29
.vscode/tasks.json
vendored
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
{
|
||||
"version": "2.0.0",
|
||||
"tasks": [
|
||||
{
|
||||
"type": "cmake",
|
||||
"label": "Configure",
|
||||
"command": "configure",
|
||||
"problemMatcher": [
|
||||
"$gcc"
|
||||
],
|
||||
"group": "build"
|
||||
},
|
||||
{
|
||||
"type": "cmake",
|
||||
"label": "Build",
|
||||
"command": "build",
|
||||
"problemMatcher": [
|
||||
"$gcc"
|
||||
],
|
||||
"group": {
|
||||
"kind": "build",
|
||||
"isDefault": true
|
||||
},
|
||||
"dependsOn": [
|
||||
"Configure"
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
683
Android.bp
683
Android.bp
|
|
@ -35,23 +35,23 @@ cc_library_headers {
|
|||
|
||||
cc_library_static {
|
||||
name: "libhevcdec",
|
||||
defaults: ["no_bti"],
|
||||
vendor_available: true,
|
||||
host_supported: true,
|
||||
|
||||
cflags: [
|
||||
"-D_LIB",
|
||||
"-DMULTICORE",
|
||||
"-fPIC",
|
||||
"-DENABLE_MAIN_REXT_PROFILE",
|
||||
|
||||
"-O3",
|
||||
"-DANDROID",
|
||||
"-DDISABLE_SEI",
|
||||
"-Wall",
|
||||
"-Werror",
|
||||
// common/x86/ihevc_sao_ssse3_intr.c: implicit conversion from
|
||||
// 'int' to 'char' changes value from 128 to -128
|
||||
"-Wno-error=constant-conversion",
|
||||
// #KEEP_THREAD_ACTIVE is experimental
|
||||
"-UKEEP_THREADS_ACTIVE",
|
||||
],
|
||||
|
||||
export_include_dirs: [
|
||||
|
|
@ -60,64 +60,66 @@ cc_library_static {
|
|||
],
|
||||
|
||||
srcs: [
|
||||
"common/ihevc_quant_tables.c",
|
||||
"common/ihevc_inter_pred_filters.c",
|
||||
"common/ihevc_weighted_pred.c",
|
||||
"common/ihevc_padding.c",
|
||||
"common/ihevc_deblk_edge_filter.c",
|
||||
"common/ihevc_deblk_tables.c",
|
||||
"common/ihevc_buf_mgr.c",
|
||||
"common/ihevc_cabac_tables.c",
|
||||
"common/ihevc_common_tables.c",
|
||||
"common/ihevc_intra_pred_filters.c",
|
||||
"common/ihevc_chroma_intra_pred_filters.c",
|
||||
"common/ihevc_mem_fns.c",
|
||||
"common/ihevc_sao.c",
|
||||
"common/ihevc_trans_tables.c",
|
||||
"common/ihevc_recon.c",
|
||||
"common/ihevc_itrans.c",
|
||||
"common/ihevc_itrans_recon.c",
|
||||
"common/ihevc_iquant_recon.c",
|
||||
"common/ihevc_iquant_itrans_recon.c",
|
||||
"common/ihevc_itrans_recon_32x32.c",
|
||||
"common/ihevc_itrans_recon_16x16.c",
|
||||
"common/ihevc_itrans_recon_8x8.c",
|
||||
"common/ihevc_chroma_itrans_recon.c",
|
||||
"common/ihevc_chroma_iquant_recon.c",
|
||||
"common/ihevc_chroma_iquant_itrans_recon.c",
|
||||
"common/ihevc_chroma_recon.c",
|
||||
"common/ihevc_chroma_iquant_recon.c",
|
||||
"common/ihevc_chroma_itrans_recon.c",
|
||||
"common/ihevc_chroma_itrans_recon_32x32.c",
|
||||
"common/ihevc_chroma_itrans_recon_16x16.c",
|
||||
"common/ihevc_chroma_itrans_recon_8x8.c",
|
||||
"common/ihevc_buf_mgr.c",
|
||||
"common/ihevc_chroma_recon.c",
|
||||
"common/ihevc_common_tables.c",
|
||||
"common/ihevc_deblk_edge_filter.c",
|
||||
"common/ihevc_deblk_tables.c",
|
||||
"common/ihevc_disp_mgr.c",
|
||||
"common/ihevc_dpb_mgr.c",
|
||||
"common/ihevc_inter_pred_filters.c",
|
||||
"common/ihevc_intra_pred_filters.c",
|
||||
"common/ihevc_iquant_itrans_recon.c",
|
||||
"common/ihevc_iquant_recon.c",
|
||||
"common/ihevc_itrans.c",
|
||||
"common/ihevc_itrans_res.c",
|
||||
"common/ihevc_itrans_recon.c",
|
||||
"common/ihevc_itrans_recon_16x16.c",
|
||||
"common/ihevc_itrans_recon_32x32.c",
|
||||
"common/ihevc_itrans_recon_8x8.c",
|
||||
"common/ihevc_mem_fns.c",
|
||||
"common/ihevc_padding.c",
|
||||
"common/ihevc_quant_tables.c",
|
||||
"common/ihevc_recon.c",
|
||||
"common/ihevc_sao.c",
|
||||
"common/ihevc_trans_tables.c",
|
||||
"common/ihevc_weighted_pred.c",
|
||||
"common/ithread.c",
|
||||
"decoder/ihevcd_version.c",
|
||||
"decoder/ihevcd_api.c",
|
||||
"decoder/ihevcd_decode.c",
|
||||
"decoder/ihevcd_nal.c",
|
||||
"decoder/ihevcd_bitstream.c",
|
||||
"decoder/ihevcd_parse_headers.c",
|
||||
"decoder/ihevcd_parse_slice_header.c",
|
||||
"decoder/ihevcd_parse_slice.c",
|
||||
"decoder/ihevcd_parse_residual.c",
|
||||
"decoder/ihevcd_boundary_strength.c",
|
||||
"decoder/ihevcd_cabac.c",
|
||||
"decoder/ihevcd_intra_pred_mode_prediction.c",
|
||||
"decoder/ihevcd_process_slice.c",
|
||||
"decoder/ihevcd_utils.c",
|
||||
"decoder/ihevcd_job_queue.c",
|
||||
"decoder/ihevcd_ref_list.c",
|
||||
"decoder/ihevcd_common_tables.c",
|
||||
"decoder/ihevcd_deblk.c",
|
||||
"decoder/ihevcd_decode.c",
|
||||
"decoder/ihevcd_fmt_conv.c",
|
||||
"decoder/ihevcd_get_mv.c",
|
||||
"decoder/ihevcd_mv_pred.c",
|
||||
"decoder/ihevcd_mv_merge.c",
|
||||
"decoder/ihevcd_ilf_padding.c",
|
||||
"decoder/ihevcd_inter_pred.c",
|
||||
"decoder/ihevcd_intra_pred_mode_prediction.c",
|
||||
"decoder/ihevcd_iquant_itrans_recon_ctb.c",
|
||||
"decoder/ihevcd_itrans_recon_dc.c",
|
||||
"decoder/ihevcd_common_tables.c",
|
||||
"decoder/ihevcd_boundary_strength.c",
|
||||
"decoder/ihevcd_deblk.c",
|
||||
"decoder/ihevcd_inter_pred.c",
|
||||
"decoder/ihevcd_job_queue.c",
|
||||
"decoder/ihevcd_mv_merge.c",
|
||||
"decoder/ihevcd_mv_pred.c",
|
||||
"decoder/ihevcd_nal.c",
|
||||
"decoder/ihevcd_parse_headers.c",
|
||||
"decoder/ihevcd_parse_residual.c",
|
||||
"decoder/ihevcd_parse_slice.c",
|
||||
"decoder/ihevcd_parse_slice_header.c",
|
||||
"decoder/ihevcd_process_slice.c",
|
||||
"decoder/ihevcd_ref_list.c",
|
||||
"decoder/ihevcd_sao.c",
|
||||
"decoder/ihevcd_ilf_padding.c",
|
||||
"decoder/ihevcd_fmt_conv.c",
|
||||
"decoder/ihevcd_utils.c",
|
||||
"decoder/ihevcd_version.c",
|
||||
],
|
||||
|
||||
arch: {
|
||||
|
|
@ -131,29 +133,64 @@ cc_library_static {
|
|||
"-DDEFAULT_ARCH=D_ARCH_ARMV8_GENERIC",
|
||||
],
|
||||
local_include_dirs: [
|
||||
"decoder/arm",
|
||||
"common/arm",
|
||||
"decoder/arm64",
|
||||
"common/arm64",
|
||||
"decoder/arm",
|
||||
"decoder/arm64",
|
||||
],
|
||||
|
||||
srcs: [
|
||||
"decoder/arm/ihevcd_function_selector.c",
|
||||
"decoder/arm/ihevcd_function_selector_noneon.c",
|
||||
"decoder/arm64/ihevcd_function_selector_av8.c",
|
||||
"common/arm/ihevc_intra_pred_filters_neon_intr.c",
|
||||
"common/arm/ihevc_weighted_pred_neon_intr.c",
|
||||
"common/arm64/ihevc_mem_fns.s",
|
||||
"common/arm64/ihevc_itrans_recon_32x32.s",
|
||||
"common/arm64/ihevc_weighted_pred_bi_default.s",
|
||||
"common/arm64/ihevc_weighted_pred_bi.s",
|
||||
"common/arm64/ihevc_weighted_pred_uni.s",
|
||||
"common/arm64/ihevc_deblk_chroma_horz.s",
|
||||
"common/arm64/ihevc_deblk_chroma_vert.s",
|
||||
"common/arm64/ihevc_deblk_luma_horz.s",
|
||||
"common/arm64/ihevc_deblk_luma_vert.s",
|
||||
"common/arm64/ihevc_deblk_chroma_vert.s",
|
||||
"common/arm64/ihevc_deblk_chroma_horz.s",
|
||||
"common/arm64/ihevc_sao_band_offset_luma.s",
|
||||
"common/arm64/ihevc_inter_pred_chroma_copy.s",
|
||||
"common/arm64/ihevc_inter_pred_chroma_copy_w16out.s",
|
||||
"common/arm64/ihevc_inter_pred_chroma_horz.s",
|
||||
"common/arm64/ihevc_inter_pred_chroma_horz_w16out.s",
|
||||
"common/arm64/ihevc_inter_pred_chroma_vert.s",
|
||||
"common/arm64/ihevc_inter_pred_chroma_vert_w16inp.s",
|
||||
"common/arm64/ihevc_inter_pred_chroma_vert_w16inp_w16out.s",
|
||||
"common/arm64/ihevc_inter_pred_chroma_vert_w16out.s",
|
||||
"common/arm64/ihevc_inter_pred_filters_luma_horz.s",
|
||||
"common/arm64/ihevc_inter_pred_filters_luma_vert.s",
|
||||
"common/arm64/ihevc_inter_pred_filters_luma_vert_w16inp.s",
|
||||
"common/arm64/ihevc_inter_pred_filters_luma_vert_w16out.s",
|
||||
"common/arm64/ihevc_inter_pred_luma_copy.s",
|
||||
"common/arm64/ihevc_inter_pred_luma_copy_w16out.s",
|
||||
"common/arm64/ihevc_inter_pred_luma_horz_w16out.s",
|
||||
"common/arm64/ihevc_inter_pred_luma_vert_w16inp_w16out.s",
|
||||
"common/arm64/ihevc_intra_pred_chroma_dc.s",
|
||||
"common/arm64/ihevc_intra_pred_chroma_horz.s",
|
||||
"common/arm64/ihevc_intra_pred_chroma_mode2.s",
|
||||
"common/arm64/ihevc_intra_pred_chroma_mode_18_34.s",
|
||||
"common/arm64/ihevc_intra_pred_chroma_mode_27_to_33.s",
|
||||
"common/arm64/ihevc_intra_pred_chroma_mode_3_to_9.s",
|
||||
"common/arm64/ihevc_intra_pred_chroma_planar.s",
|
||||
"common/arm64/ihevc_intra_pred_chroma_ver.s",
|
||||
"common/arm64/ihevc_intra_pred_filters_chroma_mode_11_to_17.s",
|
||||
"common/arm64/ihevc_intra_pred_filters_chroma_mode_19_to_25.s",
|
||||
"common/arm64/ihevc_intra_pred_filters_luma_mode_11_to_17.s",
|
||||
"common/arm64/ihevc_intra_pred_filters_luma_mode_19_to_25.s",
|
||||
"common/arm64/ihevc_intra_pred_luma_dc.s",
|
||||
"common/arm64/ihevc_intra_pred_luma_horz.s",
|
||||
"common/arm64/ihevc_intra_pred_luma_mode2.s",
|
||||
"common/arm64/ihevc_intra_pred_luma_mode_18_34.s",
|
||||
"common/arm64/ihevc_intra_pred_luma_mode_27_to_33.s",
|
||||
"common/arm64/ihevc_intra_pred_luma_mode_3_to_9.s",
|
||||
"common/arm64/ihevc_intra_pred_luma_planar.s",
|
||||
"common/arm64/ihevc_intra_pred_luma_vert.s",
|
||||
"common/arm64/ihevc_itrans_recon_16x16.s",
|
||||
"common/arm64/ihevc_itrans_recon_32x32.s",
|
||||
"common/arm64/ihevc_itrans_recon_4x4.s",
|
||||
"common/arm64/ihevc_itrans_recon_4x4_ttype1.s",
|
||||
"common/arm64/ihevc_itrans_recon_8x8.s",
|
||||
"common/arm64/ihevc_mem_fns.s",
|
||||
"common/arm64/ihevc_padding.s",
|
||||
"common/arm64/ihevc_sao_band_offset_chroma.s",
|
||||
"common/arm64/ihevc_sao_band_offset_luma.s",
|
||||
"common/arm64/ihevc_sao_edge_offset_class0.s",
|
||||
"common/arm64/ihevc_sao_edge_offset_class0_chroma.s",
|
||||
"common/arm64/ihevc_sao_edge_offset_class1.s",
|
||||
|
|
@ -162,156 +199,107 @@ cc_library_static {
|
|||
"common/arm64/ihevc_sao_edge_offset_class2_chroma.s",
|
||||
"common/arm64/ihevc_sao_edge_offset_class3.s",
|
||||
"common/arm64/ihevc_sao_edge_offset_class3_chroma.s",
|
||||
"common/arm64/ihevc_inter_pred_luma_horz_w16out.s",
|
||||
"common/arm64/ihevc_inter_pred_filters_luma_horz.s",
|
||||
"common/arm64/ihevc_inter_pred_filters_luma_vert.s",
|
||||
"common/arm64/ihevc_inter_pred_chroma_horz.s",
|
||||
"common/arm64/ihevc_inter_pred_chroma_horz_w16out.s",
|
||||
"common/arm64/ihevc_inter_pred_chroma_vert.s",
|
||||
"common/arm64/ihevc_inter_pred_chroma_vert_w16out.s",
|
||||
"common/arm64/ihevc_inter_pred_chroma_vert_w16inp.s",
|
||||
"common/arm64/ihevc_inter_pred_chroma_vert_w16inp_w16out.s",
|
||||
"common/arm64/ihevc_inter_pred_filters_luma_vert_w16inp.s",
|
||||
"common/arm64/ihevc_inter_pred_filters_luma_vert_w16out.s",
|
||||
"common/arm64/ihevc_inter_pred_luma_vert_w16inp_w16out.s",
|
||||
"common/arm64/ihevc_inter_pred_luma_copy_w16out.s",
|
||||
"common/arm64/ihevc_inter_pred_luma_copy.s",
|
||||
"common/arm64/ihevc_inter_pred_chroma_copy.s",
|
||||
"common/arm64/ihevc_inter_pred_chroma_copy_w16out.s",
|
||||
"common/arm64/ihevc_itrans_recon_4x4_ttype1.s",
|
||||
"common/arm64/ihevc_itrans_recon_4x4.s",
|
||||
"common/arm64/ihevc_itrans_recon_8x8.s",
|
||||
"common/arm64/ihevc_itrans_recon_16x16.s",
|
||||
"common/arm64/ihevc_intra_pred_chroma_planar.s",
|
||||
"common/arm64/ihevc_intra_pred_chroma_dc.s",
|
||||
"common/arm64/ihevc_intra_pred_chroma_horz.s",
|
||||
"common/arm64/ihevc_intra_pred_chroma_ver.s",
|
||||
"common/arm64/ihevc_intra_pred_chroma_mode2.s",
|
||||
"common/arm64/ihevc_intra_pred_chroma_mode_18_34.s",
|
||||
"common/arm64/ihevc_intra_pred_filters_chroma_mode_11_to_17.s",
|
||||
"common/arm64/ihevc_intra_pred_filters_chroma_mode_19_to_25.s",
|
||||
"common/arm64/ihevc_intra_pred_chroma_mode_3_to_9.s",
|
||||
"common/arm64/ihevc_intra_pred_chroma_mode_27_to_33.s",
|
||||
"common/arm64/ihevc_intra_pred_luma_planar.s",
|
||||
"common/arm64/ihevc_intra_pred_luma_horz.s",
|
||||
"common/arm64/ihevc_intra_pred_luma_mode2.s",
|
||||
"common/arm64/ihevc_intra_pred_luma_mode_27_to_33.s",
|
||||
"common/arm64/ihevc_intra_pred_luma_mode_18_34.s",
|
||||
"common/arm64/ihevc_intra_pred_luma_vert.s",
|
||||
"common/arm64/ihevc_intra_pred_luma_dc.s",
|
||||
"common/arm64/ihevc_intra_pred_filters_luma_mode_11_to_17.s",
|
||||
"common/arm64/ihevc_intra_pred_filters_luma_mode_19_to_25.s",
|
||||
"common/arm64/ihevc_intra_pred_luma_mode_3_to_9.s",
|
||||
"common/arm64/ihevc_padding.s",
|
||||
"decoder/arm64/ihevcd_itrans_recon_dc_luma.s",
|
||||
"decoder/arm64/ihevcd_itrans_recon_dc_chroma.s",
|
||||
"common/arm64/ihevc_weighted_pred_bi.s",
|
||||
"common/arm64/ihevc_weighted_pred_bi_default.s",
|
||||
"common/arm64/ihevc_weighted_pred_uni.s",
|
||||
"decoder/arm/ihevcd_function_selector.c",
|
||||
"decoder/arm/ihevcd_function_selector_noneon.c",
|
||||
"decoder/arm64/ihevcd_fmt_conv_420sp_to_420p.s",
|
||||
"decoder/arm64/ihevcd_fmt_conv_420sp_to_420sp.s",
|
||||
"decoder/arm64/ihevcd_fmt_conv_420sp_to_rgba8888.s",
|
||||
"decoder/arm64/ihevcd_function_selector_av8.c",
|
||||
"decoder/arm64/ihevcd_itrans_recon_dc_chroma.s",
|
||||
"decoder/arm64/ihevcd_itrans_recon_dc_luma.s",
|
||||
],
|
||||
},
|
||||
|
||||
arm: {
|
||||
local_include_dirs: [
|
||||
"decoder/arm",
|
||||
"common/arm",
|
||||
"decoder/arm",
|
||||
],
|
||||
|
||||
srcs: [
|
||||
"decoder/arm/ihevcd_function_selector.c",
|
||||
"decoder/arm/ihevcd_function_selector_noneon.c",
|
||||
"common/arm/ihevc_deblk_chroma_horz.s",
|
||||
"common/arm/ihevc_deblk_chroma_vert.s",
|
||||
"common/arm/ihevc_deblk_luma_horz.s",
|
||||
"common/arm/ihevc_deblk_luma_vert.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_copy.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_copy_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_horz.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_horz_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_vert.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_vert_w16inp.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_vert_w16inp_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_vert_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_filters_luma_horz.s",
|
||||
"common/arm/ihevc_inter_pred_filters_luma_vert.s",
|
||||
"common/arm/ihevc_inter_pred_filters_luma_vert_w16inp.s",
|
||||
"common/arm/ihevc_inter_pred_luma_copy.s",
|
||||
"common/arm/ihevc_inter_pred_luma_copy_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_luma_horz_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_luma_vert_w16inp_w16out.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_dc.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_horz.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_mode2.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_mode_18_34.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_mode_27_to_33.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_mode_3_to_9.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_planar.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_ver.s",
|
||||
"common/arm/ihevc_intra_pred_filters_chroma_mode_11_to_17.s",
|
||||
"common/arm/ihevc_intra_pred_filters_chroma_mode_19_to_25.s",
|
||||
"common/arm/ihevc_intra_pred_filters_luma_mode_11_to_17.s",
|
||||
"common/arm/ihevc_intra_pred_filters_luma_mode_19_to_25.s",
|
||||
"common/arm/ihevc_intra_pred_filters_neon_intr.c",
|
||||
"common/arm/ihevc_intra_pred_luma_dc.s",
|
||||
"common/arm/ihevc_intra_pred_luma_horz.s",
|
||||
"common/arm/ihevc_intra_pred_luma_mode2.s",
|
||||
"common/arm/ihevc_intra_pred_luma_mode_18_34.s",
|
||||
"common/arm/ihevc_intra_pred_luma_mode_27_to_33.s",
|
||||
"common/arm/ihevc_intra_pred_luma_mode_3_to_9.s",
|
||||
"common/arm/ihevc_intra_pred_luma_planar.s",
|
||||
"common/arm/ihevc_intra_pred_luma_vert.s",
|
||||
"common/arm/ihevc_intra_ref_substitution_a9q.c",
|
||||
"common/arm/ihevc_itrans_recon_16x16.s",
|
||||
"common/arm/ihevc_itrans_recon_32x32.s",
|
||||
"common/arm/ihevc_itrans_recon_4x4.s",
|
||||
"common/arm/ihevc_itrans_recon_4x4_ttype1.s",
|
||||
"common/arm/ihevc_itrans_recon_8x8.s",
|
||||
"common/arm/ihevc_mem_fns.s",
|
||||
"common/arm/ihevc_padding.s",
|
||||
"common/arm/ihevc_sao_band_offset_chroma.s",
|
||||
"common/arm/ihevc_sao_band_offset_luma.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class0.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class0_chroma.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class1.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class1_chroma.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class2.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class2_chroma.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class3.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class3_chroma.s",
|
||||
"common/arm/ihevc_weighted_pred_bi.s",
|
||||
"common/arm/ihevc_weighted_pred_bi_default.s",
|
||||
"common/arm/ihevc_weighted_pred_neon_intr.c",
|
||||
"common/arm/ihevc_weighted_pred_uni.s",
|
||||
"decoder/arm/ihevcd_fmt_conv_420sp_to_420p.s",
|
||||
"decoder/arm/ihevcd_fmt_conv_420sp_to_420sp.s",
|
||||
"decoder/arm/ihevcd_function_selector_a9q.c",
|
||||
"decoder/arm/ihevcd_itrans_recon_dc_chroma.s",
|
||||
"decoder/arm/ihevcd_itrans_recon_dc_luma.s",
|
||||
],
|
||||
|
||||
cflags: [
|
||||
// Modules coded with neon intrinsics are not not included in Android Build.
|
||||
"-DDISABLE_NEONINTR",
|
||||
"-DARM",
|
||||
"-DARMGCC",
|
||||
"-fno-tree-vectorize",
|
||||
|
||||
// These will be overriden by armv7_a_neon
|
||||
"-DDISABLE_NEON",
|
||||
"-DDEFAULT_ARCH=D_ARCH_ARM_NONEON",
|
||||
"-DDEFAULT_ARCH=D_ARCH_ARM_A9Q",
|
||||
],
|
||||
|
||||
instruction_set: "arm",
|
||||
|
||||
neon: {
|
||||
srcs: [
|
||||
"decoder/arm/ihevcd_function_selector_a9q.c",
|
||||
"common/arm/ihevc_intra_ref_substitution_a9q.c",
|
||||
"common/arm/ihevc_intra_pred_filters_neon_intr.c",
|
||||
"common/arm/ihevc_weighted_pred_neon_intr.c",
|
||||
"common/arm/ihevc_mem_fns.s",
|
||||
"common/arm/ihevc_itrans_recon_32x32.s",
|
||||
"common/arm/ihevc_weighted_pred_bi_default.s",
|
||||
"common/arm/ihevc_weighted_pred_bi.s",
|
||||
"common/arm/ihevc_weighted_pred_uni.s",
|
||||
"common/arm/ihevc_deblk_luma_horz.s",
|
||||
"common/arm/ihevc_deblk_luma_vert.s",
|
||||
"common/arm/ihevc_deblk_chroma_vert.s",
|
||||
"common/arm/ihevc_deblk_chroma_horz.s",
|
||||
"common/arm/ihevc_sao_band_offset_luma.s",
|
||||
"common/arm/ihevc_sao_band_offset_chroma.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class0.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class0_chroma.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class1.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class1_chroma.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class2.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class2_chroma.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class3.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class3_chroma.s",
|
||||
"common/arm/ihevc_inter_pred_luma_horz_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_filters_luma_horz.s",
|
||||
"common/arm/ihevc_inter_pred_filters_luma_vert.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_horz.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_horz_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_vert.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_vert_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_vert_w16inp.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_vert_w16inp_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_filters_luma_vert_w16inp.s",
|
||||
"common/arm/ihevc_inter_pred_luma_vert_w16inp_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_luma_copy_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_luma_copy.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_copy.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_copy_w16out.s",
|
||||
"common/arm/ihevc_itrans_recon_4x4_ttype1.s",
|
||||
"common/arm/ihevc_itrans_recon_4x4.s",
|
||||
"common/arm/ihevc_itrans_recon_8x8.s",
|
||||
"common/arm/ihevc_itrans_recon_16x16.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_planar.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_dc.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_horz.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_ver.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_mode2.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_mode_18_34.s",
|
||||
"common/arm/ihevc_intra_pred_filters_chroma_mode_11_to_17.s",
|
||||
"common/arm/ihevc_intra_pred_filters_chroma_mode_19_to_25.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_mode_3_to_9.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_mode_27_to_33.s",
|
||||
"common/arm/ihevc_intra_pred_luma_planar.s",
|
||||
"common/arm/ihevc_intra_pred_luma_horz.s",
|
||||
"common/arm/ihevc_intra_pred_luma_mode2.s",
|
||||
"common/arm/ihevc_intra_pred_luma_mode_27_to_33.s",
|
||||
"common/arm/ihevc_intra_pred_luma_mode_18_34.s",
|
||||
"common/arm/ihevc_intra_pred_luma_vert.s",
|
||||
"common/arm/ihevc_intra_pred_luma_dc.s",
|
||||
"common/arm/ihevc_intra_pred_filters_luma_mode_11_to_17.s",
|
||||
"common/arm/ihevc_intra_pred_filters_luma_mode_19_to_25.s",
|
||||
"common/arm/ihevc_intra_pred_luma_mode_3_to_9.s",
|
||||
"common/arm/ihevc_padding.s",
|
||||
"decoder/arm/ihevcd_itrans_recon_dc_luma.s",
|
||||
"decoder/arm/ihevcd_itrans_recon_dc_chroma.s",
|
||||
"decoder/arm/ihevcd_fmt_conv_420sp_to_420p.s",
|
||||
"decoder/arm/ihevcd_fmt_conv_420sp_to_420sp.s",
|
||||
"decoder/arm/ihevcd_fmt_conv_420sp_to_rgba8888.s",
|
||||
],
|
||||
cflags: [
|
||||
"-UDISABLE_NEON",
|
||||
"-UDEFAULT_ARCH",
|
||||
"-DDEFAULT_ARCH=D_ARCH_ARM_A9Q",
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
x86_64: {
|
||||
|
|
@ -324,37 +312,37 @@ cc_library_static {
|
|||
],
|
||||
|
||||
local_include_dirs: [
|
||||
"decoder/x86",
|
||||
"common/x86",
|
||||
"decoder/x86",
|
||||
],
|
||||
|
||||
srcs: [
|
||||
"decoder/x86/ihevcd_function_selector.c",
|
||||
"decoder/x86/ihevcd_function_selector_generic.c",
|
||||
"decoder/x86/ihevcd_function_selector_ssse3.c",
|
||||
"decoder/x86/ihevcd_function_selector_sse42.c",
|
||||
"common/x86/ihevc_inter_pred_filters_ssse3_intr.c",
|
||||
"common/x86/ihevc_weighted_pred_ssse3_intr.c",
|
||||
"common/x86/ihevc_intra_pred_filters_ssse3_intr.c",
|
||||
"common/x86/ihevc_chroma_intra_pred_filters_ssse3_intr.c",
|
||||
"common/x86/ihevc_itrans_recon_ssse3_intr.c",
|
||||
"common/x86/ihevc_itrans_recon_16x16_ssse3_intr.c",
|
||||
"common/x86/ihevc_itrans_recon_32x32_ssse3_intr.c",
|
||||
"common/x86/ihevc_sao_ssse3_intr.c",
|
||||
"common/x86/ihevc_deblk_ssse3_intr.c",
|
||||
"common/x86/ihevc_padding_ssse3_intr.c",
|
||||
"common/x86/ihevc_mem_fns_ssse3_intr.c",
|
||||
"decoder/x86/ihevcd_fmt_conv_ssse3_intr.c",
|
||||
"decoder/x86/ihevcd_it_rec_dc_ssse3_intr.c",
|
||||
"common/x86/ihevc_inter_pred_filters_sse42_intr.c",
|
||||
"common/x86/ihevc_weighted_pred_sse42_intr.c",
|
||||
"common/x86/ihevc_intra_pred_filters_sse42_intr.c",
|
||||
"common/x86/ihevc_chroma_intra_pred_filters_sse42_intr.c",
|
||||
"common/x86/ihevc_itrans_recon_sse42_intr.c",
|
||||
"common/x86/ihevc_16x16_itrans_recon_sse42_intr.c",
|
||||
"common/x86/ihevc_32x32_itrans_recon_sse42_intr.c",
|
||||
"decoder/x86/ihevcd_it_rec_dc_sse42_intr.c",
|
||||
"common/x86/ihevc_chroma_intra_pred_filters_sse42_intr.c",
|
||||
"common/x86/ihevc_chroma_intra_pred_filters_ssse3_intr.c",
|
||||
"common/x86/ihevc_deblk_ssse3_intr.c",
|
||||
"common/x86/ihevc_inter_pred_filters_sse42_intr.c",
|
||||
"common/x86/ihevc_inter_pred_filters_ssse3_intr.c",
|
||||
"common/x86/ihevc_intra_pred_filters_sse42_intr.c",
|
||||
"common/x86/ihevc_intra_pred_filters_ssse3_intr.c",
|
||||
"common/x86/ihevc_itrans_recon_16x16_ssse3_intr.c",
|
||||
"common/x86/ihevc_itrans_recon_32x32_ssse3_intr.c",
|
||||
"common/x86/ihevc_itrans_recon_sse42_intr.c",
|
||||
"common/x86/ihevc_itrans_recon_ssse3_intr.c",
|
||||
"common/x86/ihevc_mem_fns_ssse3_intr.c",
|
||||
"common/x86/ihevc_padding_ssse3_intr.c",
|
||||
"common/x86/ihevc_sao_ssse3_intr.c",
|
||||
"common/x86/ihevc_tables_x86_intr.c",
|
||||
"common/x86/ihevc_weighted_pred_sse42_intr.c",
|
||||
"common/x86/ihevc_weighted_pred_ssse3_intr.c",
|
||||
"decoder/x86/ihevcd_fmt_conv_ssse3_intr.c",
|
||||
"decoder/x86/ihevcd_function_selector.c",
|
||||
"decoder/x86/ihevcd_function_selector_generic.c",
|
||||
"decoder/x86/ihevcd_function_selector_sse42.c",
|
||||
"decoder/x86/ihevcd_function_selector_ssse3.c",
|
||||
"decoder/x86/ihevcd_it_rec_dc_sse42_intr.c",
|
||||
"decoder/x86/ihevcd_it_rec_dc_ssse3_intr.c",
|
||||
],
|
||||
},
|
||||
|
||||
|
|
@ -368,37 +356,37 @@ cc_library_static {
|
|||
],
|
||||
|
||||
local_include_dirs: [
|
||||
"decoder/x86",
|
||||
"common/x86",
|
||||
"decoder/x86",
|
||||
],
|
||||
|
||||
srcs: [
|
||||
"decoder/x86/ihevcd_function_selector.c",
|
||||
"decoder/x86/ihevcd_function_selector_generic.c",
|
||||
"decoder/x86/ihevcd_function_selector_ssse3.c",
|
||||
"decoder/x86/ihevcd_function_selector_sse42.c",
|
||||
"common/x86/ihevc_inter_pred_filters_ssse3_intr.c",
|
||||
"common/x86/ihevc_weighted_pred_ssse3_intr.c",
|
||||
"common/x86/ihevc_intra_pred_filters_ssse3_intr.c",
|
||||
"common/x86/ihevc_chroma_intra_pred_filters_ssse3_intr.c",
|
||||
"common/x86/ihevc_itrans_recon_ssse3_intr.c",
|
||||
"common/x86/ihevc_itrans_recon_16x16_ssse3_intr.c",
|
||||
"common/x86/ihevc_itrans_recon_32x32_ssse3_intr.c",
|
||||
"common/x86/ihevc_sao_ssse3_intr.c",
|
||||
"common/x86/ihevc_deblk_ssse3_intr.c",
|
||||
"common/x86/ihevc_padding_ssse3_intr.c",
|
||||
"common/x86/ihevc_mem_fns_ssse3_intr.c",
|
||||
"decoder/x86/ihevcd_fmt_conv_ssse3_intr.c",
|
||||
"decoder/x86/ihevcd_it_rec_dc_ssse3_intr.c",
|
||||
"common/x86/ihevc_inter_pred_filters_sse42_intr.c",
|
||||
"common/x86/ihevc_weighted_pred_sse42_intr.c",
|
||||
"common/x86/ihevc_intra_pred_filters_sse42_intr.c",
|
||||
"common/x86/ihevc_chroma_intra_pred_filters_sse42_intr.c",
|
||||
"common/x86/ihevc_itrans_recon_sse42_intr.c",
|
||||
"common/x86/ihevc_16x16_itrans_recon_sse42_intr.c",
|
||||
"common/x86/ihevc_32x32_itrans_recon_sse42_intr.c",
|
||||
"decoder/x86/ihevcd_it_rec_dc_sse42_intr.c",
|
||||
"common/x86/ihevc_chroma_intra_pred_filters_sse42_intr.c",
|
||||
"common/x86/ihevc_chroma_intra_pred_filters_ssse3_intr.c",
|
||||
"common/x86/ihevc_deblk_ssse3_intr.c",
|
||||
"common/x86/ihevc_inter_pred_filters_sse42_intr.c",
|
||||
"common/x86/ihevc_inter_pred_filters_ssse3_intr.c",
|
||||
"common/x86/ihevc_intra_pred_filters_sse42_intr.c",
|
||||
"common/x86/ihevc_intra_pred_filters_ssse3_intr.c",
|
||||
"common/x86/ihevc_itrans_recon_16x16_ssse3_intr.c",
|
||||
"common/x86/ihevc_itrans_recon_32x32_ssse3_intr.c",
|
||||
"common/x86/ihevc_itrans_recon_sse42_intr.c",
|
||||
"common/x86/ihevc_itrans_recon_ssse3_intr.c",
|
||||
"common/x86/ihevc_mem_fns_ssse3_intr.c",
|
||||
"common/x86/ihevc_padding_ssse3_intr.c",
|
||||
"common/x86/ihevc_sao_ssse3_intr.c",
|
||||
"common/x86/ihevc_tables_x86_intr.c",
|
||||
"common/x86/ihevc_weighted_pred_sse42_intr.c",
|
||||
"common/x86/ihevc_weighted_pred_ssse3_intr.c",
|
||||
"decoder/x86/ihevcd_fmt_conv_ssse3_intr.c",
|
||||
"decoder/x86/ihevcd_function_selector.c",
|
||||
"decoder/x86/ihevcd_function_selector_generic.c",
|
||||
"decoder/x86/ihevcd_function_selector_sse42.c",
|
||||
"decoder/x86/ihevcd_function_selector_ssse3.c",
|
||||
"decoder/x86/ihevcd_it_rec_dc_sse42_intr.c",
|
||||
"decoder/x86/ihevcd_it_rec_dc_ssse3_intr.c",
|
||||
],
|
||||
},
|
||||
riscv64: {
|
||||
|
|
@ -418,7 +406,7 @@ cc_library_static {
|
|||
misc_undefined: ["bounds"],
|
||||
// Enable CFI if this becomes a shared library.
|
||||
cfi: true,
|
||||
config: {
|
||||
config: {
|
||||
cfi_assembly_support: true,
|
||||
},
|
||||
blocklist: "libhevc_blocklist.txt",
|
||||
|
|
@ -431,7 +419,7 @@ cc_library_static {
|
|||
min_sdk_version: "29",
|
||||
}
|
||||
|
||||
cc_test {
|
||||
cc_binary {
|
||||
name: "hevcdec",
|
||||
host_supported: true,
|
||||
cflags: [
|
||||
|
|
@ -442,7 +430,6 @@ cc_test {
|
|||
"-Wall",
|
||||
"-Werror",
|
||||
],
|
||||
gtest: false,
|
||||
srcs: ["test/decoder/main.c"],
|
||||
static_libs: ["libhevcdec"],
|
||||
target: {
|
||||
|
|
@ -454,16 +441,17 @@ cc_test {
|
|||
|
||||
cc_library_static {
|
||||
name: "libhevcenc",
|
||||
defaults: ["no_bti"],
|
||||
vendor_available: true,
|
||||
host_supported: true,
|
||||
cflags: [
|
||||
"-DENABLE_MAIN_REXT_PROFILE",
|
||||
"-DDISABLE_SEI",
|
||||
"-fPIC",
|
||||
"-O3",
|
||||
"-Wall",
|
||||
"-Wno-unused-variable",
|
||||
"-Wno-unused-parameter",
|
||||
"-Wno-switch",
|
||||
],
|
||||
|
||||
export_include_dirs: [
|
||||
|
|
@ -475,6 +463,7 @@ cc_library_static {
|
|||
"common/ihevc_cabac_tables.c",
|
||||
"common/ihevc_chroma_intra_pred_filters.c",
|
||||
"common/ihevc_chroma_itrans_recon.c",
|
||||
"common/ihevc_chroma_itrans_recon_32x32.c",
|
||||
"common/ihevc_chroma_itrans_recon_16x16.c",
|
||||
"common/ihevc_chroma_itrans_recon_8x8.c",
|
||||
"common/ihevc_common_tables.c",
|
||||
|
|
@ -591,31 +580,18 @@ cc_library_static {
|
|||
arm64: {
|
||||
|
||||
local_include_dirs: [
|
||||
"encoder/arm",
|
||||
"common/arm",
|
||||
"common/arm64",
|
||||
"encoder/arm",
|
||||
],
|
||||
|
||||
srcs: [
|
||||
"encoder/arm/ihevce_coarse_layer_sad_neon.c",
|
||||
"encoder/arm/ihevce_common_utils_neon.c",
|
||||
"encoder/arm/ihevce_copy_neon.c",
|
||||
"encoder/arm/ihevce_had_compute_neon.c",
|
||||
"encoder/arm/ihevce_hme_utils_neon.c",
|
||||
"encoder/arm/ihevce_itrans_recon_neon.c",
|
||||
"encoder/arm/ihevce_me_neon.c",
|
||||
"encoder/arm/ihevce_sad_compute_neon.c",
|
||||
"encoder/arm/ihevce_scale_by_2_neon.c",
|
||||
"encoder/arm/ihevce_scan_coeffs_neon.c",
|
||||
"encoder/arm/ihevce_ssd_and_sad_calculator_neon.c",
|
||||
"encoder/arm/ihevce_ssd_calculator_neon.c",
|
||||
"encoder/arm/ihevce_subpel_neon.c",
|
||||
"common/arm/ihevc_intra_pred_filters_neon_intr.c",
|
||||
"common/arm/ihevc_intra_ref_substitution_a9q.c",
|
||||
"common/arm/ihevc_quant_iquant_ssd_neon_intr.c",
|
||||
"common/arm/ihevc_resi_trans_neon.c",
|
||||
"common/arm/ihevc_resi_trans_neon_32x32.c",
|
||||
"common/arm/ihevc_quant_iquant_ssd_neon_intr.c",
|
||||
"common/arm/ihevc_intra_pred_filters_neon_intr.c",
|
||||
"common/arm/ihevc_weighted_pred_neon_intr.c",
|
||||
"common/arm/ihevc_intra_ref_substitution_a9q.c",
|
||||
"common/arm64/ihevc_deblk_chroma_horz.s",
|
||||
"common/arm64/ihevc_deblk_chroma_vert.s",
|
||||
"common/arm64/ihevc_deblk_luma_horz.s",
|
||||
|
|
@ -676,6 +652,19 @@ cc_library_static {
|
|||
"common/arm64/ihevc_weighted_pred_bi.s",
|
||||
"common/arm64/ihevc_weighted_pred_bi_default.s",
|
||||
"common/arm64/ihevc_weighted_pred_uni.s",
|
||||
"encoder/arm/ihevce_coarse_layer_sad_neon.c",
|
||||
"encoder/arm/ihevce_common_utils_neon.c",
|
||||
"encoder/arm/ihevce_copy_neon.c",
|
||||
"encoder/arm/ihevce_had_compute_neon.c",
|
||||
"encoder/arm/ihevce_hme_utils_neon.c",
|
||||
"encoder/arm/ihevce_itrans_recon_neon.c",
|
||||
"encoder/arm/ihevce_me_neon.c",
|
||||
"encoder/arm/ihevce_sad_compute_neon.c",
|
||||
"encoder/arm/ihevce_scale_by_2_neon.c",
|
||||
"encoder/arm/ihevce_scan_coeffs_neon.c",
|
||||
"encoder/arm/ihevce_ssd_and_sad_calculator_neon.c",
|
||||
"encoder/arm/ihevce_ssd_calculator_neon.c",
|
||||
"encoder/arm/ihevce_subpel_neon.c",
|
||||
],
|
||||
|
||||
cflags: [
|
||||
|
|
@ -687,101 +676,98 @@ cc_library_static {
|
|||
|
||||
arm: {
|
||||
local_include_dirs: [
|
||||
"encoder/arm",
|
||||
"common/arm",
|
||||
"encoder/arm",
|
||||
],
|
||||
|
||||
srcs: [
|
||||
"common/arm/ihevc_deblk_chroma_horz.s",
|
||||
"common/arm/ihevc_deblk_chroma_vert.s",
|
||||
"common/arm/ihevc_deblk_luma_horz.s",
|
||||
"common/arm/ihevc_deblk_luma_vert.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_copy.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_copy_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_horz.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_horz_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_vert.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_vert_w16inp.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_vert_w16inp_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_vert_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_filters_luma_horz.s",
|
||||
"common/arm/ihevc_inter_pred_filters_luma_vert.s",
|
||||
"common/arm/ihevc_inter_pred_filters_luma_vert_w16inp.s",
|
||||
"common/arm/ihevc_inter_pred_luma_copy.s",
|
||||
"common/arm/ihevc_inter_pred_luma_copy_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_luma_horz_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_luma_vert_w16inp_w16out.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_dc.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_horz.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_mode2.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_mode_18_34.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_mode_27_to_33.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_mode_3_to_9.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_planar.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_ver.s",
|
||||
"common/arm/ihevc_intra_pred_filters_chroma_mode_11_to_17.s",
|
||||
"common/arm/ihevc_intra_pred_filters_chroma_mode_19_to_25.s",
|
||||
"common/arm/ihevc_intra_pred_filters_luma_mode_11_to_17.s",
|
||||
"common/arm/ihevc_intra_pred_filters_luma_mode_19_to_25.s",
|
||||
"common/arm/ihevc_intra_pred_filters_neon_intr.c",
|
||||
"common/arm/ihevc_intra_pred_luma_dc.s",
|
||||
"common/arm/ihevc_intra_pred_luma_horz.s",
|
||||
"common/arm/ihevc_intra_pred_luma_mode2.s",
|
||||
"common/arm/ihevc_intra_pred_luma_mode_18_34.s",
|
||||
"common/arm/ihevc_intra_pred_luma_mode_27_to_33.s",
|
||||
"common/arm/ihevc_intra_pred_luma_mode_3_to_9.s",
|
||||
"common/arm/ihevc_intra_pred_luma_planar.s",
|
||||
"common/arm/ihevc_intra_pred_luma_vert.s",
|
||||
"common/arm/ihevc_intra_ref_substitution_a9q.c",
|
||||
"common/arm/ihevc_itrans_recon_16x16.s",
|
||||
"common/arm/ihevc_itrans_recon_32x32.s",
|
||||
"common/arm/ihevc_itrans_recon_4x4.s",
|
||||
"common/arm/ihevc_itrans_recon_4x4_ttype1.s",
|
||||
"common/arm/ihevc_itrans_recon_8x8.s",
|
||||
"common/arm/ihevc_mem_fns.s",
|
||||
"common/arm/ihevc_padding.s",
|
||||
"common/arm/ihevc_quant_iquant_ssd_neon_intr.c",
|
||||
"common/arm/ihevc_resi_trans.s",
|
||||
"common/arm/ihevc_resi_trans_32x32_a9q.s",
|
||||
"common/arm/ihevc_resi_trans_neon.c",
|
||||
"common/arm/ihevc_resi_trans_neon_32x32.c",
|
||||
"common/arm/ihevc_sao_band_offset_chroma.s",
|
||||
"common/arm/ihevc_sao_band_offset_luma.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class0.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class0_chroma.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class1.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class1_chroma.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class2.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class2_chroma.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class3.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class3_chroma.s",
|
||||
"common/arm/ihevc_weighted_pred_bi.s",
|
||||
"common/arm/ihevc_weighted_pred_bi_default.s",
|
||||
"common/arm/ihevc_weighted_pred_neon_intr.c",
|
||||
"common/arm/ihevc_weighted_pred_uni.s",
|
||||
"encoder/arm/ihevce_coarse_layer_sad_neon.c",
|
||||
"encoder/arm/ihevce_common_utils_neon.c",
|
||||
"encoder/arm/ihevce_copy_neon.c",
|
||||
"encoder/arm/ihevce_had_compute_neon.c",
|
||||
"encoder/arm/ihevce_hme_utils_neon.c",
|
||||
"encoder/arm/ihevce_itrans_recon_neon.c",
|
||||
"encoder/arm/ihevce_me_neon.c",
|
||||
"encoder/arm/ihevce_sad_compute_neon.c",
|
||||
"encoder/arm/ihevce_scale_by_2_neon.c",
|
||||
"encoder/arm/ihevce_scan_coeffs_neon.c",
|
||||
"encoder/arm/ihevce_ssd_and_sad_calculator_neon.c",
|
||||
"encoder/arm/ihevce_ssd_calculator_neon.c",
|
||||
"encoder/arm/ihevce_subpel_neon.c",
|
||||
],
|
||||
|
||||
cflags: [
|
||||
"-DENABLE_NEON",
|
||||
"-DARM",
|
||||
],
|
||||
instruction_set: "arm",
|
||||
|
||||
neon: {
|
||||
srcs: [
|
||||
"encoder/arm/ihevce_coarse_layer_sad_neon.c",
|
||||
"encoder/arm/ihevce_common_utils_neon.c",
|
||||
"encoder/arm/ihevce_copy_neon.c",
|
||||
"encoder/arm/ihevce_had_compute_neon.c",
|
||||
"encoder/arm/ihevce_hme_utils_neon.c",
|
||||
"encoder/arm/ihevce_itrans_recon_neon.c",
|
||||
"encoder/arm/ihevce_me_neon.c",
|
||||
"encoder/arm/ihevce_sad_compute_neon.c",
|
||||
"encoder/arm/ihevce_scale_by_2_neon.c",
|
||||
"encoder/arm/ihevce_scan_coeffs_neon.c",
|
||||
"encoder/arm/ihevce_ssd_and_sad_calculator_neon.c",
|
||||
"encoder/arm/ihevce_ssd_calculator_neon.c",
|
||||
"encoder/arm/ihevce_subpel_neon.c",
|
||||
"common/arm/ihevc_resi_trans_neon.c",
|
||||
"common/arm/ihevc_resi_trans_neon_32x32.c",
|
||||
"common/arm/ihevc_quant_iquant_ssd_neon_intr.c",
|
||||
"common/arm/ihevc_intra_pred_filters_neon_intr.c",
|
||||
"common/arm/ihevc_weighted_pred_neon_intr.c",
|
||||
"common/arm/ihevc_intra_ref_substitution_a9q.c",
|
||||
"common/arm/ihevc_deblk_chroma_horz.s",
|
||||
"common/arm/ihevc_deblk_chroma_vert.s",
|
||||
"common/arm/ihevc_deblk_luma_horz.s",
|
||||
"common/arm/ihevc_deblk_luma_vert.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_copy.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_copy_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_horz.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_horz_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_vert.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_vert_w16inp.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_vert_w16inp_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_chroma_vert_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_filters_luma_horz.s",
|
||||
"common/arm/ihevc_inter_pred_filters_luma_vert.s",
|
||||
"common/arm/ihevc_inter_pred_filters_luma_vert_w16inp.s",
|
||||
"common/arm/ihevc_inter_pred_luma_copy.s",
|
||||
"common/arm/ihevc_inter_pred_luma_copy_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_luma_horz_w16out.s",
|
||||
"common/arm/ihevc_inter_pred_luma_vert_w16inp_w16out.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_dc.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_horz.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_mode2.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_mode_18_34.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_mode_27_to_33.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_mode_3_to_9.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_planar.s",
|
||||
"common/arm/ihevc_intra_pred_chroma_ver.s",
|
||||
"common/arm/ihevc_intra_pred_filters_chroma_mode_11_to_17.s",
|
||||
"common/arm/ihevc_intra_pred_filters_chroma_mode_19_to_25.s",
|
||||
"common/arm/ihevc_intra_pred_filters_luma_mode_11_to_17.s",
|
||||
"common/arm/ihevc_intra_pred_filters_luma_mode_19_to_25.s",
|
||||
"common/arm/ihevc_intra_pred_luma_dc.s",
|
||||
"common/arm/ihevc_intra_pred_luma_horz.s",
|
||||
"common/arm/ihevc_intra_pred_luma_mode2.s",
|
||||
"common/arm/ihevc_intra_pred_luma_mode_18_34.s",
|
||||
"common/arm/ihevc_intra_pred_luma_mode_27_to_33.s",
|
||||
"common/arm/ihevc_intra_pred_luma_mode_3_to_9.s",
|
||||
"common/arm/ihevc_intra_pred_luma_planar.s",
|
||||
"common/arm/ihevc_intra_pred_luma_vert.s",
|
||||
"common/arm/ihevc_itrans_recon_16x16.s",
|
||||
"common/arm/ihevc_itrans_recon_32x32.s",
|
||||
"common/arm/ihevc_itrans_recon_4x4.s",
|
||||
"common/arm/ihevc_itrans_recon_4x4_ttype1.s",
|
||||
"common/arm/ihevc_itrans_recon_8x8.s",
|
||||
"common/arm/ihevc_resi_trans.s",
|
||||
"common/arm/ihevc_resi_trans_32x32_a9q.s",
|
||||
"common/arm/ihevc_mem_fns.s",
|
||||
"common/arm/ihevc_padding.s",
|
||||
"common/arm/ihevc_sao_band_offset_chroma.s",
|
||||
"common/arm/ihevc_sao_band_offset_luma.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class0.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class0_chroma.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class1.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class1_chroma.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class2.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class2_chroma.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class3.s",
|
||||
"common/arm/ihevc_sao_edge_offset_class3_chroma.s",
|
||||
"common/arm/ihevc_weighted_pred_bi_default.s",
|
||||
"common/arm/ihevc_weighted_pred_bi.s",
|
||||
"common/arm/ihevc_weighted_pred_uni.s",
|
||||
],
|
||||
|
||||
cflags: [
|
||||
"-DENABLE_NEON",
|
||||
"-DARM",
|
||||
],
|
||||
},
|
||||
},
|
||||
|
||||
x86_64: {
|
||||
|
|
@ -807,7 +793,7 @@ cc_library_static {
|
|||
misc_undefined: ["bounds"],
|
||||
// Enable CFI if this becomes a shared library.
|
||||
cfi: true,
|
||||
config: {
|
||||
config: {
|
||||
cfi_assembly_support: true,
|
||||
},
|
||||
blocklist: "libhevc_blocklist.txt",
|
||||
|
|
@ -820,7 +806,7 @@ cc_library_static {
|
|||
min_sdk_version: "29",
|
||||
}
|
||||
|
||||
cc_test {
|
||||
cc_binary {
|
||||
name: "hevcenc",
|
||||
host_supported: true,
|
||||
cflags: [
|
||||
|
|
@ -829,7 +815,6 @@ cc_test {
|
|||
"-Wall",
|
||||
"-Werror",
|
||||
],
|
||||
gtest: false,
|
||||
srcs: ["test/encoder/main.c"],
|
||||
static_libs: ["libhevcenc"],
|
||||
sanitize: {
|
||||
|
|
|
|||
|
|
@ -1,6 +1,17 @@
|
|||
cmake_minimum_required(VERSION 3.9.1)
|
||||
project(libhevc C CXX)
|
||||
enable_language(ASM)
|
||||
|
||||
if(NOT DEFINED SYSTEM_NAME)
|
||||
set(SYSTEM_NAME ${CMAKE_HOST_SYSTEM_NAME})
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED SYSTEM_PROCESSOR)
|
||||
set(SYSTEM_PROCESSOR ${CMAKE_HOST_SYSTEM_PROCESSOR})
|
||||
endif()
|
||||
|
||||
if(NOT "${SYSTEM_NAME}" STREQUAL "Darwin")
|
||||
enable_language(ASM)
|
||||
endif()
|
||||
|
||||
set(HEVC_ROOT "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||
set(HEVC_CONFIG_DIR "${CMAKE_CURRENT_BINARY_DIR}")
|
||||
|
|
@ -31,6 +42,7 @@ endif()
|
|||
include("${HEVC_ROOT}/cmake/utils.cmake")
|
||||
|
||||
libhevc_add_compile_options()
|
||||
libhevc_add_gtest()
|
||||
libhevc_add_definitions()
|
||||
libhevc_set_link_libraries()
|
||||
|
||||
|
|
@ -43,3 +55,5 @@ include("${HEVC_ROOT}/test/encoder/hevcenc.cmake")
|
|||
|
||||
include("${HEVC_ROOT}/fuzzer/hevc_dec_fuzzer.cmake")
|
||||
include("${HEVC_ROOT}/fuzzer/hevc_enc_fuzzer.cmake")
|
||||
|
||||
include("${HEVC_ROOT}/tests/common/common.cmake")
|
||||
|
|
|
|||
1
OWNERS
1
OWNERS
|
|
@ -1,3 +1,4 @@
|
|||
# owners for external/libhevc
|
||||
include platform/frameworks/av:/media/janitors/avic_OWNERS
|
||||
include platform/frameworks/av:/media/janitors/codec_OWNERS
|
||||
essick@google.com
|
||||
|
|
|
|||
28
README.md
28
README.md
|
|
@ -7,6 +7,8 @@ Supports:
|
|||
- aarch32/aarch64 on Linux.
|
||||
- aarch32/aarch64 on Android.
|
||||
- x86_32/x86_64 on Linux.
|
||||
- aarch64 on Mac.
|
||||
- x86_64 on Mac.
|
||||
|
||||
## Native Builds
|
||||
Use the following commands for building on the target machine
|
||||
|
|
@ -51,3 +53,29 @@ $ make
|
|||
$ cmake .. -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/aarch32_toolchain.cmake
|
||||
$ make
|
||||
```
|
||||
|
||||
### Building for android
|
||||
NOTE: This assumes that you are building on a machine that has
|
||||
[Android NDK](https://developer.android.com/ndk/downloads).
|
||||
|
||||
```
|
||||
$ cd external/libhevc
|
||||
$ mkdir build
|
||||
$ cd build
|
||||
```
|
||||
|
||||
#### Armv7 (32-bit)
|
||||
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/android_toolchain.cmake\
|
||||
-DHEVC_ANDROID_NDK_PATH=/opt/android-ndk-r26d/\
|
||||
-DANDROID_ABI=armeabi-v7a\
|
||||
-DANDROID_PLATFORM=android-23 ../
|
||||
make
|
||||
|
||||
#### Armv8 (64-bit)
|
||||
|
||||
cmake -DCMAKE_TOOLCHAIN_FILE=../cmake/toolchains/android_toolchain.cmake\
|
||||
-DHEVC_ANDROID_NDK_PATH=/opt/android-ndk-r26d/\
|
||||
-DANDROID_ABI=arm64-v8a\
|
||||
-DANDROID_PLATFORM=android-23 ../
|
||||
make
|
||||
|
|
|
|||
|
|
@ -1,7 +1,10 @@
|
|||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_PROCESSOR aarch32)
|
||||
set(SYSTEM_NAME Linux)
|
||||
set(SYSTEM_PROCESSOR aarch32)
|
||||
|
||||
# Modify these variables with paths to appropriate compilers that can produce
|
||||
# armv7 targets
|
||||
set(CMAKE_C_COMPILER arm-linux-gnueabihf-gcc)
|
||||
set(CMAKE_CXX_COMPILER arm-linux-gnueabihf-g++)
|
||||
|
||||
# Build all binaries as static, so that they can be run using qemu
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-static")
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
set(CMAKE_SYSTEM_NAME Linux)
|
||||
set(CMAKE_SYSTEM_PROCESSOR aarch64)
|
||||
set(SYSTEM_NAME Linux)
|
||||
set(SYSTEM_PROCESSOR aarch64)
|
||||
|
||||
# Modify these variables with paths to appropriate compilers that can produce
|
||||
# armv8 targets
|
||||
|
|
@ -11,3 +11,6 @@ set(CMAKE_C_COMPILER_AR
|
|||
set(CMAKE_CXX_COMPILER_AR
|
||||
aarch64-linux-gnu-gcc-ar
|
||||
CACHE FILEPATH "Archiver")
|
||||
|
||||
# Build all binaries as static, so that they can be run using qemu
|
||||
set(CMAKE_EXE_LINKER_FLAGS "-static")
|
||||
|
|
|
|||
34
cmake/toolchains/android_toolchain.cmake
Normal file
34
cmake/toolchains/android_toolchain.cmake
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
set(SYSTEM_NAME Android)
|
||||
set(CMAKE_SYSTEM_NAME Android)
|
||||
|
||||
if(NOT ANDROID_PLATFORM)
|
||||
set(ANDROID_PLATFORM android-23)
|
||||
endif()
|
||||
|
||||
# Choose target architecture with:
|
||||
# -DANDROID_ABI={armeabi-v7a, arm64-v8a, x86, x86_64}
|
||||
if(NOT ANDROID_ABI)
|
||||
set(ANDROID_ABI arm64-v8a)
|
||||
endif()
|
||||
|
||||
if(ANDROID_ABI MATCHES "^armeabi")
|
||||
set(SYSTEM_PROCESSOR aarch32)
|
||||
else()
|
||||
set(SYSTEM_PROCESSOR aarch64)
|
||||
endif()
|
||||
|
||||
# Toolchain files don't have access to cached variables:
|
||||
# https://gitlab.kitware.com/cmake/cmake/issues/16170. Set an intermediate
|
||||
# environment variable when loaded the first time.
|
||||
if(HEVC_ANDROID_NDK_PATH)
|
||||
set(ENV{HEVC_ANDROID_NDK_PATH} "${HEVC_ANDROID_NDK_PATH}")
|
||||
else()
|
||||
set(HEVC_ANDROID_NDK_PATH "$ENV{HEVC_ANDROID_NDK_PATH}")
|
||||
endif()
|
||||
|
||||
if(NOT HEVC_ANDROID_NDK_PATH)
|
||||
message(FATAL_ERROR "HEVC_ANDROID_NDK_PATH not set.")
|
||||
return()
|
||||
endif()
|
||||
|
||||
include("${HEVC_ANDROID_NDK_PATH}/build/cmake/android.toolchain.cmake")
|
||||
|
|
@ -2,9 +2,9 @@ include(CheckCXXCompilerFlag)
|
|||
|
||||
# Adds compiler options for all targets
|
||||
function(libhevc_add_compile_options)
|
||||
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
|
||||
if("${SYSTEM_PROCESSOR}" STREQUAL "aarch64" OR "${SYSTEM_PROCESSOR}" STREQUAL "arm64")
|
||||
add_compile_options(-march=armv8-a)
|
||||
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch32")
|
||||
elseif("${SYSTEM_PROCESSOR}" STREQUAL "aarch32")
|
||||
add_compile_options(-march=armv7-a -mfpu=neon)
|
||||
else()
|
||||
add_compile_options(-msse4.2 -mno-avx)
|
||||
|
|
@ -32,9 +32,15 @@ endfunction()
|
|||
|
||||
# Adds defintions for all targets
|
||||
function(libhevc_add_definitions)
|
||||
if(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch64")
|
||||
if("${SYSTEM_NAME}" STREQUAL "Darwin")
|
||||
if("${SYSTEM_PROCESSOR}" STREQUAL "arm64")
|
||||
add_definitions(-DARMV8 -DDARWIN -DDEFAULT_ARCH=D_ARCH_ARMV8_GENERIC)
|
||||
else()
|
||||
add_definitions(-DX86 -DDARWIN -DDISABLE_AVX2 -DDEFAULT_ARCH=D_ARCH_X86_GENERIC)
|
||||
endif()
|
||||
elseif("${SYSTEM_PROCESSOR}" STREQUAL "aarch64")
|
||||
add_definitions(-DARMV8 -DDEFAULT_ARCH=D_ARCH_ARMV8_GENERIC -DENABLE_NEON)
|
||||
elseif(${CMAKE_SYSTEM_PROCESSOR} STREQUAL "aarch32")
|
||||
elseif("${SYSTEM_PROCESSOR}" STREQUAL "aarch32")
|
||||
add_definitions(-DARMV7 -DDEFAULT_ARCH=D_ARCH_ARM_A9Q -DENABLE_NEON
|
||||
-DDISABLE_NEONINTR)
|
||||
else()
|
||||
|
|
@ -112,3 +118,35 @@ endfunction()
|
|||
function(libhevc_add_fuzzer NAME LIB)
|
||||
libhevc_add_executable(${NAME} ${LIB} FUZZER 1 ${ARGV})
|
||||
endfunction()
|
||||
|
||||
# Adds GoogleTest and Threads dependency
|
||||
function(libhevc_add_gtest)
|
||||
include(FetchContent)
|
||||
FetchContent_Declare(
|
||||
googletest
|
||||
URL https://github.com/google/googletest/archive/03597a01ee50ed33e9dfd640b249b4be3799d395.zip
|
||||
)
|
||||
# For Windows: Prevent overriding the parent project's compiler/linker settings
|
||||
set(gtest_force_shared_crt ON CACHE BOOL "" FORCE)
|
||||
FetchContent_MakeAvailable(googletest)
|
||||
endfunction()
|
||||
|
||||
# cmake-format: off
|
||||
# Adds a target for a gtest executable
|
||||
#
|
||||
# Arguments:
|
||||
# NAME: Name of the executable
|
||||
#
|
||||
# Optional Arguments:
|
||||
# SOURCES: Additional source files
|
||||
# cmake-format: on
|
||||
function(libhevc_add_gtest_executable NAME)
|
||||
set(multi_value_args SOURCES)
|
||||
cmake_parse_arguments(ARG "" "" "${multi_value_args}" ${ARGN})
|
||||
|
||||
libhevc_add_executable(
|
||||
${NAME} libhevcdec
|
||||
SOURCES ${HEVC_ROOT}/tests/common/func_selector.cc
|
||||
${HEVC_ROOT}/tests/common/tests_common.cc ${ARG_SOURCES}
|
||||
LIBS GTest::gtest_main)
|
||||
endfunction()
|
||||
|
|
|
|||
|
|
@ -438,6 +438,11 @@ void ihevc_intra_pred_luma_ref_substitution_neonintr(UWORD8 *pu1_top_left,
|
|||
* @param[in] mode
|
||||
* integer intraprediction mode
|
||||
*
|
||||
* @param[in] intra_smoothing_flags
|
||||
* integer bit 3 indicates if intra smoothing is enabled/disabled
|
||||
* unconditionally. this is applicable to frext profiles only
|
||||
* bit 0 indicates strong intra smoothing enabled/disabled
|
||||
*
|
||||
* @returns
|
||||
*
|
||||
* @remarks
|
||||
|
|
@ -451,7 +456,7 @@ void ihevc_intra_pred_ref_filtering_neonintr(UWORD8 *pu1_src,
|
|||
WORD32 nt,
|
||||
UWORD8 *pu1_dst,
|
||||
WORD32 mode,
|
||||
WORD32 strong_intra_smoothing_enable_flag)
|
||||
WORD32 intra_smoothing_flags)
|
||||
{
|
||||
WORD32 filter_flag;
|
||||
WORD32 i = 0;
|
||||
|
|
@ -475,10 +480,12 @@ void ihevc_intra_pred_ref_filtering_neonintr(UWORD8 *pu1_src,
|
|||
WORD32 abs_cond_left_flag = 0;
|
||||
WORD32 abs_cond_top_flag = 0;
|
||||
WORD32 dc_val = 1 << (BIT_DEPTH - 5);
|
||||
WORD32 intra_smoothing_disabled = (intra_smoothing_flags >> 3);
|
||||
WORD32 strong_intra_smoothing_enable_flag = intra_smoothing_flags & 1;
|
||||
|
||||
shift_res = vdup_n_u8(0);
|
||||
|
||||
filter_flag = gau1_intra_pred_ref_filter[mode] & (1 << (CTZ(nt) - 2));
|
||||
|
||||
filter_flag = intra_smoothing_disabled ?
|
||||
0 : (gau1_intra_pred_ref_filter[mode] & (1 << (CTZ(nt) - 2)));
|
||||
if(0 == filter_flag)
|
||||
{
|
||||
if(pu1_src == pu1_dst)
|
||||
|
|
|
|||
|
|
@ -103,7 +103,8 @@ void ihevc_intra_pred_chroma_ref_substitution_a9q(UWORD8 *pu1_top_left,
|
|||
WORD32 nt,
|
||||
WORD32 nbr_flags,
|
||||
UWORD8 *pu1_dst,
|
||||
WORD32 dst_strd)
|
||||
WORD32 dst_strd,
|
||||
WORD32 chroma_format_idc)
|
||||
{
|
||||
UWORD8 pu1_ref_u, pu1_ref_v;
|
||||
WORD32 dc_val, i, j;
|
||||
|
|
@ -180,7 +181,7 @@ void ihevc_intra_pred_chroma_ref_substitution_a9q(UWORD8 *pu1_top_left,
|
|||
// U-V interleaved Top-top right samples
|
||||
}
|
||||
|
||||
if(nt == 4)
|
||||
if(nt == 4 || (nt == 8 && chroma_format_idc == CHROMA_FMT_IDC_YUV444))
|
||||
{
|
||||
/* 1 bit extraction for all the neighboring blocks */
|
||||
tp_left = (nbr_flags & 0x10000) >> 16;
|
||||
|
|
@ -248,8 +249,9 @@ void ihevc_intra_pred_chroma_ref_substitution_a9q(UWORD8 *pu1_top_left,
|
|||
|
||||
}
|
||||
}
|
||||
else if(nt == 8)
|
||||
else if(nt == 8 || (nt == 16 && chroma_format_idc == CHROMA_FMT_IDC_YUV444))
|
||||
{
|
||||
WORD32 sub_sample = chroma_format_idc == CHROMA_FMT_IDC_YUV444 ? 2 : 1;
|
||||
WORD32 nbr_flags_temp = 0;
|
||||
nbr_flags_temp = ((nbr_flags & 0xC) >> 2) + ((nbr_flags & 0xC0) >> 4)
|
||||
+ ((nbr_flags & 0x300) >> 4)
|
||||
|
|
@ -259,16 +261,16 @@ void ihevc_intra_pred_chroma_ref_substitution_a9q(UWORD8 *pu1_top_left,
|
|||
/* compute trailing zeors based on nbr_flag for substitution process of below left see section .*/
|
||||
/* as each bit in nbr flags corresponds to 8 pels for bot_left, left, top and topright but 1 pel for topleft */
|
||||
{
|
||||
nbr_id_from_bl = look_up_trailing_zeros(nbr_flags_temp & 0XF) * 4; /* for bottom left and left */
|
||||
if(nbr_id_from_bl == 32)
|
||||
nbr_id_from_bl = 16;
|
||||
if(nbr_id_from_bl == 16)
|
||||
nbr_id_from_bl = look_up_trailing_zeros(nbr_flags_temp & 0XF) * (4 * sub_sample); /* for bottom left and left */
|
||||
if(nbr_id_from_bl == 32 * sub_sample)
|
||||
nbr_id_from_bl = 16 * sub_sample;
|
||||
if(nbr_id_from_bl == 16 * sub_sample)
|
||||
{
|
||||
/* for top left : 1 pel per nbr bit */
|
||||
if(!((nbr_flags_temp >> 8) & 0x1))
|
||||
{
|
||||
nbr_id_from_bl++;
|
||||
nbr_id_from_bl += look_up_trailing_zeros((nbr_flags_temp >> 4) & 0xF) * 4; /* top and top right; 8 pels per nbr bit */
|
||||
nbr_id_from_bl += look_up_trailing_zeros((nbr_flags_temp >> 4) & 0xF) * 4 * sub_sample; /* top and top right; 8 pels per nbr bit */
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -287,14 +289,14 @@ void ihevc_intra_pred_chroma_ref_substitution_a9q(UWORD8 *pu1_top_left,
|
|||
}
|
||||
|
||||
/* for the loop of 4*Nt+1 pixels (excluding pixels computed from reverse substitution) */
|
||||
while(nbr_id_from_bl < ((T8C_4NT)+1))
|
||||
while(nbr_id_from_bl < ((T8C_4NT * sub_sample)+1))
|
||||
{
|
||||
/* To Obtain the next unavailable idx flag after reverse neighbor substitution */
|
||||
/* Divide by 8 to obtain the original index */
|
||||
frwd_nbr_flag = (nbr_id_from_bl >> 2); /*+ (nbr_id_from_bl & 0x1);*/
|
||||
frwd_nbr_flag = (nbr_id_from_bl >> (chroma_format_idc == CHROMA_FMT_IDC_YUV444 ? 3 : 2)); /*+ (nbr_id_from_bl & 0x1);*/
|
||||
|
||||
/* The Top-left flag is at the last bit location of nbr_flags*/
|
||||
if(nbr_id_from_bl == (T8C_4NT / 2))
|
||||
if(nbr_id_from_bl == (T8C_4NT * sub_sample / 2))
|
||||
{
|
||||
get_bits = GET_BIT(nbr_flags_temp, 8);
|
||||
|
||||
|
|
@ -313,22 +315,23 @@ void ihevc_intra_pred_chroma_ref_substitution_a9q(UWORD8 *pu1_top_left,
|
|||
UWORD16 *pu2_dst;
|
||||
/* 8 pel substitution (other than TL) */
|
||||
pu2_dst = (UWORD16 *)&pu1_dst[(2 * nbr_id_from_bl) - 2];
|
||||
ihevc_memset_16bit_a9q((UWORD16 *)(pu1_dst + (2 * nbr_id_from_bl)), pu2_dst[0], 4);
|
||||
ihevc_memset_16bit_a9q((UWORD16 *)(pu1_dst + (2 * nbr_id_from_bl)), pu2_dst[0], 4 * sub_sample);
|
||||
}
|
||||
|
||||
}
|
||||
nbr_id_from_bl += (nbr_id_from_bl == (T8C_4NT / 2)) ? 1 : 4;
|
||||
nbr_id_from_bl += (nbr_id_from_bl == (T8C_4NT * sub_sample / 2)) ? 1 : 4 * sub_sample;
|
||||
}
|
||||
|
||||
}
|
||||
else if(nt == 16)
|
||||
else if(nt == 16 || (nt == 32 && chroma_format_idc == CHROMA_FMT_IDC_YUV444))
|
||||
{
|
||||
WORD32 sub_sample = chroma_format_idc == CHROMA_FMT_IDC_YUV444 ? 2 : 1;
|
||||
/* compute trailing ones based on mbr_flag for substitution process of below left see section .*/
|
||||
/* as each bit in nbr flags corresponds to 4 pels for bot_left, left, top and topright but 1 pel for topleft */
|
||||
{
|
||||
nbr_id_from_bl = look_up_trailing_zeros((nbr_flags & 0XFF)) * 4; /* for bottom left and left */
|
||||
nbr_id_from_bl = look_up_trailing_zeros((nbr_flags & 0XFF)) * 4 * sub_sample; /* for bottom left and left */
|
||||
|
||||
if(nbr_id_from_bl == 32)
|
||||
if(nbr_id_from_bl == 32 * sub_sample)
|
||||
{
|
||||
/* for top left : 1 pel per nbr bit */
|
||||
if(!((nbr_flags >> 16) & 0x1))
|
||||
|
|
@ -336,7 +339,7 @@ void ihevc_intra_pred_chroma_ref_substitution_a9q(UWORD8 *pu1_top_left,
|
|||
/* top left not available */
|
||||
nbr_id_from_bl++;
|
||||
/* top and top right; 4 pels per nbr bit */
|
||||
nbr_id_from_bl += look_up_trailing_zeros((nbr_flags >> 8) & 0xFF) * 4;
|
||||
nbr_id_from_bl += look_up_trailing_zeros((nbr_flags >> 8) & 0xFF) * 4 * sub_sample;
|
||||
}
|
||||
}
|
||||
/* Reverse Substitution Process*/
|
||||
|
|
@ -354,14 +357,14 @@ void ihevc_intra_pred_chroma_ref_substitution_a9q(UWORD8 *pu1_top_left,
|
|||
}
|
||||
|
||||
/* for the loop of 4*Nt+1 pixels (excluding pixels computed from reverse substitution) */
|
||||
while(nbr_id_from_bl < ((T16C_4NT)+1))
|
||||
while(nbr_id_from_bl < ((T16C_4NT * sub_sample)+1))
|
||||
{
|
||||
/* To Obtain the next unavailable idx flag after reverse neighbor substitution */
|
||||
/* Devide by 4 to obtain the original index */
|
||||
frwd_nbr_flag = (nbr_id_from_bl >> 2); /*+ (nbr_id_from_bl & 0x1);*/
|
||||
frwd_nbr_flag = (nbr_id_from_bl >> (chroma_format_idc == CHROMA_FMT_IDC_YUV444 ? 3 : 2)); /*+ (nbr_id_from_bl & 0x1);*/
|
||||
|
||||
/* The Top-left flag is at the last bit location of nbr_flags*/
|
||||
if(nbr_id_from_bl == (T16C_4NT / 2))
|
||||
if(nbr_id_from_bl == (T16C_4NT * sub_sample / 2))
|
||||
{
|
||||
get_bits = GET_BIT(nbr_flags, 16);
|
||||
/* only pel substitution for TL */
|
||||
|
|
@ -379,11 +382,11 @@ void ihevc_intra_pred_chroma_ref_substitution_a9q(UWORD8 *pu1_top_left,
|
|||
UWORD16 *pu2_dst;
|
||||
/* 4 pel substitution (other than TL) */
|
||||
pu2_dst = (UWORD16 *)&pu1_dst[(2 * nbr_id_from_bl) - 2];
|
||||
ihevc_memset_16bit_a9q((UWORD16 *)(pu1_dst + (2 * nbr_id_from_bl)), pu2_dst[0], 4);
|
||||
ihevc_memset_16bit_a9q((UWORD16 *)(pu1_dst + (2 * nbr_id_from_bl)), pu2_dst[0], 4 * sub_sample);
|
||||
}
|
||||
|
||||
}
|
||||
nbr_id_from_bl += (nbr_id_from_bl == (T16C_4NT / 2)) ? 1 : 4;
|
||||
nbr_id_from_bl += (nbr_id_from_bl == (T16C_4NT * sub_sample / 2)) ? 1 : 4 * sub_sample;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ list(
|
|||
"${HEVC_ROOT}/common/ihevc_trans_tables.c"
|
||||
"${HEVC_ROOT}/common/ihevc_recon.c"
|
||||
"${HEVC_ROOT}/common/ihevc_itrans.c"
|
||||
"${HEVC_ROOT}/common/ihevc_itrans_res.c"
|
||||
"${HEVC_ROOT}/common/ihevc_itrans_recon.c"
|
||||
"${HEVC_ROOT}/common/ihevc_iquant_recon.c"
|
||||
"${HEVC_ROOT}/common/ihevc_iquant_itrans_recon.c"
|
||||
|
|
@ -29,6 +30,7 @@ list(
|
|||
"${HEVC_ROOT}/common/ihevc_chroma_iquant_itrans_recon.c"
|
||||
"${HEVC_ROOT}/common/ihevc_chroma_recon.c"
|
||||
"${HEVC_ROOT}/common/ihevc_chroma_itrans_recon_16x16.c"
|
||||
"${HEVC_ROOT}/common/ihevc_chroma_itrans_recon_32x32.c"
|
||||
"${HEVC_ROOT}/common/ihevc_chroma_itrans_recon_8x8.c"
|
||||
"${HEVC_ROOT}/common/ihevc_buf_mgr.c"
|
||||
"${HEVC_ROOT}/common/ihevc_disp_mgr.c"
|
||||
|
|
@ -62,7 +64,7 @@ list(
|
|||
include_directories(${HEVC_ROOT}/common)
|
||||
|
||||
# arm/x86 sources
|
||||
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64")
|
||||
if("${SYSTEM_PROCESSOR}" STREQUAL "aarch64" OR "${SYSTEM_PROCESSOR}" STREQUAL "arm64")
|
||||
list(
|
||||
APPEND
|
||||
LIBHEVC_COMMON_ASMS
|
||||
|
|
@ -135,7 +137,7 @@ if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64")
|
|||
"${HEVC_ROOT}/common/arm64/ihevc_weighted_pred_uni.s")
|
||||
|
||||
include_directories(${HEVC_ROOT}/common/arm64 ${HEVC_ROOT}/common/arm)
|
||||
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch32")
|
||||
elseif("${SYSTEM_PROCESSOR}" STREQUAL "aarch32")
|
||||
list(
|
||||
APPEND
|
||||
LIBHEVC_COMMON_ASMS
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -92,9 +92,13 @@ typedef enum
|
|||
IHEVC_CAB_COEFFY_PREFIX = IHEVC_CAB_COEFFX_PREFIX + 18,
|
||||
IHEVC_CAB_CODED_SUBLK_IDX = IHEVC_CAB_COEFFY_PREFIX + 18,
|
||||
IHEVC_CAB_COEFF_FLAG = IHEVC_CAB_CODED_SUBLK_IDX + 4,
|
||||
IHEVC_CAB_COEFABS_GRTR1_FLAG = IHEVC_CAB_COEFF_FLAG + 42,
|
||||
IHEVC_CAB_COEFABS_GRTR1_FLAG = IHEVC_CAB_COEFF_FLAG + 44,
|
||||
IHEVC_CAB_COEFABS_GRTR2_FLAG = IHEVC_CAB_COEFABS_GRTR1_FLAG + 24,
|
||||
IHEVC_CAB_CTXT_END = IHEVC_CAB_COEFABS_GRTR2_FLAG + 6
|
||||
IHEVC_CAB_CCP_LOG2_RES_ABS = IHEVC_CAB_COEFABS_GRTR2_FLAG + 6,
|
||||
IHEVC_CAB_CCP_RES_SIGN_FLAG = IHEVC_CAB_CCP_LOG2_RES_ABS + 8,
|
||||
IHEVC_CAB_EXPLICIT_RDPCM_FLAG = IHEVC_CAB_CCP_RES_SIGN_FLAG + 2,
|
||||
IHEVC_CAB_EXPLICIT_RDPCM_DIR = IHEVC_CAB_EXPLICIT_RDPCM_FLAG + 2,
|
||||
IHEVC_CAB_CTXT_END = IHEVC_CAB_EXPLICIT_RDPCM_DIR + 2,
|
||||
}IHEVC_CABAC_CTXT_OFFSETS;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -126,7 +126,14 @@ typedef void ihevc_intra_pred_chroma_ref_substitution_ft(UWORD8 *pu1_top_left,
|
|||
WORD32 nt,
|
||||
WORD32 nbr_flags,
|
||||
UWORD8 *pu1_dst,
|
||||
WORD32 dst_strd);
|
||||
WORD32 dst_strd,
|
||||
WORD32 chroma_format_idc);
|
||||
|
||||
typedef void ihevc_intra_pred_chroma_ref_filtering_ft(UWORD8 *pu1_src,
|
||||
WORD32 nt,
|
||||
UWORD8 *pu1_dst,
|
||||
WORD32 mode,
|
||||
WORD32 intra_smoothing_flags);
|
||||
|
||||
typedef void ihevc_hbd_intra_pred_chroma_planar_ft(
|
||||
UWORD16 *pu2_ref,
|
||||
|
|
@ -240,6 +247,7 @@ ihevc_intra_pred_chroma_mode_11_to_17_ft ihevc_intra_pred_chroma_mode_11_to_17;
|
|||
ihevc_intra_pred_chroma_mode_19_to_25_ft ihevc_intra_pred_chroma_mode_19_to_25;
|
||||
ihevc_intra_pred_chroma_mode_27_to_33_ft ihevc_intra_pred_chroma_mode_27_to_33;
|
||||
ihevc_intra_pred_chroma_ref_substitution_ft ihevc_intra_pred_chroma_ref_substitution;
|
||||
ihevc_intra_pred_chroma_ref_filtering_ft ihevc_intra_pred_chroma_ref_filtering;
|
||||
|
||||
ihevc_hbd_intra_pred_chroma_planar_ft ihevc_hbd_intra_pred_chroma_planar;
|
||||
ihevc_hbd_intra_pred_chroma_dc_ft ihevc_hbd_intra_pred_chroma_dc;
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@
|
|||
|
||||
#include "ihevc_typedefs.h"
|
||||
#include "ihevc_macros.h"
|
||||
#include "ihevc_defs.h"
|
||||
#include "ihevc_func_selector.h"
|
||||
#include "ihevc_platform_macros.h"
|
||||
#include "ihevc_intra_pred.h"
|
||||
|
|
@ -129,7 +130,8 @@ void ihevc_intra_pred_chroma_ref_substitution(UWORD8 *pu1_top_left,
|
|||
WORD32 nt,
|
||||
WORD32 nbr_flags,
|
||||
UWORD8 *pu1_dst,
|
||||
WORD32 dst_strd)
|
||||
WORD32 dst_strd,
|
||||
WORD32 chroma_format_idc)
|
||||
{
|
||||
UWORD8 pu1_ref_u, pu1_ref_v;
|
||||
WORD32 dc_val, i, j;
|
||||
|
|
@ -206,7 +208,7 @@ void ihevc_intra_pred_chroma_ref_substitution(UWORD8 *pu1_top_left,
|
|||
// U-V interleaved Top-top right samples
|
||||
}
|
||||
|
||||
if(nt == 4)
|
||||
if(nt == 4 || (nt == 8 && chroma_format_idc == CHROMA_FMT_IDC_YUV444))
|
||||
{
|
||||
/* 1 bit extraction for all the neighboring blocks */
|
||||
tp_left = (nbr_flags & 0x10000) >> 16;
|
||||
|
|
@ -274,8 +276,9 @@ void ihevc_intra_pred_chroma_ref_substitution(UWORD8 *pu1_top_left,
|
|||
|
||||
}
|
||||
}
|
||||
else if(nt == 8)
|
||||
else if(nt == 8 || (nt == 16 && chroma_format_idc == CHROMA_FMT_IDC_YUV444))
|
||||
{
|
||||
WORD32 sub_sample = chroma_format_idc == CHROMA_FMT_IDC_YUV444 ? 2 : 1;
|
||||
WORD32 nbr_flags_temp = 0;
|
||||
nbr_flags_temp = ((nbr_flags & 0xC) >> 2) + ((nbr_flags & 0xC0) >> 4)
|
||||
+ ((nbr_flags & 0x300) >> 4)
|
||||
|
|
@ -285,16 +288,16 @@ void ihevc_intra_pred_chroma_ref_substitution(UWORD8 *pu1_top_left,
|
|||
/* compute trailing zeors based on nbr_flag for substitution process of below left see section .*/
|
||||
/* as each bit in nbr flags corresponds to 8 pels for bot_left, left, top and topright but 1 pel for topleft */
|
||||
{
|
||||
nbr_id_from_bl = look_up_trailing_zeros(nbr_flags_temp & 0XF) * 4; /* for bottom left and left */
|
||||
if(nbr_id_from_bl == 32)
|
||||
nbr_id_from_bl = 16;
|
||||
if(nbr_id_from_bl == 16)
|
||||
nbr_id_from_bl = look_up_trailing_zeros(nbr_flags_temp & 0XF) * (4 * sub_sample); /* for bottom left and left */
|
||||
if(nbr_id_from_bl == 32 * sub_sample)
|
||||
nbr_id_from_bl = 16 * sub_sample;
|
||||
if(nbr_id_from_bl == 16 * sub_sample)
|
||||
{
|
||||
/* for top left : 1 pel per nbr bit */
|
||||
if(!((nbr_flags_temp >> 8) & 0x1))
|
||||
{
|
||||
nbr_id_from_bl++;
|
||||
nbr_id_from_bl += look_up_trailing_zeros((nbr_flags_temp >> 4) & 0xF) * 4; /* top and top right; 8 pels per nbr bit */
|
||||
nbr_id_from_bl += look_up_trailing_zeros((nbr_flags_temp >> 4) & 0xF) * 4 * sub_sample; /* top and top right; 8 pels per nbr bit */
|
||||
|
||||
}
|
||||
}
|
||||
|
|
@ -313,14 +316,14 @@ void ihevc_intra_pred_chroma_ref_substitution(UWORD8 *pu1_top_left,
|
|||
}
|
||||
|
||||
/* for the loop of 4*Nt+1 pixels (excluding pixels computed from reverse substitution) */
|
||||
while(nbr_id_from_bl < ((T8C_4NT)+1))
|
||||
while(nbr_id_from_bl < ((T8C_4NT * sub_sample)+1))
|
||||
{
|
||||
/* To Obtain the next unavailable idx flag after reverse neighbor substitution */
|
||||
/* Divide by 8 to obtain the original index */
|
||||
frwd_nbr_flag = (nbr_id_from_bl >> 2); /*+ (nbr_id_from_bl & 0x1);*/
|
||||
frwd_nbr_flag = (nbr_id_from_bl >> (chroma_format_idc == CHROMA_FMT_IDC_YUV444 ? 3 : 2)); /*+ (nbr_id_from_bl & 0x1);*/
|
||||
|
||||
/* The Top-left flag is at the last bit location of nbr_flags*/
|
||||
if(nbr_id_from_bl == (T8C_4NT / 2))
|
||||
if(nbr_id_from_bl == (T8C_4NT * sub_sample / 2))
|
||||
{
|
||||
get_bits = GET_BIT(nbr_flags_temp, 8);
|
||||
|
||||
|
|
@ -339,22 +342,23 @@ void ihevc_intra_pred_chroma_ref_substitution(UWORD8 *pu1_top_left,
|
|||
UWORD16 *pu2_dst;
|
||||
/* 8 pel substitution (other than TL) */
|
||||
pu2_dst = (UWORD16 *)&pu1_dst[(2 * nbr_id_from_bl) - 2];
|
||||
ihevc_memset_16bit((UWORD16 *)(pu1_dst + (2 * nbr_id_from_bl)), pu2_dst[0], 4);
|
||||
ihevc_memset_16bit((UWORD16 *)(pu1_dst + (2 * nbr_id_from_bl)), pu2_dst[0], 4 * sub_sample);
|
||||
}
|
||||
|
||||
}
|
||||
nbr_id_from_bl += (nbr_id_from_bl == (T8C_4NT / 2)) ? 1 : 4;
|
||||
nbr_id_from_bl += (nbr_id_from_bl == (T8C_4NT * sub_sample / 2)) ? 1 : 4 * sub_sample;
|
||||
}
|
||||
|
||||
}
|
||||
else if(nt == 16)
|
||||
else if(nt == 16 || (nt == 32 && chroma_format_idc == CHROMA_FMT_IDC_YUV444))
|
||||
{
|
||||
WORD32 sub_sample = chroma_format_idc == CHROMA_FMT_IDC_YUV444 ? 2 : 1;
|
||||
/* compute trailing ones based on mbr_flag for substitution process of below left see section .*/
|
||||
/* as each bit in nbr flags corresponds to 4 pels for bot_left, left, top and topright but 1 pel for topleft */
|
||||
{
|
||||
nbr_id_from_bl = look_up_trailing_zeros((nbr_flags & 0XFF)) * 4; /* for bottom left and left */
|
||||
nbr_id_from_bl = look_up_trailing_zeros((nbr_flags & 0XFF)) * 4 * sub_sample; /* for bottom left and left */
|
||||
|
||||
if(nbr_id_from_bl == 32)
|
||||
if(nbr_id_from_bl == 32 * sub_sample)
|
||||
{
|
||||
/* for top left : 1 pel per nbr bit */
|
||||
if(!((nbr_flags >> 16) & 0x1))
|
||||
|
|
@ -362,7 +366,7 @@ void ihevc_intra_pred_chroma_ref_substitution(UWORD8 *pu1_top_left,
|
|||
/* top left not available */
|
||||
nbr_id_from_bl++;
|
||||
/* top and top right; 4 pels per nbr bit */
|
||||
nbr_id_from_bl += look_up_trailing_zeros((nbr_flags >> 8) & 0xFF) * 4;
|
||||
nbr_id_from_bl += look_up_trailing_zeros((nbr_flags >> 8) & 0xFF) * 4 * sub_sample;
|
||||
}
|
||||
}
|
||||
/* Reverse Substitution Process*/
|
||||
|
|
@ -380,14 +384,14 @@ void ihevc_intra_pred_chroma_ref_substitution(UWORD8 *pu1_top_left,
|
|||
}
|
||||
|
||||
/* for the loop of 4*Nt+1 pixels (excluding pixels computed from reverse substitution) */
|
||||
while(nbr_id_from_bl < ((T16C_4NT)+1))
|
||||
while(nbr_id_from_bl < ((T16C_4NT * sub_sample)+1))
|
||||
{
|
||||
/* To Obtain the next unavailable idx flag after reverse neighbor substitution */
|
||||
/* Devide by 4 to obtain the original index */
|
||||
frwd_nbr_flag = (nbr_id_from_bl >> 2); /*+ (nbr_id_from_bl & 0x1);*/
|
||||
frwd_nbr_flag = (nbr_id_from_bl >> (chroma_format_idc == CHROMA_FMT_IDC_YUV444 ? 3 : 2)); /*+ (nbr_id_from_bl & 0x1);*/
|
||||
|
||||
/* The Top-left flag is at the last bit location of nbr_flags*/
|
||||
if(nbr_id_from_bl == (T16C_4NT / 2))
|
||||
if(nbr_id_from_bl == (T16C_4NT * sub_sample / 2))
|
||||
{
|
||||
get_bits = GET_BIT(nbr_flags, 16);
|
||||
/* only pel substitution for TL */
|
||||
|
|
@ -405,17 +409,110 @@ void ihevc_intra_pred_chroma_ref_substitution(UWORD8 *pu1_top_left,
|
|||
UWORD16 *pu2_dst;
|
||||
/* 4 pel substitution (other than TL) */
|
||||
pu2_dst = (UWORD16 *)&pu1_dst[(2 * nbr_id_from_bl) - 2];
|
||||
ihevc_memset_16bit((UWORD16 *)(pu1_dst + (2 * nbr_id_from_bl)), pu2_dst[0], 4);
|
||||
ihevc_memset_16bit((UWORD16 *)(pu1_dst + (2 * nbr_id_from_bl)), pu2_dst[0], 4 * sub_sample);
|
||||
}
|
||||
|
||||
}
|
||||
nbr_id_from_bl += (nbr_id_from_bl == (T16C_4NT / 2)) ? 1 : 4;
|
||||
nbr_id_from_bl += (nbr_id_from_bl == (T16C_4NT * sub_sample / 2)) ? 1 : 4 * sub_sample;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*******************************************************************************
|
||||
*
|
||||
* @brief
|
||||
* Intra prediction interpolation filter for chroma ref_filtering (4:4:4)
|
||||
*
|
||||
*
|
||||
* @par Description:
|
||||
* Reference DC filtering for neighboring chroma samples dependent on TU size and
|
||||
* mode Refer to section 8.4.4.2.3 in the standard
|
||||
*
|
||||
* @param[in] pu1_src
|
||||
* UWORD8 pointer to the source
|
||||
*
|
||||
* @param[out] pu1_dst
|
||||
* UWORD8 pointer to the destination
|
||||
*
|
||||
* @param[in] nt
|
||||
* integer Transform Block size
|
||||
*
|
||||
* @param[in] mode
|
||||
* integer intraprediction mode
|
||||
*
|
||||
* @param[in] strong_intra_smoothing_enable_flag
|
||||
* integer containing intra_smoothing_disabled_flag and strong_smoothing_enable_flag
|
||||
*
|
||||
* @returns
|
||||
*
|
||||
* @remarks
|
||||
* None
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
void ihevc_intra_pred_chroma_ref_filtering(UWORD8 *pu1_src,
|
||||
WORD32 nt,
|
||||
UWORD8 *pu1_dst,
|
||||
WORD32 mode,
|
||||
WORD32 intra_smoothing_flag)
|
||||
{
|
||||
WORD32 filter_flag;
|
||||
WORD32 i; /* Generic indexing variable */
|
||||
WORD32 four_nt = 4 * nt;
|
||||
UWORD8 au1_flt[((4 * MAX_CU_SIZE) + 1) * 2];
|
||||
WORD32 intra_smoothing_disabled_flag = (intra_smoothing_flag >> 3) & 0x1;
|
||||
WORD32 strong_intra_smoothing_enable_flag = intra_smoothing_flag & 0x1;
|
||||
UNUSED(strong_intra_smoothing_enable_flag);
|
||||
|
||||
if(intra_smoothing_disabled_flag)
|
||||
{
|
||||
if(pu1_src == pu1_dst) return;
|
||||
for(i = 0; i < (2 * (four_nt + 1)); i += 2)
|
||||
{
|
||||
pu1_dst[i] = pu1_src[i];
|
||||
pu1_dst[i + 1] = pu1_src[i + 1];
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
filter_flag = gau1_intra_pred_ref_filter[mode] & (1 << (CTZ(nt) - 2));
|
||||
if(0 == filter_flag)
|
||||
{
|
||||
if(pu1_src == pu1_dst) return;
|
||||
for(i = 0; i < (2 * (four_nt + 1)); i += 2)
|
||||
{
|
||||
pu1_dst[i] = pu1_src[i];
|
||||
pu1_dst[i + 1] = pu1_src[i + 1];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
/* Extremities Untouched*/
|
||||
au1_flt[0] = pu1_src[0];
|
||||
au1_flt[1] = pu1_src[1];
|
||||
au1_flt[four_nt * 2] = pu1_src[four_nt * 2];
|
||||
au1_flt[(four_nt * 2) + 1] = pu1_src[(four_nt * 2) + 1];
|
||||
|
||||
for(i = 2; i < four_nt * 2; i += 2)
|
||||
{
|
||||
au1_flt[i] = (pu1_src[i - 2] + 2 * pu1_src[i] + pu1_src[i + 2] + 2) >> 2;
|
||||
au1_flt[i + 1] = (pu1_src[i - 1] + 2 * pu1_src[i + 1] + pu1_src[i + 3] + 2) >> 2;
|
||||
}
|
||||
|
||||
for(i = 0; i < (2 * (four_nt + 1)); i += 2)
|
||||
{
|
||||
pu1_dst[i] = au1_flt[i];
|
||||
pu1_dst[i + 1] = au1_flt[i + 1];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
*******************************************************************************
|
||||
*
|
||||
|
|
|
|||
|
|
@ -94,6 +94,15 @@ typedef void ihevc_hbd_chroma_itrans_recon_16x16_ft(WORD16 *pi2_src,
|
|||
WORD32 zero_cols,
|
||||
WORD32 zero_rows,
|
||||
UWORD8 bit_depth);
|
||||
typedef void ihevc_chroma_itrans_recon_32x32_ft(WORD16 *pi2_src,
|
||||
WORD16 *pi2_tmp,
|
||||
UWORD8 *pu1_pred,
|
||||
UWORD8 *pu1_dst,
|
||||
WORD32 src_strd,
|
||||
WORD32 pred_strd,
|
||||
WORD32 dst_strd,
|
||||
WORD32 zero_cols,
|
||||
WORD32 zero_rows);
|
||||
|
||||
ihevc_chroma_itrans_recon_4x4_ft ihevc_chroma_itrans_recon_4x4;
|
||||
ihevc_hbd_chroma_itrans_recon_4x4_ft ihevc_hbd_chroma_itrans_recon_4x4;
|
||||
|
|
@ -101,6 +110,7 @@ ihevc_chroma_itrans_recon_8x8_ft ihevc_chroma_itrans_recon_8x8;
|
|||
ihevc_hbd_chroma_itrans_recon_8x8_ft ihevc_hbd_chroma_itrans_recon_8x8;
|
||||
ihevc_chroma_itrans_recon_16x16_ft ihevc_chroma_itrans_recon_16x16;
|
||||
ihevc_hbd_chroma_itrans_recon_16x16_ft ihevc_hbd_chroma_itrans_recon_16x16;
|
||||
ihevc_chroma_itrans_recon_32x32_ft ihevc_chroma_itrans_recon_32x32;
|
||||
|
||||
/* A9 Q Function Declarations */
|
||||
ihevc_chroma_itrans_recon_4x4_ft ihevc_chroma_itrans_recon_4x4_a9q;
|
||||
|
|
|
|||
1135
common/ihevc_chroma_itrans_recon_32x32.c
Normal file
1135
common/ihevc_chroma_itrans_recon_32x32.c
Normal file
File diff suppressed because it is too large
Load diff
|
|
@ -306,3 +306,157 @@ void ihevc_chroma_recon_16x16(WORD16 *pi2_src,
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
*******************************************************************************
|
||||
*
|
||||
* @brief
|
||||
* This function performs reconstruction for 32x32 input block
|
||||
*
|
||||
* @par Description:
|
||||
* Performs reconstruction of 32x32 input block by adding adding prediction
|
||||
* data to input and clipping it to 8 bit
|
||||
*
|
||||
* @param[in] pi2_src
|
||||
* Input 32x32 coefficients
|
||||
*
|
||||
* @param[in] pu1_pred
|
||||
* Prediction 32x32 block
|
||||
*
|
||||
* @param[out] pu1_dst
|
||||
* Output 32x32 block
|
||||
*
|
||||
* @param[in] src_strd
|
||||
* Input stride
|
||||
*
|
||||
* @param[in] pred_strd
|
||||
* Prediction stride
|
||||
*
|
||||
* @param[in] dst_strd
|
||||
* Output Stride
|
||||
*
|
||||
* @param[in] shift
|
||||
* Output shift
|
||||
*
|
||||
* @param[in] zero_cols
|
||||
* Zero columns in pi2_tmp
|
||||
*
|
||||
* @returns Void
|
||||
*
|
||||
* @remarks
|
||||
* None
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
|
||||
void ihevc_chroma_recon_32x32(WORD16 *pi2_src,
|
||||
UWORD8 *pu1_pred,
|
||||
UWORD8 *pu1_dst,
|
||||
WORD32 src_strd,
|
||||
WORD32 pred_strd,
|
||||
WORD32 dst_strd,
|
||||
WORD32 zero_cols)
|
||||
{
|
||||
WORD32 i, j;
|
||||
WORD32 trans_size;
|
||||
|
||||
trans_size = TRANS_SIZE_32;
|
||||
|
||||
/* Reconstruction */
|
||||
|
||||
for(i = 0; i < trans_size; i++)
|
||||
{
|
||||
/* Checking for Zero Cols */
|
||||
if((zero_cols & 1) == 1)
|
||||
{
|
||||
for(j = 0; j < trans_size; j++)
|
||||
{
|
||||
pu1_dst[j * dst_strd] = pu1_pred[j * pred_strd];
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
for(j = 0; j < trans_size; j++)
|
||||
{
|
||||
pu1_dst[j * dst_strd] =
|
||||
CLIP_U8(pi2_src[j * src_strd] + pu1_pred[j * pred_strd]);
|
||||
}
|
||||
}
|
||||
pi2_src++;
|
||||
pu1_dst += 2;
|
||||
pu1_pred += 2;
|
||||
zero_cols = zero_cols >> 1;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
* @brief Constructs chroma recon with Cross Component Prediction (CCP)
|
||||
*
|
||||
* @par Description
|
||||
* This routine uses reconstructed luma residual samples to predict chroma
|
||||
* residual samples as per HEVC Specification Section 8.6.6. It scales the
|
||||
* luma residual by a signaled alpha value and adds it to the chroma residual
|
||||
* prior to final reconstruction.
|
||||
*
|
||||
* @param[in] pi2_luma_res
|
||||
* pointer to the luma residual
|
||||
*
|
||||
* @param[in] pi2_chroma_res
|
||||
* pointer to the chroma residual
|
||||
*
|
||||
* @param[in] pu1_pred
|
||||
* prediction block
|
||||
*
|
||||
* @param[in] pu1_dst
|
||||
* destination block
|
||||
*
|
||||
* @param[in] alpha
|
||||
* scaling factor for the luma residual
|
||||
*
|
||||
* @param[in] trans_size
|
||||
* transform size
|
||||
*
|
||||
* @param[in] luma_res_stride
|
||||
* stride of the luma residual buffer
|
||||
*
|
||||
* @param[in] chroma_res_stride
|
||||
* stride of the chroma residual buffer
|
||||
*
|
||||
* @param[in] pred_strd
|
||||
* Prediction stride
|
||||
*
|
||||
* @param[in] dst_strd
|
||||
* Output Stride
|
||||
*
|
||||
* @return success or failure error code
|
||||
*
|
||||
******************************************************************************
|
||||
*/
|
||||
void ihevc_chroma_recon_nxn_ccp(WORD16 *pi2_luma_res,
|
||||
WORD16 *pi2_chroma_res,
|
||||
UWORD8 *pu1_pred,
|
||||
UWORD8 *pu1_dst,
|
||||
WORD32 alpha,
|
||||
WORD32 trans_size,
|
||||
WORD32 luma_res_stride,
|
||||
WORD32 chroma_res_stride,
|
||||
WORD32 pred_stride,
|
||||
WORD32 dst_stride)
|
||||
{
|
||||
WORD32 i, j;
|
||||
|
||||
for(i = 0; i < trans_size; i++)
|
||||
{
|
||||
for(j = 0; j < trans_size; j++)
|
||||
{
|
||||
WORD32 res = (alpha * pi2_luma_res[j]) >> 3;
|
||||
pu1_dst[j * 2] = CLIP_U8(pu1_pred[j * 2] + (pi2_chroma_res[j] + res));
|
||||
}
|
||||
pi2_luma_res += luma_res_stride;
|
||||
pi2_chroma_res += chroma_res_stride;
|
||||
pu1_dst += dst_stride;
|
||||
pu1_pred += pred_stride;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -88,6 +88,13 @@ typedef void ihevc_hbd_chroma_recon_16x16_ft(WORD16 *pi2_src,
|
|||
WORD32 dst_strd,
|
||||
WORD32 zero_cols,
|
||||
UWORD8 bit_depth);
|
||||
typedef void ihevc_chroma_recon_32x32_ft(WORD16 *pi2_src,
|
||||
UWORD8 *pu1_pred,
|
||||
UWORD8 *pu1_dst,
|
||||
WORD32 src_strd,
|
||||
WORD32 pred_strd,
|
||||
WORD32 dst_strd,
|
||||
WORD32 zero_cols);
|
||||
|
||||
ihevc_chroma_recon_4x4_ft ihevc_chroma_recon_4x4;
|
||||
ihevc_hbd_chroma_recon_4x4_ft ihevc_hbd_chroma_recon_4x4;
|
||||
|
|
@ -95,5 +102,17 @@ ihevc_chroma_recon_8x8_ft ihevc_chroma_recon_8x8;
|
|||
ihevc_hbd_chroma_recon_8x8_ft ihevc_hbd_chroma_recon_8x8;
|
||||
ihevc_chroma_recon_16x16_ft ihevc_chroma_recon_16x16;
|
||||
ihevc_hbd_chroma_recon_16x16_ft ihevc_hbd_chroma_recon_16x16;
|
||||
ihevc_chroma_recon_32x32_ft ihevc_chroma_recon_32x32;
|
||||
|
||||
void ihevc_chroma_recon_nxn_ccp(WORD16 *pi2_luma_res,
|
||||
WORD16 *pi2_chroma_res,
|
||||
UWORD8 *pu1_pred,
|
||||
UWORD8 *pu1_dst,
|
||||
WORD32 alpha,
|
||||
WORD32 trans_size,
|
||||
WORD32 luma_res_stride,
|
||||
WORD32 chroma_res_stride,
|
||||
WORD32 pred_stride,
|
||||
WORD32 dst_stride);
|
||||
|
||||
#endif /*_IHEVC_CHROMA_RECON_H_*/
|
||||
|
|
|
|||
|
|
@ -40,7 +40,10 @@
|
|||
/*****************************************************************************/
|
||||
enum
|
||||
{
|
||||
IHEVC_PROFILE_UNKNOWN = -1,
|
||||
IHEVC_PROFILE_MAIN = 0,
|
||||
IHEVC_PROFILE_MAIN_STILL = 1,
|
||||
IHEVC_PROFILE_MAIN_REXT = 2,
|
||||
};
|
||||
|
||||
enum
|
||||
|
|
|
|||
|
|
@ -46,6 +46,9 @@
|
|||
#define REF_WIDTH 1280
|
||||
#define REF_HEIGHT 720
|
||||
|
||||
extern WORD8 gai1_ihevc_luma_filter[4][NTAPS_LUMA];
|
||||
extern WORD8 gai1_ihevc_chroma_filter[8][NTAPS_LUMA];
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Function Declarations */
|
||||
/*****************************************************************************/
|
||||
|
|
|
|||
|
|
@ -61,6 +61,26 @@
|
|||
#include "ihevc_func_selector.h"
|
||||
|
||||
#include "ihevc_inter_pred.h"
|
||||
|
||||
WORD8 gai1_ihevc_luma_filter[4][NTAPS_LUMA] =
|
||||
{
|
||||
{ 0, 0, 0, 64, 0, 0, 0, 0 },
|
||||
{ -1, 4, -10, 58, 17, -5, 1, 0 },
|
||||
{ -1, 4, -11, 40, 40, -11, 4, -1 },
|
||||
{ 0, 1, -5, 17, 58, -10, 4, -1 } };
|
||||
|
||||
/* The filter uses only the first four elements in each array */
|
||||
WORD8 gai1_ihevc_chroma_filter[8][NTAPS_LUMA] =
|
||||
{
|
||||
{ 0, 64, 0, 0, 0, 0, 0, 0 },
|
||||
{ -2, 58, 10, -2, 0, 0, 0, 0 },
|
||||
{ -4, 54, 16, -2, 0, 0, 0, 0 },
|
||||
{ -6, 46, 28, -4, 0, 0, 0, 0 },
|
||||
{ -4, 36, 36, -4, 0, 0, 0, 0 },
|
||||
{ -4, 28, 46, -6, 0, 0, 0, 0 },
|
||||
{ -2, 16, 54, -4, 0, 0, 0, 0 },
|
||||
{ -2, 10, 58, -2, 0, 0, 0, 0 } };
|
||||
|
||||
/*****************************************************************************/
|
||||
/* Function Definitions */
|
||||
/*****************************************************************************/
|
||||
|
|
|
|||
|
|
@ -159,7 +159,7 @@ typedef void ihevc_intra_pred_ref_filtering_ft(UWORD8 *pu1_src,
|
|||
WORD32 nt,
|
||||
UWORD8 *pu1_dst,
|
||||
WORD32 mode,
|
||||
WORD32 strong_intra_smoothing_enable_flag);
|
||||
WORD32 intra_smoothing_flags);
|
||||
|
||||
typedef void ihevc_hbd_intra_pred_luma_planar_ft(
|
||||
UWORD16 *pu2_ref,
|
||||
|
|
|
|||
|
|
@ -627,6 +627,11 @@ void ihevc_intra_pred_luma_ref_substitution(UWORD8 *pu1_top_left,
|
|||
* @param[in] mode
|
||||
* integer intraprediction mode
|
||||
*
|
||||
* @param[in] intra_smoothing_flags
|
||||
* integer bit 3 indicates if intra smoothing is enabled/disabled
|
||||
* unconditionally. this is applicable to frext profiles only
|
||||
* bit 0 indicates strong intra smoothing enabled/disabled
|
||||
*
|
||||
* @returns
|
||||
*
|
||||
* @remarks
|
||||
|
|
@ -640,7 +645,7 @@ void ihevc_intra_pred_ref_filtering(UWORD8 *pu1_src,
|
|||
WORD32 nt,
|
||||
UWORD8 *pu1_dst,
|
||||
WORD32 mode,
|
||||
WORD32 strong_intra_smoothing_enable_flag)
|
||||
WORD32 intra_smoothing_flags)
|
||||
{
|
||||
WORD32 filter_flag;
|
||||
WORD32 i; /* Generic indexing variable */
|
||||
|
|
@ -651,9 +656,11 @@ void ihevc_intra_pred_ref_filtering(UWORD8 *pu1_src,
|
|||
WORD32 abs_cond_top_flag = 0;
|
||||
/*WORD32 dc_val = 1 << (BIT_DEPTH - 5);*/
|
||||
WORD32 dc_val = 1 << (8 - 5);
|
||||
//WORD32 strong_intra_smoothing_enable_flag = 1;
|
||||
WORD32 intra_smoothing_disabled = (intra_smoothing_flags >> 3);
|
||||
WORD32 strong_intra_smoothing_enable_flag = intra_smoothing_flags & 1;
|
||||
|
||||
filter_flag = gau1_intra_pred_ref_filter[mode] & (1 << (CTZ(nt) - 2));
|
||||
filter_flag = intra_smoothing_disabled ?
|
||||
0 : (gau1_intra_pred_ref_filter[mode] & (1 << (CTZ(nt) - 2)));
|
||||
if(0 == filter_flag)
|
||||
{
|
||||
if(pu1_src == pu1_dst)
|
||||
|
|
@ -943,8 +950,8 @@ void ihevc_intra_pred_luma_dc(UWORD8 *pu1_ref,
|
|||
* @param[in] nt
|
||||
* integer Transform Block size
|
||||
*
|
||||
* @param[in] mode
|
||||
* integer intraprediction mode
|
||||
* @param[in] disable_boundary_filter
|
||||
* disable boundary filtering
|
||||
*
|
||||
* @returns
|
||||
*
|
||||
|
|
@ -960,17 +967,16 @@ void ihevc_intra_pred_luma_horz(UWORD8 *pu1_ref,
|
|||
UWORD8 *pu1_dst,
|
||||
WORD32 dst_strd,
|
||||
WORD32 nt,
|
||||
WORD32 mode)
|
||||
WORD32 disable_boundary_filter)
|
||||
{
|
||||
|
||||
WORD32 row, col;
|
||||
WORD32 two_nt;
|
||||
WORD16 s2_predpixel;
|
||||
UNUSED(mode);
|
||||
UNUSED(src_strd);
|
||||
two_nt = 2 * nt;
|
||||
|
||||
if(nt == 32)
|
||||
if(nt == 32 || disable_boundary_filter)
|
||||
{
|
||||
for(row = 0; row < nt; row++)
|
||||
for(col = 0; col < nt; col++)
|
||||
|
|
@ -1023,8 +1029,8 @@ void ihevc_intra_pred_luma_horz(UWORD8 *pu1_ref,
|
|||
* @param[in] nt
|
||||
* integer Transform Block size
|
||||
*
|
||||
* @param[in] mode
|
||||
* integer intraprediction mode
|
||||
* @param[in] disable_boundary_filter
|
||||
* disable boundary filtering
|
||||
*
|
||||
* @returns
|
||||
*
|
||||
|
|
@ -1040,15 +1046,14 @@ void ihevc_intra_pred_luma_ver(UWORD8 *pu1_ref,
|
|||
UWORD8 *pu1_dst,
|
||||
WORD32 dst_strd,
|
||||
WORD32 nt,
|
||||
WORD32 mode)
|
||||
WORD32 disable_boundary_filter)
|
||||
{
|
||||
WORD32 row, col;
|
||||
WORD16 s2_predpixel;
|
||||
WORD32 two_nt = 2 * nt;
|
||||
UNUSED(mode);
|
||||
UNUSED(src_strd);
|
||||
|
||||
if(nt == 32)
|
||||
if(nt == 32 || disable_boundary_filter)
|
||||
{
|
||||
/* Replication to next columns*/
|
||||
for(row = 0; row < nt; row++)
|
||||
|
|
|
|||
2493
common/ihevc_itrans_res.c
Normal file
2493
common/ihevc_itrans_res.c
Normal file
File diff suppressed because it is too large
Load diff
108
common/ihevc_itrans_res.h
Normal file
108
common/ihevc_itrans_res.h
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
/******************************************************************************
|
||||
*
|
||||
* Copyright (C) 2012 Ittiam Systems Pvt Ltd, Bangalore
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at:
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*
|
||||
******************************************************************************/
|
||||
/**
|
||||
*******************************************************************************
|
||||
* @file
|
||||
* ihevc_itrans_res.h
|
||||
*
|
||||
* @brief
|
||||
* Functions declarations for inverse transform
|
||||
*
|
||||
* @author
|
||||
* Ittiam
|
||||
*
|
||||
* @remarks
|
||||
* None
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
#ifndef _IHEVC_ITRANS_RES_H_
|
||||
#define _IHEVC_ITRANS_RES_H_
|
||||
|
||||
typedef void ihevc_itrans_res_4x4_ttype1_ft(WORD16 *pi2_src,
|
||||
WORD16 *pi2_tmp,
|
||||
WORD16 *pi2_dst,
|
||||
WORD32 src_strd,
|
||||
WORD32 dst_strd,
|
||||
WORD32 zero_cols,
|
||||
WORD32 zero_rows);
|
||||
|
||||
typedef void ihevc_itrans_res_4x4_ft(WORD16 *pi2_src,
|
||||
WORD16 *pi2_tmp,
|
||||
WORD16 *pi2_dst,
|
||||
WORD32 src_strd,
|
||||
WORD32 dst_strd,
|
||||
WORD32 zero_cols,
|
||||
WORD32 zero_rows);
|
||||
|
||||
typedef void ihevcd_itrans_res_dc_ft(WORD16 *pi2_dst,
|
||||
WORD32 dst_strd,
|
||||
WORD32 log2_trans_size,
|
||||
WORD16 i2_coeff_value);
|
||||
|
||||
typedef void ihevc_itrans_res_8x8_ft(WORD16 *pi2_src,
|
||||
WORD16 *pi2_tmp,
|
||||
WORD16 *pi2_dst,
|
||||
WORD32 src_strd,
|
||||
WORD32 dst_strd,
|
||||
WORD32 zero_cols,
|
||||
WORD32 zero_rows);
|
||||
|
||||
typedef void ihevc_itrans_res_16x16_ft(WORD16 *pi2_src,
|
||||
WORD16 *pi2_tmp,
|
||||
WORD16 *pi2_dst,
|
||||
WORD32 src_strd,
|
||||
WORD32 dst_strd,
|
||||
WORD32 zero_cols,
|
||||
WORD32 zero_rows);
|
||||
|
||||
typedef void ihevc_itrans_res_32x32_ft(WORD16 *pi2_src,
|
||||
WORD16 *pi2_tmp,
|
||||
WORD16 *pi2_dst,
|
||||
WORD32 src_strd,
|
||||
WORD32 dst_strd,
|
||||
WORD32 zero_cols,
|
||||
WORD32 zero_rows);
|
||||
|
||||
typedef void ihevc_res_4x4_transform(WORD16 *pi2_src,
|
||||
WORD16 *pi2_dst,
|
||||
WORD32 src_strd,
|
||||
WORD32 dst_strd,
|
||||
WORD32 zero_cols);
|
||||
|
||||
typedef void ihevc_res_nxn_transform(WORD16 *pi2_src,
|
||||
WORD16 *pi2_dst,
|
||||
WORD32 src_strd,
|
||||
WORD32 dst_strd,
|
||||
WORD32 trans_size,
|
||||
WORD32 zero_cols);
|
||||
|
||||
/* C function declarations */
|
||||
ihevc_itrans_res_4x4_ttype1_ft ihevc_itrans_res_4x4_ttype1;
|
||||
ihevc_itrans_res_4x4_ft ihevc_itrans_res_4x4;
|
||||
ihevcd_itrans_res_dc_ft ihevcd_itrans_res_dc;
|
||||
ihevc_itrans_res_8x8_ft ihevc_itrans_res_8x8;
|
||||
ihevc_itrans_res_16x16_ft ihevc_itrans_res_16x16;
|
||||
ihevc_itrans_res_32x32_ft ihevc_itrans_res_32x32;
|
||||
|
||||
ihevc_res_4x4_transform ihevc_res_4x4_rotate;
|
||||
ihevc_res_nxn_transform ihevc_res_nxn_copy;
|
||||
ihevc_res_nxn_transform ihevc_res_nxn_rdpcm_horz;
|
||||
ihevc_res_nxn_transform ihevc_res_nxn_rdpcm_vert;
|
||||
|
||||
#endif /*_IHEVC_ITRANS_RES_H_*/
|
||||
|
|
@ -39,6 +39,7 @@
|
|||
#define _IHEVC_STRUCTS_H_
|
||||
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
/**
|
||||
* Buffering Period SEI parameters Info
|
||||
*/
|
||||
|
|
@ -519,6 +520,7 @@ typedef struct
|
|||
time_code_t s_time_code;
|
||||
} sei_params_t;
|
||||
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Sub-layer HRD parameters Info
|
||||
|
|
@ -952,7 +954,9 @@ typedef struct
|
|||
// See IV_FLD_TYPE_T for all field types
|
||||
UWORD32 e4_fld_type;
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
sei_params_t s_sei_params;
|
||||
#endif
|
||||
|
||||
WORD32 i4_vui_present;
|
||||
|
||||
|
|
@ -1416,6 +1420,28 @@ typedef struct
|
|||
*/
|
||||
UWORD32 b3_chroma_intra_mode_idx : 3;
|
||||
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
/**
|
||||
* Cb CCP alpha magnitude
|
||||
*/
|
||||
UWORD32 b3_cb_log2_res_scale_abs_plus1 : 3;
|
||||
|
||||
/**
|
||||
* Cb CCP alpha sign
|
||||
*/
|
||||
UWORD32 b1_cb_log2_res_sign : 1;
|
||||
|
||||
/**
|
||||
* Cr CCP alpha magnitude
|
||||
*/
|
||||
UWORD32 b3_cr_log2_res_scale_abs_plus1 : 3;
|
||||
|
||||
/**
|
||||
* Cr CCP alpha sign
|
||||
*/
|
||||
UWORD32 b1_cr_log2_res_sign : 1;
|
||||
#endif
|
||||
|
||||
}tu_t;
|
||||
|
||||
/**
|
||||
|
|
@ -2477,6 +2503,36 @@ typedef struct
|
|||
*/
|
||||
vui_t s_vui_parameters;
|
||||
|
||||
/**
|
||||
* sps_extension_present_flag
|
||||
*/
|
||||
WORD8 i1_sps_extension_present_flag;
|
||||
|
||||
/**
|
||||
* sps_range_extension_present_flag
|
||||
*/
|
||||
WORD8 i1_sps_range_extension_flag;
|
||||
|
||||
/**
|
||||
* sps_multilayer_extension_present_flag
|
||||
*/
|
||||
WORD8 i1_sps_multilayer_extension_flag;
|
||||
|
||||
/**
|
||||
* sps_3d_extension_present_flag
|
||||
*/
|
||||
WORD8 i1_sps_3d_extension_flag;
|
||||
|
||||
/**
|
||||
* sps_scc_extension_present_flag
|
||||
*/
|
||||
WORD8 i1_sps_scc_extension_flag;
|
||||
|
||||
/**
|
||||
* sps_extension_reserved
|
||||
*/
|
||||
WORD8 i1_sps_extension_4bits;
|
||||
|
||||
/**
|
||||
* Log2(CTB Size) in luma units
|
||||
*/
|
||||
|
|
@ -2539,8 +2595,8 @@ typedef struct
|
|||
/* Inter 8 x 8 Y, 8 x 8 U, 8 x 8 V */
|
||||
/* Intra 16x16 Y, 16x16 U, 16x16 V */
|
||||
/* Inter 16x16 Y, 16x16 U, 16x16 V */
|
||||
/* Intra 32x32 Y */
|
||||
/* Inter 32x32 Y */
|
||||
/* Intra 32x32 Y, 32x32 U, 32x32 V */
|
||||
/* Inter 32x32 Y, 32x32 U, 32x32 V */
|
||||
/*************************************************************************/
|
||||
WORD16 *pi2_scaling_mat;
|
||||
|
||||
|
|
@ -2582,9 +2638,9 @@ typedef struct
|
|||
WORD8 i1_use_high_precision_pred_wt;
|
||||
|
||||
/**
|
||||
* fast_rice_adaptation_enabled_flag
|
||||
* persistent_rice_adaptation_enabled_flag
|
||||
*/
|
||||
WORD8 i1_fast_rice_adaptation_enabled_flag;
|
||||
WORD8 i1_persistent_rice_adaptation_enabled_flag;
|
||||
|
||||
/**
|
||||
* cabac_bypass_alignment_enabled_flag
|
||||
|
|
@ -2615,8 +2671,8 @@ typedef struct
|
|||
/* Inter 8 x 8 Y, 8 x 8 U, 8 x 8 V */
|
||||
/* Intra 16x16 Y, 16x16 U, 16x16 V */
|
||||
/* Inter 16x16 Y, 16x16 U, 16x16 V */
|
||||
/* Intra 32x32 Y */
|
||||
/* Inter 32x32 Y */
|
||||
/* Intra 32x32 Y, 32x32 U, 32x32 V */
|
||||
/* Inter 32x32 Y, 32x32 U, 32x32 V */
|
||||
/*************************************************************************/
|
||||
WORD16 *pi2_scaling_mat;
|
||||
|
||||
|
|
@ -2818,6 +2874,36 @@ typedef struct
|
|||
*/
|
||||
WORD8 i1_slice_extension_present_flag;
|
||||
|
||||
/**
|
||||
* pps_extension_present_flag
|
||||
*/
|
||||
WORD8 i1_pps_extension_present_flag;
|
||||
|
||||
/**
|
||||
* pps_range_extension_present_flag
|
||||
*/
|
||||
WORD8 i1_pps_range_extension_flag;
|
||||
|
||||
/**
|
||||
* pps_multilayer_extension_present_flag
|
||||
*/
|
||||
WORD8 i1_pps_multilayer_extension_flag;
|
||||
|
||||
/**
|
||||
* pps_3d_extension_present_flag
|
||||
*/
|
||||
WORD8 i1_pps_3d_extension_flag;
|
||||
|
||||
/**
|
||||
* pps_scc_extension_present_flag
|
||||
*/
|
||||
WORD8 i1_pps_scc_extension_flag;
|
||||
|
||||
/**
|
||||
* pps_extension_reserved
|
||||
*/
|
||||
WORD8 i1_pps_extension_4bits;
|
||||
|
||||
/**
|
||||
* scaling_list_dc_coef_minus8
|
||||
*/
|
||||
|
|
@ -2838,7 +2924,7 @@ typedef struct
|
|||
/**
|
||||
* log2_max_transform_skip_block_size_minus2
|
||||
*/
|
||||
WORD32 i4_log2_max_transform_skip_block_size_minus2;
|
||||
WORD8 i1_log2_max_transform_skip_block_size_minus2;
|
||||
|
||||
/**
|
||||
* cross_component_prediction_enabled_flag
|
||||
|
|
|
|||
|
|
@ -877,6 +877,12 @@ const WORD16 g_ai2_ihevc_trans_intr_4[4][8] =
|
|||
|
||||
const UWORD8 IHEVCE_CHROMA_SHUFFLEMASK_HBD[8] = { 0x00, 0x01, 0x04, 0x05,
|
||||
0x08, 0x09, 0x0C, 0x0D };
|
||||
|
||||
const UWORD32 gau4_ihevcd_4_bit_reverse[] =
|
||||
{
|
||||
0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15
|
||||
};
|
||||
|
||||
#ifndef DISABLE_AVX2
|
||||
const WORD32 g_ai4_ihevc_trans_8_intr_avx2[7][8] =
|
||||
{ /* 4*32 = 128 bit */
|
||||
|
|
|
|||
|
|
@ -116,4 +116,6 @@ extern const WORD16 g_ai2_ihevc_trans_intr_4[4][8];
|
|||
|
||||
extern const UWORD8 IHEVCE_CHROMA_SHUFFLEMASK_HBD[8];
|
||||
|
||||
extern MEM_ALIGN16 const UWORD32 gau4_ihevcd_4_bit_reverse[16];
|
||||
|
||||
#endif /*_IHEVC_TRANS_TABLES_H_*/
|
||||
|
|
|
|||
|
|
@ -91,6 +91,11 @@
|
|||
* @param[in] mode
|
||||
* integer intraprediction mode
|
||||
*
|
||||
* @param[in] intra_smoothing_flags
|
||||
* integer bit 3 indicates if intra smoothing is enabled/disabled
|
||||
* unconditionally. this is applicable to frext profiles only
|
||||
* bit 0 indicates strong intra smoothing enabled/disabled
|
||||
*
|
||||
* @returns
|
||||
*
|
||||
* @remarks
|
||||
|
|
@ -104,7 +109,7 @@ void ihevc_intra_pred_ref_filtering_sse42(UWORD8 *pu1_src,
|
|||
WORD32 nt,
|
||||
UWORD8 *pu1_dst,
|
||||
WORD32 mode,
|
||||
WORD32 strong_intra_smoothing_enable_flag)
|
||||
WORD32 intra_smoothing_flags)
|
||||
{
|
||||
WORD32 filter_flag;
|
||||
WORD32 i; /* Generic indexing variable */
|
||||
|
|
@ -117,11 +122,10 @@ void ihevc_intra_pred_ref_filtering_sse42(UWORD8 *pu1_src,
|
|||
__m128i src_temp1, src_temp2, src_temp3, src_temp7;
|
||||
__m128i src_temp4, src_temp5, src_temp6, src_temp8;
|
||||
|
||||
//WORD32 strong_intra_smoothing_enable_flag = 1;
|
||||
|
||||
|
||||
|
||||
filter_flag = gau1_intra_pred_ref_filter[mode] & (1 << (CTZ(nt) - 2));
|
||||
WORD32 intra_smoothing_disabled = (intra_smoothing_flags >> 3);
|
||||
WORD32 strong_intra_smoothing_enable_flag = intra_smoothing_flags & 1;
|
||||
filter_flag = intra_smoothing_disabled ?
|
||||
0 : (gau1_intra_pred_ref_filter[mode] & (1 << (CTZ(nt) - 2)));
|
||||
if(0 == filter_flag)
|
||||
{
|
||||
if(pu1_src == pu1_dst)
|
||||
|
|
|
|||
|
|
@ -377,6 +377,11 @@ void ihevc_intra_pred_luma_ref_substitution_ssse3(UWORD8 *pu1_top_left,
|
|||
* @param[in] mode
|
||||
* integer intraprediction mode
|
||||
*
|
||||
* @param[in] intra_smoothing_flags
|
||||
* integer bit 3 indicates if intra smoothing is enabled/disabled
|
||||
* unconditionally. this is applicable to frext profiles only
|
||||
* bit 0 indicates strong intra smoothing enabled/disabled
|
||||
*
|
||||
* @returns
|
||||
*
|
||||
* @remarks
|
||||
|
|
@ -389,7 +394,7 @@ void ihevc_intra_pred_ref_filtering_ssse3(UWORD8 *pu1_src,
|
|||
WORD32 nt,
|
||||
UWORD8 *pu1_dst,
|
||||
WORD32 mode,
|
||||
WORD32 strong_intra_smoothing_enable_flag)
|
||||
WORD32 intra_smoothing_flags)
|
||||
{
|
||||
WORD32 filter_flag;
|
||||
WORD32 i; /* Generic indexing variable */
|
||||
|
|
@ -402,9 +407,10 @@ void ihevc_intra_pred_ref_filtering_ssse3(UWORD8 *pu1_src,
|
|||
__m128i src_temp1, src_temp2, src_temp3, src_temp7;
|
||||
__m128i src_temp4, src_temp5, src_temp6, src_temp8;
|
||||
|
||||
//WORD32 strong_intra_smoothing_enable_flag = 1;
|
||||
|
||||
filter_flag = gau1_intra_pred_ref_filter[mode] & (1 << (CTZ(nt) - 2));
|
||||
WORD32 intra_smoothing_disabled = (intra_smoothing_flags >> 3);
|
||||
WORD32 strong_intra_smoothing_enable_flag = intra_smoothing_flags & 1;
|
||||
filter_flag = intra_smoothing_disabled ?
|
||||
0 : (gau1_intra_pred_ref_filter[mode] & (1 << (CTZ(nt) - 2)));
|
||||
if(0 == filter_flag)
|
||||
{
|
||||
if(pu1_src == pu1_dst)
|
||||
|
|
|
|||
|
|
@ -1,453 +0,0 @@
|
|||
@/*****************************************************************************
|
||||
@*
|
||||
@* Copyright (C) 2012 Ittiam Systems Pvt Ltd, Bangalore
|
||||
@*
|
||||
@* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
@* you may not use this file except in compliance with the License.
|
||||
@* You may obtain a copy of the License at:
|
||||
@*
|
||||
@* http://www.apache.org/licenses/LICENSE-2.0
|
||||
@*
|
||||
@* Unless required by applicable law or agreed to in writing, software
|
||||
@* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
@* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
@* See the License for the specific language governing permissions and
|
||||
@* limitations under the License.
|
||||
@*
|
||||
@*****************************************************************************/
|
||||
@/**
|
||||
@/*******************************************************************************
|
||||
@* @file
|
||||
@* ihevcd_fmt_conv_420sp_to_rgba8888.s
|
||||
@*
|
||||
@* @brief
|
||||
@* contains function definitions for format conversions
|
||||
@*
|
||||
@* @author
|
||||
@* ittiam
|
||||
@*
|
||||
@* @par list of functions:
|
||||
@*
|
||||
@*
|
||||
@* @remarks
|
||||
@* none
|
||||
@*
|
||||
@*******************************************************************************/
|
||||
.equ DO1STROUNDING, 0
|
||||
|
||||
@ ARM
|
||||
@
|
||||
@ PRESERVE8
|
||||
|
||||
.text
|
||||
.p2align 2
|
||||
|
||||
|
||||
|
||||
|
||||
@/*****************************************************************************
|
||||
@* *
|
||||
@* Function Name : ihevcd_fmt_conv_420sp_to_rgba8888() *
|
||||
@* *
|
||||
@* Description : This function conversts the image from YUV422 color *
|
||||
@* space to RGB888 color space. The function can be *
|
||||
@* invoked at the MB level. *
|
||||
@* *
|
||||
@* Arguments : R0 pubY *
|
||||
@* R1 pubUV *
|
||||
@* R2 pusRGB *
|
||||
@* R3 pusRGB *
|
||||
@* [R13 #40] usHeight *
|
||||
@* [R13 #44] usWidth *
|
||||
@* [R13 #48] usStrideY *
|
||||
@* [R13 #52] usStrideU *
|
||||
@* [R13 #56] usStrideV *
|
||||
@* [R13 #60] usStrideRGB *
|
||||
@* *
|
||||
@* Values Returned : None *
|
||||
@* *
|
||||
@* Register Usage : R0 - R14 *
|
||||
@* *
|
||||
@* Stack Usage : 104 Bytes *
|
||||
@* *
|
||||
@* Interruptibility : Interruptible *
|
||||
@* *
|
||||
@* Known Limitations *
|
||||
@* Assumptions: Image Width: Assumed to be multiple of 16 and *
|
||||
@* greater than or equal to 16 *
|
||||
@* Image Height: Assumed to be even. *
|
||||
@* *
|
||||
@* Revision History : *
|
||||
@* DD MM YYYY Author(s) Changes (Describe the changes made) *
|
||||
@* 07 06 2010 Varshita Draft *
|
||||
@* 07 06 2010 Naveen Kr T Completed *
|
||||
@* 05 08 2013 Naveen K P Modified for HEVC *
|
||||
@* 30 10 2018 Saurabh Sood Store D registers to stack *
|
||||
@*****************************************************************************/
|
||||
.global ihevcd_fmt_conv_420sp_to_rgba8888_a9q
|
||||
.type ihevcd_fmt_conv_420sp_to_rgba8888_a9q, function
|
||||
ihevcd_fmt_conv_420sp_to_rgba8888_a9q:
|
||||
|
||||
@// push the registers on the stack
|
||||
STMFD SP!,{R4-R12,LR}
|
||||
VPUSH {d8-d15}
|
||||
|
||||
@//R0 - Y PTR
|
||||
@//R1 - UV PTR
|
||||
@//R2 - RGB PTR
|
||||
@//R3 - RGB PTR
|
||||
@//R4 - PIC WIDTH
|
||||
@//R5 - PIC HT
|
||||
@//R6 - STRIDE Y
|
||||
@//R7 - STRIDE U
|
||||
@//R8 - STRIDE V
|
||||
@//R9 - STRIDE RGB
|
||||
|
||||
@//ONE ROW PROCESSING AT A TIME
|
||||
|
||||
@//THE FOUR CONSTANTS ARE:
|
||||
@//C1=0x3311,C2=0xF379,C3=0xE5F8,C4=0x4092
|
||||
|
||||
@PLD [R0]
|
||||
@PLD [R1]
|
||||
@PLD [R2]
|
||||
|
||||
|
||||
@/* can be loaded from a defined const type */
|
||||
MOVW R10,#0x3311
|
||||
VMOV.16 D0[0],R10 @//C1
|
||||
|
||||
MOVW R10,#0xF379
|
||||
VMOV.16 D0[1],R10 @//C2
|
||||
|
||||
MOVW R10,#0xE5F8
|
||||
VMOV.16 D0[2],R10 @//C3
|
||||
|
||||
MOVW R10,#0x4092
|
||||
VMOV.16 D0[3],R10 @//C4
|
||||
|
||||
@//LOAD CONSTANT 128 INTO A CORTEX REGISTER
|
||||
MOV R10,#128
|
||||
VDUP.8 D1,R10
|
||||
|
||||
@//D0 HAS C1-C2-C3-C4
|
||||
@// load other parameters from stack
|
||||
LDR R5,[sp,#104]
|
||||
@LDR R4,[sp,#44]
|
||||
LDR R6,[sp,#108]
|
||||
LDR R7,[sp,#112]
|
||||
@LDR R8,[sp,#52]
|
||||
LDR R9,[sp,#116]
|
||||
|
||||
@// calculate offsets, offset = stride - width
|
||||
SUB R10,R6,R3 @// luma offset
|
||||
SUB R11,R7,R3
|
||||
@, LSR #1 @// u offset
|
||||
@SUB R12,R8,R3, LSR #1 @// v offset
|
||||
SUB R14,R9,R3 @// rgb offset in pixels
|
||||
|
||||
@// calculate height loop count
|
||||
MOV R5,R5, LSR #1 @// height_cnt = height / 16
|
||||
|
||||
@// create next row pointers for rgb and luma data
|
||||
ADD R7,R0,R6 @// luma_next_row = luma + luma_stride
|
||||
ADD R8,R2,R9,LSL #2 @// rgb_next_row = rgb + rgb_stride
|
||||
|
||||
LABEL_YUV420SP_TO_RGB8888_HEIGHT_LOOP:
|
||||
|
||||
@//LOAD VALUES OF U&V AND COMPUTE THE R,G,B WEIGHT VALUES.
|
||||
VLD1.8 {D2,D3},[R1]! @//LOAD 8 VALUES OF UV
|
||||
@//VLD1.8 {D3},[R2]! @//LOAD 8 VALUES OF V
|
||||
|
||||
@// calculate width loop count
|
||||
MOV R6,R3, LSR #4 @// width_cnt = width / 16
|
||||
|
||||
@//COMPUTE THE ACTUAL RGB VALUES,WE CAN DO TWO ROWS AT A TIME
|
||||
@//LOAD VALUES OF Y 8-BIT VALUES
|
||||
VLD2.8 {D30,D31},[R0]! @//D0 - Y0,Y2,Y4,Y6,Y8,Y10,Y12,Y14 row 1
|
||||
@//D1 - Y1,Y3,Y5,Y7,Y9,Y11,Y13,Y15
|
||||
VLD2.8 {D28,D29},[R7]! @//D0 - Y0,Y2,Y4,Y6,Y8,Y10,Y12,Y14 row2
|
||||
@//D1 - Y1,Y3,Y5,Y7,Y9,Y11,Y13,Y15
|
||||
|
||||
SUBS R6,R6,#1
|
||||
BEQ LABEL_YUV420SP_TO_RGB8888_WIDTH_LOOP_SKIP
|
||||
|
||||
LABEL_YUV420SP_TO_RGB8888_WIDTH_LOOP:
|
||||
@VMOV.I8 Q1,#128
|
||||
VUZP.8 D2,D3
|
||||
|
||||
|
||||
@//NEED TO SUBTRACT (U-128) AND (V-128)
|
||||
@//(D2-D1),(D3-D1)
|
||||
VSUBL.U8 Q2,D2,D1 @//(U-128)
|
||||
VSUBL.U8 Q3,D3,D1 @//(V-128)
|
||||
|
||||
@//LOAD VALUES OF U&V for next row
|
||||
VLD1.8 {D2,D3},[R1]! @//LOAD 8 VALUES OF U
|
||||
@//VLD1.8 {D3},[R2]! @//LOAD 8 VALUES OF V
|
||||
|
||||
@PLD [R0]
|
||||
PLD [R1]
|
||||
|
||||
@//NEED TO MULTIPLY WITH Q2,Q3 WITH CO-EEFICIENTS
|
||||
VMULL.S16 Q4,D4,D0[3] @//(U-128)*C4 FOR B
|
||||
VMULL.S16 Q5,D5,D0[3] @//(U-128)*C4 FOR B
|
||||
|
||||
VMULL.S16 Q10,D6,D0[0] @//(V-128)*C1 FOR R
|
||||
VMULL.S16 Q11,D7,D0[0] @//(V-128)*C1 FOR R
|
||||
|
||||
VMULL.S16 Q6,D4,D0[1] @//(U-128)*C2 FOR G
|
||||
VMLAL.S16 Q6,D6,D0[2] @//Q6 = (U-128)*C2 + (V-128)*C3
|
||||
VMULL.S16 Q7,D5,D0[1] @//(U-128)*C2 FOR G
|
||||
VMLAL.S16 Q7,D7,D0[2] @//Q7 = (U-128)*C2 + (V-128)*C3
|
||||
|
||||
@//NARROW RIGHT SHIFT BY 13 FOR R&B
|
||||
VQSHRN.S32 D8,Q4,#13 @//D8 = (U-128)*C4>>13 4 16-BIT VALUES
|
||||
VQSHRN.S32 D9,Q5,#13 @//D9 = (U-128)*C4>>13 4 16-BIT VALUES
|
||||
@//Q4 - WEIGHT FOR B
|
||||
|
||||
@//NARROW RIGHT SHIFT BY 13 FOR R&B
|
||||
VQSHRN.S32 D10,Q10,#13 @//D10 = (V-128)*C1>>13 4 16-BIT VALUES
|
||||
VQSHRN.S32 D11,Q11,#13 @//D11 = (V-128)*C1>>13 4 16-BIT VALUES
|
||||
@//Q5 - WEIGHT FOR R
|
||||
|
||||
@//NARROW RIGHT SHIFT BY 13 FOR G
|
||||
VQSHRN.S32 D12,Q6,#13 @//D12 = [(U-128)*C2 + (V-128)*C3]>>13 4 16-BIT VALUES
|
||||
VQSHRN.S32 D13,Q7,#13 @//D13 = [(U-128)*C2 + (V-128)*C3]>>13 4 16-BIT VALUES
|
||||
@//Q6 - WEIGHT FOR G
|
||||
|
||||
VADDW.U8 Q7,Q4,D30 @//Q7 - HAS Y + B
|
||||
VADDW.U8 Q8,Q5,D30 @//Q8 - HAS Y + R
|
||||
VADDW.U8 Q9,Q6,D30 @//Q9 - HAS Y + G
|
||||
|
||||
VADDW.U8 Q10,Q4,D31 @//Q10 - HAS Y + B
|
||||
VADDW.U8 Q11,Q5,D31 @//Q11 - HAS Y + R
|
||||
VADDW.U8 Q12,Q6,D31 @//Q12 - HAS Y + G
|
||||
|
||||
VQMOVUN.S16 D14,Q7
|
||||
VQMOVUN.S16 D15,Q9
|
||||
VQMOVUN.S16 D16,Q8
|
||||
VMOV.I8 D17,#0
|
||||
|
||||
VZIP.8 D14,D15
|
||||
VZIP.8 D16,D17
|
||||
VZIP.16 Q7,Q8
|
||||
|
||||
|
||||
VQMOVUN.S16 D20,Q10
|
||||
VQMOVUN.S16 D21,Q12
|
||||
VQMOVUN.S16 D22,Q11
|
||||
VMOV.I8 D23,#0
|
||||
|
||||
VZIP.8 D20,D21
|
||||
VZIP.8 D22,D23
|
||||
VZIP.16 Q10,Q11
|
||||
|
||||
VZIP.32 Q7,Q10
|
||||
VZIP.32 Q8,Q11
|
||||
|
||||
VST1.32 D14,[R2]!
|
||||
VST1.32 D15,[R2]!
|
||||
VST1.32 D20,[R2]!
|
||||
VST1.32 D21,[R2]!
|
||||
VST1.32 D16,[R2]!
|
||||
VST1.32 D17,[R2]!
|
||||
VST1.32 D22,[R2]!
|
||||
VST1.32 D23,[R2]!
|
||||
|
||||
@//D14-D20 - TOALLY HAVE 16 VALUES
|
||||
@//WE NEED TO SHIFT R,G,B VALUES TO GET 5BIT,6BIT AND 5BIT COMBINATIONS
|
||||
VADDW.U8 Q7,Q4,D28 @//Q7 - HAS Y + B
|
||||
VADDW.U8 Q8,Q5,D28 @//Q2 - HAS Y + R
|
||||
VADDW.U8 Q9,Q6,D28 @//Q3 - HAS Y + G
|
||||
|
||||
VADDW.U8 Q10,Q4,D29 @//Q10 - HAS Y + B
|
||||
VADDW.U8 Q11,Q5,D29 @//Q11 - HAS Y + R
|
||||
VADDW.U8 Q12,Q6,D29 @//Q12 - HAS Y + G
|
||||
|
||||
@//COMPUTE THE ACTUAL RGB VALUES,WE CAN DO TWO ROWS AT A TIME
|
||||
@//LOAD VALUES OF Y 8-BIT VALUES
|
||||
VLD2.8 {D30,D31},[R0]! @//D0 - Y0,Y2,Y4,Y6,Y8,Y10,Y12,Y14 row 1
|
||||
@//D1 - Y1,Y3,Y5,Y7,Y9,Y11,Y13,Y15
|
||||
VLD2.8 {D28,D29},[R7]! @//D0 - Y0,Y2,Y4,Y6,Y8,Y10,Y12,Y14 row2
|
||||
@//D1 - Y1,Y3,Y5,Y7,Y9,Y11,Y13,Y15
|
||||
|
||||
PLD [R0]
|
||||
PLD [R7]
|
||||
|
||||
VQMOVUN.S16 D14,Q7
|
||||
VQMOVUN.S16 D15,Q9
|
||||
VQMOVUN.S16 D16,Q8
|
||||
VMOV.I8 D17,#0
|
||||
|
||||
VZIP.8 D14,D15
|
||||
VZIP.8 D16,D17
|
||||
VZIP.16 Q7,Q8
|
||||
|
||||
|
||||
VQMOVUN.S16 D20,Q10
|
||||
VQMOVUN.S16 D21,Q12
|
||||
VQMOVUN.S16 D22,Q11
|
||||
VMOV.I8 D23,#0
|
||||
|
||||
VZIP.8 D20,D21
|
||||
VZIP.8 D22,D23
|
||||
VZIP.16 Q10,Q11
|
||||
|
||||
VZIP.32 Q7,Q10
|
||||
VZIP.32 Q8,Q11
|
||||
|
||||
VST1.32 D14,[R8]!
|
||||
VST1.32 D15,[R8]!
|
||||
VST1.32 D20,[R8]!
|
||||
VST1.32 D21,[R8]!
|
||||
VST1.32 D16,[R8]!
|
||||
VST1.32 D17,[R8]!
|
||||
VST1.32 D22,[R8]!
|
||||
VST1.32 D23,[R8]!
|
||||
|
||||
SUBS R6,R6,#1 @// width_cnt -= 1
|
||||
BNE LABEL_YUV420SP_TO_RGB8888_WIDTH_LOOP
|
||||
|
||||
LABEL_YUV420SP_TO_RGB8888_WIDTH_LOOP_SKIP:
|
||||
@VMOV.I8 Q1,#128
|
||||
VUZP.8 D2,D3
|
||||
|
||||
|
||||
@//NEED TO SUBTRACT (U-128) AND (V-128)
|
||||
@//(D2-D1),(D3-D1)
|
||||
VSUBL.U8 Q2,D2,D1 @//(U-128)
|
||||
VSUBL.U8 Q3,D3,D1 @//(V-128)
|
||||
|
||||
|
||||
@//NEED TO MULTIPLY WITH Q2,Q3 WITH CO-EEFICIENTS
|
||||
VMULL.S16 Q4,D4,D0[3] @//(U-128)*C4 FOR B
|
||||
VMULL.S16 Q5,D5,D0[3] @//(U-128)*C4 FOR B
|
||||
|
||||
VMULL.S16 Q10,D6,D0[0] @//(V-128)*C1 FOR R
|
||||
VMULL.S16 Q11,D7,D0[0] @//(V-128)*C1 FOR R
|
||||
|
||||
VMULL.S16 Q6,D4,D0[1] @//(U-128)*C2 FOR G
|
||||
VMLAL.S16 Q6,D6,D0[2] @//Q6 = (U-128)*C2 + (V-128)*C3
|
||||
VMULL.S16 Q7,D5,D0[1] @//(U-128)*C2 FOR G
|
||||
VMLAL.S16 Q7,D7,D0[2] @//Q7 = (U-128)*C2 + (V-128)*C3
|
||||
|
||||
@//NARROW RIGHT SHIFT BY 13 FOR R&B
|
||||
VQSHRN.S32 D8,Q4,#13 @//D8 = (U-128)*C4>>13 4 16-BIT VALUES
|
||||
VQSHRN.S32 D9,Q5,#13 @//D9 = (U-128)*C4>>13 4 16-BIT VALUES
|
||||
@//Q4 - WEIGHT FOR B
|
||||
|
||||
@//NARROW RIGHT SHIFT BY 13 FOR R&B
|
||||
VQSHRN.S32 D10,Q10,#13 @//D10 = (V-128)*C1>>13 4 16-BIT VALUES
|
||||
VQSHRN.S32 D11,Q11,#13 @//D11 = (V-128)*C1>>13 4 16-BIT VALUES
|
||||
@//Q5 - WEIGHT FOR R
|
||||
|
||||
@//NARROW RIGHT SHIFT BY 13 FOR G
|
||||
VQSHRN.S32 D12,Q6,#13 @//D12 = [(U-128)*C2 + (V-128)*C3]>>13 4 16-BIT VALUES
|
||||
VQSHRN.S32 D13,Q7,#13 @//D13 = [(U-128)*C2 + (V-128)*C3]>>13 4 16-BIT VALUES
|
||||
@//Q6 - WEIGHT FOR G
|
||||
|
||||
VADDW.U8 Q7,Q4,D30 @//Q7 - HAS Y + B
|
||||
VADDW.U8 Q8,Q5,D30 @//Q8 - HAS Y + R
|
||||
VADDW.U8 Q9,Q6,D30 @//Q9 - HAS Y + G
|
||||
|
||||
VADDW.U8 Q10,Q4,D31 @//Q10 - HAS Y + B
|
||||
VADDW.U8 Q11,Q5,D31 @//Q11 - HAS Y + R
|
||||
VADDW.U8 Q12,Q6,D31 @//Q12 - HAS Y + G
|
||||
|
||||
VQMOVUN.S16 D14,Q7
|
||||
VQMOVUN.S16 D15,Q9
|
||||
VQMOVUN.S16 D16,Q8
|
||||
VMOV.I8 D17,#0
|
||||
|
||||
VZIP.8 D14,D15
|
||||
VZIP.8 D16,D17
|
||||
VZIP.16 Q7,Q8
|
||||
|
||||
|
||||
VQMOVUN.S16 D20,Q10
|
||||
VQMOVUN.S16 D21,Q12
|
||||
VQMOVUN.S16 D22,Q11
|
||||
VMOV.I8 D23,#0
|
||||
|
||||
VZIP.8 D20,D21
|
||||
VZIP.8 D22,D23
|
||||
VZIP.16 Q10,Q11
|
||||
|
||||
VZIP.32 Q7,Q10
|
||||
VZIP.32 Q8,Q11
|
||||
|
||||
VST1.32 D14,[R2]!
|
||||
VST1.32 D15,[R2]!
|
||||
VST1.32 D20,[R2]!
|
||||
VST1.32 D21,[R2]!
|
||||
VST1.32 D16,[R2]!
|
||||
VST1.32 D17,[R2]!
|
||||
VST1.32 D22,[R2]!
|
||||
VST1.32 D23,[R2]!
|
||||
|
||||
@//D14-D20 - TOALLY HAVE 16 VALUES
|
||||
@//WE NEED TO SHIFT R,G,B VALUES TO GET 5BIT,6BIT AND 5BIT COMBINATIONS
|
||||
VADDW.U8 Q7,Q4,D28 @//Q7 - HAS Y + B
|
||||
VADDW.U8 Q8,Q5,D28 @//Q2 - HAS Y + R
|
||||
VADDW.U8 Q9,Q6,D28 @//Q3 - HAS Y + G
|
||||
|
||||
VADDW.U8 Q10,Q4,D29 @//Q10 - HAS Y + B
|
||||
VADDW.U8 Q11,Q5,D29 @//Q11 - HAS Y + R
|
||||
VADDW.U8 Q12,Q6,D29 @//Q12 - HAS Y + G
|
||||
|
||||
|
||||
VQMOVUN.S16 D14,Q7
|
||||
VQMOVUN.S16 D15,Q9
|
||||
VQMOVUN.S16 D16,Q8
|
||||
VMOV.I8 D17,#0
|
||||
|
||||
VZIP.8 D14,D15
|
||||
VZIP.8 D16,D17
|
||||
VZIP.16 Q7,Q8
|
||||
|
||||
|
||||
VQMOVUN.S16 D20,Q10
|
||||
VQMOVUN.S16 D21,Q12
|
||||
VQMOVUN.S16 D22,Q11
|
||||
VMOV.I8 D23,#0
|
||||
|
||||
VZIP.8 D20,D21
|
||||
VZIP.8 D22,D23
|
||||
VZIP.16 Q10,Q11
|
||||
|
||||
VZIP.32 Q7,Q10
|
||||
VZIP.32 Q8,Q11
|
||||
|
||||
VST1.32 D14,[R8]!
|
||||
VST1.32 D15,[R8]!
|
||||
VST1.32 D20,[R8]!
|
||||
VST1.32 D21,[R8]!
|
||||
VST1.32 D16,[R8]!
|
||||
VST1.32 D17,[R8]!
|
||||
VST1.32 D22,[R8]!
|
||||
VST1.32 D23,[R8]!
|
||||
|
||||
@// Adjust the address pointers
|
||||
ADD R0,R7,R10 @// luma = luma_next + offset
|
||||
ADD R2,R8,R14,LSL #2 @// rgb = rgb_next + offset
|
||||
|
||||
ADD R7,R0,R3 @// luma_next = luma + width
|
||||
ADD R8,R2,R3,LSL #2 @// rgb_next_row = rgb + width
|
||||
|
||||
ADD R1,R1,R11 @// adjust u pointer
|
||||
@ADD R2,R2,R12 @// adjust v pointer
|
||||
|
||||
ADD R7,R7,R10 @// luma_next = luma + width + offset (because of register crunch)
|
||||
ADD R8,R8,R14,LSL #2 @// rgb_next_row = rgb + width + offset
|
||||
|
||||
SUBS R5,R5,#1 @// height_cnt -= 1
|
||||
|
||||
BNE LABEL_YUV420SP_TO_RGB8888_HEIGHT_LOOP
|
||||
|
||||
@//POP THE REGISTERS
|
||||
VPOP {d8-d15}
|
||||
LDMFD SP!,{R4-R12,PC}
|
||||
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
|
@ -58,10 +58,6 @@
|
|||
#include "ihevcd_function_selector.h"
|
||||
#include "ihevcd_structs.h"
|
||||
|
||||
void ihevcd_init_function_ptr_neonintr(codec_t *ps_codec);
|
||||
void ihevcd_init_function_ptr_noneon(codec_t *ps_codec);
|
||||
void ihevcd_init_function_ptr_a9q(codec_t *ps_codec);
|
||||
void ihevcd_init_function_ptr_av8(codec_t *ps_codec);
|
||||
void ihevcd_init_function_ptr(void *pv_codec)
|
||||
{
|
||||
codec_t *ps_codec = (codec_t *)pv_codec;
|
||||
|
|
@ -71,11 +67,11 @@ void ihevcd_init_function_ptr(void *pv_codec)
|
|||
{
|
||||
#ifndef DISABLE_NEONINTR
|
||||
case ARCH_ARM_NEONINTR:
|
||||
ihevcd_init_function_ptr_neonintr(ps_codec);
|
||||
ihevcd_init_function_ptr_neonintr(&ps_codec->s_func_selector);
|
||||
break;
|
||||
#endif
|
||||
case ARCH_ARM_NONEON:
|
||||
ihevcd_init_function_ptr_noneon(ps_codec);
|
||||
ihevcd_init_function_ptr_noneon(&ps_codec->s_func_selector);
|
||||
break;
|
||||
default:
|
||||
case ARCH_ARM_A5:
|
||||
|
|
@ -84,9 +80,9 @@ void ihevcd_init_function_ptr(void *pv_codec)
|
|||
case ARCH_ARM_A15:
|
||||
case ARCH_ARM_A9Q:
|
||||
#ifndef DISABLE_NEON
|
||||
ihevcd_init_function_ptr_a9q(ps_codec);
|
||||
ihevcd_init_function_ptr_a9q(&ps_codec->s_func_selector);
|
||||
#else
|
||||
ihevcd_init_function_ptr_noneon(ps_codec);
|
||||
ihevcd_init_function_ptr_noneon(&ps_codec->s_func_selector);
|
||||
#endif
|
||||
break;
|
||||
}
|
||||
|
|
@ -106,12 +102,17 @@ void ihevcd_init_function_ptr(void *pv_codec)
|
|||
switch(ps_codec->e_processor_arch)
|
||||
{
|
||||
case ARCH_ARM_NONEON:
|
||||
ihevcd_init_function_ptr_noneon(ps_codec);
|
||||
ihevcd_init_function_ptr_noneon(&ps_codec->s_func_selector);
|
||||
break;
|
||||
case ARCH_ARMV8_GENERIC:
|
||||
default:
|
||||
ihevcd_init_function_ptr_av8(ps_codec);
|
||||
#ifdef DARWIN
|
||||
ihevcd_init_function_ptr_noneon(&ps_codec->s_func_selector);
|
||||
break;
|
||||
#else
|
||||
ihevcd_init_function_ptr_av8(&ps_codec->s_func_selector);
|
||||
break;
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,107 +54,113 @@
|
|||
#include "ihevc_dpb_mgr.h"
|
||||
#include "ihevc_error.h"
|
||||
|
||||
#include "ihevcd_defs.h"
|
||||
#include "ihevcd_function_selector.h"
|
||||
#include "ihevcd_structs.h"
|
||||
|
||||
void ihevcd_init_function_ptr_a9q(codec_t *ps_codec)
|
||||
void ihevcd_init_function_ptr_a9q(func_selector_t *ps_func_selector)
|
||||
{
|
||||
ps_codec->s_func_selector.ihevc_deblk_chroma_horz_fptr = &ihevc_deblk_chroma_horz_a9q;
|
||||
ps_codec->s_func_selector.ihevc_deblk_chroma_vert_fptr = &ihevc_deblk_chroma_vert_a9q;
|
||||
ps_codec->s_func_selector.ihevc_deblk_luma_vert_fptr = &ihevc_deblk_luma_vert_a9q;
|
||||
ps_codec->s_func_selector.ihevc_deblk_luma_horz_fptr = &ihevc_deblk_luma_horz_a9q;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_copy_fptr = &ihevc_inter_pred_chroma_copy_a9q;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_copy_w16out_fptr = &ihevc_inter_pred_chroma_copy_w16out_a9q;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_horz_fptr = &ihevc_inter_pred_chroma_horz_a9q;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_horz_w16out_fptr = &ihevc_inter_pred_chroma_horz_w16out_a9q;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_fptr = &ihevc_inter_pred_chroma_vert_a9q;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_w16inp_fptr = &ihevc_inter_pred_chroma_vert_w16inp_a9q;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16inp_w16out_a9q;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16out_a9q;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_horz_fptr = &ihevc_inter_pred_luma_horz_a9q;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_fptr = &ihevc_inter_pred_luma_vert_a9q;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_w16out_fptr = &ihevc_inter_pred_luma_vert_w16out_a9q;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_w16inp_fptr = &ihevc_inter_pred_luma_vert_w16inp_a9q;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_copy_fptr = &ihevc_inter_pred_luma_copy_a9q;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_copy_w16out_fptr = &ihevc_inter_pred_luma_copy_w16out_a9q;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_horz_w16out_fptr = &ihevc_inter_pred_luma_horz_w16out_a9q;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_luma_vert_w16inp_w16out_a9q;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_ref_substitution_fptr = &ihevc_intra_pred_chroma_ref_substitution_a9q;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_ref_substitution_fptr = &ihevc_intra_pred_luma_ref_substitution_a9q;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_ref_subst_all_avlble_fptr = &ihevc_intra_pred_luma_ref_subst_all_avlble;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_ref_filtering_fptr = &ihevc_intra_pred_ref_filtering_neonintr;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_dc_fptr = &ihevc_intra_pred_chroma_dc_a9q;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_horz_fptr = &ihevc_intra_pred_chroma_horz_a9q;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode2_fptr = &ihevc_intra_pred_chroma_mode2_a9q;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_18_34_fptr = &ihevc_intra_pred_chroma_mode_18_34_a9q;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_27_to_33_fptr = &ihevc_intra_pred_chroma_mode_27_to_33_a9q;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_3_to_9_fptr = &ihevc_intra_pred_chroma_mode_3_to_9_a9q;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_planar_fptr = &ihevc_intra_pred_chroma_planar_a9q;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_ver_fptr = &ihevc_intra_pred_chroma_ver_a9q;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_11_to_17_fptr = &ihevc_intra_pred_chroma_mode_11_to_17_a9q;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_19_to_25_fptr = &ihevc_intra_pred_chroma_mode_19_to_25_a9q;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_11_to_17_fptr = &ihevc_intra_pred_luma_mode_11_to_17_a9q;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_19_to_25_fptr = &ihevc_intra_pred_luma_mode_19_to_25_a9q;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_dc_fptr = &ihevc_intra_pred_luma_dc_a9q;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_horz_fptr = &ihevc_intra_pred_luma_horz_a9q;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode2_fptr = &ihevc_intra_pred_luma_mode2_a9q;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_18_34_fptr = &ihevc_intra_pred_luma_mode_18_34_a9q;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_27_to_33_fptr = &ihevc_intra_pred_luma_mode_27_to_33_a9q;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_3_to_9_fptr = &ihevc_intra_pred_luma_mode_3_to_9_a9q;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_planar_fptr = &ihevc_intra_pred_luma_planar_a9q;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_ver_fptr = &ihevc_intra_pred_luma_ver_a9q;
|
||||
ps_codec->s_func_selector.ihevc_itrans_4x4_ttype1_fptr = &ihevc_itrans_4x4_ttype1;
|
||||
ps_codec->s_func_selector.ihevc_itrans_4x4_fptr = &ihevc_itrans_4x4;
|
||||
ps_codec->s_func_selector.ihevc_itrans_8x8_fptr = &ihevc_itrans_8x8;
|
||||
ps_codec->s_func_selector.ihevc_itrans_16x16_fptr = &ihevc_itrans_16x16;
|
||||
ps_codec->s_func_selector.ihevc_itrans_32x32_fptr = &ihevc_itrans_32x32;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_4x4_ttype1_fptr = &ihevc_itrans_recon_4x4_ttype1_a9q;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_4x4_fptr = &ihevc_itrans_recon_4x4_a9q;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_8x8_fptr = &ihevc_itrans_recon_8x8_a9q;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_16x16_fptr = &ihevc_itrans_recon_16x16_a9q;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_32x32_fptr = &ihevc_itrans_recon_32x32_a9q;
|
||||
ps_codec->s_func_selector.ihevc_chroma_itrans_recon_4x4_fptr = &ihevc_chroma_itrans_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_chroma_itrans_recon_8x8_fptr = &ihevc_chroma_itrans_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_chroma_itrans_recon_16x16_fptr = &ihevc_chroma_itrans_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_recon_4x4_ttype1_fptr = &ihevc_recon_4x4_ttype1;
|
||||
ps_codec->s_func_selector.ihevc_recon_4x4_fptr = &ihevc_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_recon_8x8_fptr = &ihevc_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_recon_16x16_fptr = &ihevc_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_recon_32x32_fptr = &ihevc_recon_32x32;
|
||||
ps_codec->s_func_selector.ihevc_chroma_recon_4x4_fptr = &ihevc_chroma_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_chroma_recon_8x8_fptr = &ihevc_chroma_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_chroma_recon_16x16_fptr = &ihevc_chroma_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_memcpy_mul_8_fptr = &ihevc_memcpy_mul_8_a9q;
|
||||
ps_codec->s_func_selector.ihevc_memcpy_fptr = &ihevc_memcpy_a9q;
|
||||
ps_codec->s_func_selector.ihevc_memset_mul_8_fptr = &ihevc_memset_mul_8_a9q;
|
||||
ps_codec->s_func_selector.ihevc_memset_fptr = &ihevc_memset_a9q;
|
||||
ps_codec->s_func_selector.ihevc_memset_16bit_mul_8_fptr = &ihevc_memset_16bit_mul_8_a9q;
|
||||
ps_codec->s_func_selector.ihevc_memset_16bit_fptr = &ihevc_memset_16bit_a9q;
|
||||
ps_codec->s_func_selector.ihevc_pad_left_luma_fptr = &ihevc_pad_left_luma_a9q;
|
||||
ps_codec->s_func_selector.ihevc_pad_left_chroma_fptr = &ihevc_pad_left_chroma_a9q;
|
||||
ps_codec->s_func_selector.ihevc_pad_right_luma_fptr = &ihevc_pad_right_luma_a9q;
|
||||
ps_codec->s_func_selector.ihevc_pad_right_chroma_fptr = &ihevc_pad_right_chroma_a9q;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_bi_fptr = &ihevc_weighted_pred_bi_a9q;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_bi_default_fptr = &ihevc_weighted_pred_bi_default_a9q;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_uni_fptr = &ihevc_weighted_pred_uni_a9q;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_bi_fptr = &ihevc_weighted_pred_chroma_bi_neonintr;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_bi_default_fptr = &ihevc_weighted_pred_chroma_bi_default_neonintr;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_uni_fptr = &ihevc_weighted_pred_chroma_uni_neonintr;
|
||||
ps_codec->s_func_selector.ihevc_sao_band_offset_luma_fptr = &ihevc_sao_band_offset_luma_a9q;
|
||||
ps_codec->s_func_selector.ihevc_sao_band_offset_chroma_fptr = &ihevc_sao_band_offset_chroma_a9q;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class0_fptr = &ihevc_sao_edge_offset_class0_a9q;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class0_chroma_fptr = &ihevc_sao_edge_offset_class0_chroma_a9q;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class1_fptr = &ihevc_sao_edge_offset_class1_a9q;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class1_chroma_fptr = &ihevc_sao_edge_offset_class1_chroma_a9q;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class2_fptr = &ihevc_sao_edge_offset_class2_a9q;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class2_chroma_fptr = &ihevc_sao_edge_offset_class2_chroma_a9q;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class3_fptr = &ihevc_sao_edge_offset_class3_a9q;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class3_chroma_fptr = &ihevc_sao_edge_offset_class3_chroma_a9q;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_rgba8888_fptr = &ihevcd_fmt_conv_420sp_to_rgba8888_a9q;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_rgb565_fptr = &ihevcd_fmt_conv_420sp_to_rgb565;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_420sp_fptr = &ihevcd_fmt_conv_420sp_to_420sp;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_420p_fptr = &ihevcd_fmt_conv_420sp_to_420p_a9q;
|
||||
ps_codec->s_func_selector.ihevcd_itrans_recon_dc_luma_fptr = &ihevcd_itrans_recon_dc_luma_a9q;
|
||||
ps_codec->s_func_selector.ihevcd_itrans_recon_dc_chroma_fptr = &ihevcd_itrans_recon_dc_chroma_a9q;
|
||||
ps_func_selector->ihevc_deblk_chroma_horz_fptr = &ihevc_deblk_chroma_horz_a9q;
|
||||
ps_func_selector->ihevc_deblk_chroma_vert_fptr = &ihevc_deblk_chroma_vert_a9q;
|
||||
ps_func_selector->ihevc_deblk_luma_vert_fptr = &ihevc_deblk_luma_vert_a9q;
|
||||
ps_func_selector->ihevc_deblk_luma_horz_fptr = &ihevc_deblk_luma_horz_a9q;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_copy_fptr = &ihevc_inter_pred_chroma_copy_a9q;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_copy_w16out_fptr = &ihevc_inter_pred_chroma_copy_w16out_a9q;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_horz_fptr = &ihevc_inter_pred_chroma_horz_a9q;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_horz_w16out_fptr = &ihevc_inter_pred_chroma_horz_w16out_a9q;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_fptr = &ihevc_inter_pred_chroma_vert_a9q;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_w16inp_fptr = &ihevc_inter_pred_chroma_vert_w16inp_a9q;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16inp_w16out_a9q;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16out_a9q;
|
||||
ps_func_selector->ihevc_inter_pred_luma_horz_fptr = &ihevc_inter_pred_luma_horz_a9q;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_fptr = &ihevc_inter_pred_luma_vert_a9q;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_w16out_fptr = &ihevc_inter_pred_luma_vert_w16out_a9q;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_w16inp_fptr = &ihevc_inter_pred_luma_vert_w16inp_a9q;
|
||||
ps_func_selector->ihevc_inter_pred_luma_copy_fptr = &ihevc_inter_pred_luma_copy_a9q;
|
||||
ps_func_selector->ihevc_inter_pred_luma_copy_w16out_fptr = &ihevc_inter_pred_luma_copy_w16out_a9q;
|
||||
ps_func_selector->ihevc_inter_pred_luma_horz_w16out_fptr = &ihevc_inter_pred_luma_horz_w16out_a9q;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_luma_vert_w16inp_w16out_a9q;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_ref_substitution_fptr = &ihevc_intra_pred_chroma_ref_substitution_a9q;
|
||||
ps_func_selector->ihevc_intra_pred_luma_ref_substitution_fptr = &ihevc_intra_pred_luma_ref_substitution_a9q;
|
||||
ps_func_selector->ihevc_intra_pred_luma_ref_subst_all_avlble_fptr = &ihevc_intra_pred_luma_ref_subst_all_avlble;
|
||||
ps_func_selector->ihevc_intra_pred_ref_filtering_fptr = &ihevc_intra_pred_ref_filtering_neonintr;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_ref_filtering_fptr = &ihevc_intra_pred_chroma_ref_filtering;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_dc_fptr = &ihevc_intra_pred_chroma_dc_a9q;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_horz_fptr = &ihevc_intra_pred_chroma_horz_a9q;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode2_fptr = &ihevc_intra_pred_chroma_mode2_a9q;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_18_34_fptr = &ihevc_intra_pred_chroma_mode_18_34_a9q;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_27_to_33_fptr = &ihevc_intra_pred_chroma_mode_27_to_33_a9q;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_3_to_9_fptr = &ihevc_intra_pred_chroma_mode_3_to_9_a9q;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_planar_fptr = &ihevc_intra_pred_chroma_planar_a9q;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_ver_fptr = &ihevc_intra_pred_chroma_ver_a9q;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_11_to_17_fptr = &ihevc_intra_pred_chroma_mode_11_to_17_a9q;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_19_to_25_fptr = &ihevc_intra_pred_chroma_mode_19_to_25_a9q;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_11_to_17_fptr = &ihevc_intra_pred_luma_mode_11_to_17_a9q;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_19_to_25_fptr = &ihevc_intra_pred_luma_mode_19_to_25_a9q;
|
||||
ps_func_selector->ihevc_intra_pred_luma_dc_fptr = &ihevc_intra_pred_luma_dc_a9q;
|
||||
ps_func_selector->ihevc_intra_pred_luma_horz_fptr = &ihevc_intra_pred_luma_horz_a9q;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode2_fptr = &ihevc_intra_pred_luma_mode2_a9q;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_18_34_fptr = &ihevc_intra_pred_luma_mode_18_34_a9q;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_27_to_33_fptr = &ihevc_intra_pred_luma_mode_27_to_33_a9q;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_3_to_9_fptr = &ihevc_intra_pred_luma_mode_3_to_9_a9q;
|
||||
ps_func_selector->ihevc_intra_pred_luma_planar_fptr = &ihevc_intra_pred_luma_planar_a9q;
|
||||
ps_func_selector->ihevc_intra_pred_luma_ver_fptr = &ihevc_intra_pred_luma_ver_a9q;
|
||||
ps_func_selector->ihevc_itrans_4x4_ttype1_fptr = &ihevc_itrans_4x4_ttype1;
|
||||
ps_func_selector->ihevc_itrans_4x4_fptr = &ihevc_itrans_4x4;
|
||||
ps_func_selector->ihevc_itrans_8x8_fptr = &ihevc_itrans_8x8;
|
||||
ps_func_selector->ihevc_itrans_16x16_fptr = &ihevc_itrans_16x16;
|
||||
ps_func_selector->ihevc_itrans_32x32_fptr = &ihevc_itrans_32x32;
|
||||
ps_func_selector->ihevc_itrans_res_4x4_ttype1_fptr = &ihevc_itrans_res_4x4_ttype1;
|
||||
ps_func_selector->ihevc_itrans_res_4x4_fptr = &ihevc_itrans_res_4x4;
|
||||
ps_func_selector->ihevc_itrans_res_8x8_fptr = &ihevc_itrans_res_8x8;
|
||||
ps_func_selector->ihevc_itrans_res_16x16_fptr = &ihevc_itrans_res_16x16;
|
||||
ps_func_selector->ihevc_itrans_res_32x32_fptr = &ihevc_itrans_res_32x32;
|
||||
ps_func_selector->ihevc_itrans_recon_4x4_ttype1_fptr = &ihevc_itrans_recon_4x4_ttype1_a9q;
|
||||
ps_func_selector->ihevc_itrans_recon_4x4_fptr = &ihevc_itrans_recon_4x4_a9q;
|
||||
ps_func_selector->ihevc_itrans_recon_8x8_fptr = &ihevc_itrans_recon_8x8_a9q;
|
||||
ps_func_selector->ihevc_itrans_recon_16x16_fptr = &ihevc_itrans_recon_16x16_a9q;
|
||||
ps_func_selector->ihevc_itrans_recon_32x32_fptr = &ihevc_itrans_recon_32x32_a9q;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_4x4_fptr = &ihevc_chroma_itrans_recon_4x4;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_8x8_fptr = &ihevc_chroma_itrans_recon_8x8;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_16x16_fptr = &ihevc_chroma_itrans_recon_16x16;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_32x32_fptr = &ihevc_chroma_itrans_recon_32x32;
|
||||
ps_func_selector->ihevc_recon_4x4_ttype1_fptr = &ihevc_recon_4x4_ttype1;
|
||||
ps_func_selector->ihevc_recon_4x4_fptr = &ihevc_recon_4x4;
|
||||
ps_func_selector->ihevc_recon_8x8_fptr = &ihevc_recon_8x8;
|
||||
ps_func_selector->ihevc_recon_16x16_fptr = &ihevc_recon_16x16;
|
||||
ps_func_selector->ihevc_recon_32x32_fptr = &ihevc_recon_32x32;
|
||||
ps_func_selector->ihevc_chroma_recon_4x4_fptr = &ihevc_chroma_recon_4x4;
|
||||
ps_func_selector->ihevc_chroma_recon_8x8_fptr = &ihevc_chroma_recon_8x8;
|
||||
ps_func_selector->ihevc_chroma_recon_16x16_fptr = &ihevc_chroma_recon_16x16;
|
||||
ps_func_selector->ihevc_chroma_recon_32x32_fptr = &ihevc_chroma_recon_32x32;
|
||||
ps_func_selector->ihevc_memcpy_mul_8_fptr = &ihevc_memcpy_mul_8_a9q;
|
||||
ps_func_selector->ihevc_memcpy_fptr = &ihevc_memcpy_a9q;
|
||||
ps_func_selector->ihevc_memset_mul_8_fptr = &ihevc_memset_mul_8_a9q;
|
||||
ps_func_selector->ihevc_memset_fptr = &ihevc_memset_a9q;
|
||||
ps_func_selector->ihevc_memset_16bit_mul_8_fptr = &ihevc_memset_16bit_mul_8_a9q;
|
||||
ps_func_selector->ihevc_memset_16bit_fptr = &ihevc_memset_16bit_a9q;
|
||||
ps_func_selector->ihevc_pad_left_luma_fptr = &ihevc_pad_left_luma_a9q;
|
||||
ps_func_selector->ihevc_pad_left_chroma_fptr = &ihevc_pad_left_chroma_a9q;
|
||||
ps_func_selector->ihevc_pad_right_luma_fptr = &ihevc_pad_right_luma_a9q;
|
||||
ps_func_selector->ihevc_pad_right_chroma_fptr = &ihevc_pad_right_chroma_a9q;
|
||||
ps_func_selector->ihevc_weighted_pred_bi_fptr = &ihevc_weighted_pred_bi_a9q;
|
||||
ps_func_selector->ihevc_weighted_pred_bi_default_fptr = &ihevc_weighted_pred_bi_default_a9q;
|
||||
ps_func_selector->ihevc_weighted_pred_uni_fptr = &ihevc_weighted_pred_uni_a9q;
|
||||
ps_func_selector->ihevc_weighted_pred_chroma_bi_fptr = &ihevc_weighted_pred_chroma_bi_neonintr;
|
||||
ps_func_selector->ihevc_weighted_pred_chroma_bi_default_fptr = &ihevc_weighted_pred_chroma_bi_default_neonintr;
|
||||
ps_func_selector->ihevc_weighted_pred_chroma_uni_fptr = &ihevc_weighted_pred_chroma_uni_neonintr;
|
||||
ps_func_selector->ihevc_sao_band_offset_luma_fptr = &ihevc_sao_band_offset_luma_a9q;
|
||||
ps_func_selector->ihevc_sao_band_offset_chroma_fptr = &ihevc_sao_band_offset_chroma_a9q;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class0_fptr = &ihevc_sao_edge_offset_class0_a9q;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class0_chroma_fptr = &ihevc_sao_edge_offset_class0_chroma_a9q;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class1_fptr = &ihevc_sao_edge_offset_class1_a9q;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class1_chroma_fptr = &ihevc_sao_edge_offset_class1_chroma_a9q;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class2_fptr = &ihevc_sao_edge_offset_class2_a9q;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class2_chroma_fptr = &ihevc_sao_edge_offset_class2_chroma_a9q;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class3_fptr = &ihevc_sao_edge_offset_class3_a9q;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class3_chroma_fptr = &ihevc_sao_edge_offset_class3_chroma_a9q;
|
||||
ps_func_selector->ihevcd_fmt_conv_420sp_to_420sp_fptr = &ihevcd_fmt_conv_420sp_to_420sp;
|
||||
ps_func_selector->ihevcd_fmt_conv_420sp_to_420p_fptr = &ihevcd_fmt_conv_420sp_to_420p_a9q;
|
||||
ps_func_selector->ihevcd_fmt_conv_444sp_to_444p_fptr = &ihevcd_fmt_conv_444sp_to_444p;
|
||||
ps_func_selector->ihevcd_itrans_recon_dc_luma_fptr = &ihevcd_itrans_recon_dc_luma_a9q;
|
||||
ps_func_selector->ihevcd_itrans_recon_dc_chroma_fptr = &ihevcd_itrans_recon_dc_chroma_a9q;
|
||||
ps_func_selector->ihevcd_itrans_res_dc_fptr = &ihevcd_itrans_res_dc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,107 +54,113 @@
|
|||
#include "ihevc_dpb_mgr.h"
|
||||
#include "ihevc_error.h"
|
||||
|
||||
#include "ihevcd_defs.h"
|
||||
#include "ihevcd_function_selector.h"
|
||||
#include "ihevcd_structs.h"
|
||||
|
||||
void ihevcd_init_function_ptr_noneon(codec_t *ps_codec)
|
||||
void ihevcd_init_function_ptr_noneon(func_selector_t *ps_func_selector)
|
||||
{
|
||||
ps_codec->s_func_selector.ihevc_deblk_chroma_horz_fptr = &ihevc_deblk_chroma_horz;
|
||||
ps_codec->s_func_selector.ihevc_deblk_chroma_vert_fptr = &ihevc_deblk_chroma_vert;
|
||||
ps_codec->s_func_selector.ihevc_deblk_luma_vert_fptr = &ihevc_deblk_luma_vert;
|
||||
ps_codec->s_func_selector.ihevc_deblk_luma_horz_fptr = &ihevc_deblk_luma_horz;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_copy_fptr = &ihevc_inter_pred_chroma_copy;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_copy_w16out_fptr = &ihevc_inter_pred_chroma_copy_w16out;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_horz_fptr = &ihevc_inter_pred_chroma_horz;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_horz_w16out_fptr = &ihevc_inter_pred_chroma_horz_w16out;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_fptr = &ihevc_inter_pred_chroma_vert;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_w16inp_fptr = &ihevc_inter_pred_chroma_vert_w16inp;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16inp_w16out;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16out;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_horz_fptr = &ihevc_inter_pred_luma_horz;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_fptr = &ihevc_inter_pred_luma_vert;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_w16out_fptr = &ihevc_inter_pred_luma_vert_w16out;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_w16inp_fptr = &ihevc_inter_pred_luma_vert_w16inp;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_copy_fptr = &ihevc_inter_pred_luma_copy;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_copy_w16out_fptr = &ihevc_inter_pred_luma_copy_w16out;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_horz_w16out_fptr = &ihevc_inter_pred_luma_horz_w16out;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_luma_vert_w16inp_w16out;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_ref_substitution_fptr = &ihevc_intra_pred_chroma_ref_substitution;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_ref_substitution_fptr = &ihevc_intra_pred_luma_ref_substitution;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_ref_subst_all_avlble_fptr = &ihevc_intra_pred_luma_ref_subst_all_avlble;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_ref_filtering_fptr = &ihevc_intra_pred_ref_filtering;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_dc_fptr = &ihevc_intra_pred_chroma_dc;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_horz_fptr = &ihevc_intra_pred_chroma_horz;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode2_fptr = &ihevc_intra_pred_chroma_mode2;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_18_34_fptr = &ihevc_intra_pred_chroma_mode_18_34;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_27_to_33_fptr = &ihevc_intra_pred_chroma_mode_27_to_33;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_3_to_9_fptr = &ihevc_intra_pred_chroma_mode_3_to_9;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_planar_fptr = &ihevc_intra_pred_chroma_planar;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_ver_fptr = &ihevc_intra_pred_chroma_ver;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_11_to_17_fptr = &ihevc_intra_pred_chroma_mode_11_to_17;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_19_to_25_fptr = &ihevc_intra_pred_chroma_mode_19_to_25;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_11_to_17_fptr = &ihevc_intra_pred_luma_mode_11_to_17;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_19_to_25_fptr = &ihevc_intra_pred_luma_mode_19_to_25;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_dc_fptr = &ihevc_intra_pred_luma_dc;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_horz_fptr = &ihevc_intra_pred_luma_horz;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode2_fptr = &ihevc_intra_pred_luma_mode2;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_18_34_fptr = &ihevc_intra_pred_luma_mode_18_34;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_27_to_33_fptr = &ihevc_intra_pred_luma_mode_27_to_33;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_3_to_9_fptr = &ihevc_intra_pred_luma_mode_3_to_9;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_planar_fptr = &ihevc_intra_pred_luma_planar;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_ver_fptr = &ihevc_intra_pred_luma_ver;
|
||||
ps_codec->s_func_selector.ihevc_itrans_4x4_ttype1_fptr = &ihevc_itrans_4x4_ttype1;
|
||||
ps_codec->s_func_selector.ihevc_itrans_4x4_fptr = &ihevc_itrans_4x4;
|
||||
ps_codec->s_func_selector.ihevc_itrans_8x8_fptr = &ihevc_itrans_8x8;
|
||||
ps_codec->s_func_selector.ihevc_itrans_16x16_fptr = &ihevc_itrans_16x16;
|
||||
ps_codec->s_func_selector.ihevc_itrans_32x32_fptr = &ihevc_itrans_32x32;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_4x4_ttype1_fptr = &ihevc_itrans_recon_4x4_ttype1;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_4x4_fptr = &ihevc_itrans_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_8x8_fptr = &ihevc_itrans_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_16x16_fptr = &ihevc_itrans_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_32x32_fptr = &ihevc_itrans_recon_32x32;
|
||||
ps_codec->s_func_selector.ihevc_chroma_itrans_recon_4x4_fptr = &ihevc_chroma_itrans_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_chroma_itrans_recon_8x8_fptr = &ihevc_chroma_itrans_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_chroma_itrans_recon_16x16_fptr = &ihevc_chroma_itrans_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_recon_4x4_ttype1_fptr = &ihevc_recon_4x4_ttype1;
|
||||
ps_codec->s_func_selector.ihevc_recon_4x4_fptr = &ihevc_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_recon_8x8_fptr = &ihevc_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_recon_16x16_fptr = &ihevc_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_recon_32x32_fptr = &ihevc_recon_32x32;
|
||||
ps_codec->s_func_selector.ihevc_chroma_recon_4x4_fptr = &ihevc_chroma_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_chroma_recon_8x8_fptr = &ihevc_chroma_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_chroma_recon_16x16_fptr = &ihevc_chroma_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_memcpy_mul_8_fptr = &ihevc_memcpy_mul_8;
|
||||
ps_codec->s_func_selector.ihevc_memcpy_fptr = &ihevc_memcpy;
|
||||
ps_codec->s_func_selector.ihevc_memset_mul_8_fptr = &ihevc_memset_mul_8;
|
||||
ps_codec->s_func_selector.ihevc_memset_fptr = &ihevc_memset;
|
||||
ps_codec->s_func_selector.ihevc_memset_16bit_mul_8_fptr = &ihevc_memset_16bit_mul_8;
|
||||
ps_codec->s_func_selector.ihevc_memset_16bit_fptr = &ihevc_memset_16bit;
|
||||
ps_codec->s_func_selector.ihevc_pad_left_luma_fptr = &ihevc_pad_left_luma;
|
||||
ps_codec->s_func_selector.ihevc_pad_left_chroma_fptr = &ihevc_pad_left_chroma;
|
||||
ps_codec->s_func_selector.ihevc_pad_right_luma_fptr = &ihevc_pad_right_luma;
|
||||
ps_codec->s_func_selector.ihevc_pad_right_chroma_fptr = &ihevc_pad_right_chroma;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_bi_fptr = &ihevc_weighted_pred_bi;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_bi_default_fptr = &ihevc_weighted_pred_bi_default;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_uni_fptr = &ihevc_weighted_pred_uni;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_bi_fptr = &ihevc_weighted_pred_chroma_bi;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_bi_default_fptr = &ihevc_weighted_pred_chroma_bi_default;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_uni_fptr = &ihevc_weighted_pred_chroma_uni;
|
||||
ps_codec->s_func_selector.ihevc_sao_band_offset_luma_fptr = &ihevc_sao_band_offset_luma;
|
||||
ps_codec->s_func_selector.ihevc_sao_band_offset_chroma_fptr = &ihevc_sao_band_offset_chroma;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class0_fptr = &ihevc_sao_edge_offset_class0;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class0_chroma_fptr = &ihevc_sao_edge_offset_class0_chroma;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class1_fptr = &ihevc_sao_edge_offset_class1;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class1_chroma_fptr = &ihevc_sao_edge_offset_class1_chroma;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class2_fptr = &ihevc_sao_edge_offset_class2;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class2_chroma_fptr = &ihevc_sao_edge_offset_class2_chroma;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class3_fptr = &ihevc_sao_edge_offset_class3;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class3_chroma_fptr = &ihevc_sao_edge_offset_class3_chroma;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_rgba8888_fptr = &ihevcd_fmt_conv_420sp_to_rgba8888;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_rgb565_fptr = &ihevcd_fmt_conv_420sp_to_rgb565;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_420sp_fptr = &ihevcd_fmt_conv_420sp_to_420sp;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_420p_fptr = &ihevcd_fmt_conv_420sp_to_420p;
|
||||
ps_codec->s_func_selector.ihevcd_itrans_recon_dc_luma_fptr = &ihevcd_itrans_recon_dc_luma;
|
||||
ps_codec->s_func_selector.ihevcd_itrans_recon_dc_chroma_fptr = &ihevcd_itrans_recon_dc_chroma;
|
||||
ps_func_selector->ihevc_deblk_chroma_horz_fptr = &ihevc_deblk_chroma_horz;
|
||||
ps_func_selector->ihevc_deblk_chroma_vert_fptr = &ihevc_deblk_chroma_vert;
|
||||
ps_func_selector->ihevc_deblk_luma_vert_fptr = &ihevc_deblk_luma_vert;
|
||||
ps_func_selector->ihevc_deblk_luma_horz_fptr = &ihevc_deblk_luma_horz;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_copy_fptr = &ihevc_inter_pred_chroma_copy;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_copy_w16out_fptr = &ihevc_inter_pred_chroma_copy_w16out;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_horz_fptr = &ihevc_inter_pred_chroma_horz;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_horz_w16out_fptr = &ihevc_inter_pred_chroma_horz_w16out;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_fptr = &ihevc_inter_pred_chroma_vert;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_w16inp_fptr = &ihevc_inter_pred_chroma_vert_w16inp;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16inp_w16out;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16out;
|
||||
ps_func_selector->ihevc_inter_pred_luma_horz_fptr = &ihevc_inter_pred_luma_horz;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_fptr = &ihevc_inter_pred_luma_vert;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_w16out_fptr = &ihevc_inter_pred_luma_vert_w16out;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_w16inp_fptr = &ihevc_inter_pred_luma_vert_w16inp;
|
||||
ps_func_selector->ihevc_inter_pred_luma_copy_fptr = &ihevc_inter_pred_luma_copy;
|
||||
ps_func_selector->ihevc_inter_pred_luma_copy_w16out_fptr = &ihevc_inter_pred_luma_copy_w16out;
|
||||
ps_func_selector->ihevc_inter_pred_luma_horz_w16out_fptr = &ihevc_inter_pred_luma_horz_w16out;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_luma_vert_w16inp_w16out;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_ref_substitution_fptr = &ihevc_intra_pred_chroma_ref_substitution;
|
||||
ps_func_selector->ihevc_intra_pred_luma_ref_substitution_fptr = &ihevc_intra_pred_luma_ref_substitution;
|
||||
ps_func_selector->ihevc_intra_pred_luma_ref_subst_all_avlble_fptr = &ihevc_intra_pred_luma_ref_subst_all_avlble;
|
||||
ps_func_selector->ihevc_intra_pred_ref_filtering_fptr = &ihevc_intra_pred_ref_filtering;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_ref_filtering_fptr = &ihevc_intra_pred_chroma_ref_filtering;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_dc_fptr = &ihevc_intra_pred_chroma_dc;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_horz_fptr = &ihevc_intra_pred_chroma_horz;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode2_fptr = &ihevc_intra_pred_chroma_mode2;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_18_34_fptr = &ihevc_intra_pred_chroma_mode_18_34;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_27_to_33_fptr = &ihevc_intra_pred_chroma_mode_27_to_33;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_3_to_9_fptr = &ihevc_intra_pred_chroma_mode_3_to_9;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_planar_fptr = &ihevc_intra_pred_chroma_planar;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_ver_fptr = &ihevc_intra_pred_chroma_ver;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_11_to_17_fptr = &ihevc_intra_pred_chroma_mode_11_to_17;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_19_to_25_fptr = &ihevc_intra_pred_chroma_mode_19_to_25;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_11_to_17_fptr = &ihevc_intra_pred_luma_mode_11_to_17;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_19_to_25_fptr = &ihevc_intra_pred_luma_mode_19_to_25;
|
||||
ps_func_selector->ihevc_intra_pred_luma_dc_fptr = &ihevc_intra_pred_luma_dc;
|
||||
ps_func_selector->ihevc_intra_pred_luma_horz_fptr = &ihevc_intra_pred_luma_horz;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode2_fptr = &ihevc_intra_pred_luma_mode2;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_18_34_fptr = &ihevc_intra_pred_luma_mode_18_34;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_27_to_33_fptr = &ihevc_intra_pred_luma_mode_27_to_33;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_3_to_9_fptr = &ihevc_intra_pred_luma_mode_3_to_9;
|
||||
ps_func_selector->ihevc_intra_pred_luma_planar_fptr = &ihevc_intra_pred_luma_planar;
|
||||
ps_func_selector->ihevc_intra_pred_luma_ver_fptr = &ihevc_intra_pred_luma_ver;
|
||||
ps_func_selector->ihevc_itrans_4x4_ttype1_fptr = &ihevc_itrans_4x4_ttype1;
|
||||
ps_func_selector->ihevc_itrans_4x4_fptr = &ihevc_itrans_4x4;
|
||||
ps_func_selector->ihevc_itrans_8x8_fptr = &ihevc_itrans_8x8;
|
||||
ps_func_selector->ihevc_itrans_16x16_fptr = &ihevc_itrans_16x16;
|
||||
ps_func_selector->ihevc_itrans_32x32_fptr = &ihevc_itrans_32x32;
|
||||
ps_func_selector->ihevc_itrans_res_4x4_ttype1_fptr = &ihevc_itrans_res_4x4_ttype1;
|
||||
ps_func_selector->ihevc_itrans_res_4x4_fptr = &ihevc_itrans_res_4x4;
|
||||
ps_func_selector->ihevc_itrans_res_8x8_fptr = &ihevc_itrans_res_8x8;
|
||||
ps_func_selector->ihevc_itrans_res_16x16_fptr = &ihevc_itrans_res_16x16;
|
||||
ps_func_selector->ihevc_itrans_res_32x32_fptr = &ihevc_itrans_res_32x32;
|
||||
ps_func_selector->ihevc_itrans_recon_4x4_ttype1_fptr = &ihevc_itrans_recon_4x4_ttype1;
|
||||
ps_func_selector->ihevc_itrans_recon_4x4_fptr = &ihevc_itrans_recon_4x4;
|
||||
ps_func_selector->ihevc_itrans_recon_8x8_fptr = &ihevc_itrans_recon_8x8;
|
||||
ps_func_selector->ihevc_itrans_recon_16x16_fptr = &ihevc_itrans_recon_16x16;
|
||||
ps_func_selector->ihevc_itrans_recon_32x32_fptr = &ihevc_itrans_recon_32x32;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_4x4_fptr = &ihevc_chroma_itrans_recon_4x4;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_8x8_fptr = &ihevc_chroma_itrans_recon_8x8;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_16x16_fptr = &ihevc_chroma_itrans_recon_16x16;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_32x32_fptr = &ihevc_chroma_itrans_recon_32x32;
|
||||
ps_func_selector->ihevc_recon_4x4_ttype1_fptr = &ihevc_recon_4x4_ttype1;
|
||||
ps_func_selector->ihevc_recon_4x4_fptr = &ihevc_recon_4x4;
|
||||
ps_func_selector->ihevc_recon_8x8_fptr = &ihevc_recon_8x8;
|
||||
ps_func_selector->ihevc_recon_16x16_fptr = &ihevc_recon_16x16;
|
||||
ps_func_selector->ihevc_recon_32x32_fptr = &ihevc_recon_32x32;
|
||||
ps_func_selector->ihevc_chroma_recon_4x4_fptr = &ihevc_chroma_recon_4x4;
|
||||
ps_func_selector->ihevc_chroma_recon_8x8_fptr = &ihevc_chroma_recon_8x8;
|
||||
ps_func_selector->ihevc_chroma_recon_16x16_fptr = &ihevc_chroma_recon_16x16;
|
||||
ps_func_selector->ihevc_chroma_recon_32x32_fptr = &ihevc_chroma_recon_32x32;
|
||||
ps_func_selector->ihevc_memcpy_mul_8_fptr = &ihevc_memcpy_mul_8;
|
||||
ps_func_selector->ihevc_memcpy_fptr = &ihevc_memcpy;
|
||||
ps_func_selector->ihevc_memset_mul_8_fptr = &ihevc_memset_mul_8;
|
||||
ps_func_selector->ihevc_memset_fptr = &ihevc_memset;
|
||||
ps_func_selector->ihevc_memset_16bit_mul_8_fptr = &ihevc_memset_16bit_mul_8;
|
||||
ps_func_selector->ihevc_memset_16bit_fptr = &ihevc_memset_16bit;
|
||||
ps_func_selector->ihevc_pad_left_luma_fptr = &ihevc_pad_left_luma;
|
||||
ps_func_selector->ihevc_pad_left_chroma_fptr = &ihevc_pad_left_chroma;
|
||||
ps_func_selector->ihevc_pad_right_luma_fptr = &ihevc_pad_right_luma;
|
||||
ps_func_selector->ihevc_pad_right_chroma_fptr = &ihevc_pad_right_chroma;
|
||||
ps_func_selector->ihevc_weighted_pred_bi_fptr = &ihevc_weighted_pred_bi;
|
||||
ps_func_selector->ihevc_weighted_pred_bi_default_fptr = &ihevc_weighted_pred_bi_default;
|
||||
ps_func_selector->ihevc_weighted_pred_uni_fptr = &ihevc_weighted_pred_uni;
|
||||
ps_func_selector->ihevc_weighted_pred_chroma_bi_fptr = &ihevc_weighted_pred_chroma_bi;
|
||||
ps_func_selector->ihevc_weighted_pred_chroma_bi_default_fptr = &ihevc_weighted_pred_chroma_bi_default;
|
||||
ps_func_selector->ihevc_weighted_pred_chroma_uni_fptr = &ihevc_weighted_pred_chroma_uni;
|
||||
ps_func_selector->ihevc_sao_band_offset_luma_fptr = &ihevc_sao_band_offset_luma;
|
||||
ps_func_selector->ihevc_sao_band_offset_chroma_fptr = &ihevc_sao_band_offset_chroma;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class0_fptr = &ihevc_sao_edge_offset_class0;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class0_chroma_fptr = &ihevc_sao_edge_offset_class0_chroma;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class1_fptr = &ihevc_sao_edge_offset_class1;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class1_chroma_fptr = &ihevc_sao_edge_offset_class1_chroma;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class2_fptr = &ihevc_sao_edge_offset_class2;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class2_chroma_fptr = &ihevc_sao_edge_offset_class2_chroma;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class3_fptr = &ihevc_sao_edge_offset_class3;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class3_chroma_fptr = &ihevc_sao_edge_offset_class3_chroma;
|
||||
ps_func_selector->ihevcd_fmt_conv_420sp_to_420sp_fptr = &ihevcd_fmt_conv_420sp_to_420sp;
|
||||
ps_func_selector->ihevcd_fmt_conv_420sp_to_420p_fptr = &ihevcd_fmt_conv_420sp_to_420p;
|
||||
ps_func_selector->ihevcd_fmt_conv_444sp_to_444p_fptr = &ihevcd_fmt_conv_444sp_to_444p;
|
||||
ps_func_selector->ihevcd_itrans_recon_dc_luma_fptr = &ihevcd_itrans_recon_dc_luma;
|
||||
ps_func_selector->ihevcd_itrans_recon_dc_chroma_fptr = &ihevcd_itrans_recon_dc_chroma;
|
||||
ps_func_selector->ihevcd_itrans_res_dc_fptr = &ihevcd_itrans_res_dc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,528 +0,0 @@
|
|||
///*****************************************************************************
|
||||
//*
|
||||
//* Copyright (C) 2012 Ittiam Systems Pvt Ltd, Bangalore
|
||||
//*
|
||||
//* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
//* you may not use this file except in compliance with the License.
|
||||
//* You may obtain a copy of the License at:
|
||||
//*
|
||||
//* http://www.apache.org/licenses/LICENSE-2.0
|
||||
//*
|
||||
//* Unless required by applicable law or agreed to in writing, software
|
||||
//* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
//* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
//* See the License for the specific language governing permissions and
|
||||
//* limitations under the License.
|
||||
//*
|
||||
//*****************************************************************************/
|
||||
///**
|
||||
///*******************************************************************************
|
||||
//* //file
|
||||
//* ihevcd_fmt_conv_420sp_to_rgba8888.s
|
||||
//*
|
||||
//* //brief
|
||||
//* contains function definitions for format conversions
|
||||
//*
|
||||
//* //author
|
||||
//* ittiam
|
||||
//*
|
||||
//* //par list of functions:
|
||||
//*
|
||||
//*
|
||||
//* //remarks
|
||||
//* none
|
||||
//*
|
||||
//*******************************************************************************/
|
||||
|
||||
.equ DO1STROUNDING, 0
|
||||
|
||||
// ARM
|
||||
//
|
||||
// PRESERVE8
|
||||
|
||||
.text
|
||||
.p2align 2
|
||||
|
||||
.include "ihevc_neon_macros.s"
|
||||
|
||||
|
||||
|
||||
///*****************************************************************************
|
||||
//* *
|
||||
//* Function Name : ihevcd_fmt_conv_420sp_to_rgba8888() *
|
||||
//* *
|
||||
//* Description : This function conversts the image from YUV422 color *
|
||||
//* space to RGB888 color space. The function can be *
|
||||
//* invoked at the MB level. *
|
||||
//* *
|
||||
//* Arguments : x0 pubY *
|
||||
//* x1 pubUV *
|
||||
//* x2 pusRGB *
|
||||
//* x3 pusRGB *
|
||||
//* [x13 #40] usHeight *
|
||||
//* [x13 #44] usWidth *
|
||||
//* [x13 #48] usStrideY *
|
||||
//* [x13 #52] usStrideU *
|
||||
//* [x13 #56] usStrideV *
|
||||
//* [x13 #60] usStrideRGB *
|
||||
//* *
|
||||
//* Values Returned : None *
|
||||
//* *
|
||||
//* Register Usage : x0 - x14 *
|
||||
//* *
|
||||
//* Stack Usage : 40 Bytes *
|
||||
//* *
|
||||
//* Interruptibility : Interruptible *
|
||||
//* *
|
||||
//* Known Limitations *
|
||||
//* Assumptions: Image Width: Assumed to be multiple of 16 and *
|
||||
//* greater than or equal to 16 *
|
||||
//* Image Height: Assumed to be even. *
|
||||
//* *
|
||||
//* Revision History : *
|
||||
//* DD MM YYYY Author(s) Changes (Describe the changes made) *
|
||||
//* 07 06 2010 Varshita Draft *
|
||||
//* 07 06 2010 Naveen Kr T Completed *
|
||||
//* 05 08 2013 Naveen K P Modified for HEVC *
|
||||
//*****************************************************************************/
|
||||
.global ihevcd_fmt_conv_420sp_to_rgba8888_av8
|
||||
.type ihevcd_fmt_conv_420sp_to_rgba8888_av8, function
|
||||
ihevcd_fmt_conv_420sp_to_rgba8888_av8:
|
||||
|
||||
//// push the registers on the stack
|
||||
// STMFD sp!,{x4-x12,x14}
|
||||
|
||||
stp d12,d14,[sp,#-16]!
|
||||
stp d8,d15,[sp,#-16]! // Storing d15 using { sub sp,sp,#8; str d15,[sp] } is giving bus error.
|
||||
// d8 is used as dummy register and stored along with d15 using stp. d8 is not used in the function.
|
||||
stp x19, x20,[sp,#-16]!
|
||||
|
||||
|
||||
////x0 - Y PTR
|
||||
////x1 - UV PTR
|
||||
////x2 - RGB PTR
|
||||
////x3 - RGB PTR
|
||||
////x4 - PIC WIDTH
|
||||
////x5 - PIC HT
|
||||
////x6 - STRIDE Y
|
||||
////x7 - STRIDE U
|
||||
////x8 - STRIDE V
|
||||
////x9 - STRIDE RGB
|
||||
|
||||
////ONE ROW PROCESSING AT A TIME
|
||||
|
||||
////THE FOUR CONSTANTS ARE:
|
||||
////C1=0x3311,C2=0xF379,C3=0xE5F8,C4=0x4092
|
||||
|
||||
//PLD [x0]
|
||||
//PLD [x1]
|
||||
//PLD [x2]
|
||||
|
||||
|
||||
///* can be loaded from a defined const type */
|
||||
mov x10,#0x3311
|
||||
mov v0.h[0], w10 ////C1
|
||||
|
||||
mov x10,#0xF379
|
||||
mov v0.h[1], w10 ////C2
|
||||
|
||||
mov x10,#0xE5F8
|
||||
mov v0.h[2], w10 ////C3
|
||||
|
||||
mov x10,#0x4092
|
||||
mov v0.h[3], w10 ////C4
|
||||
|
||||
////LOAD CONSTANT 128 INTO A CORTEX REGISTER
|
||||
MOV x10,#128
|
||||
dup v1.8b,w10
|
||||
|
||||
////D0 HAS C1-C2-C3-C4
|
||||
//// load other parameters from stack
|
||||
mov x9, x7
|
||||
mov x7, x6
|
||||
mov x6, x5
|
||||
mov x5, x4
|
||||
//LDR x4,[sp,#44]
|
||||
//LDR x8,[sp,#52]
|
||||
|
||||
//// calculate offsets, offset = stride - width
|
||||
SUB x10,x6,x3 //// luma offset
|
||||
SUB x11,x7,x3
|
||||
//, LSR #1 @// u offset
|
||||
//SUB x12,x8,x3, LSR #1 @// v offset
|
||||
SUB x14,x9,x3 //// rgb offset in pixels
|
||||
|
||||
//// calculate height loop count
|
||||
LSR x5, x5, #1 //// height_cnt = height / 16
|
||||
|
||||
//// create next row pointers for rgb and luma data
|
||||
ADD x7,x0,x6 //// luma_next_row = luma + luma_stride
|
||||
ADD x8,x2,x9,LSL #2 //// rgb_next_row = rgb + rgb_stride
|
||||
|
||||
LABEL_YUV420SP_TO_RGB8888_HEIGHT_LOOP:
|
||||
|
||||
////LOAD VALUES OF U&V AND COMPUTE THE R,G,B WEIGHT VALUES.
|
||||
LD1 {v2.8b, v3.8b},[x1],#16 ////LOAD 8 VALUES OF UV
|
||||
////VLD1.8 {D3},[x2]! @//LOAD 8 VALUES OF V
|
||||
|
||||
//// calculate width loop count
|
||||
LSR x6, x3, #4 //// width_cnt = width / 16
|
||||
|
||||
////COMPUTE THE ACTUAL RGB VALUES,WE CAN DO TWO ROWS AT A TIME
|
||||
////LOAD VALUES OF Y 8-BIT VALUES
|
||||
LD2 {v30.8b, v31.8b},[x0],#16 ////D0 - Y0,Y2,Y4,Y6,Y8,Y10,Y12,Y14 row 1
|
||||
////D1 - Y1,Y3,Y5,Y7,Y9,Y11,Y13,Y15
|
||||
LD2 {v28.8b, v29.8b},[x7],#16 ////D0 - Y0,Y2,Y4,Y6,Y8,Y10,Y12,Y14 row2
|
||||
////D1 - Y1,Y3,Y5,Y7,Y9,Y11,Y13,Y15
|
||||
|
||||
SUBS x6,x6,#1
|
||||
BEQ LABEL_YUV420SP_TO_RGB8888_WIDTH_LOOP_SKIP
|
||||
|
||||
LABEL_YUV420SP_TO_RGB8888_WIDTH_LOOP:
|
||||
//VMOV.I8 Q1,#128
|
||||
UZP1 v27.8b, v2.8b, v3.8b
|
||||
UZP2 v3.8b, v2.8b, v3.8b
|
||||
mov v2.d[0], v27.d[0]
|
||||
|
||||
////NEED TO SUBTRACT (U-128) AND (V-128)
|
||||
////(D2-D1),(D3-D1)
|
||||
uSUBL v4.8h, v2.8b, v1.8b ////(U-128)
|
||||
uSUBL v6.8h, v3.8b, v1.8b ////(V-128)
|
||||
|
||||
////LOAD VALUES OF U&V for next row
|
||||
LD1 {v2.8b, v3.8b},[x1],#16 ////LOAD 8 VALUES OF U
|
||||
////VLD1.8 {D3},[x2]! @//LOAD 8 VALUES OF V
|
||||
|
||||
//PLD [x0]
|
||||
prfm PLDL1KEEP,[x1]
|
||||
|
||||
////NEED TO MULTIPLY WITH Q2,Q3 WITH CO-EEFICIENTS
|
||||
sMULL v5.4s, v4.4h, v0.h[3] ////(U-128)*C4 FOR B
|
||||
sMULL2 v7.4s, v4.8h, v0.h[3] ////(U-128)*C4 FOR B
|
||||
|
||||
sMULL v20.4s, v6.4h, v0.h[0] ////(V-128)*C1 FOR R
|
||||
sMULL2 v22.4s, v6.8h, v0.h[0] ////(V-128)*C1 FOR R
|
||||
|
||||
sMULL v12.4s, v4.4h, v0.h[1] ////(U-128)*C2 FOR G
|
||||
sMLAL v12.4s, v6.4h, v0.h[2] ////Q6 = (U-128)*C2 + (V-128)*C3
|
||||
sMULL2 v14.4s, v4.8h, v0.h[1] ////(U-128)*C2 FOR G
|
||||
sMLAL2 v14.4s, v6.8h, v0.h[2] ////Q7 = (U-128)*C2 + (V-128)*C3
|
||||
|
||||
////NARROW RIGHT SHIFT BY 13 FOR R&B
|
||||
sqshrn v5.4h, v5.4s,#13 ////D8 = (U-128)*C4>>13 4 16-BIT VALUES
|
||||
sqshrn2 v5.8h, v7.4s,#13 ////D9 = (U-128)*C4>>13 4 16-BIT VALUES
|
||||
////Q4 - WEIGHT FOR B
|
||||
|
||||
////NARROW RIGHT SHIFT BY 13 FOR R&B
|
||||
sqshrn v7.4h, v20.4s,#13 ////D10 = (V-128)*C1>>13 4 16-BIT VALUES
|
||||
sqshrn2 v7.8h, v22.4s,#13 ////D11 = (V-128)*C1>>13 4 16-BIT VALUES
|
||||
////Q5 - WEIGHT FOR R
|
||||
|
||||
////NARROW RIGHT SHIFT BY 13 FOR G
|
||||
sqshrn v12.4h, v12.4s,#13 ////D12 = [(U-128)*C2 + (V-128)*C3]>>13 4 16-BIT VALUES
|
||||
sqshrn2 v12.8h, v14.4s,#13 ////D13 = [(U-128)*C2 + (V-128)*C3]>>13 4 16-BIT VALUES
|
||||
////Q6 - WEIGHT FOR G
|
||||
|
||||
UADDW v14.8h, v5.8h , v30.8b ////Q7 - HAS Y + B
|
||||
UADDW v16.8h, v7.8h , v30.8b ////Q8 - HAS Y + R
|
||||
UADDW v18.8h, v12.8h , v30.8b ////Q9 - HAS Y + G
|
||||
|
||||
UADDW v20.8h, v5.8h , v31.8b ////Q10 - HAS Y + B
|
||||
UADDW v22.8h, v7.8h , v31.8b ////Q11 - HAS Y + R
|
||||
UADDW v24.8h, v12.8h , v31.8b ////Q12 - HAS Y + G
|
||||
|
||||
sqxtun v14.8b, v14.8h
|
||||
sqxtun v15.8b, v18.8h
|
||||
sqxtun v16.8b, v16.8h
|
||||
movi v17.8b, #0
|
||||
|
||||
sqxtun v20.8b, v20.8h
|
||||
sqxtun v21.8b, v24.8h
|
||||
sqxtun v22.8b, v22.8h
|
||||
movi v23.8b, #0
|
||||
|
||||
ZIP1 v27.8b, v14.8b, v15.8b
|
||||
ZIP2 v15.8b, v14.8b, v15.8b
|
||||
mov v14.d[0], v27.d[0]
|
||||
ZIP1 v27.8b, v16.8b, v17.8b
|
||||
ZIP2 v17.8b, v16.8b, v17.8b
|
||||
mov v16.d[0], v27.d[0]
|
||||
|
||||
ZIP1 v27.8b, v20.8b, v21.8b
|
||||
ZIP2 v21.8b, v20.8b, v21.8b
|
||||
mov v20.d[0], v27.d[0]
|
||||
ZIP1 v27.8b, v22.8b, v23.8b
|
||||
ZIP2 v23.8b, v22.8b, v23.8b
|
||||
mov v22.d[0], v27.d[0]
|
||||
|
||||
mov v14.d[1], v15.d[0]
|
||||
mov v20.d[1], v21.d[0]
|
||||
mov v16.d[1], v17.d[0]
|
||||
mov v22.d[1], v23.d[0]
|
||||
|
||||
ZIP1 v27.8h, v14.8h, v16.8h
|
||||
ZIP2 v26.8h, v14.8h, v16.8h
|
||||
|
||||
ZIP1 v25.8h, v20.8h, v22.8h
|
||||
ZIP2 v19.8h, v20.8h, v22.8h
|
||||
|
||||
ZIP1 v14.4s, v27.4s, v25.4s
|
||||
ZIP2 v20.4s, v27.4s, v25.4s
|
||||
|
||||
ZIP1 v16.4s, v26.4s, v19.4s
|
||||
ZIP2 v22.4s, v26.4s, v19.4s
|
||||
|
||||
ST1 {v14.4s},[x2],#16
|
||||
ST1 {v20.4s},[x2],#16
|
||||
ST1 {v16.4s},[x2],#16
|
||||
ST1 {v22.4s},[x2],#16
|
||||
|
||||
////D14-D20 - TOALLY HAVE 16 VALUES
|
||||
////WE NEED TO SHIFT R,G,B VALUES TO GET 5BIT,6BIT AND 5BIT COMBINATIONS
|
||||
UADDW v14.8h, v5.8h , v28.8b ////Q7 - HAS Y + B
|
||||
UADDW v16.8h, v7.8h , v28.8b ////Q2 - HAS Y + R
|
||||
UADDW v18.8h, v12.8h , v28.8b ////Q3 - HAS Y + G
|
||||
|
||||
UADDW v20.8h, v5.8h , v29.8b ////Q10 - HAS Y + B
|
||||
UADDW v22.8h, v7.8h , v29.8b ////Q11 - HAS Y + R
|
||||
UADDW v24.8h, v12.8h , v29.8b ////Q12 - HAS Y + G
|
||||
|
||||
////COMPUTE THE ACTUAL RGB VALUES,WE CAN DO TWO ROWS AT A TIME
|
||||
////LOAD VALUES OF Y 8-BIT VALUES
|
||||
LD2 {v30.8b, v31.8b},[x0],#16 ////D0 - Y0,Y2,Y4,Y6,Y8,Y10,Y12,Y14 row 1
|
||||
////D1 - Y1,Y3,Y5,Y7,Y9,Y11,Y13,Y15
|
||||
LD2 {v28.8b, v29.8b},[x7],#16 ////D0 - Y0,Y2,Y4,Y6,Y8,Y10,Y12,Y14 row2
|
||||
////D1 - Y1,Y3,Y5,Y7,Y9,Y11,Y13,Y15
|
||||
|
||||
prfm PLDL1KEEP,[x0]
|
||||
prfm PLDL1KEEP,[x7]
|
||||
|
||||
sqxtun v14.8b, v14.8h
|
||||
sqxtun v15.8b, v18.8h
|
||||
sqxtun v16.8b, v16.8h
|
||||
movi v17.8b, #0
|
||||
|
||||
sqxtun v20.8b, v20.8h
|
||||
sqxtun v21.8b, v24.8h
|
||||
sqxtun v22.8b, v22.8h
|
||||
movi v23.8b, #0
|
||||
|
||||
ZIP1 v27.8b, v14.8b, v15.8b
|
||||
ZIP2 v15.8b, v14.8b, v15.8b
|
||||
mov v14.d[0], v27.d[0]
|
||||
ZIP1 v27.8b, v16.8b, v17.8b
|
||||
ZIP2 v17.8b, v16.8b, v17.8b
|
||||
mov v16.d[0], v27.d[0]
|
||||
|
||||
ZIP1 v27.8b, v20.8b, v21.8b
|
||||
ZIP2 v21.8b, v20.8b, v21.8b
|
||||
mov v20.d[0], v27.d[0]
|
||||
ZIP1 v27.8b, v22.8b, v23.8b
|
||||
ZIP2 v23.8b, v22.8b, v23.8b
|
||||
mov v22.d[0], v27.d[0]
|
||||
|
||||
mov v14.d[1], v15.d[0]
|
||||
mov v20.d[1], v21.d[0]
|
||||
mov v16.d[1], v17.d[0]
|
||||
mov v22.d[1], v23.d[0]
|
||||
|
||||
ZIP1 v27.8h, v14.8h, v16.8h
|
||||
ZIP2 v26.8h, v14.8h, v16.8h
|
||||
|
||||
ZIP1 v25.8h, v20.8h, v22.8h
|
||||
ZIP2 v19.8h, v20.8h, v22.8h
|
||||
|
||||
ZIP1 v14.4s, v27.4s, v25.4s
|
||||
ZIP2 v20.4s, v27.4s, v25.4s
|
||||
|
||||
ZIP1 v16.4s, v26.4s, v19.4s
|
||||
ZIP2 v22.4s, v26.4s, v19.4s
|
||||
|
||||
ST1 {v14.4s},[x8],#16
|
||||
ST1 {v20.4s},[x8],#16
|
||||
ST1 {v16.4s},[x8],#16
|
||||
ST1 {v22.4s},[x8],#16
|
||||
|
||||
SUBS x6,x6,#1 //// width_cnt -= 1
|
||||
BNE LABEL_YUV420SP_TO_RGB8888_WIDTH_LOOP
|
||||
|
||||
LABEL_YUV420SP_TO_RGB8888_WIDTH_LOOP_SKIP:
|
||||
//VMOV.I8 Q1,#128
|
||||
UZP1 v27.8b, v2.8b, v3.8b
|
||||
UZP2 v3.8b, v2.8b, v3.8b
|
||||
mov v2.d[0], v27.d[0]
|
||||
|
||||
|
||||
////NEED TO SUBTRACT (U-128) AND (V-128)
|
||||
////(D2-D1),(D3-D1)
|
||||
uSUBL v4.8h, v2.8b, v1.8b ////(U-128)
|
||||
uSUBL v6.8h, v3.8b, v1.8b ////(V-128)
|
||||
|
||||
|
||||
////NEED TO MULTIPLY WITH Q2,Q3 WITH CO-EEFICIENTS
|
||||
sMULL v5.4s, v4.4h, v0.h[3] ////(U-128)*C4 FOR B
|
||||
sMULL2 v7.4s, v4.8h, v0.h[3] ////(U-128)*C4 FOR B
|
||||
|
||||
sMULL v20.4s, v6.4h, v0.h[0] ////(V-128)*C1 FOR R
|
||||
sMULL2 v22.4s, v6.8h, v0.h[0] ////(V-128)*C1 FOR R
|
||||
|
||||
sMULL v12.4s, v4.4h, v0.h[1] ////(U-128)*C2 FOR G
|
||||
sMLAL v12.4s, v6.4h, v0.h[2] ////Q6 = (U-128)*C2 + (V-128)*C3
|
||||
sMULL2 v14.4s, v4.8h, v0.h[1] ////(U-128)*C2 FOR G
|
||||
sMLAL2 v14.4s, v6.8h, v0.h[2] ////Q7 = (U-128)*C2 + (V-128)*C3
|
||||
|
||||
////NARROW RIGHT SHIFT BY 13 FOR R&B
|
||||
sqshrn v5.4h, v5.4s,#13 ////D8 = (U-128)*C4>>13 4 16-BIT VALUES
|
||||
sqshrn2 v5.8h, v7.4s,#13 ////D9 = (U-128)*C4>>13 4 16-BIT VALUES
|
||||
////Q4 - WEIGHT FOR B
|
||||
|
||||
////NARROW RIGHT SHIFT BY 13 FOR R&B
|
||||
sqshrn v7.4h, v20.4s,#13 ////D10 = (V-128)*C1>>13 4 16-BIT VALUES
|
||||
sqshrn2 v7.8h, v22.4s,#13 ////D11 = (V-128)*C1>>13 4 16-BIT VALUES
|
||||
////Q5 - WEIGHT FOR R
|
||||
|
||||
////NARROW RIGHT SHIFT BY 13 FOR G
|
||||
sqshrn v12.4h, v12.4s,#13 ////D12 = [(U-128)*C2 + (V-128)*C3]>>13 4 16-BIT VALUES
|
||||
sqshrn2 v12.8h, v14.4s,#13 ////D13 = [(U-128)*C2 + (V-128)*C3]>>13 4 16-BIT VALUES
|
||||
////Q6 - WEIGHT FOR G
|
||||
|
||||
UADDW v14.8h, v5.8h , v30.8b ////Q7 - HAS Y + B
|
||||
UADDW v16.8h, v7.8h , v30.8b ////Q8 - HAS Y + R
|
||||
UADDW v18.8h, v12.8h , v30.8b ////Q9 - HAS Y + G
|
||||
|
||||
UADDW v20.8h, v5.8h , v31.8b ////Q10 - HAS Y + B
|
||||
UADDW v22.8h, v7.8h , v31.8b ////Q11 - HAS Y + R
|
||||
UADDW v24.8h, v12.8h , v31.8b ////Q12 - HAS Y + G
|
||||
|
||||
sqxtun v14.8b, v14.8h
|
||||
sqxtun v15.8b, v18.8h
|
||||
sqxtun v16.8b, v16.8h
|
||||
movi v17.8b, #0
|
||||
|
||||
sqxtun v20.8b, v20.8h
|
||||
sqxtun v21.8b, v24.8h
|
||||
sqxtun v22.8b, v22.8h
|
||||
movi v23.8b, #0
|
||||
|
||||
ZIP1 v27.8b, v14.8b, v15.8b
|
||||
ZIP2 v15.8b, v14.8b, v15.8b
|
||||
mov v14.d[0], v27.d[0]
|
||||
ZIP1 v27.8b, v16.8b, v17.8b
|
||||
ZIP2 v17.8b, v16.8b, v17.8b
|
||||
mov v16.d[0], v27.d[0]
|
||||
|
||||
ZIP1 v27.8b, v20.8b, v21.8b
|
||||
ZIP2 v21.8b, v20.8b, v21.8b
|
||||
mov v20.d[0], v27.d[0]
|
||||
ZIP1 v27.8b, v22.8b, v23.8b
|
||||
ZIP2 v23.8b, v22.8b, v23.8b
|
||||
mov v22.d[0], v27.d[0]
|
||||
|
||||
mov v14.d[1], v15.d[0]
|
||||
mov v20.d[1], v21.d[0]
|
||||
mov v16.d[1], v17.d[0]
|
||||
mov v22.d[1], v23.d[0]
|
||||
|
||||
ZIP1 v27.8h, v14.8h, v16.8h
|
||||
ZIP2 v26.8h, v14.8h, v16.8h
|
||||
|
||||
ZIP1 v25.8h, v20.8h, v22.8h
|
||||
ZIP2 v19.8h, v20.8h, v22.8h
|
||||
|
||||
ZIP1 v14.4s, v27.4s, v25.4s
|
||||
ZIP2 v20.4s, v27.4s, v25.4s
|
||||
|
||||
ZIP1 v16.4s, v26.4s, v19.4s
|
||||
ZIP2 v22.4s, v26.4s, v19.4s
|
||||
|
||||
ST1 {v14.4s},[x2],#16
|
||||
ST1 {v20.4s},[x2],#16
|
||||
ST1 {v16.4s},[x2],#16
|
||||
ST1 {v22.4s},[x2],#16
|
||||
|
||||
////D14-D20 - TOALLY HAVE 16 VALUES
|
||||
////WE NEED TO SHIFT R,G,B VALUES TO GET 5BIT,6BIT AND 5BIT COMBINATIONS
|
||||
UADDW v14.8h, v5.8h , v28.8b ////Q7 - HAS Y + B
|
||||
UADDW v16.8h, v7.8h , v28.8b ////Q2 - HAS Y + R
|
||||
UADDW v18.8h, v12.8h , v28.8b ////Q3 - HAS Y + G
|
||||
|
||||
UADDW v20.8h, v5.8h , v29.8b ////Q10 - HAS Y + B
|
||||
UADDW v22.8h, v7.8h , v29.8b ////Q11 - HAS Y + R
|
||||
UADDW v24.8h, v12.8h , v29.8b ////Q12 - HAS Y + G
|
||||
|
||||
sqxtun v14.8b, v14.8h
|
||||
sqxtun v15.8b, v18.8h
|
||||
sqxtun v16.8b, v16.8h
|
||||
movi v17.8b, #0
|
||||
|
||||
sqxtun v20.8b, v20.8h
|
||||
sqxtun v21.8b, v24.8h
|
||||
sqxtun v22.8b, v22.8h
|
||||
movi v23.8b, #0
|
||||
|
||||
ZIP1 v27.8b, v14.8b, v15.8b
|
||||
ZIP2 v15.8b, v14.8b, v15.8b
|
||||
mov v14.d[0], v27.d[0]
|
||||
ZIP1 v27.8b, v16.8b, v17.8b
|
||||
ZIP2 v17.8b, v16.8b, v17.8b
|
||||
mov v16.d[0], v27.d[0]
|
||||
|
||||
ZIP1 v27.8b, v20.8b, v21.8b
|
||||
ZIP2 v21.8b, v20.8b, v21.8b
|
||||
mov v20.d[0], v27.d[0]
|
||||
ZIP1 v27.8b, v22.8b, v23.8b
|
||||
ZIP2 v23.8b, v22.8b, v23.8b
|
||||
mov v22.d[0], v27.d[0]
|
||||
|
||||
mov v14.d[1], v15.d[0]
|
||||
mov v20.d[1], v21.d[0]
|
||||
mov v16.d[1], v17.d[0]
|
||||
mov v22.d[1], v23.d[0]
|
||||
|
||||
ZIP1 v27.8h, v14.8h, v16.8h
|
||||
ZIP2 v26.8h, v14.8h, v16.8h
|
||||
|
||||
ZIP1 v25.8h, v20.8h, v22.8h
|
||||
ZIP2 v19.8h, v20.8h, v22.8h
|
||||
|
||||
ZIP1 v14.4s, v27.4s, v25.4s
|
||||
ZIP2 v20.4s, v27.4s, v25.4s
|
||||
|
||||
ZIP1 v16.4s, v26.4s, v19.4s
|
||||
ZIP2 v22.4s, v26.4s, v19.4s
|
||||
|
||||
ST1 {v14.4s},[x8],#16
|
||||
ST1 {v20.4s},[x8],#16
|
||||
ST1 {v16.4s},[x8],#16
|
||||
ST1 {v22.4s},[x8],#16
|
||||
|
||||
//// Adjust the address pointers
|
||||
ADD x0,x7,x10 //// luma = luma_next + offset
|
||||
ADD x2,x8,x14,LSL #2 //// rgb = rgb_next + offset
|
||||
|
||||
ADD x7,x0,x3 //// luma_next = luma + width
|
||||
ADD x8,x2,x3,LSL #2 //// rgb_next_row = rgb + width
|
||||
|
||||
ADD x1,x1,x11 //// adjust u pointer
|
||||
//ADD x2,x2,x12 @// adjust v pointer
|
||||
|
||||
ADD x7,x7,x10 //// luma_next = luma + width + offset (because of register crunch)
|
||||
ADD x8,x8,x14,LSL #2 //// rgb_next_row = rgb + width + offset
|
||||
|
||||
SUBS x5,x5,#1 //// height_cnt -= 1
|
||||
|
||||
BNE LABEL_YUV420SP_TO_RGB8888_HEIGHT_LOOP
|
||||
|
||||
////POP THE REGISTERS
|
||||
// LDMFD sp!,{x4-x12,PC}
|
||||
ldp x19, x20,[sp],#16
|
||||
ldp d8,d15,[sp],#16 // Loading d15 using { ldr d15,[sp]; add sp,sp,#8 } is giving bus error.
|
||||
// d8 is used as dummy register and loaded along with d15 using ldp. d8 is not used in the function.
|
||||
ldp d12,d14,[sp],#16
|
||||
ret
|
||||
|
||||
|
||||
|
||||
|
||||
.section .note.GNU-stack,"",%progbits
|
||||
|
||||
|
|
@ -54,107 +54,113 @@
|
|||
#include "ihevc_dpb_mgr.h"
|
||||
#include "ihevc_error.h"
|
||||
|
||||
#include "ihevcd_defs.h"
|
||||
#include "ihevcd_function_selector.h"
|
||||
#include "ihevcd_structs.h"
|
||||
|
||||
void ihevcd_init_function_ptr_av8(codec_t *ps_codec)
|
||||
void ihevcd_init_function_ptr_av8(func_selector_t *ps_func_selector)
|
||||
{
|
||||
ps_codec->s_func_selector.ihevc_deblk_chroma_horz_fptr = &ihevc_deblk_chroma_horz_av8;
|
||||
ps_codec->s_func_selector.ihevc_deblk_chroma_vert_fptr = &ihevc_deblk_chroma_vert_av8;
|
||||
ps_codec->s_func_selector.ihevc_deblk_luma_vert_fptr = &ihevc_deblk_luma_vert_av8;
|
||||
ps_codec->s_func_selector.ihevc_deblk_luma_horz_fptr = &ihevc_deblk_luma_horz_av8;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_copy_fptr = &ihevc_inter_pred_chroma_copy_av8;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_copy_w16out_fptr = &ihevc_inter_pred_chroma_copy_w16out_av8;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_horz_fptr = &ihevc_inter_pred_chroma_horz_av8;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_horz_w16out_fptr = &ihevc_inter_pred_chroma_horz_w16out_av8;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_fptr = &ihevc_inter_pred_chroma_vert_av8;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_w16inp_fptr = &ihevc_inter_pred_chroma_vert_w16inp_av8;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16inp_w16out_av8;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16out_av8;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_horz_fptr = &ihevc_inter_pred_luma_horz_av8;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_fptr = &ihevc_inter_pred_luma_vert_av8;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_w16out_fptr = &ihevc_inter_pred_luma_vert_w16out_av8;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_w16inp_fptr = &ihevc_inter_pred_luma_vert_w16inp_av8;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_copy_fptr = &ihevc_inter_pred_luma_copy_av8;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_copy_w16out_fptr = &ihevc_inter_pred_luma_copy_w16out_av8;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_horz_w16out_fptr = &ihevc_inter_pred_luma_horz_w16out_av8;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_luma_vert_w16inp_w16out_av8;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_ref_substitution_fptr = &ihevc_intra_pred_chroma_ref_substitution;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_ref_substitution_fptr = &ihevc_intra_pred_luma_ref_substitution;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_ref_subst_all_avlble_fptr = &ihevc_intra_pred_luma_ref_subst_all_avlble;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_ref_filtering_fptr = &ihevc_intra_pred_ref_filtering_neonintr;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_dc_fptr = &ihevc_intra_pred_chroma_dc_av8;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_horz_fptr = &ihevc_intra_pred_chroma_horz_av8;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode2_fptr = &ihevc_intra_pred_chroma_mode2_av8;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_18_34_fptr = &ihevc_intra_pred_chroma_mode_18_34_av8;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_27_to_33_fptr = &ihevc_intra_pred_chroma_mode_27_to_33_av8;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_3_to_9_fptr = &ihevc_intra_pred_chroma_mode_3_to_9_av8;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_planar_fptr = &ihevc_intra_pred_chroma_planar_av8;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_ver_fptr = &ihevc_intra_pred_chroma_ver_av8;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_11_to_17_fptr = &ihevc_intra_pred_chroma_mode_11_to_17_av8;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_19_to_25_fptr = &ihevc_intra_pred_chroma_mode_19_to_25_av8;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_11_to_17_fptr = &ihevc_intra_pred_luma_mode_11_to_17_av8;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_19_to_25_fptr = &ihevc_intra_pred_luma_mode_19_to_25_av8;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_dc_fptr = &ihevc_intra_pred_luma_dc_av8;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_horz_fptr = &ihevc_intra_pred_luma_horz_av8;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode2_fptr = &ihevc_intra_pred_luma_mode2_av8;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_18_34_fptr = &ihevc_intra_pred_luma_mode_18_34_av8;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_27_to_33_fptr = &ihevc_intra_pred_luma_mode_27_to_33_av8;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_3_to_9_fptr = &ihevc_intra_pred_luma_mode_3_to_9_av8;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_planar_fptr = &ihevc_intra_pred_luma_planar_av8;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_ver_fptr = &ihevc_intra_pred_luma_ver_av8;
|
||||
ps_codec->s_func_selector.ihevc_itrans_4x4_ttype1_fptr = &ihevc_itrans_4x4_ttype1;
|
||||
ps_codec->s_func_selector.ihevc_itrans_4x4_fptr = &ihevc_itrans_4x4;
|
||||
ps_codec->s_func_selector.ihevc_itrans_8x8_fptr = &ihevc_itrans_8x8;
|
||||
ps_codec->s_func_selector.ihevc_itrans_16x16_fptr = &ihevc_itrans_16x16;
|
||||
ps_codec->s_func_selector.ihevc_itrans_32x32_fptr = &ihevc_itrans_32x32;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_4x4_ttype1_fptr = &ihevc_itrans_recon_4x4_ttype1_av8;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_4x4_fptr = &ihevc_itrans_recon_4x4_av8;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_8x8_fptr = &ihevc_itrans_recon_8x8_av8;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_16x16_fptr = &ihevc_itrans_recon_16x16_av8;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_32x32_fptr = &ihevc_itrans_recon_32x32_av8;
|
||||
ps_codec->s_func_selector.ihevc_chroma_itrans_recon_4x4_fptr = &ihevc_chroma_itrans_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_chroma_itrans_recon_8x8_fptr = &ihevc_chroma_itrans_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_chroma_itrans_recon_16x16_fptr = &ihevc_chroma_itrans_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_recon_4x4_ttype1_fptr = &ihevc_recon_4x4_ttype1;
|
||||
ps_codec->s_func_selector.ihevc_recon_4x4_fptr = &ihevc_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_recon_8x8_fptr = &ihevc_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_recon_16x16_fptr = &ihevc_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_recon_32x32_fptr = &ihevc_recon_32x32;
|
||||
ps_codec->s_func_selector.ihevc_chroma_recon_4x4_fptr = &ihevc_chroma_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_chroma_recon_8x8_fptr = &ihevc_chroma_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_chroma_recon_16x16_fptr = &ihevc_chroma_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_memcpy_mul_8_fptr = &ihevc_memcpy_mul_8_av8;
|
||||
ps_codec->s_func_selector.ihevc_memcpy_fptr = &ihevc_memcpy_av8;
|
||||
ps_codec->s_func_selector.ihevc_memset_mul_8_fptr = &ihevc_memset_mul_8_av8;
|
||||
ps_codec->s_func_selector.ihevc_memset_fptr = &ihevc_memset_av8;
|
||||
ps_codec->s_func_selector.ihevc_memset_16bit_mul_8_fptr = &ihevc_memset_16bit_mul_8_av8;
|
||||
ps_codec->s_func_selector.ihevc_memset_16bit_fptr = &ihevc_memset_16bit_av8;
|
||||
ps_codec->s_func_selector.ihevc_pad_left_luma_fptr = &ihevc_pad_left_luma_av8;
|
||||
ps_codec->s_func_selector.ihevc_pad_left_chroma_fptr = &ihevc_pad_left_chroma_av8;
|
||||
ps_codec->s_func_selector.ihevc_pad_right_luma_fptr = &ihevc_pad_right_luma_av8;
|
||||
ps_codec->s_func_selector.ihevc_pad_right_chroma_fptr = &ihevc_pad_right_chroma_av8;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_bi_fptr = &ihevc_weighted_pred_bi_av8;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_bi_default_fptr = &ihevc_weighted_pred_bi_default_av8;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_uni_fptr = &ihevc_weighted_pred_uni_av8;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_bi_fptr = &ihevc_weighted_pred_chroma_bi_neonintr;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_bi_default_fptr = &ihevc_weighted_pred_chroma_bi_default_neonintr;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_uni_fptr = &ihevc_weighted_pred_chroma_uni_neonintr;
|
||||
ps_codec->s_func_selector.ihevc_sao_band_offset_luma_fptr = &ihevc_sao_band_offset_luma_av8;
|
||||
ps_codec->s_func_selector.ihevc_sao_band_offset_chroma_fptr = &ihevc_sao_band_offset_chroma_av8;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class0_fptr = &ihevc_sao_edge_offset_class0_av8;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class0_chroma_fptr = &ihevc_sao_edge_offset_class0_chroma_av8;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class1_fptr = &ihevc_sao_edge_offset_class1_av8;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class1_chroma_fptr = &ihevc_sao_edge_offset_class1_chroma_av8;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class2_fptr = &ihevc_sao_edge_offset_class2_av8;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class2_chroma_fptr = &ihevc_sao_edge_offset_class2_chroma_av8;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class3_fptr = &ihevc_sao_edge_offset_class3_av8;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class3_chroma_fptr = &ihevc_sao_edge_offset_class3_chroma_av8;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_rgba8888_fptr = &ihevcd_fmt_conv_420sp_to_rgba8888_av8;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_rgb565_fptr = &ihevcd_fmt_conv_420sp_to_rgb565;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_420sp_fptr = &ihevcd_fmt_conv_420sp_to_420sp_av8;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_420p_fptr = &ihevcd_fmt_conv_420sp_to_420p_av8;
|
||||
ps_codec->s_func_selector.ihevcd_itrans_recon_dc_luma_fptr = &ihevcd_itrans_recon_dc_luma_av8;
|
||||
ps_codec->s_func_selector.ihevcd_itrans_recon_dc_chroma_fptr = &ihevcd_itrans_recon_dc_chroma_av8;
|
||||
ps_func_selector->ihevc_deblk_chroma_horz_fptr = &ihevc_deblk_chroma_horz_av8;
|
||||
ps_func_selector->ihevc_deblk_chroma_vert_fptr = &ihevc_deblk_chroma_vert_av8;
|
||||
ps_func_selector->ihevc_deblk_luma_vert_fptr = &ihevc_deblk_luma_vert_av8;
|
||||
ps_func_selector->ihevc_deblk_luma_horz_fptr = &ihevc_deblk_luma_horz_av8;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_copy_fptr = &ihevc_inter_pred_chroma_copy_av8;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_copy_w16out_fptr = &ihevc_inter_pred_chroma_copy_w16out_av8;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_horz_fptr = &ihevc_inter_pred_chroma_horz_av8;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_horz_w16out_fptr = &ihevc_inter_pred_chroma_horz_w16out_av8;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_fptr = &ihevc_inter_pred_chroma_vert_av8;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_w16inp_fptr = &ihevc_inter_pred_chroma_vert_w16inp_av8;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16inp_w16out_av8;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16out_av8;
|
||||
ps_func_selector->ihevc_inter_pred_luma_horz_fptr = &ihevc_inter_pred_luma_horz_av8;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_fptr = &ihevc_inter_pred_luma_vert_av8;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_w16out_fptr = &ihevc_inter_pred_luma_vert_w16out_av8;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_w16inp_fptr = &ihevc_inter_pred_luma_vert_w16inp_av8;
|
||||
ps_func_selector->ihevc_inter_pred_luma_copy_fptr = &ihevc_inter_pred_luma_copy_av8;
|
||||
ps_func_selector->ihevc_inter_pred_luma_copy_w16out_fptr = &ihevc_inter_pred_luma_copy_w16out_av8;
|
||||
ps_func_selector->ihevc_inter_pred_luma_horz_w16out_fptr = &ihevc_inter_pred_luma_horz_w16out_av8;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_luma_vert_w16inp_w16out_av8;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_ref_substitution_fptr = &ihevc_intra_pred_chroma_ref_substitution;
|
||||
ps_func_selector->ihevc_intra_pred_luma_ref_substitution_fptr = &ihevc_intra_pred_luma_ref_substitution;
|
||||
ps_func_selector->ihevc_intra_pred_luma_ref_subst_all_avlble_fptr = &ihevc_intra_pred_luma_ref_subst_all_avlble;
|
||||
ps_func_selector->ihevc_intra_pred_ref_filtering_fptr = &ihevc_intra_pred_ref_filtering_neonintr;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_ref_filtering_fptr = &ihevc_intra_pred_chroma_ref_filtering;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_dc_fptr = &ihevc_intra_pred_chroma_dc_av8;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_horz_fptr = &ihevc_intra_pred_chroma_horz_av8;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode2_fptr = &ihevc_intra_pred_chroma_mode2_av8;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_18_34_fptr = &ihevc_intra_pred_chroma_mode_18_34_av8;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_27_to_33_fptr = &ihevc_intra_pred_chroma_mode_27_to_33_av8;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_3_to_9_fptr = &ihevc_intra_pred_chroma_mode_3_to_9_av8;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_planar_fptr = &ihevc_intra_pred_chroma_planar_av8;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_ver_fptr = &ihevc_intra_pred_chroma_ver_av8;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_11_to_17_fptr = &ihevc_intra_pred_chroma_mode_11_to_17_av8;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_19_to_25_fptr = &ihevc_intra_pred_chroma_mode_19_to_25_av8;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_11_to_17_fptr = &ihevc_intra_pred_luma_mode_11_to_17_av8;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_19_to_25_fptr = &ihevc_intra_pred_luma_mode_19_to_25_av8;
|
||||
ps_func_selector->ihevc_intra_pred_luma_dc_fptr = &ihevc_intra_pred_luma_dc_av8;
|
||||
ps_func_selector->ihevc_intra_pred_luma_horz_fptr = &ihevc_intra_pred_luma_horz_av8;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode2_fptr = &ihevc_intra_pred_luma_mode2_av8;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_18_34_fptr = &ihevc_intra_pred_luma_mode_18_34_av8;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_27_to_33_fptr = &ihevc_intra_pred_luma_mode_27_to_33_av8;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_3_to_9_fptr = &ihevc_intra_pred_luma_mode_3_to_9_av8;
|
||||
ps_func_selector->ihevc_intra_pred_luma_planar_fptr = &ihevc_intra_pred_luma_planar_av8;
|
||||
ps_func_selector->ihevc_intra_pred_luma_ver_fptr = &ihevc_intra_pred_luma_ver_av8;
|
||||
ps_func_selector->ihevc_itrans_4x4_ttype1_fptr = &ihevc_itrans_4x4_ttype1;
|
||||
ps_func_selector->ihevc_itrans_4x4_fptr = &ihevc_itrans_4x4;
|
||||
ps_func_selector->ihevc_itrans_8x8_fptr = &ihevc_itrans_8x8;
|
||||
ps_func_selector->ihevc_itrans_16x16_fptr = &ihevc_itrans_16x16;
|
||||
ps_func_selector->ihevc_itrans_32x32_fptr = &ihevc_itrans_32x32;
|
||||
ps_func_selector->ihevc_itrans_res_4x4_ttype1_fptr = &ihevc_itrans_res_4x4_ttype1;
|
||||
ps_func_selector->ihevc_itrans_res_4x4_fptr = &ihevc_itrans_res_4x4;
|
||||
ps_func_selector->ihevc_itrans_res_8x8_fptr = &ihevc_itrans_res_8x8;
|
||||
ps_func_selector->ihevc_itrans_res_16x16_fptr = &ihevc_itrans_res_16x16;
|
||||
ps_func_selector->ihevc_itrans_res_32x32_fptr = &ihevc_itrans_res_32x32;
|
||||
ps_func_selector->ihevc_itrans_recon_4x4_ttype1_fptr = &ihevc_itrans_recon_4x4_ttype1_av8;
|
||||
ps_func_selector->ihevc_itrans_recon_4x4_fptr = &ihevc_itrans_recon_4x4_av8;
|
||||
ps_func_selector->ihevc_itrans_recon_8x8_fptr = &ihevc_itrans_recon_8x8_av8;
|
||||
ps_func_selector->ihevc_itrans_recon_16x16_fptr = &ihevc_itrans_recon_16x16_av8;
|
||||
ps_func_selector->ihevc_itrans_recon_32x32_fptr = &ihevc_itrans_recon_32x32_av8;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_4x4_fptr = &ihevc_chroma_itrans_recon_4x4;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_8x8_fptr = &ihevc_chroma_itrans_recon_8x8;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_16x16_fptr = &ihevc_chroma_itrans_recon_16x16;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_32x32_fptr = &ihevc_chroma_itrans_recon_32x32;
|
||||
ps_func_selector->ihevc_recon_4x4_ttype1_fptr = &ihevc_recon_4x4_ttype1;
|
||||
ps_func_selector->ihevc_recon_4x4_fptr = &ihevc_recon_4x4;
|
||||
ps_func_selector->ihevc_recon_8x8_fptr = &ihevc_recon_8x8;
|
||||
ps_func_selector->ihevc_recon_16x16_fptr = &ihevc_recon_16x16;
|
||||
ps_func_selector->ihevc_recon_32x32_fptr = &ihevc_recon_32x32;
|
||||
ps_func_selector->ihevc_chroma_recon_4x4_fptr = &ihevc_chroma_recon_4x4;
|
||||
ps_func_selector->ihevc_chroma_recon_8x8_fptr = &ihevc_chroma_recon_8x8;
|
||||
ps_func_selector->ihevc_chroma_recon_16x16_fptr = &ihevc_chroma_recon_16x16;
|
||||
ps_func_selector->ihevc_chroma_recon_32x32_fptr = &ihevc_chroma_recon_32x32;
|
||||
ps_func_selector->ihevc_memcpy_mul_8_fptr = &ihevc_memcpy_mul_8_av8;
|
||||
ps_func_selector->ihevc_memcpy_fptr = &ihevc_memcpy_av8;
|
||||
ps_func_selector->ihevc_memset_mul_8_fptr = &ihevc_memset_mul_8_av8;
|
||||
ps_func_selector->ihevc_memset_fptr = &ihevc_memset_av8;
|
||||
ps_func_selector->ihevc_memset_16bit_mul_8_fptr = &ihevc_memset_16bit_mul_8_av8;
|
||||
ps_func_selector->ihevc_memset_16bit_fptr = &ihevc_memset_16bit_av8;
|
||||
ps_func_selector->ihevc_pad_left_luma_fptr = &ihevc_pad_left_luma_av8;
|
||||
ps_func_selector->ihevc_pad_left_chroma_fptr = &ihevc_pad_left_chroma_av8;
|
||||
ps_func_selector->ihevc_pad_right_luma_fptr = &ihevc_pad_right_luma_av8;
|
||||
ps_func_selector->ihevc_pad_right_chroma_fptr = &ihevc_pad_right_chroma_av8;
|
||||
ps_func_selector->ihevc_weighted_pred_bi_fptr = &ihevc_weighted_pred_bi_av8;
|
||||
ps_func_selector->ihevc_weighted_pred_bi_default_fptr = &ihevc_weighted_pred_bi_default_av8;
|
||||
ps_func_selector->ihevc_weighted_pred_uni_fptr = &ihevc_weighted_pred_uni_av8;
|
||||
ps_func_selector->ihevc_weighted_pred_chroma_bi_fptr = &ihevc_weighted_pred_chroma_bi_neonintr;
|
||||
ps_func_selector->ihevc_weighted_pred_chroma_bi_default_fptr = &ihevc_weighted_pred_chroma_bi_default_neonintr;
|
||||
ps_func_selector->ihevc_weighted_pred_chroma_uni_fptr = &ihevc_weighted_pred_chroma_uni_neonintr;
|
||||
ps_func_selector->ihevc_sao_band_offset_luma_fptr = &ihevc_sao_band_offset_luma_av8;
|
||||
ps_func_selector->ihevc_sao_band_offset_chroma_fptr = &ihevc_sao_band_offset_chroma_av8;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class0_fptr = &ihevc_sao_edge_offset_class0_av8;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class0_chroma_fptr = &ihevc_sao_edge_offset_class0_chroma_av8;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class1_fptr = &ihevc_sao_edge_offset_class1_av8;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class1_chroma_fptr = &ihevc_sao_edge_offset_class1_chroma_av8;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class2_fptr = &ihevc_sao_edge_offset_class2_av8;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class2_chroma_fptr = &ihevc_sao_edge_offset_class2_chroma_av8;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class3_fptr = &ihevc_sao_edge_offset_class3_av8;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class3_chroma_fptr = &ihevc_sao_edge_offset_class3_chroma_av8;
|
||||
ps_func_selector->ihevcd_fmt_conv_420sp_to_420sp_fptr = &ihevcd_fmt_conv_420sp_to_420sp_av8;
|
||||
ps_func_selector->ihevcd_fmt_conv_420sp_to_420p_fptr = &ihevcd_fmt_conv_420sp_to_420p_av8;
|
||||
ps_func_selector->ihevcd_fmt_conv_444sp_to_444p_fptr = &ihevcd_fmt_conv_444sp_to_444p;
|
||||
ps_func_selector->ihevcd_itrans_recon_dc_luma_fptr = &ihevcd_itrans_recon_dc_luma_av8;
|
||||
ps_func_selector->ihevcd_itrans_recon_dc_chroma_fptr = &ihevcd_itrans_recon_dc_chroma_av8;
|
||||
ps_func_selector->ihevcd_itrans_res_dc_fptr = &ihevcd_itrans_res_dc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -226,14 +226,16 @@ static IV_API_CALL_STATUS_T api_check_struct_sanity(iv_obj_t *ps_handle,
|
|||
|
||||
|
||||
if((ps_ip->s_ivd_create_ip_t.e_output_format != IV_YUV_420P)
|
||||
&& (ps_ip->s_ivd_create_ip_t.e_output_format
|
||||
!= IV_YUV_422ILE)
|
||||
&& (ps_ip->s_ivd_create_ip_t.e_output_format
|
||||
!= IV_RGB_565)
|
||||
&& (ps_ip->s_ivd_create_ip_t.e_output_format
|
||||
!= IV_YUV_420SP_UV)
|
||||
&& (ps_ip->s_ivd_create_ip_t.e_output_format
|
||||
!= IV_YUV_420SP_VU))
|
||||
!= IV_YUV_420SP_VU)
|
||||
&& (ps_ip->s_ivd_create_ip_t.e_output_format
|
||||
!= IV_GRAY)
|
||||
&& (ps_ip->s_ivd_create_ip_t.e_output_format
|
||||
!= IV_YUV_444P)
|
||||
&& (ps_ip->s_ivd_create_ip_t.e_output_format
|
||||
!= IV_YUV_422P))
|
||||
{
|
||||
ps_op->s_ivd_create_op_t.u4_error_code |= 1
|
||||
<< IVD_UNSUPPORTEDPARAM;
|
||||
|
|
@ -243,6 +245,19 @@ static IV_API_CALL_STATUS_T api_check_struct_sanity(iv_obj_t *ps_handle,
|
|||
return (IV_FAIL);
|
||||
}
|
||||
|
||||
/* Shared display mode is supported only for 420SP and 420P formats */
|
||||
if((ps_ip->s_ivd_create_ip_t.e_output_format != IV_YUV_420P)
|
||||
&& (ps_ip->s_ivd_create_ip_t.e_output_format != IV_YUV_420SP_UV)
|
||||
&& (ps_ip->s_ivd_create_ip_t.e_output_format != IV_YUV_420SP_VU)
|
||||
&& ps_ip->s_ivd_create_ip_t.u4_share_disp_buf == 1)
|
||||
{
|
||||
ps_op->s_ivd_create_op_t.u4_error_code |= 1
|
||||
<< IVD_UNSUPPORTEDPARAM;
|
||||
ps_op->s_ivd_create_op_t.u4_error_code |=
|
||||
IVD_INIT_DEC_FAILED;
|
||||
return (IV_FAIL);
|
||||
}
|
||||
|
||||
}
|
||||
break;
|
||||
|
||||
|
|
@ -768,6 +783,7 @@ static IV_API_CALL_STATUS_T api_check_struct_sanity(iv_obj_t *ps_handle,
|
|||
|
||||
break;
|
||||
}
|
||||
#ifndef DISABLE_SEI
|
||||
case IHEVCD_CXA_CMD_CTL_GET_SEI_MASTERING_PARAMS:
|
||||
{
|
||||
ihevcd_cxa_ctl_get_sei_mastering_params_ip_t *ps_ip;
|
||||
|
|
@ -796,6 +812,7 @@ static IV_API_CALL_STATUS_T api_check_struct_sanity(iv_obj_t *ps_handle,
|
|||
|
||||
break;
|
||||
}
|
||||
#endif
|
||||
case IHEVCD_CXA_CMD_CTL_SET_NUM_CORES:
|
||||
{
|
||||
ihevcd_cxa_ctl_set_num_cores_ip_t *ps_ip;
|
||||
|
|
@ -822,15 +839,11 @@ static IV_API_CALL_STATUS_T api_check_struct_sanity(iv_obj_t *ps_handle,
|
|||
return IV_FAIL;
|
||||
}
|
||||
|
||||
#ifdef MULTICORE
|
||||
if((ps_ip->u4_num_cores < 1) || (ps_ip->u4_num_cores > MAX_NUM_CORES))
|
||||
#else
|
||||
if(ps_ip->u4_num_cores != 1)
|
||||
#endif
|
||||
{
|
||||
ps_op->u4_error_code |= 1 << IVD_UNSUPPORTEDPARAM;
|
||||
return IV_FAIL;
|
||||
}
|
||||
{
|
||||
ps_op->u4_error_code |= 1 << IVD_UNSUPPORTEDPARAM;
|
||||
return IV_FAIL;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case IHEVCD_CXA_CMD_CTL_SET_PROCESSOR:
|
||||
|
|
@ -969,6 +982,13 @@ void ihevcd_update_function_ptr(codec_t *ps_codec)
|
|||
ps_codec->apf_intra_pred_chroma[9] = (pf_intra_pred)ps_codec->s_func_selector.ihevc_intra_pred_chroma_ver_fptr;
|
||||
ps_codec->apf_intra_pred_chroma[10] = (pf_intra_pred)ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_27_to_33_fptr;
|
||||
|
||||
/* Init itrans res function array */
|
||||
ps_codec->apf_itrans_res[0] = (pf_itrans_res)ps_codec->s_func_selector.ihevc_itrans_res_4x4_ttype1_fptr;
|
||||
ps_codec->apf_itrans_res[1] = (pf_itrans_res)ps_codec->s_func_selector.ihevc_itrans_res_4x4_fptr;
|
||||
ps_codec->apf_itrans_res[2] = (pf_itrans_res)ps_codec->s_func_selector.ihevc_itrans_res_8x8_fptr;
|
||||
ps_codec->apf_itrans_res[3] = (pf_itrans_res)ps_codec->s_func_selector.ihevc_itrans_res_16x16_fptr;
|
||||
ps_codec->apf_itrans_res[4] = (pf_itrans_res)ps_codec->s_func_selector.ihevc_itrans_res_32x32_fptr;
|
||||
|
||||
/* Init itrans_recon function array */
|
||||
ps_codec->apf_itrans_recon[0] = (pf_itrans_recon)ps_codec->s_func_selector.ihevc_itrans_recon_4x4_ttype1_fptr;
|
||||
ps_codec->apf_itrans_recon[1] = (pf_itrans_recon)ps_codec->s_func_selector.ihevc_itrans_recon_4x4_fptr;
|
||||
|
|
@ -978,6 +998,7 @@ void ihevcd_update_function_ptr(codec_t *ps_codec)
|
|||
ps_codec->apf_itrans_recon[5] = (pf_itrans_recon)ps_codec->s_func_selector.ihevc_chroma_itrans_recon_4x4_fptr;
|
||||
ps_codec->apf_itrans_recon[6] = (pf_itrans_recon)ps_codec->s_func_selector.ihevc_chroma_itrans_recon_8x8_fptr;
|
||||
ps_codec->apf_itrans_recon[7] = (pf_itrans_recon)ps_codec->s_func_selector.ihevc_chroma_itrans_recon_16x16_fptr;
|
||||
ps_codec->apf_itrans_recon[8] = (pf_itrans_recon)ps_codec->s_func_selector.ihevc_chroma_itrans_recon_32x32_fptr;
|
||||
|
||||
/* Init recon function array */
|
||||
ps_codec->apf_recon[0] = (pf_recon)ps_codec->s_func_selector.ihevc_recon_4x4_ttype1_fptr;
|
||||
|
|
@ -988,11 +1009,14 @@ void ihevcd_update_function_ptr(codec_t *ps_codec)
|
|||
ps_codec->apf_recon[5] = (pf_recon)ps_codec->s_func_selector.ihevc_chroma_recon_4x4_fptr;
|
||||
ps_codec->apf_recon[6] = (pf_recon)ps_codec->s_func_selector.ihevc_chroma_recon_8x8_fptr;
|
||||
ps_codec->apf_recon[7] = (pf_recon)ps_codec->s_func_selector.ihevc_chroma_recon_16x16_fptr;
|
||||
ps_codec->apf_recon[8] = (pf_recon)ps_codec->s_func_selector.ihevc_chroma_recon_32x32_fptr;
|
||||
|
||||
/* Init itrans_recon_dc function array */
|
||||
ps_codec->apf_itrans_recon_dc[0] = (pf_itrans_recon_dc)ps_codec->s_func_selector.ihevcd_itrans_recon_dc_luma_fptr;
|
||||
ps_codec->apf_itrans_recon_dc[1] = (pf_itrans_recon_dc)ps_codec->s_func_selector.ihevcd_itrans_recon_dc_chroma_fptr;
|
||||
|
||||
ps_codec->apf_itrans_res_dc = (pf_itrans_res_dc)ps_codec->s_func_selector.ihevcd_itrans_res_dc_fptr;
|
||||
|
||||
/* Init sao function array */
|
||||
ps_codec->apf_sao_luma[0] = (pf_sao_luma)ps_codec->s_func_selector.ihevc_sao_edge_offset_class0_fptr;
|
||||
ps_codec->apf_sao_luma[1] = (pf_sao_luma)ps_codec->s_func_selector.ihevc_sao_edge_offset_class1_fptr;
|
||||
|
|
@ -1216,6 +1240,7 @@ WORD32 ihevcd_allocate_static_bufs(iv_obj_t **pps_codec_obj,
|
|||
ps_codec->pf_aligned_alloc = pf_aligned_alloc;
|
||||
ps_codec->pf_aligned_free = pf_aligned_free;
|
||||
ps_codec->pv_mem_ctxt = pv_mem_ctxt;
|
||||
ps_codec->i4_threads_active = ps_create_ip->u4_keep_threads_active;
|
||||
|
||||
/* Request memory to hold thread handles for each processing thread */
|
||||
size = MAX_PROCESS_THREADS * ithread_get_handle_size();
|
||||
|
|
@ -1230,52 +1255,52 @@ WORD32 ihevcd_allocate_static_bufs(iv_obj_t **pps_codec_obj,
|
|||
(UWORD8 *)pv_buf + (i * handle_size);
|
||||
}
|
||||
|
||||
#ifdef KEEP_THREADS_ACTIVE
|
||||
/* Request memory to hold mutex (start/done) for each processing thread */
|
||||
size = 2 * MAX_PROCESS_THREADS * ithread_get_mutex_lock_size();
|
||||
pv_buf = ps_codec->pf_aligned_alloc(pv_mem_ctxt, 128, size);
|
||||
RETURN_IF((NULL == pv_buf), IV_FAIL);
|
||||
memset(pv_buf, 0, size);
|
||||
|
||||
for(i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
if(ps_codec->i4_threads_active)
|
||||
{
|
||||
WORD32 ret;
|
||||
WORD32 mutex_size = ithread_get_mutex_lock_size();
|
||||
ps_codec->apv_proc_start_mutex[i] =
|
||||
(UWORD8 *)pv_buf + (2 * i * mutex_size);
|
||||
ps_codec->apv_proc_done_mutex[i] =
|
||||
(UWORD8 *)pv_buf + ((2 * i + 1) * mutex_size);
|
||||
/* Request memory to hold mutex (start/done) for each processing thread */
|
||||
size = 2 * MAX_PROCESS_THREADS * ithread_get_mutex_lock_size();
|
||||
pv_buf = ps_codec->pf_aligned_alloc(pv_mem_ctxt, 128, size);
|
||||
RETURN_IF((NULL == pv_buf), IV_FAIL);
|
||||
memset(pv_buf, 0, size);
|
||||
|
||||
ret = ithread_mutex_init(ps_codec->apv_proc_start_mutex[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
for(i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
{
|
||||
WORD32 ret;
|
||||
WORD32 mutex_size = ithread_get_mutex_lock_size();
|
||||
ps_codec->apv_proc_start_mutex[i] =
|
||||
(UWORD8 *)pv_buf + (2 * i * mutex_size);
|
||||
ps_codec->apv_proc_done_mutex[i] =
|
||||
(UWORD8 *)pv_buf + ((2 * i + 1) * mutex_size);
|
||||
|
||||
ret = ithread_mutex_init(ps_codec->apv_proc_done_mutex[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
ret = ithread_mutex_init(ps_codec->apv_proc_start_mutex[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
|
||||
ret = ithread_mutex_init(ps_codec->apv_proc_done_mutex[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
}
|
||||
|
||||
size = 2 * MAX_PROCESS_THREADS * ithread_get_cond_struct_size();
|
||||
pv_buf = ps_codec->pf_aligned_alloc(pv_mem_ctxt, 128, size);
|
||||
RETURN_IF((NULL == pv_buf), IV_FAIL);
|
||||
memset(pv_buf, 0, size);
|
||||
|
||||
for(i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
{
|
||||
WORD32 ret;
|
||||
WORD32 cond_size = ithread_get_cond_struct_size();
|
||||
ps_codec->apv_proc_start_condition[i] =
|
||||
(UWORD8 *)pv_buf + (2 * i * cond_size);
|
||||
ps_codec->apv_proc_done_condition[i] =
|
||||
(UWORD8 *)pv_buf + ((2 * i + 1) * cond_size);
|
||||
|
||||
ret = ithread_cond_init(ps_codec->apv_proc_start_condition[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
|
||||
ret = ithread_cond_init(ps_codec->apv_proc_done_condition[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
}
|
||||
}
|
||||
|
||||
size = 2 * MAX_PROCESS_THREADS * ithread_get_cond_struct_size();
|
||||
pv_buf = ps_codec->pf_aligned_alloc(pv_mem_ctxt, 128, size);
|
||||
RETURN_IF((NULL == pv_buf), IV_FAIL);
|
||||
memset(pv_buf, 0, size);
|
||||
|
||||
for(i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
{
|
||||
WORD32 ret;
|
||||
WORD32 cond_size = ithread_get_cond_struct_size();
|
||||
ps_codec->apv_proc_start_condition[i] =
|
||||
(UWORD8 *)pv_buf + (2 * i * cond_size);
|
||||
ps_codec->apv_proc_done_condition[i] =
|
||||
(UWORD8 *)pv_buf + ((2 * i + 1) * cond_size);
|
||||
|
||||
ret = ithread_cond_init(ps_codec->apv_proc_start_condition[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
|
||||
ret = ithread_cond_init(ps_codec->apv_proc_done_condition[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
/* Request memory for static bitstream buffer which holds bitstream after emulation prevention */
|
||||
size = MIN_BITSBUF_SIZE;
|
||||
pv_buf = pf_aligned_alloc(pv_mem_ctxt, 128, size + 16); //Alloc extra for parse optimization
|
||||
|
|
@ -1391,19 +1416,31 @@ WORD32 ihevcd_allocate_static_bufs(iv_obj_t **pps_codec_obj,
|
|||
|
||||
{
|
||||
WORD32 inter_pred_tmp_buf_size, ntaps_luma;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
WORD32 res_buf_size;
|
||||
#endif
|
||||
WORD32 pic_pu_idx_map_size;
|
||||
|
||||
/* Max inter pred size */
|
||||
ntaps_luma = 8;
|
||||
inter_pred_tmp_buf_size = sizeof(WORD16) * (MAX_CTB_SIZE + ntaps_luma) * MAX_CTB_SIZE;
|
||||
// For yuv 4:4:4 chroma the inter pred buffer size for one CTB will be double of luma
|
||||
inter_pred_tmp_buf_size = sizeof(WORD16) * (MAX_CTB_SIZE + ntaps_luma) * MAX_CTB_SIZE * 2;
|
||||
|
||||
inter_pred_tmp_buf_size = ALIGN64(inter_pred_tmp_buf_size);
|
||||
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
res_buf_size = sizeof(WORD16) * (MAX_TU_SIZE * MAX_TU_SIZE);
|
||||
res_buf_size = ALIGN64(res_buf_size);
|
||||
#endif
|
||||
|
||||
/* To hold pu_index w.r.t. frame level pu_t array for a CTB */
|
||||
pic_pu_idx_map_size = sizeof(WORD32) * (18 * 18);
|
||||
pic_pu_idx_map_size = ALIGN64(pic_pu_idx_map_size);
|
||||
|
||||
size = inter_pred_tmp_buf_size * 2;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
size += (res_buf_size * 4);
|
||||
#endif
|
||||
size += pic_pu_idx_map_size;
|
||||
size *= MAX_PROCESS_THREADS;
|
||||
|
||||
|
|
@ -1419,6 +1456,17 @@ WORD32 ihevcd_allocate_static_bufs(iv_obj_t **pps_codec_obj,
|
|||
ps_codec->as_process[i].pi2_inter_pred_tmp_buf2 = (WORD16 *)pu1_buf;
|
||||
pu1_buf += inter_pred_tmp_buf_size;
|
||||
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
ps_codec->as_process[i].pi2_res_luma_buf = (WORD16 *)pu1_buf;
|
||||
pu1_buf += res_buf_size;
|
||||
|
||||
ps_codec->as_process[i].pi2_res_chroma_buf = (WORD16 *)pu1_buf;
|
||||
pu1_buf += res_buf_size;
|
||||
|
||||
ps_codec->as_process[i].pi2_invscan_out_subtu = (WORD16 *)pu1_buf;
|
||||
pu1_buf += (res_buf_size * 2);
|
||||
#endif
|
||||
|
||||
/* Inverse transform intermediate and inverse scan output buffers reuse inter pred scratch buffers */
|
||||
ps_codec->as_process[i].pi2_itrans_intrmd_buf =
|
||||
ps_codec->as_process[i].pi2_inter_pred_tmp_buf2;
|
||||
|
|
@ -1464,6 +1512,37 @@ WORD32 ihevcd_allocate_static_bufs(iv_obj_t **pps_codec_obj,
|
|||
return (status);
|
||||
}
|
||||
|
||||
WORD32 ihevcd_join_threads(codec_t *ps_codec)
|
||||
{
|
||||
if(ps_codec->i4_threads_active)
|
||||
{
|
||||
int i;
|
||||
/* Wait for threads */
|
||||
ps_codec->i4_break_threads = 1;
|
||||
|
||||
for(i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
{
|
||||
WORD32 ret;
|
||||
if(ps_codec->ai4_process_thread_created[i])
|
||||
{
|
||||
ret = ithread_mutex_lock(ps_codec->apv_proc_start_mutex[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
|
||||
ps_codec->ai4_process_start[i] = 1;
|
||||
ret = ithread_cond_signal(ps_codec->apv_proc_start_condition[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
|
||||
ret = ithread_mutex_unlock(ps_codec->apv_proc_start_mutex[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
|
||||
ithread_join(ps_codec->apv_process_thread_handle[i], NULL);
|
||||
|
||||
ps_codec->ai4_process_thread_created[i] = 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
return IV_SUCCESS;
|
||||
}
|
||||
/**
|
||||
*******************************************************************************
|
||||
*
|
||||
|
|
@ -1494,43 +1573,29 @@ WORD32 ihevcd_free_static_bufs(iv_obj_t *ps_codec_obj)
|
|||
pf_aligned_free = ps_codec->pf_aligned_free;
|
||||
pv_mem_ctxt = ps_codec->pv_mem_ctxt;
|
||||
|
||||
#ifdef KEEP_THREADS_ACTIVE
|
||||
/* Wait for threads */
|
||||
ps_codec->i4_break_threads = 1;
|
||||
for(int i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
if(ps_codec->i4_threads_active)
|
||||
{
|
||||
WORD32 ret;
|
||||
if(ps_codec->ai4_process_thread_created[i])
|
||||
/* Wait for threads */
|
||||
ihevcd_join_threads(ps_codec);
|
||||
|
||||
for(int i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
{
|
||||
ret = ithread_mutex_lock(ps_codec->apv_proc_start_mutex[i]);
|
||||
WORD32 ret;
|
||||
ret = ithread_cond_destroy(ps_codec->apv_proc_start_condition[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
|
||||
ps_codec->ai4_process_start[i] = 1;
|
||||
ret = ithread_cond_signal(ps_codec->apv_proc_start_condition[i]);
|
||||
ret = ithread_cond_destroy(ps_codec->apv_proc_done_condition[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
|
||||
ret = ithread_mutex_unlock(ps_codec->apv_proc_start_mutex[i]);
|
||||
ret = ithread_mutex_destroy(ps_codec->apv_proc_start_mutex[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
|
||||
ithread_join(ps_codec->apv_process_thread_handle[i], NULL);
|
||||
|
||||
ps_codec->ai4_process_thread_created[i] = 0;
|
||||
ret = ithread_mutex_destroy(ps_codec->apv_proc_done_mutex[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
}
|
||||
ret = ithread_cond_destroy(ps_codec->apv_proc_start_condition[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
|
||||
ret = ithread_cond_destroy(ps_codec->apv_proc_done_condition[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
|
||||
ret = ithread_mutex_destroy(ps_codec->apv_proc_start_mutex[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
|
||||
ret = ithread_mutex_destroy(ps_codec->apv_proc_done_mutex[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
ALIGNED_FREE(ps_codec, ps_codec->apv_proc_start_mutex[0]);
|
||||
ALIGNED_FREE(ps_codec, ps_codec->apv_proc_start_condition[0]);
|
||||
}
|
||||
ALIGNED_FREE(ps_codec, ps_codec->apv_proc_start_mutex[0]);
|
||||
ALIGNED_FREE(ps_codec, ps_codec->apv_proc_start_condition[0]);
|
||||
#endif
|
||||
|
||||
ALIGNED_FREE(ps_codec, ps_codec->apv_process_thread_handle[0]);
|
||||
ALIGNED_FREE(ps_codec, ps_codec->pu1_bitsbuf_static);
|
||||
|
|
@ -1751,41 +1816,62 @@ WORD32 ihevcd_allocate_dynamic_bufs(codec_t *ps_codec)
|
|||
memset(ps_codec->as_process[0].pu4_pic_pu_idx_top, 0, sizeof(UWORD32) * (wd / 4 + 1));
|
||||
|
||||
{
|
||||
sps_t *ps_sps = (ps_codec->s_parse.ps_sps_base + ps_codec->i4_sps_id);
|
||||
|
||||
/* To hold SAO left buffer for luma */
|
||||
size = sizeof(UWORD8) * (MAX(ht, wd));
|
||||
|
||||
/* To hold SAO left buffer for chroma */
|
||||
size += sizeof(UWORD8) * (MAX(ht, wd));
|
||||
if(ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_MONOCHROME)
|
||||
{
|
||||
size += sizeof(UWORD8) * (MAX(ht, wd));
|
||||
}
|
||||
|
||||
/* To hold SAO top buffer for luma */
|
||||
size += sizeof(UWORD8) * wd;
|
||||
|
||||
/* To hold SAO top buffer for chroma */
|
||||
size += sizeof(UWORD8) * wd;
|
||||
if(ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_MONOCHROME)
|
||||
{
|
||||
size += sizeof(UWORD8) * wd;
|
||||
}
|
||||
|
||||
/* To hold SAO top left luma pixel value for last output ctb in a row*/
|
||||
size += sizeof(UWORD8) * max_ctb_rows;
|
||||
|
||||
/* To hold SAO top left chroma pixel value last output ctb in a row*/
|
||||
size += sizeof(UWORD8) * max_ctb_rows * 2;
|
||||
if(ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_MONOCHROME)
|
||||
{
|
||||
size += sizeof(UWORD8) * max_ctb_rows * 2;
|
||||
}
|
||||
|
||||
/* To hold SAO top left pixel luma for current ctb - column array*/
|
||||
size += sizeof(UWORD8) * max_ctb_rows;
|
||||
|
||||
/* To hold SAO top left pixel chroma for current ctb-column array*/
|
||||
size += sizeof(UWORD8) * max_ctb_rows * 2;
|
||||
if(ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_MONOCHROME)
|
||||
{
|
||||
size += sizeof(UWORD8) * max_ctb_rows * 2;
|
||||
}
|
||||
|
||||
/* To hold SAO top right pixel luma pixel value last output ctb in a row*/
|
||||
size += sizeof(UWORD8) * max_ctb_cols;
|
||||
|
||||
/* To hold SAO top right pixel chroma pixel value last output ctb in a row*/
|
||||
size += sizeof(UWORD8) * max_ctb_cols * 2;
|
||||
if(ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_MONOCHROME)
|
||||
{
|
||||
size += sizeof(UWORD8) * max_ctb_cols * 2;
|
||||
}
|
||||
|
||||
/*To hold SAO botton bottom left pixels for luma*/
|
||||
size += sizeof(UWORD8) * max_ctb_rows;
|
||||
|
||||
/*To hold SAO botton bottom left pixels for luma*/
|
||||
size += sizeof(UWORD8) * max_ctb_rows * 2;
|
||||
/*To hold SAO botton bottom left pixels for chroma*/
|
||||
if(ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_MONOCHROME)
|
||||
{
|
||||
size += sizeof(UWORD8) * max_ctb_rows * 2;
|
||||
}
|
||||
|
||||
size = ALIGN64(size);
|
||||
|
||||
pu1_buf = ps_codec->pf_aligned_alloc(pv_mem_ctxt, 128, size);
|
||||
|
|
@ -1799,12 +1885,16 @@ WORD32 ihevcd_allocate_dynamic_bufs(codec_t *ps_codec)
|
|||
ps_codec->s_parse.s_sao_ctxt.pu1_sao_src_left_luma = (UWORD8 *)pu1_buf;
|
||||
pu1_buf += MAX(ht, wd);
|
||||
|
||||
for(i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
if(ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_MONOCHROME)
|
||||
{
|
||||
ps_codec->as_process[i].s_sao_ctxt.pu1_sao_src_left_chroma = (UWORD8 *)pu1_buf;
|
||||
for(i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
{
|
||||
ps_codec->as_process[i].s_sao_ctxt.pu1_sao_src_left_chroma = (UWORD8 *)pu1_buf;
|
||||
}
|
||||
ps_codec->s_parse.s_sao_ctxt.pu1_sao_src_left_chroma = (UWORD8 *)pu1_buf;
|
||||
pu1_buf += MAX(ht, wd);
|
||||
}
|
||||
ps_codec->s_parse.s_sao_ctxt.pu1_sao_src_left_chroma = (UWORD8 *)pu1_buf;
|
||||
pu1_buf += MAX(ht, wd);
|
||||
|
||||
for(i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
{
|
||||
ps_codec->as_process[i].s_sao_ctxt.pu1_sao_src_top_luma = (UWORD8 *)pu1_buf;
|
||||
|
|
@ -1812,12 +1902,16 @@ WORD32 ihevcd_allocate_dynamic_bufs(codec_t *ps_codec)
|
|||
ps_codec->s_parse.s_sao_ctxt.pu1_sao_src_top_luma = (UWORD8 *)pu1_buf;
|
||||
pu1_buf += wd;
|
||||
|
||||
for(i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
if(ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_MONOCHROME)
|
||||
{
|
||||
ps_codec->as_process[i].s_sao_ctxt.pu1_sao_src_top_chroma = (UWORD8 *)pu1_buf;
|
||||
for(i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
{
|
||||
ps_codec->as_process[i].s_sao_ctxt.pu1_sao_src_top_chroma = (UWORD8 *)pu1_buf;
|
||||
}
|
||||
ps_codec->s_parse.s_sao_ctxt.pu1_sao_src_top_chroma = (UWORD8 *)pu1_buf;
|
||||
pu1_buf += wd;
|
||||
}
|
||||
ps_codec->s_parse.s_sao_ctxt.pu1_sao_src_top_chroma = (UWORD8 *)pu1_buf;
|
||||
pu1_buf += wd;
|
||||
|
||||
for(i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
{
|
||||
ps_codec->as_process[i].s_sao_ctxt.pu1_sao_src_luma_top_left_ctb = (UWORD8 *)pu1_buf;
|
||||
|
|
@ -1825,12 +1919,15 @@ WORD32 ihevcd_allocate_dynamic_bufs(codec_t *ps_codec)
|
|||
ps_codec->s_parse.s_sao_ctxt.pu1_sao_src_luma_top_left_ctb = (UWORD8 *)pu1_buf;
|
||||
pu1_buf += ht / MIN_CTB_SIZE;
|
||||
|
||||
for(i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
if(ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_MONOCHROME)
|
||||
{
|
||||
ps_codec->as_process[i].s_sao_ctxt.pu1_sao_src_chroma_top_left_ctb = (UWORD8 *)pu1_buf;
|
||||
for(i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
{
|
||||
ps_codec->as_process[i].s_sao_ctxt.pu1_sao_src_chroma_top_left_ctb = (UWORD8 *)pu1_buf;
|
||||
}
|
||||
ps_codec->s_parse.s_sao_ctxt.pu1_sao_src_chroma_top_left_ctb = (UWORD8 *)pu1_buf;
|
||||
pu1_buf += (ht / MIN_CTB_SIZE) * 2;
|
||||
}
|
||||
ps_codec->s_parse.s_sao_ctxt.pu1_sao_src_chroma_top_left_ctb = (UWORD8 *)pu1_buf;
|
||||
pu1_buf += (ht / MIN_CTB_SIZE) * 2;
|
||||
|
||||
for(i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
{
|
||||
|
|
@ -1839,27 +1936,32 @@ WORD32 ihevcd_allocate_dynamic_bufs(codec_t *ps_codec)
|
|||
ps_codec->s_parse.s_sao_ctxt.pu1_sao_src_top_left_luma_curr_ctb = (UWORD8 *)pu1_buf;
|
||||
pu1_buf += ht / MIN_CTB_SIZE;
|
||||
|
||||
for(i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
if(ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_MONOCHROME)
|
||||
{
|
||||
ps_codec->as_process[i].s_sao_ctxt.pu1_sao_src_top_left_chroma_curr_ctb = (UWORD8 *)pu1_buf;
|
||||
for(i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
{
|
||||
ps_codec->as_process[i].s_sao_ctxt.pu1_sao_src_top_left_chroma_curr_ctb = (UWORD8 *)pu1_buf;
|
||||
}
|
||||
ps_codec->s_parse.s_sao_ctxt.pu1_sao_src_top_left_chroma_curr_ctb = (UWORD8 *)pu1_buf;
|
||||
pu1_buf += (ht / MIN_CTB_SIZE) * 2;
|
||||
}
|
||||
ps_codec->s_parse.s_sao_ctxt.pu1_sao_src_top_left_chroma_curr_ctb = (UWORD8 *)pu1_buf;
|
||||
|
||||
pu1_buf += (ht / MIN_CTB_SIZE) * 2;
|
||||
for(i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
{
|
||||
ps_codec->as_process[i].s_sao_ctxt.pu1_sao_src_top_left_luma_top_right = (UWORD8 *)pu1_buf;
|
||||
}
|
||||
ps_codec->s_parse.s_sao_ctxt.pu1_sao_src_top_left_luma_top_right = (UWORD8 *)pu1_buf;
|
||||
|
||||
pu1_buf += wd / MIN_CTB_SIZE;
|
||||
for(i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
{
|
||||
ps_codec->as_process[i].s_sao_ctxt.pu1_sao_src_top_left_chroma_top_right = (UWORD8 *)pu1_buf;
|
||||
}
|
||||
ps_codec->s_parse.s_sao_ctxt.pu1_sao_src_top_left_chroma_top_right = (UWORD8 *)pu1_buf;
|
||||
|
||||
pu1_buf += (wd / MIN_CTB_SIZE) * 2;
|
||||
if(ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_MONOCHROME)
|
||||
{
|
||||
for(i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
{
|
||||
ps_codec->as_process[i].s_sao_ctxt.pu1_sao_src_top_left_chroma_top_right = (UWORD8 *)pu1_buf;
|
||||
}
|
||||
ps_codec->s_parse.s_sao_ctxt.pu1_sao_src_top_left_chroma_top_right = (UWORD8 *)pu1_buf;
|
||||
pu1_buf += (wd / MIN_CTB_SIZE) * 2;
|
||||
}
|
||||
|
||||
/*Per CTB, Store 1 value for luma , 2 values for chroma*/
|
||||
for(i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
|
|
@ -1867,16 +1969,17 @@ WORD32 ihevcd_allocate_dynamic_bufs(codec_t *ps_codec)
|
|||
ps_codec->as_process[i].s_sao_ctxt.pu1_sao_src_top_left_luma_bot_left = (UWORD8 *)pu1_buf;
|
||||
}
|
||||
ps_codec->s_parse.s_sao_ctxt.pu1_sao_src_top_left_luma_bot_left = (UWORD8 *)pu1_buf;
|
||||
|
||||
pu1_buf += (ht / MIN_CTB_SIZE);
|
||||
|
||||
for(i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
if(ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_MONOCHROME)
|
||||
{
|
||||
ps_codec->as_process[i].s_sao_ctxt.pu1_sao_src_top_left_chroma_bot_left = (UWORD8 *)pu1_buf;
|
||||
for(i = 0; i < MAX_PROCESS_THREADS; i++)
|
||||
{
|
||||
ps_codec->as_process[i].s_sao_ctxt.pu1_sao_src_top_left_chroma_bot_left = (UWORD8 *)pu1_buf;
|
||||
}
|
||||
ps_codec->s_parse.s_sao_ctxt.pu1_sao_src_top_left_chroma_bot_left = (UWORD8 *)pu1_buf;
|
||||
pu1_buf += (ht / MIN_CTB_SIZE) * 2;
|
||||
}
|
||||
ps_codec->s_parse.s_sao_ctxt.pu1_sao_src_top_left_chroma_bot_left = (UWORD8 *)pu1_buf;
|
||||
|
||||
pu1_buf += (ht / MIN_CTB_SIZE) * 2;
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -2015,20 +2118,38 @@ WORD32 ihevcd_allocate_dynamic_bufs(codec_t *ps_codec)
|
|||
ps_codec->as_process[i].s_sao_ctxt.ps_pic_sao = ps_codec->s_parse.ps_pic_sao;
|
||||
}
|
||||
|
||||
/* Only if width * height * 3 / 2 is greater than MIN_BITSBUF_SIZE,
|
||||
/* Only if (frame size * compression factor) is greater than MIN_BITSBUF_SIZE,
|
||||
then allocate dynamic bistream buffer */
|
||||
ps_codec->pu1_bitsbuf_dynamic = NULL;
|
||||
size = wd * ht;
|
||||
if(size > MIN_BITSBUF_SIZE)
|
||||
{
|
||||
pv_buf = ps_codec->pf_aligned_alloc(pv_mem_ctxt, 128, size + 16); //Alloc extra for parse optimization
|
||||
RETURN_IF((NULL == pv_buf), IV_FAIL);
|
||||
memset(pv_buf, 0, size + 16);
|
||||
ps_codec->pu1_bitsbuf_dynamic = pv_buf;
|
||||
ps_codec->u4_bitsbuf_size_dynamic = size;
|
||||
sps_t *ps_sps = (ps_codec->s_parse.ps_sps_base + ps_codec->i4_sps_id);
|
||||
|
||||
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV444)
|
||||
{
|
||||
size = wd * ht * 3;
|
||||
}
|
||||
else if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV422)
|
||||
{
|
||||
size = wd * ht * 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
size = wd * ht;
|
||||
}
|
||||
|
||||
if(size > MIN_BITSBUF_SIZE)
|
||||
{
|
||||
//Alloc extra for parse optimization
|
||||
pv_buf = ps_codec->pf_aligned_alloc(pv_mem_ctxt, 128, size + 16);
|
||||
RETURN_IF((NULL == pv_buf), IV_FAIL);
|
||||
|
||||
memset(pv_buf, 0, size + 16);
|
||||
ps_codec->pu1_bitsbuf_dynamic = pv_buf;
|
||||
ps_codec->u4_bitsbuf_size_dynamic = size;
|
||||
}
|
||||
}
|
||||
|
||||
size = ihevcd_get_tu_data_size(wd * ht);
|
||||
size = ihevcd_get_tu_data_size(ps_codec, wd * ht);
|
||||
pv_buf = ps_codec->pf_aligned_alloc(pv_mem_ctxt, 128, size);
|
||||
RETURN_IF((NULL == pv_buf), IV_FAIL);
|
||||
memset(pv_buf, 0, size);
|
||||
|
|
@ -2249,6 +2370,10 @@ WORD32 ihevcd_create(iv_obj_t *ps_codec_obj,
|
|||
return IV_FAIL;
|
||||
}
|
||||
ps_codec = (codec_t *)ps_codec_obj->pv_codec_handle;
|
||||
if (ps_create_ip->u4_enable_yuv_formats == 0) {
|
||||
ps_create_ip->u4_enable_yuv_formats = 1 << CHROMA_FMT_IDC_YUV420;
|
||||
}
|
||||
ps_codec->u4_enable_yuv_formats = ps_create_ip->u4_enable_yuv_formats;
|
||||
ret = ihevcd_init(ps_codec);
|
||||
|
||||
TRACE_INIT(NULL);
|
||||
|
|
@ -2453,6 +2578,7 @@ WORD32 ihevcd_set_flush_mode(iv_obj_t *ps_codec_obj,
|
|||
ivd_ctl_flush_op_t *ps_ctl_op = (ivd_ctl_flush_op_t *)pv_api_op;
|
||||
UNUSED(pv_api_ip);
|
||||
ps_codec = (codec_t *)(ps_codec_obj->pv_codec_handle);
|
||||
ihevcd_join_threads(ps_codec);
|
||||
|
||||
/* Signal flush frame control call */
|
||||
ps_codec->i4_flush_mode = 1;
|
||||
|
|
@ -2517,15 +2643,15 @@ WORD32 ihevcd_get_status(iv_obj_t *ps_codec_obj,
|
|||
ps_ctl_op->u4_min_num_in_bufs = MIN_IN_BUFS;
|
||||
if(ps_codec->e_chroma_fmt == IV_YUV_420P)
|
||||
ps_ctl_op->u4_min_num_out_bufs = MIN_OUT_BUFS_420;
|
||||
else if(ps_codec->e_chroma_fmt == IV_YUV_422ILE)
|
||||
ps_ctl_op->u4_min_num_out_bufs = MIN_OUT_BUFS_422ILE;
|
||||
else if(ps_codec->e_chroma_fmt == IV_RGB_565)
|
||||
ps_ctl_op->u4_min_num_out_bufs = MIN_OUT_BUFS_RGB565;
|
||||
else if(ps_codec->e_chroma_fmt == IV_RGBA_8888)
|
||||
ps_ctl_op->u4_min_num_out_bufs = MIN_OUT_BUFS_RGBA8888;
|
||||
else if(ps_codec->e_chroma_fmt == IV_YUV_444P)
|
||||
ps_ctl_op->u4_min_num_out_bufs = MIN_OUT_BUFS_444;
|
||||
else if(ps_codec->e_chroma_fmt == IV_YUV_422P)
|
||||
ps_ctl_op->u4_min_num_out_bufs = MIN_OUT_BUFS_422;
|
||||
else if((ps_codec->e_chroma_fmt == IV_YUV_420SP_UV)
|
||||
|| (ps_codec->e_chroma_fmt == IV_YUV_420SP_VU))
|
||||
ps_ctl_op->u4_min_num_out_bufs = MIN_OUT_BUFS_420SP;
|
||||
else if(ps_codec->e_chroma_fmt == IV_GRAY)
|
||||
ps_ctl_op->u4_min_num_out_bufs = MIN_OUT_BUFS_GRAY;
|
||||
|
||||
ps_ctl_op->u4_num_disp_bufs = 1;
|
||||
|
||||
|
|
@ -2590,23 +2716,11 @@ WORD32 ihevcd_get_status(iv_obj_t *ps_codec_obj,
|
|||
ps_ctl_op->u4_min_out_buf_size[1] = (wd * ht) >> 2;
|
||||
ps_ctl_op->u4_min_out_buf_size[2] = (wd * ht) >> 2;
|
||||
}
|
||||
else if(ps_codec->e_chroma_fmt == IV_YUV_422ILE)
|
||||
else if(ps_codec->e_chroma_fmt == IV_YUV_444P)
|
||||
{
|
||||
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht) * 2;
|
||||
ps_ctl_op->u4_min_out_buf_size[1] =
|
||||
ps_ctl_op->u4_min_out_buf_size[2] = 0;
|
||||
}
|
||||
else if(ps_codec->e_chroma_fmt == IV_RGB_565)
|
||||
{
|
||||
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht) * 2;
|
||||
ps_ctl_op->u4_min_out_buf_size[1] =
|
||||
ps_ctl_op->u4_min_out_buf_size[2] = 0;
|
||||
}
|
||||
else if(ps_codec->e_chroma_fmt == IV_RGBA_8888)
|
||||
{
|
||||
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht) * 4;
|
||||
ps_ctl_op->u4_min_out_buf_size[1] =
|
||||
ps_ctl_op->u4_min_out_buf_size[2] = 0;
|
||||
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht);
|
||||
ps_ctl_op->u4_min_out_buf_size[1] = (wd * ht);
|
||||
ps_ctl_op->u4_min_out_buf_size[2] = (wd * ht);
|
||||
}
|
||||
else if((ps_codec->e_chroma_fmt == IV_YUV_420SP_UV)
|
||||
|| (ps_codec->e_chroma_fmt == IV_YUV_420SP_VU))
|
||||
|
|
@ -2615,6 +2729,18 @@ WORD32 ihevcd_get_status(iv_obj_t *ps_codec_obj,
|
|||
ps_ctl_op->u4_min_out_buf_size[1] = (wd * ht) >> 1;
|
||||
ps_ctl_op->u4_min_out_buf_size[2] = 0;
|
||||
}
|
||||
else if(ps_codec->e_chroma_fmt == IV_GRAY)
|
||||
{
|
||||
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht);
|
||||
ps_ctl_op->u4_min_out_buf_size[1] = 0;
|
||||
ps_ctl_op->u4_min_out_buf_size[2] = 0;
|
||||
}
|
||||
else if(ps_codec->e_chroma_fmt == IV_YUV_422P)
|
||||
{
|
||||
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht);
|
||||
ps_ctl_op->u4_min_out_buf_size[1] = (wd * ht) >> 1;
|
||||
ps_ctl_op->u4_min_out_buf_size[2] = (wd * ht) >> 1;
|
||||
}
|
||||
ps_ctl_op->u4_pic_ht = ht;
|
||||
ps_ctl_op->u4_pic_wd = wd;
|
||||
ps_ctl_op->u4_frame_rate = 30000;
|
||||
|
|
@ -2677,15 +2803,15 @@ WORD32 ihevcd_get_buf_info(iv_obj_t *ps_codec_obj,
|
|||
ps_ctl_op->u4_min_num_in_bufs = MIN_IN_BUFS;
|
||||
if(ps_codec->e_chroma_fmt == IV_YUV_420P)
|
||||
ps_ctl_op->u4_min_num_out_bufs = MIN_OUT_BUFS_420;
|
||||
else if(ps_codec->e_chroma_fmt == IV_YUV_422ILE)
|
||||
ps_ctl_op->u4_min_num_out_bufs = MIN_OUT_BUFS_422ILE;
|
||||
else if(ps_codec->e_chroma_fmt == IV_RGB_565)
|
||||
ps_ctl_op->u4_min_num_out_bufs = MIN_OUT_BUFS_RGB565;
|
||||
else if(ps_codec->e_chroma_fmt == IV_RGBA_8888)
|
||||
ps_ctl_op->u4_min_num_out_bufs = MIN_OUT_BUFS_RGBA8888;
|
||||
else if(ps_codec->e_chroma_fmt == IV_YUV_444P)
|
||||
ps_ctl_op->u4_min_num_out_bufs = MIN_OUT_BUFS_444;
|
||||
else if(ps_codec->e_chroma_fmt == IV_YUV_422P)
|
||||
ps_ctl_op->u4_min_num_out_bufs = MIN_OUT_BUFS_422;
|
||||
else if((ps_codec->e_chroma_fmt == IV_YUV_420SP_UV)
|
||||
|| (ps_codec->e_chroma_fmt == IV_YUV_420SP_VU))
|
||||
ps_ctl_op->u4_min_num_out_bufs = MIN_OUT_BUFS_420SP;
|
||||
else if(ps_codec->e_chroma_fmt == IV_GRAY)
|
||||
ps_ctl_op->u4_min_num_out_bufs = MIN_OUT_BUFS_GRAY;
|
||||
|
||||
ps_ctl_op->u4_num_disp_bufs = 1;
|
||||
|
||||
|
|
@ -2694,7 +2820,25 @@ WORD32 ihevcd_get_buf_info(iv_obj_t *ps_codec_obj,
|
|||
wd = ALIGN64(ps_codec->i4_wd);
|
||||
ht = ALIGN64(ps_codec->i4_ht);
|
||||
|
||||
ps_ctl_op->u4_min_in_buf_size[i] = MAX((wd * ht), MIN_BITSBUF_SIZE);
|
||||
if(ps_codec->i4_sps_done)
|
||||
{
|
||||
sps_t *ps_sps = (ps_codec->s_parse.ps_sps_base + ps_codec->i4_sps_id);
|
||||
|
||||
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV444)
|
||||
ps_ctl_op->u4_min_in_buf_size[i] = MAX((wd * ht * 3), MIN_BITSBUF_SIZE);
|
||||
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV422)
|
||||
ps_ctl_op->u4_min_in_buf_size[i] = MAX((wd * ht * 2), MIN_BITSBUF_SIZE);
|
||||
else
|
||||
ps_ctl_op->u4_min_in_buf_size[i] = MAX((wd * ht), MIN_BITSBUF_SIZE);
|
||||
}
|
||||
else
|
||||
{
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
ps_ctl_op->u4_min_in_buf_size[i] = MAX((wd * ht * 3), MIN_BITSBUF_SIZE);
|
||||
#else
|
||||
ps_ctl_op->u4_min_in_buf_size[i] = MAX((wd * ht), MIN_BITSBUF_SIZE);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
wd = 0;
|
||||
|
|
@ -2760,23 +2904,11 @@ WORD32 ihevcd_get_buf_info(iv_obj_t *ps_codec_obj,
|
|||
ps_ctl_op->u4_min_out_buf_size[1] = (wd * ht) >> 2;
|
||||
ps_ctl_op->u4_min_out_buf_size[2] = (wd * ht) >> 2;
|
||||
}
|
||||
else if(ps_codec->e_chroma_fmt == IV_YUV_422ILE)
|
||||
else if(ps_codec->e_chroma_fmt == IV_YUV_444P)
|
||||
{
|
||||
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht) * 2;
|
||||
ps_ctl_op->u4_min_out_buf_size[1] =
|
||||
ps_ctl_op->u4_min_out_buf_size[2] = 0;
|
||||
}
|
||||
else if(ps_codec->e_chroma_fmt == IV_RGB_565)
|
||||
{
|
||||
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht) * 2;
|
||||
ps_ctl_op->u4_min_out_buf_size[1] =
|
||||
ps_ctl_op->u4_min_out_buf_size[2] = 0;
|
||||
}
|
||||
else if(ps_codec->e_chroma_fmt == IV_RGBA_8888)
|
||||
{
|
||||
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht) * 4;
|
||||
ps_ctl_op->u4_min_out_buf_size[1] =
|
||||
ps_ctl_op->u4_min_out_buf_size[2] = 0;
|
||||
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht);
|
||||
ps_ctl_op->u4_min_out_buf_size[1] = (wd * ht);
|
||||
ps_ctl_op->u4_min_out_buf_size[2] = (wd * ht);
|
||||
}
|
||||
else if((ps_codec->e_chroma_fmt == IV_YUV_420SP_UV)
|
||||
|| (ps_codec->e_chroma_fmt == IV_YUV_420SP_VU))
|
||||
|
|
@ -2785,6 +2917,18 @@ WORD32 ihevcd_get_buf_info(iv_obj_t *ps_codec_obj,
|
|||
ps_ctl_op->u4_min_out_buf_size[1] = (wd * ht) >> 1;
|
||||
ps_ctl_op->u4_min_out_buf_size[2] = 0;
|
||||
}
|
||||
else if(ps_codec->e_chroma_fmt == IV_GRAY)
|
||||
{
|
||||
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht);
|
||||
ps_ctl_op->u4_min_out_buf_size[1] =
|
||||
ps_ctl_op->u4_min_out_buf_size[2] = 0;
|
||||
}
|
||||
else if(ps_codec->e_chroma_fmt == IV_YUV_422P)
|
||||
{
|
||||
ps_ctl_op->u4_min_out_buf_size[0] = (wd * ht);
|
||||
ps_ctl_op->u4_min_out_buf_size[1] = (wd * ht) >> 1;
|
||||
ps_ctl_op->u4_min_out_buf_size[2] = (wd * ht) >> 1;
|
||||
}
|
||||
ps_codec->i4_num_disp_bufs = ps_ctl_op->u4_num_disp_bufs;
|
||||
|
||||
return IV_SUCCESS;
|
||||
|
|
@ -2943,6 +3087,8 @@ WORD32 ihevcd_reset(iv_obj_t *ps_codec_obj, void *pv_api_ip, void *pv_api_op)
|
|||
if(ps_codec != NULL)
|
||||
{
|
||||
DEBUG("\nReset called \n");
|
||||
ihevcd_join_threads(ps_codec);
|
||||
|
||||
ihevcd_init(ps_codec);
|
||||
}
|
||||
else
|
||||
|
|
@ -3175,6 +3321,24 @@ WORD32 ihevcd_get_frame_dimensions(iv_obj_t *ps_codec_obj,
|
|||
ps_op->u4_buffer_wd[1] <<= 1;
|
||||
ps_op->u4_x_offset[1] <<= 1;
|
||||
}
|
||||
else if(ps_codec->e_chroma_fmt == IV_YUV_444P)
|
||||
{
|
||||
ps_op->u4_disp_wd[1] = ps_op->u4_disp_wd[2] = ps_op->u4_disp_wd[0];
|
||||
ps_op->u4_disp_ht[1] = ps_op->u4_disp_ht[2] = ps_op->u4_disp_ht[0];
|
||||
ps_op->u4_buffer_wd[1] = ps_op->u4_buffer_wd[2] = ps_op->u4_buffer_wd[0];
|
||||
ps_op->u4_buffer_ht[1] = ps_op->u4_buffer_ht[2] = ps_op->u4_buffer_ht[0];
|
||||
ps_op->u4_x_offset[1] = ps_op->u4_x_offset[2] = ps_op->u4_x_offset[0];
|
||||
ps_op->u4_y_offset[1] = ps_op->u4_y_offset[2] = ps_op->u4_y_offset[0];
|
||||
}
|
||||
else if(ps_codec->e_chroma_fmt == IV_GRAY)
|
||||
{
|
||||
ps_op->u4_disp_wd[1] = ps_op->u4_disp_wd[2] = 0;
|
||||
ps_op->u4_disp_ht[1] = ps_op->u4_disp_ht[2] = 0;
|
||||
ps_op->u4_buffer_wd[1] = ps_op->u4_buffer_wd[2] = 0;
|
||||
ps_op->u4_buffer_ht[1] = ps_op->u4_buffer_ht[2] = 0;
|
||||
ps_op->u4_x_offset[1] = ps_op->u4_x_offset[2] = 0;
|
||||
ps_op->u4_y_offset[1] = ps_op->u4_y_offset[2] = 0;
|
||||
}
|
||||
|
||||
return IV_SUCCESS;
|
||||
|
||||
|
|
@ -3321,6 +3485,7 @@ WORD32 ihevcd_get_vui_params(iv_obj_t *ps_codec_obj,
|
|||
return IV_SUCCESS;
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
/**
|
||||
*******************************************************************************
|
||||
*
|
||||
|
|
@ -3396,6 +3561,7 @@ WORD32 ihevcd_get_sei_mastering_params(iv_obj_t *ps_codec_obj,
|
|||
|
||||
return IV_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
*******************************************************************************
|
||||
|
|
@ -3504,11 +3670,7 @@ WORD32 ihevcd_set_num_cores(iv_obj_t *ps_codec_obj,
|
|||
ps_ip = (ihevcd_cxa_ctl_set_num_cores_ip_t *)pv_api_ip;
|
||||
ps_op = (ihevcd_cxa_ctl_set_num_cores_op_t *)pv_api_op;
|
||||
|
||||
#ifdef MULTICORE
|
||||
ps_codec->i4_num_cores = ps_ip->u4_num_cores;
|
||||
#else
|
||||
ps_codec->i4_num_cores = 1;
|
||||
#endif
|
||||
ps_op->u4_error_code = 0;
|
||||
return IV_SUCCESS;
|
||||
}
|
||||
|
|
@ -3634,8 +3796,17 @@ WORD32 ihevcd_ctl(iv_obj_t *ps_codec_obj, void *pv_api_ip, void *pv_api_op)
|
|||
(void *)pv_api_op);
|
||||
break;
|
||||
case IHEVCD_CXA_CMD_CTL_GET_SEI_MASTERING_PARAMS:
|
||||
#ifndef DISABLE_SEI
|
||||
ret = ihevcd_get_sei_mastering_params(ps_codec_obj, (void *)pv_api_ip,
|
||||
(void *)pv_api_op);
|
||||
#else
|
||||
{
|
||||
ihevcd_cxa_ctl_get_sei_mastering_params_op_t *ps_op =
|
||||
(ihevcd_cxa_ctl_get_sei_mastering_params_op_t *)pv_api_op;
|
||||
ps_op->u4_error_code = IHEVCD_SEI_MASTERING_PARAMS_NOT_FOUND;
|
||||
return IV_FAIL;
|
||||
}
|
||||
#endif
|
||||
break;
|
||||
case IHEVCD_CXA_CMD_CTL_SET_PROCESSOR:
|
||||
ret = ihevcd_set_processor(ps_codec_obj, (void *)pv_api_ip,
|
||||
|
|
|
|||
|
|
@ -133,7 +133,12 @@ IHEVCD_ERROR_T ihevcd_cabac_init(cab_ctxt_t *ps_cabac,
|
|||
bitstrm_t *ps_bitstrm,
|
||||
WORD32 qp,
|
||||
WORD32 cabac_init_idc,
|
||||
const UWORD8 *pu1_init_ctxt)
|
||||
const UWORD8 *pu1_init_ctxt
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
,
|
||||
const WORD32 *pi4_rice_stat_coeff
|
||||
#endif
|
||||
)
|
||||
{
|
||||
/* Sanity checks */
|
||||
ASSERT(ps_cabac != NULL);
|
||||
|
|
@ -162,6 +167,16 @@ IHEVCD_ERROR_T ihevcd_cabac_init(cab_ctxt_t *ps_cabac,
|
|||
memcpy(ps_cabac->au1_ctxt_models,
|
||||
pu1_init_ctxt,
|
||||
IHEVC_CAB_CTXT_END);
|
||||
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
/* golomb rice statistics */
|
||||
if(pi4_rice_stat_coeff)
|
||||
{
|
||||
memcpy(ps_cabac->ai4_rice_stat_coeff, pi4_rice_stat_coeff,
|
||||
sizeof(ps_cabac->ai4_rice_stat_coeff));
|
||||
}
|
||||
#endif
|
||||
|
||||
DEBUG_RANGE_OFST("init", ps_cabac->u4_range, ps_cabac->u4_ofst);
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -214,6 +214,10 @@ IHEVCD_ERROR_T ihevcd_cabac_init
|
|||
WORD32 slice_qp,
|
||||
WORD32 cabac_init_idc,
|
||||
const UWORD8 *pu1_init_ctxt
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
,
|
||||
const WORD32 *pi4_rice_stat_coeff
|
||||
#endif
|
||||
);
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -38,7 +38,7 @@
|
|||
#include "ihevcd_common_tables.h"
|
||||
#include "ihevc_defs.h"
|
||||
|
||||
const WORD16 gai2_ihevcd_chroma_qp[] =
|
||||
const WORD16 gai2_ihevcd_chroma_qp_420[] =
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
|
||||
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 29,
|
||||
30, 31, 32, 33, 33, 34, 34, 35, 35, 36, 36, 37, 37, 38,
|
||||
|
|
@ -47,3 +47,12 @@ const WORD16 gai2_ihevcd_chroma_qp[] =
|
|||
const UWORD8 gau1_intra_pred_chroma_modes[] =
|
||||
{ INTRA_PLANAR, INTRA_ANGULAR(26), INTRA_ANGULAR(10), INTRA_DC };
|
||||
|
||||
const UWORD8 gau1_intra_pred_chroma_modes_422[] =
|
||||
{ 0, 1, 2, 2, 2, 2, 3, 5, 7, 8, 10, 12, 13, 15, 17, 18, 19, 20,
|
||||
21, 22, 23, 23, 24, 24, 25, 25, 26, 27, 27, 28, 28, 29, 29, 30, 31};
|
||||
|
||||
const WORD16 gai2_ihevcd_chroma_qp_clip[] =
|
||||
{ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16,
|
||||
17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30,
|
||||
31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44,
|
||||
45, 46, 47, 48, 49, 50, 51, 51, 51, 51, 51, 51, 51 };
|
||||
|
|
|
|||
|
|
@ -34,9 +34,12 @@
|
|||
#ifndef _IHEVCD_COMMON_TABLES_H_
|
||||
#define _IHEVCD_COMMON_TABLES_H_
|
||||
|
||||
extern const WORD16 gai2_ihevcd_chroma_qp[];
|
||||
extern const WORD16 gai2_ihevcd_chroma_qp_420[];
|
||||
|
||||
extern const UWORD8 gau1_intra_pred_chroma_modes[];
|
||||
|
||||
extern const UWORD8 gau1_intra_pred_chroma_modes_422[];
|
||||
|
||||
extern const WORD16 gai2_ihevcd_chroma_qp_clip[];
|
||||
|
||||
#endif /*_IHEVCD_COMMON_TABLES_H_*/
|
||||
|
|
|
|||
|
|
@ -71,8 +71,8 @@ IV_API_CALL_STATUS_T ihevcd_cxa_api_function(iv_obj_t *ps_handle,
|
|||
/*****************************************************************************/
|
||||
/* Enums */
|
||||
/*****************************************************************************/
|
||||
/* Codec Error codes for HEVC Decoder */
|
||||
|
||||
/* Codec Error codes for HEVC Decoder */
|
||||
|
||||
typedef enum {
|
||||
/**
|
||||
|
|
@ -176,6 +176,31 @@ typedef struct {
|
|||
* enable_frm_info
|
||||
*/
|
||||
UWORD32 u4_enable_frame_info;
|
||||
|
||||
/**
|
||||
* enable_threads
|
||||
*/
|
||||
UWORD32 u4_keep_threads_active;
|
||||
|
||||
/**
|
||||
* Bitmask specifying the set of supported YUV output formats.
|
||||
*
|
||||
* Use a bitwise OR to enable multiple formats.
|
||||
* The bit positions are defined by the CHROMA_FMT_IDC_* constants.
|
||||
*
|
||||
* Bit positions and corresponding values:
|
||||
* (1 << CHROMA_FMT_IDC_MONOCHROME): 1 (YUV 4:0:0)
|
||||
* (1 << CHROMA_FMT_IDC_YUV420): 2 (YUV 4:2:0)
|
||||
* (1 << CHROMA_FMT_IDC_YUV422): 4 (YUV 4:2:2)
|
||||
* (1 << CHROMA_FMT_IDC_YUV444): 8 (YUV 4:4:4)
|
||||
* (1 << CHROMA_FMT_IDC_YUV444_PLANES): 16 (YUV 4:4:4)
|
||||
*
|
||||
* Example (Enable 4:0:0 and 4:2:0):
|
||||
* (1 << CHROMA_FMT_IDC_MONOCHROME) | (1 << CHROMA_FMT_IDC_YUV420)
|
||||
*
|
||||
* NOTE: If this field is set to 0, YUV 4:2:0 will be enabled by default.
|
||||
*/
|
||||
UWORD32 u4_enable_yuv_formats;
|
||||
}ihevcd_cxa_create_ip_t;
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -496,7 +496,7 @@ void ihevcd_deblk_ctb(deblk_ctxt_t *ps_deblk,
|
|||
|
||||
/* Chroma Veritcal Edge */
|
||||
|
||||
if(0 == i4_is_last_ctb_x)
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc && 0 == i4_is_last_ctb_x)
|
||||
{
|
||||
|
||||
/* Top CTB's slice header */
|
||||
|
|
@ -643,7 +643,7 @@ void ihevcd_deblk_ctb(deblk_ctxt_t *ps_deblk,
|
|||
|
||||
/* Chroma Horizontal Edge */
|
||||
|
||||
if(0 == i4_is_last_ctb_y)
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc && 0 == i4_is_last_ctb_y)
|
||||
{
|
||||
|
||||
/* Left CTB's slice header */
|
||||
|
|
|
|||
|
|
@ -253,6 +253,7 @@ static void ihevcd_fill_outargs(codec_t *ps_codec,
|
|||
if(ps_codec->ps_disp_buf)
|
||||
{
|
||||
pic_buf_t *ps_disp_buf = ps_codec->ps_disp_buf;
|
||||
#ifndef DISABLE_SEI
|
||||
sei_params_t *ps_sei = &ps_disp_buf->s_sei_params;
|
||||
|
||||
if(ps_sei->i1_sei_parameters_present_flag &&
|
||||
|
|
@ -277,6 +278,7 @@ static void ihevcd_fill_outargs(codec_t *ps_codec,
|
|||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
ps_dec_op->i4_display_index = ps_disp_buf->i4_abs_poc;
|
||||
ps_dec_op->u4_output_present = 1;
|
||||
ps_dec_op->u4_ts = ps_disp_buf->u4_ts;
|
||||
|
|
@ -354,6 +356,39 @@ static void ihevcd_fill_outargs(codec_t *ps_codec,
|
|||
ps_dec_op->s_disp_frm_buf.u4_v_ht =
|
||||
ps_dec_op->s_disp_frm_buf.u4_y_ht / 2;
|
||||
}
|
||||
else if(IV_YUV_444P == ps_codec->e_chroma_fmt)
|
||||
{
|
||||
ps_dec_op->s_disp_frm_buf.u4_u_strd = ps_dec_op->s_disp_frm_buf.u4_y_strd;
|
||||
ps_dec_op->s_disp_frm_buf.u4_v_strd = ps_dec_op->s_disp_frm_buf.u4_y_strd;
|
||||
ps_dec_op->s_disp_frm_buf.u4_u_wd = ps_dec_op->s_disp_frm_buf.u4_y_wd;
|
||||
ps_dec_op->s_disp_frm_buf.u4_v_wd = ps_dec_op->s_disp_frm_buf.u4_y_wd;
|
||||
ps_dec_op->s_disp_frm_buf.u4_u_ht = ps_dec_op->s_disp_frm_buf.u4_y_ht;
|
||||
ps_dec_op->s_disp_frm_buf.u4_v_ht = ps_dec_op->s_disp_frm_buf.u4_y_ht;
|
||||
}
|
||||
else if(IV_GRAY == ps_codec->e_chroma_fmt)
|
||||
{
|
||||
ps_dec_op->s_disp_frm_buf.u4_u_strd = 0;
|
||||
ps_dec_op->s_disp_frm_buf.u4_v_strd = 0;
|
||||
ps_dec_op->s_disp_frm_buf.u4_u_wd = 0;
|
||||
ps_dec_op->s_disp_frm_buf.u4_v_wd = 0;
|
||||
ps_dec_op->s_disp_frm_buf.u4_u_ht = 0;
|
||||
ps_dec_op->s_disp_frm_buf.u4_v_ht = 0;
|
||||
}
|
||||
else if(IV_YUV_422P == ps_codec->e_chroma_fmt)
|
||||
{
|
||||
ps_dec_op->s_disp_frm_buf.u4_u_strd =
|
||||
ps_dec_op->s_disp_frm_buf.u4_y_strd / 2;
|
||||
ps_dec_op->s_disp_frm_buf.u4_v_strd =
|
||||
ps_dec_op->s_disp_frm_buf.u4_y_strd / 2;
|
||||
ps_dec_op->s_disp_frm_buf.u4_u_wd =
|
||||
ps_dec_op->s_disp_frm_buf.u4_y_wd / 2;
|
||||
ps_dec_op->s_disp_frm_buf.u4_v_wd =
|
||||
ps_dec_op->s_disp_frm_buf.u4_y_wd / 2;
|
||||
ps_dec_op->s_disp_frm_buf.u4_u_ht =
|
||||
ps_dec_op->s_disp_frm_buf.u4_y_ht;
|
||||
ps_dec_op->s_disp_frm_buf.u4_v_ht =
|
||||
ps_dec_op->s_disp_frm_buf.u4_y_ht;
|
||||
}
|
||||
|
||||
}
|
||||
else if(ps_codec->i4_flush_mode)
|
||||
|
|
@ -983,22 +1018,25 @@ WORD32 ihevcd_decode(iv_obj_t *ps_codec_obj, void *pv_api_ip, void *pv_api_op)
|
|||
{
|
||||
if(ps_codec->ai4_process_thread_created[i])
|
||||
{
|
||||
#ifdef KEEP_THREADS_ACTIVE
|
||||
ret = ithread_mutex_lock(ps_codec->apv_proc_done_mutex[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
|
||||
while(!ps_codec->ai4_process_done[i])
|
||||
if(ps_codec->i4_threads_active)
|
||||
{
|
||||
ithread_cond_wait(ps_codec->apv_proc_done_condition[i],
|
||||
ps_codec->apv_proc_done_mutex[i]);
|
||||
ret = ithread_mutex_lock(ps_codec->apv_proc_done_mutex[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
|
||||
while(!ps_codec->ai4_process_done[i])
|
||||
{
|
||||
ithread_cond_wait(ps_codec->apv_proc_done_condition[i],
|
||||
ps_codec->apv_proc_done_mutex[i]);
|
||||
}
|
||||
ps_codec->ai4_process_done[i] = 0;
|
||||
ret = ithread_mutex_unlock(ps_codec->apv_proc_done_mutex[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
}
|
||||
else
|
||||
{
|
||||
ithread_join(ps_codec->apv_process_thread_handle[i], NULL);
|
||||
ps_codec->ai4_process_thread_created[i] = 0;
|
||||
}
|
||||
ps_codec->ai4_process_done[i] = 0;
|
||||
ret = ithread_mutex_unlock(ps_codec->apv_proc_done_mutex[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
#else
|
||||
ithread_join(ps_codec->apv_process_thread_handle[i], NULL);
|
||||
ps_codec->ai4_process_thread_created[i] = 0;
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -196,7 +196,7 @@
|
|||
m_scaling_mat_size = 6 * TRANS_SIZE_4 * TRANS_SIZE_4; \
|
||||
m_scaling_mat_size += 6 * TRANS_SIZE_8 * TRANS_SIZE_8; \
|
||||
m_scaling_mat_size += 6 * TRANS_SIZE_16 * TRANS_SIZE_16; \
|
||||
m_scaling_mat_size += 2 * TRANS_SIZE_32 * TRANS_SIZE_32; \
|
||||
m_scaling_mat_size += 6 * TRANS_SIZE_32 * TRANS_SIZE_32; \
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -450,10 +450,10 @@ enum
|
|||
*/
|
||||
#define MIN_IN_BUFS 1
|
||||
#define MIN_OUT_BUFS_420 3
|
||||
#define MIN_OUT_BUFS_422ILE 1
|
||||
#define MIN_OUT_BUFS_RGB565 1
|
||||
#define MIN_OUT_BUFS_RGBA8888 1
|
||||
#define MIN_OUT_BUFS_422 3
|
||||
#define MIN_OUT_BUFS_444 3
|
||||
#define MIN_OUT_BUFS_420SP 2
|
||||
#define MIN_OUT_BUFS_GRAY 1
|
||||
|
||||
/**
|
||||
****************************************************************************
|
||||
|
|
|
|||
|
|
@ -128,5 +128,10 @@ typedef enum
|
|||
*/
|
||||
IHEVCD_SEI_MASTERING_PARAMS_NOT_FOUND,
|
||||
|
||||
/**
|
||||
* Feature not supported
|
||||
*/
|
||||
IHEVCD_UNSUPPORTED_TOOL_SET,
|
||||
|
||||
}IHEVCD_ERROR_T;
|
||||
#endif /* _IHEVCD_ERROR_H_ */
|
||||
|
|
|
|||
|
|
@ -67,270 +67,6 @@
|
|||
|
||||
/* SIMD variants of format conversion modules do not support width less than 32 */
|
||||
#define MIN_FMT_CONV_SIMD_WIDTH 32
|
||||
/**
|
||||
*******************************************************************************
|
||||
*
|
||||
* @brief Function used from copying a 420SP buffer
|
||||
*
|
||||
* @par Description
|
||||
* Function used from copying a 420SP buffer
|
||||
*
|
||||
* @param[in] pu1_y_src
|
||||
* Input Y pointer
|
||||
*
|
||||
* @param[in] pu1_uv_src
|
||||
* Input UV pointer (UV is interleaved either in UV or VU format)
|
||||
*
|
||||
* @param[in] pu1_y_dst
|
||||
* Output Y pointer
|
||||
*
|
||||
* @param[in] pu1_uv_dst
|
||||
* Output UV pointer (UV is interleaved in the same format as that of input)
|
||||
*
|
||||
* @param[in] wd
|
||||
* Width
|
||||
*
|
||||
* @param[in] ht
|
||||
* Height
|
||||
*
|
||||
* @param[in] src_y_strd
|
||||
* Input Y Stride
|
||||
*
|
||||
* @param[in] src_uv_strd
|
||||
* Input UV stride
|
||||
*
|
||||
* @param[in] dst_y_strd
|
||||
* Output Y stride
|
||||
*
|
||||
* @param[in] dst_uv_strd
|
||||
* Output UV stride
|
||||
*
|
||||
* @returns None
|
||||
*
|
||||
* @remarks In case there is a need to perform partial frame copy then
|
||||
* by passion appropriate source and destination pointers and appropriate
|
||||
* values for wd and ht it can be done
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
void ihevcd_fmt_conv_420sp_to_rgb565(UWORD8 *pu1_y_src,
|
||||
UWORD8 *pu1_uv_src,
|
||||
UWORD16 *pu2_rgb_dst,
|
||||
WORD32 wd,
|
||||
WORD32 ht,
|
||||
WORD32 src_y_strd,
|
||||
WORD32 src_uv_strd,
|
||||
WORD32 dst_strd,
|
||||
WORD32 is_u_first)
|
||||
{
|
||||
|
||||
|
||||
WORD16 i2_r, i2_g, i2_b;
|
||||
UWORD32 u4_r, u4_g, u4_b;
|
||||
WORD16 i2_i, i2_j;
|
||||
UWORD8 *pu1_y_src_nxt;
|
||||
UWORD16 *pu2_rgb_dst_NextRow;
|
||||
|
||||
UWORD8 *pu1_u_src, *pu1_v_src;
|
||||
|
||||
if(is_u_first)
|
||||
{
|
||||
pu1_u_src = (UWORD8 *)pu1_uv_src;
|
||||
pu1_v_src = (UWORD8 *)pu1_uv_src + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
pu1_u_src = (UWORD8 *)pu1_uv_src + 1;
|
||||
pu1_v_src = (UWORD8 *)pu1_uv_src;
|
||||
}
|
||||
|
||||
pu1_y_src_nxt = pu1_y_src + src_y_strd;
|
||||
pu2_rgb_dst_NextRow = pu2_rgb_dst + dst_strd;
|
||||
|
||||
for(i2_i = 0; i2_i < (ht >> 1); i2_i++)
|
||||
{
|
||||
for(i2_j = (wd >> 1); i2_j > 0; i2_j--)
|
||||
{
|
||||
i2_b = ((*pu1_u_src - 128) * COEFF4 >> 13);
|
||||
i2_g = ((*pu1_u_src - 128) * COEFF2 + (*pu1_v_src - 128) * COEFF3) >> 13;
|
||||
i2_r = ((*pu1_v_src - 128) * COEFF1) >> 13;
|
||||
|
||||
pu1_u_src += 2;
|
||||
pu1_v_src += 2;
|
||||
/* pixel 0 */
|
||||
/* B */
|
||||
u4_b = CLIP_U8(*pu1_y_src + i2_b);
|
||||
u4_b >>= 3;
|
||||
/* G */
|
||||
u4_g = CLIP_U8(*pu1_y_src + i2_g);
|
||||
u4_g >>= 2;
|
||||
/* R */
|
||||
u4_r = CLIP_U8(*pu1_y_src + i2_r);
|
||||
u4_r >>= 3;
|
||||
|
||||
pu1_y_src++;
|
||||
*pu2_rgb_dst++ = ((u4_r << 11) | (u4_g << 5) | u4_b);
|
||||
|
||||
/* pixel 1 */
|
||||
/* B */
|
||||
u4_b = CLIP_U8(*pu1_y_src + i2_b);
|
||||
u4_b >>= 3;
|
||||
/* G */
|
||||
u4_g = CLIP_U8(*pu1_y_src + i2_g);
|
||||
u4_g >>= 2;
|
||||
/* R */
|
||||
u4_r = CLIP_U8(*pu1_y_src + i2_r);
|
||||
u4_r >>= 3;
|
||||
|
||||
pu1_y_src++;
|
||||
*pu2_rgb_dst++ = ((u4_r << 11) | (u4_g << 5) | u4_b);
|
||||
|
||||
/* pixel 2 */
|
||||
/* B */
|
||||
u4_b = CLIP_U8(*pu1_y_src_nxt + i2_b);
|
||||
u4_b >>= 3;
|
||||
/* G */
|
||||
u4_g = CLIP_U8(*pu1_y_src_nxt + i2_g);
|
||||
u4_g >>= 2;
|
||||
/* R */
|
||||
u4_r = CLIP_U8(*pu1_y_src_nxt + i2_r);
|
||||
u4_r >>= 3;
|
||||
|
||||
pu1_y_src_nxt++;
|
||||
*pu2_rgb_dst_NextRow++ = ((u4_r << 11) | (u4_g << 5) | u4_b);
|
||||
|
||||
/* pixel 3 */
|
||||
/* B */
|
||||
u4_b = CLIP_U8(*pu1_y_src_nxt + i2_b);
|
||||
u4_b >>= 3;
|
||||
/* G */
|
||||
u4_g = CLIP_U8(*pu1_y_src_nxt + i2_g);
|
||||
u4_g >>= 2;
|
||||
/* R */
|
||||
u4_r = CLIP_U8(*pu1_y_src_nxt + i2_r);
|
||||
u4_r >>= 3;
|
||||
|
||||
pu1_y_src_nxt++;
|
||||
*pu2_rgb_dst_NextRow++ = ((u4_r << 11) | (u4_g << 5) | u4_b);
|
||||
|
||||
}
|
||||
|
||||
pu1_u_src = pu1_u_src + src_uv_strd - wd;
|
||||
pu1_v_src = pu1_v_src + src_uv_strd - wd;
|
||||
|
||||
pu1_y_src = pu1_y_src + (src_y_strd << 1) - wd;
|
||||
pu1_y_src_nxt = pu1_y_src_nxt + (src_y_strd << 1) - wd;
|
||||
|
||||
pu2_rgb_dst = pu2_rgb_dst_NextRow - wd + dst_strd;
|
||||
pu2_rgb_dst_NextRow = pu2_rgb_dst_NextRow + (dst_strd << 1) - wd;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
void ihevcd_fmt_conv_420sp_to_rgba8888(UWORD8 *pu1_y_src,
|
||||
UWORD8 *pu1_uv_src,
|
||||
UWORD32 *pu4_rgba_dst,
|
||||
WORD32 wd,
|
||||
WORD32 ht,
|
||||
WORD32 src_y_strd,
|
||||
WORD32 src_uv_strd,
|
||||
WORD32 dst_strd,
|
||||
WORD32 is_u_first)
|
||||
{
|
||||
|
||||
|
||||
WORD16 i2_r, i2_g, i2_b;
|
||||
UWORD32 u4_r, u4_g, u4_b;
|
||||
WORD16 i2_i, i2_j;
|
||||
UWORD8 *pu1_y_src_nxt;
|
||||
UWORD32 *pu4_rgba_dst_NextRow;
|
||||
|
||||
UWORD8 *pu1_u_src, *pu1_v_src;
|
||||
|
||||
if(is_u_first)
|
||||
{
|
||||
pu1_u_src = (UWORD8 *)pu1_uv_src;
|
||||
pu1_v_src = (UWORD8 *)pu1_uv_src + 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
pu1_u_src = (UWORD8 *)pu1_uv_src + 1;
|
||||
pu1_v_src = (UWORD8 *)pu1_uv_src;
|
||||
}
|
||||
|
||||
pu1_y_src_nxt = pu1_y_src + src_y_strd;
|
||||
pu4_rgba_dst_NextRow = pu4_rgba_dst + dst_strd;
|
||||
|
||||
for(i2_i = 0; i2_i < (ht >> 1); i2_i++)
|
||||
{
|
||||
for(i2_j = (wd >> 1); i2_j > 0; i2_j--)
|
||||
{
|
||||
i2_b = ((*pu1_u_src - 128) * COEFF4 >> 13);
|
||||
i2_g = ((*pu1_u_src - 128) * COEFF2 + (*pu1_v_src - 128) * COEFF3) >> 13;
|
||||
i2_r = ((*pu1_v_src - 128) * COEFF1) >> 13;
|
||||
|
||||
pu1_u_src += 2;
|
||||
pu1_v_src += 2;
|
||||
/* pixel 0 */
|
||||
/* B */
|
||||
u4_b = CLIP_U8(*pu1_y_src + i2_b);
|
||||
/* G */
|
||||
u4_g = CLIP_U8(*pu1_y_src + i2_g);
|
||||
/* R */
|
||||
u4_r = CLIP_U8(*pu1_y_src + i2_r);
|
||||
|
||||
pu1_y_src++;
|
||||
*pu4_rgba_dst++ = ((u4_r << 16) | (u4_g << 8) | (u4_b << 0));
|
||||
|
||||
/* pixel 1 */
|
||||
/* B */
|
||||
u4_b = CLIP_U8(*pu1_y_src + i2_b);
|
||||
/* G */
|
||||
u4_g = CLIP_U8(*pu1_y_src + i2_g);
|
||||
/* R */
|
||||
u4_r = CLIP_U8(*pu1_y_src + i2_r);
|
||||
|
||||
pu1_y_src++;
|
||||
*pu4_rgba_dst++ = ((u4_r << 16) | (u4_g << 8) | (u4_b << 0));
|
||||
|
||||
/* pixel 2 */
|
||||
/* B */
|
||||
u4_b = CLIP_U8(*pu1_y_src_nxt + i2_b);
|
||||
/* G */
|
||||
u4_g = CLIP_U8(*pu1_y_src_nxt + i2_g);
|
||||
/* R */
|
||||
u4_r = CLIP_U8(*pu1_y_src_nxt + i2_r);
|
||||
|
||||
pu1_y_src_nxt++;
|
||||
*pu4_rgba_dst_NextRow++ = ((u4_r << 16) | (u4_g << 8) | (u4_b << 0));
|
||||
|
||||
/* pixel 3 */
|
||||
/* B */
|
||||
u4_b = CLIP_U8(*pu1_y_src_nxt + i2_b);
|
||||
/* G */
|
||||
u4_g = CLIP_U8(*pu1_y_src_nxt + i2_g);
|
||||
/* R */
|
||||
u4_r = CLIP_U8(*pu1_y_src_nxt + i2_r);
|
||||
|
||||
pu1_y_src_nxt++;
|
||||
*pu4_rgba_dst_NextRow++ = ((u4_r << 16) | (u4_g << 8) | (u4_b << 0));
|
||||
|
||||
}
|
||||
|
||||
pu1_u_src = pu1_u_src + src_uv_strd - wd;
|
||||
pu1_v_src = pu1_v_src + src_uv_strd - wd;
|
||||
|
||||
pu1_y_src = pu1_y_src + (src_y_strd << 1) - wd;
|
||||
pu1_y_src_nxt = pu1_y_src_nxt + (src_y_strd << 1) - wd;
|
||||
|
||||
pu4_rgba_dst = pu4_rgba_dst_NextRow - wd + dst_strd;
|
||||
pu4_rgba_dst_NextRow = pu4_rgba_dst_NextRow + (dst_strd << 1) - wd;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
*******************************************************************************
|
||||
*
|
||||
|
|
@ -430,6 +166,128 @@ void ihevcd_fmt_conv_420sp_to_420sp(UWORD8 *pu1_y_src,
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
*******************************************************************************
|
||||
*
|
||||
* @brief Function used from copying a 400 buffer
|
||||
*
|
||||
* @par Description
|
||||
* Function used from copying a 400 buffer
|
||||
*
|
||||
* @param[in] pu1_y_src
|
||||
* Input Y pointer
|
||||
*
|
||||
* @param[in] pu1_y_dst
|
||||
* Output Y pointer
|
||||
*
|
||||
* @param[in] wd
|
||||
* Width
|
||||
*
|
||||
* @param[in] ht
|
||||
* Height
|
||||
*
|
||||
* @param[in] src_y_strd
|
||||
* Input Y Stride
|
||||
*
|
||||
* @param[in] dst_y_strd
|
||||
* Output Y stride
|
||||
*
|
||||
* @returns None
|
||||
*
|
||||
* @remarks In case there is a need to perform partial frame copy then
|
||||
* by passion appropriate source and destination pointers and appropriate
|
||||
* values for wd and ht it can be done
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
|
||||
void ihevcd_fmt_conv_luma_copy(UWORD8 *pu1_y_src,
|
||||
UWORD8 *pu1_y_dst,
|
||||
WORD32 wd,
|
||||
WORD32 ht,
|
||||
WORD32 src_y_strd,
|
||||
WORD32 dst_y_strd)
|
||||
{
|
||||
UWORD8 *pu1_src, *pu1_dst;
|
||||
WORD32 num_rows, num_cols, src_strd, dst_strd;
|
||||
WORD32 i;
|
||||
|
||||
/* copy luma */
|
||||
pu1_src = (UWORD8 *)pu1_y_src;
|
||||
pu1_dst = (UWORD8 *)pu1_y_dst;
|
||||
|
||||
num_rows = ht;
|
||||
num_cols = wd;
|
||||
|
||||
src_strd = src_y_strd;
|
||||
dst_strd = dst_y_strd;
|
||||
|
||||
for(i = 0; i < num_rows; i++)
|
||||
{
|
||||
memcpy(pu1_dst, pu1_src, num_cols);
|
||||
pu1_dst += dst_strd;
|
||||
pu1_src += src_strd;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*******************************************************************************
|
||||
*
|
||||
* @brief Function to convert a YUV 4:0:0 buffer to YUV 4:2:0 buffer
|
||||
*
|
||||
* @par Description
|
||||
* This function handles the format conversion from a 4:0:0 input buffer to a
|
||||
* 4:2:0 output buffer. It copies the Luma (Y) plane directly and synthesizes
|
||||
* the Chroma (U and V) planes by initializing them to a neutral gray value (128).
|
||||
*
|
||||
* @param[in] pu1_y_src
|
||||
* Input Y pointer
|
||||
*
|
||||
* @param[out] pu1_y_dst_tmp
|
||||
* Output Y pointer
|
||||
*
|
||||
* @param[out] pu1_u_dst_tmp
|
||||
* Output Chroma U pointer
|
||||
*
|
||||
* @param[out] pu1_v_dst_tmp
|
||||
* Output Chroma V pointer
|
||||
*
|
||||
* @param[in] ps_codec
|
||||
* Pointer to the codec structure
|
||||
*
|
||||
* @param[in] num_rows
|
||||
* Number of rows (height) to process.
|
||||
*
|
||||
* @returns None
|
||||
*
|
||||
* @remarks The Chroma (U and V) planes are initialized to 128, which represents
|
||||
* a neutral gray in 8-bit YUV, effectively 'zeroing out' the color information
|
||||
* present in the 4:0:0 (grayscale) source. The Luma plane is copied using
|
||||
* ihevcd_fmt_conv_400_to_400.
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
void ihevcd_fmt_conv_400_to_420p(UWORD8 *pu1_y_src,
|
||||
UWORD8 *pu1_y_dst,
|
||||
UWORD8 *pu1_u_dst,
|
||||
UWORD8 *pu1_v_dst,
|
||||
WORD32 wd,
|
||||
WORD32 ht,
|
||||
WORD32 src_y_strd,
|
||||
WORD32 dst_y_strd,
|
||||
WORD32 dst_uv_strd)
|
||||
{
|
||||
ihevcd_fmt_conv_luma_copy(pu1_y_src, pu1_y_dst, wd, ht, src_y_strd, dst_y_strd);
|
||||
for(int i = 0; i < ht / 2; i++)
|
||||
{
|
||||
memset(pu1_u_dst, 128, wd / 2);
|
||||
memset(pu1_v_dst, 128, wd / 2);
|
||||
pu1_u_dst += dst_uv_strd;
|
||||
pu1_v_dst += dst_uv_strd;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*******************************************************************************
|
||||
|
|
@ -659,6 +517,178 @@ void ihevcd_fmt_conv_420sp_to_420p(UWORD8 *pu1_y_src,
|
|||
return;
|
||||
}
|
||||
|
||||
/**
|
||||
*******************************************************************************
|
||||
*
|
||||
* @brief Function to convert a YUV 4:4:4 sp buffer to YUV 4:4:4 planar buffer
|
||||
*
|
||||
* @par Description
|
||||
* This function handles the format conversion from a 4:4:4 semi planar input buffer
|
||||
* to a 4:4:4 planar output buffer.
|
||||
*
|
||||
* @param[in] pu1_y_src
|
||||
* Input Y pointer
|
||||
*
|
||||
* @param[in] pu1_uv_src
|
||||
* Input UV pointer (UV is interleaved)
|
||||
*
|
||||
* @param[in] pu1_y_dst
|
||||
* Output Y pointer
|
||||
*
|
||||
* @param[in] pu1_u_dst
|
||||
* Output U pointer
|
||||
*
|
||||
* @param[in] pu1_v_dst
|
||||
* Output V pointer
|
||||
*
|
||||
* @param[in] wd
|
||||
* Width
|
||||
*
|
||||
* @param[in] ht
|
||||
* Height
|
||||
*
|
||||
* @param[in] src_y_strd
|
||||
* Input Y Stride
|
||||
*
|
||||
* @param[in] src_uv_strd
|
||||
* Input UV stride
|
||||
*
|
||||
* @param[in] dst_y_strd
|
||||
* Output Y stride
|
||||
*
|
||||
* @param[in] dst_uv_strd
|
||||
* Output U or V stride
|
||||
*
|
||||
* @returns none
|
||||
*
|
||||
* @remarks none
|
||||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
void ihevcd_fmt_conv_444sp_to_444p(UWORD8 *pu1_y_src,
|
||||
UWORD8 *pu1_uv_src,
|
||||
UWORD8 *pu1_y_dst,
|
||||
UWORD8 *pu1_u_dst,
|
||||
UWORD8 *pu1_v_dst,
|
||||
WORD32 wd,
|
||||
WORD32 ht,
|
||||
WORD32 src_y_strd,
|
||||
WORD32 src_uv_strd,
|
||||
WORD32 dst_y_strd,
|
||||
WORD32 dst_uv_strd)
|
||||
{
|
||||
ihevcd_fmt_conv_luma_copy(pu1_y_src, pu1_y_dst, wd, ht, src_y_strd, dst_y_strd);
|
||||
|
||||
/* de-interleave U and V and copy to destination */
|
||||
UWORD8 *pu1_u_src = (UWORD8*)pu1_uv_src;
|
||||
UWORD8 *pu1_v_src = (UWORD8*)pu1_uv_src + 1;
|
||||
|
||||
for(WORD32 i = 0; i < ht; i++)
|
||||
{
|
||||
for(WORD32 j = 0; j < wd; j++)
|
||||
{
|
||||
pu1_u_dst[j] = pu1_u_src[j * 2];
|
||||
pu1_v_dst[j] = pu1_v_src[j * 2];
|
||||
}
|
||||
pu1_u_dst += dst_uv_strd;
|
||||
pu1_v_dst += dst_uv_strd;
|
||||
pu1_u_src += src_uv_strd;
|
||||
pu1_v_src += src_uv_strd;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void ihevcd_fmt_conv_444sp_to_420p(UWORD8 *pu1_y_src,
|
||||
UWORD8 *pu1_uv_src,
|
||||
UWORD8 *pu1_y_dst,
|
||||
UWORD8 *pu1_u_dst,
|
||||
UWORD8 *pu1_v_dst,
|
||||
WORD32 wd,
|
||||
WORD32 ht,
|
||||
WORD32 src_y_strd,
|
||||
WORD32 src_uv_strd,
|
||||
WORD32 dst_y_strd,
|
||||
WORD32 dst_uv_strd)
|
||||
{
|
||||
ihevcd_fmt_conv_luma_copy(pu1_y_src, pu1_y_dst, wd, ht, src_y_strd, dst_y_strd);
|
||||
|
||||
for(WORD32 i = 0; i < ht; i += 2)
|
||||
{
|
||||
for(WORD32 j = 0; j < wd; j += 2)
|
||||
{
|
||||
pu1_u_dst[j / 2] = pu1_uv_src[j * 2];
|
||||
pu1_v_dst[j / 2] = pu1_uv_src[j * 2 + 1];
|
||||
}
|
||||
pu1_u_dst += dst_uv_strd;
|
||||
pu1_v_dst += dst_uv_strd;
|
||||
pu1_uv_src += (src_uv_strd * 2);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void ihevcd_fmt_conv_422sp_to_422p(UWORD8 *pu1_y_src,
|
||||
UWORD8 *pu1_uv_src,
|
||||
UWORD8 *pu1_y_dst,
|
||||
UWORD8 *pu1_u_dst,
|
||||
UWORD8 *pu1_v_dst,
|
||||
WORD32 wd,
|
||||
WORD32 ht,
|
||||
WORD32 src_y_strd,
|
||||
WORD32 src_uv_strd,
|
||||
WORD32 dst_y_strd,
|
||||
WORD32 dst_uv_strd)
|
||||
{
|
||||
UWORD8 *pu1_u_src, *pu1_v_src;
|
||||
WORD32 i, j;
|
||||
|
||||
ihevcd_fmt_conv_luma_copy(pu1_y_src, pu1_y_dst, wd, ht, src_y_strd, dst_y_strd);
|
||||
|
||||
pu1_u_src = (UWORD8 *)pu1_uv_src;
|
||||
pu1_v_src = (UWORD8 *)pu1_uv_src + 1;
|
||||
|
||||
for(i = 0; i < ht; i++)
|
||||
{
|
||||
for(j = 0; j < (wd >> 1); j++)
|
||||
{
|
||||
pu1_u_dst[j] = pu1_u_src[j * 2];
|
||||
pu1_v_dst[j] = pu1_v_src[j * 2];
|
||||
}
|
||||
|
||||
pu1_u_dst += dst_uv_strd;
|
||||
pu1_v_dst += dst_uv_strd;
|
||||
pu1_u_src += src_uv_strd;
|
||||
pu1_v_src += src_uv_strd;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
void ihevcd_fmt_conv_422sp_to_420p(UWORD8 *pu1_y_src,
|
||||
UWORD8 *pu1_uv_src,
|
||||
UWORD8 *pu1_y_dst,
|
||||
UWORD8 *pu1_u_dst,
|
||||
UWORD8 *pu1_v_dst,
|
||||
WORD32 wd,
|
||||
WORD32 ht,
|
||||
WORD32 src_y_strd,
|
||||
WORD32 src_uv_strd,
|
||||
WORD32 dst_y_strd,
|
||||
WORD32 dst_uv_strd)
|
||||
{
|
||||
ihevcd_fmt_conv_luma_copy(pu1_y_src, pu1_y_dst, wd, ht, src_y_strd, dst_y_strd);
|
||||
|
||||
for(WORD32 i = 0; i < ht; i++)
|
||||
{
|
||||
for(WORD32 j = 0; j < wd; j += 2)
|
||||
{
|
||||
pu1_u_dst[j / 2] = pu1_uv_src[j * 2];
|
||||
pu1_v_dst[j / 2] = pu1_uv_src[j * 2 + 1];
|
||||
}
|
||||
pu1_u_dst += dst_uv_strd;
|
||||
pu1_v_dst += dst_uv_strd;
|
||||
pu1_uv_src += src_uv_strd;
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -702,14 +732,15 @@ IHEVCD_ERROR_T ihevcd_fmt_conv(codec_t *ps_codec,
|
|||
UWORD8 *pu1_y_src, *pu1_uv_src;
|
||||
UWORD8 *pu1_y_dst_tmp, *pu1_uv_dst_tmp;
|
||||
UWORD8 *pu1_u_dst_tmp, *pu1_v_dst_tmp;
|
||||
UWORD16 *pu2_rgb_dst_tmp;
|
||||
UWORD32 *pu4_rgb_dst_tmp;
|
||||
WORD32 is_u_first;
|
||||
UWORD8 *pu1_luma;
|
||||
UWORD8 *pu1_chroma;
|
||||
sps_t *ps_sps;
|
||||
WORD32 disable_luma_copy;
|
||||
WORD32 crop_unit_x, crop_unit_y;
|
||||
WORD32 h_samp_factor, v_samp_factor;
|
||||
WORD32 src_chroma_pixel_strd = 2;
|
||||
WORD32 src_chroma_row_stride;
|
||||
|
||||
if(0 == num_rows)
|
||||
return ret;
|
||||
|
|
@ -718,6 +749,9 @@ IHEVCD_ERROR_T ihevcd_fmt_conv(codec_t *ps_codec,
|
|||
PROFILE_DISABLE_FMT_CONV();
|
||||
ps_sps = ps_proc->ps_sps;
|
||||
|
||||
h_samp_factor = (CHROMA_FMT_IDC_YUV444 == ps_sps->i1_chroma_format_idc) ? 1 : 2;
|
||||
v_samp_factor = (CHROMA_FMT_IDC_YUV420 == ps_sps->i1_chroma_format_idc) ? 2 : 1;
|
||||
|
||||
crop_unit_x = 1;
|
||||
crop_unit_y = 1;
|
||||
|
||||
|
|
@ -726,19 +760,29 @@ IHEVCD_ERROR_T ihevcd_fmt_conv(codec_t *ps_codec,
|
|||
crop_unit_x = 2;
|
||||
crop_unit_y = 2;
|
||||
}
|
||||
else if(CHROMA_FMT_IDC_YUV422 == ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
crop_unit_x = 2;
|
||||
crop_unit_y = 1;
|
||||
}
|
||||
|
||||
ps_disp_pic = ps_codec->ps_disp_buf;
|
||||
pu1_luma = ps_disp_pic->pu1_luma;
|
||||
pu1_chroma = ps_disp_pic->pu1_chroma;
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
pu1_chroma = ps_disp_pic->pu1_chroma;
|
||||
}
|
||||
|
||||
|
||||
/* Take care of cropping */
|
||||
pu1_luma += ps_codec->i4_strd * ps_sps->i2_pic_crop_top_offset * crop_unit_y + ps_sps->i2_pic_crop_left_offset * crop_unit_x;
|
||||
|
||||
/* Left offset is multiplied by 2 because buffer is UV interleaved */
|
||||
pu1_chroma += ps_codec->i4_strd * ps_sps->i2_pic_crop_top_offset + ps_sps->i2_pic_crop_left_offset * 2;
|
||||
|
||||
|
||||
src_chroma_row_stride = (ps_codec->i4_strd * src_chroma_pixel_strd / h_samp_factor);
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
pu1_chroma += (ps_sps->i2_pic_crop_top_offset * src_chroma_row_stride)
|
||||
+ ps_sps->i2_pic_crop_left_offset * src_chroma_pixel_strd;
|
||||
}
|
||||
is_u_first = (IV_YUV_420SP_UV == ps_codec->e_ref_chroma_fmt) ? 1 : 0;
|
||||
|
||||
/* In case of 420P output luma copy is disabled for shared mode */
|
||||
|
|
@ -752,7 +796,10 @@ IHEVCD_ERROR_T ihevcd_fmt_conv(codec_t *ps_codec,
|
|||
|
||||
{
|
||||
pu1_y_src = pu1_luma + cur_row * ps_codec->i4_strd;
|
||||
pu1_uv_src = pu1_chroma + (cur_row / 2) * ps_codec->i4_strd;
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
pu1_uv_src = pu1_chroma + ((cur_row / v_samp_factor) * src_chroma_row_stride);
|
||||
}
|
||||
|
||||
/* In case of shared mode, with 420P output, get chroma destination */
|
||||
if((1 == ps_codec->i4_share_disp_buf) && (IV_YUV_420P == ps_codec->e_chroma_fmt))
|
||||
|
|
@ -772,14 +819,27 @@ IHEVCD_ERROR_T ihevcd_fmt_conv(codec_t *ps_codec,
|
|||
}
|
||||
}
|
||||
}
|
||||
pu2_rgb_dst_tmp = (UWORD16 *)pu1_y_dst;
|
||||
pu2_rgb_dst_tmp += cur_row * ps_codec->i4_disp_strd;
|
||||
pu4_rgb_dst_tmp = (UWORD32 *)pu1_y_dst;
|
||||
pu4_rgb_dst_tmp += cur_row * ps_codec->i4_disp_strd;
|
||||
pu1_y_dst_tmp = pu1_y_dst + cur_row * ps_codec->i4_disp_strd;
|
||||
pu1_uv_dst_tmp = pu1_u_dst + (cur_row / 2) * ps_codec->i4_disp_strd;
|
||||
pu1_u_dst_tmp = pu1_u_dst + (cur_row / 2) * ps_codec->i4_disp_strd / 2;
|
||||
pu1_v_dst_tmp = pu1_v_dst + (cur_row / 2) * ps_codec->i4_disp_strd / 2;
|
||||
if(IV_YUV_444P == ps_codec->e_chroma_fmt)
|
||||
{
|
||||
pu1_u_dst_tmp = pu1_u_dst + cur_row * ps_codec->i4_disp_strd;
|
||||
pu1_v_dst_tmp = pu1_v_dst + cur_row * ps_codec->i4_disp_strd;
|
||||
}
|
||||
else if(IV_YUV_422P == ps_codec->e_chroma_fmt)
|
||||
{
|
||||
pu1_u_dst_tmp = pu1_u_dst + cur_row * ps_codec->i4_disp_strd / 2;
|
||||
pu1_v_dst_tmp = pu1_v_dst + cur_row * ps_codec->i4_disp_strd / 2;
|
||||
}
|
||||
else if(IV_YUV_420P == ps_codec->e_chroma_fmt)
|
||||
{
|
||||
pu1_u_dst_tmp = pu1_u_dst + (cur_row / 2) * ps_codec->i4_disp_strd / 2;
|
||||
pu1_v_dst_tmp = pu1_v_dst + (cur_row / 2) * ps_codec->i4_disp_strd / 2;
|
||||
}
|
||||
else if(IV_YUV_420SP_UV == ps_codec->e_chroma_fmt
|
||||
|| IV_YUV_420SP_VU == ps_codec->e_chroma_fmt)
|
||||
{
|
||||
pu1_uv_dst_tmp = pu1_u_dst + (cur_row / 2) * ps_codec->i4_disp_strd;
|
||||
}
|
||||
|
||||
/* In case of multi threaded implementation, format conversion might be called
|
||||
* before reconstruction is completed. If the frame being converted/copied
|
||||
|
|
@ -829,112 +889,119 @@ IHEVCD_ERROR_T ihevcd_fmt_conv(codec_t *ps_codec,
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
if((IV_YUV_420SP_UV == ps_codec->e_chroma_fmt) || (IV_YUV_420SP_VU == ps_codec->e_chroma_fmt))
|
||||
{
|
||||
ihevcd_fmt_conv_420sp_to_420sp_ft *fmt_conv_fptr;
|
||||
if(ps_codec->i4_disp_wd >= MIN_FMT_CONV_SIMD_WIDTH)
|
||||
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV420)
|
||||
{
|
||||
fmt_conv_fptr = ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_420sp_fptr;
|
||||
ihevcd_fmt_conv_420sp_to_420sp_ft *fmt_conv_fptr;
|
||||
if(ps_codec->i4_disp_wd >= MIN_FMT_CONV_SIMD_WIDTH)
|
||||
{
|
||||
fmt_conv_fptr = ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_420sp_fptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
fmt_conv_fptr = ihevcd_fmt_conv_420sp_to_420sp;
|
||||
}
|
||||
fmt_conv_fptr(pu1_y_src, pu1_uv_src,
|
||||
pu1_y_dst_tmp, pu1_uv_dst_tmp,
|
||||
ps_codec->i4_disp_wd, num_rows,
|
||||
ps_codec->i4_strd, ps_codec->i4_strd,
|
||||
ps_codec->i4_disp_strd, ps_codec->i4_disp_strd);
|
||||
}
|
||||
else
|
||||
}
|
||||
else if(IV_GRAY == ps_codec->e_chroma_fmt)
|
||||
{
|
||||
ihevcd_fmt_conv_luma_copy(pu1_y_src,
|
||||
pu1_y_dst_tmp,
|
||||
ps_codec->i4_disp_wd, num_rows,
|
||||
ps_codec->i4_strd,
|
||||
ps_codec->i4_disp_strd);
|
||||
}
|
||||
else if(IV_YUV_444P == ps_codec->e_chroma_fmt)
|
||||
{
|
||||
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV444)
|
||||
{
|
||||
fmt_conv_fptr = ihevcd_fmt_conv_420sp_to_420sp;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_444sp_to_444p_fptr(
|
||||
pu1_y_src, pu1_uv_src,
|
||||
pu1_y_dst_tmp, pu1_u_dst_tmp, pu1_v_dst_tmp,
|
||||
ps_codec->i4_disp_wd, num_rows,
|
||||
ps_codec->i4_strd, src_chroma_row_stride,
|
||||
ps_codec->i4_disp_strd, ps_codec->i4_disp_strd);
|
||||
}
|
||||
}
|
||||
else if(IV_YUV_422P == ps_codec->e_chroma_fmt)
|
||||
{
|
||||
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV422)
|
||||
{
|
||||
ihevcd_fmt_conv_422sp_to_422p(pu1_y_src, pu1_uv_src,
|
||||
pu1_y_dst_tmp, pu1_u_dst_tmp, pu1_v_dst_tmp,
|
||||
ps_codec->i4_disp_wd, num_rows,
|
||||
ps_codec->i4_strd, ps_codec->i4_strd,
|
||||
ps_codec->i4_disp_strd, (ps_codec->i4_disp_strd / 2));
|
||||
}
|
||||
fmt_conv_fptr(pu1_y_src, pu1_uv_src,
|
||||
pu1_y_dst_tmp, pu1_uv_dst_tmp,
|
||||
ps_codec->i4_disp_wd,
|
||||
num_rows,
|
||||
ps_codec->i4_strd,
|
||||
ps_codec->i4_strd,
|
||||
ps_codec->i4_disp_strd,
|
||||
ps_codec->i4_disp_strd);
|
||||
}
|
||||
else if(IV_YUV_420P == ps_codec->e_chroma_fmt)
|
||||
{
|
||||
ihevcd_fmt_conv_420sp_to_420p_ft *fmt_conv_fptr;
|
||||
if(ps_codec->i4_disp_wd >= MIN_FMT_CONV_SIMD_WIDTH)
|
||||
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_MONOCHROME)
|
||||
{
|
||||
fmt_conv_fptr = ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_420p_fptr;
|
||||
ihevcd_fmt_conv_400_to_420p(pu1_y_src,
|
||||
pu1_y_dst_tmp, pu1_u_dst_tmp, pu1_v_dst_tmp,
|
||||
ps_codec->i4_disp_wd, num_rows,
|
||||
ps_codec->i4_strd,
|
||||
ps_codec->i4_disp_strd, (ps_codec->i4_disp_strd / 2));
|
||||
}
|
||||
else
|
||||
else if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV420)
|
||||
{
|
||||
fmt_conv_fptr = ihevcd_fmt_conv_420sp_to_420p;
|
||||
}
|
||||
|
||||
if(0 == disable_luma_copy)
|
||||
{
|
||||
// copy luma
|
||||
WORD32 i;
|
||||
WORD32 num_cols = ps_codec->i4_disp_wd;
|
||||
|
||||
for(i = 0; i < num_rows; i++)
|
||||
ihevcd_fmt_conv_420sp_to_420p_ft *fmt_conv_fptr;
|
||||
if(ps_codec->i4_disp_wd >= MIN_FMT_CONV_SIMD_WIDTH)
|
||||
{
|
||||
memcpy(pu1_y_dst_tmp, pu1_y_src, num_cols);
|
||||
pu1_y_dst_tmp += ps_codec->i4_disp_strd;
|
||||
pu1_y_src += ps_codec->i4_strd;
|
||||
fmt_conv_fptr = ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_420p_fptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
fmt_conv_fptr = ihevcd_fmt_conv_420sp_to_420p;
|
||||
}
|
||||
|
||||
disable_luma_copy = 1;
|
||||
if(0 == disable_luma_copy)
|
||||
{
|
||||
// copy luma
|
||||
WORD32 i;
|
||||
WORD32 num_cols = ps_codec->i4_disp_wd;
|
||||
|
||||
for(i = 0; i < num_rows; i++)
|
||||
{
|
||||
memcpy(pu1_y_dst_tmp, pu1_y_src, num_cols);
|
||||
pu1_y_dst_tmp += ps_codec->i4_disp_strd;
|
||||
pu1_y_src += ps_codec->i4_strd;
|
||||
}
|
||||
|
||||
disable_luma_copy = 1;
|
||||
}
|
||||
fmt_conv_fptr(pu1_y_src, pu1_uv_src,
|
||||
pu1_y_dst_tmp, pu1_u_dst_tmp, pu1_v_dst_tmp,
|
||||
ps_codec->i4_disp_wd, num_rows,
|
||||
ps_codec->i4_strd, ps_codec->i4_strd,
|
||||
ps_codec->i4_disp_strd, (ps_codec->i4_disp_strd / 2),
|
||||
is_u_first,
|
||||
disable_luma_copy);
|
||||
}
|
||||
else if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV444)
|
||||
{
|
||||
ihevcd_fmt_conv_444sp_to_420p(pu1_y_src, pu1_uv_src,
|
||||
pu1_y_dst_tmp, pu1_u_dst_tmp, pu1_v_dst_tmp,
|
||||
ps_codec->i4_disp_wd, num_rows,
|
||||
ps_codec->i4_strd, src_chroma_row_stride,
|
||||
ps_codec->i4_disp_strd, ps_codec->i4_disp_strd / 2);
|
||||
}
|
||||
else if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV422)
|
||||
{
|
||||
ihevcd_fmt_conv_422sp_to_420p(pu1_y_src, pu1_uv_src,
|
||||
pu1_y_dst_tmp, pu1_u_dst_tmp, pu1_v_dst_tmp,
|
||||
ps_codec->i4_disp_wd, num_rows,
|
||||
ps_codec->i4_strd, src_chroma_row_stride,
|
||||
ps_codec->i4_disp_strd, ps_codec->i4_disp_strd / 2);
|
||||
}
|
||||
fmt_conv_fptr(pu1_y_src, pu1_uv_src,
|
||||
pu1_y_dst_tmp, pu1_u_dst_tmp, pu1_v_dst_tmp,
|
||||
ps_codec->i4_disp_wd,
|
||||
num_rows,
|
||||
ps_codec->i4_strd,
|
||||
ps_codec->i4_strd,
|
||||
ps_codec->i4_disp_strd,
|
||||
(ps_codec->i4_disp_strd / 2),
|
||||
is_u_first,
|
||||
disable_luma_copy);
|
||||
}
|
||||
else if(IV_RGB_565 == ps_codec->e_chroma_fmt)
|
||||
{
|
||||
ihevcd_fmt_conv_420sp_to_rgb565_ft *fmt_conv_fptr;
|
||||
if(ps_codec->i4_disp_wd >= MIN_FMT_CONV_SIMD_WIDTH)
|
||||
{
|
||||
fmt_conv_fptr = ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_rgb565_fptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
fmt_conv_fptr = ihevcd_fmt_conv_420sp_to_rgb565;
|
||||
}
|
||||
|
||||
fmt_conv_fptr(pu1_y_src, pu1_uv_src,
|
||||
pu2_rgb_dst_tmp,
|
||||
ps_codec->i4_disp_wd,
|
||||
num_rows,
|
||||
ps_codec->i4_strd,
|
||||
ps_codec->i4_strd,
|
||||
ps_codec->i4_disp_strd,
|
||||
is_u_first);
|
||||
}
|
||||
else if(IV_RGBA_8888 == ps_codec->e_chroma_fmt)
|
||||
{
|
||||
ihevcd_fmt_conv_420sp_to_rgba8888_ft *fmt_conv_fptr;
|
||||
if(ps_codec->i4_disp_wd >= MIN_FMT_CONV_SIMD_WIDTH)
|
||||
{
|
||||
fmt_conv_fptr = ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_rgba8888_fptr;
|
||||
}
|
||||
else
|
||||
{
|
||||
fmt_conv_fptr = ihevcd_fmt_conv_420sp_to_rgba8888;
|
||||
}
|
||||
|
||||
ASSERT(is_u_first == 1);
|
||||
fmt_conv_fptr(pu1_y_src,
|
||||
pu1_uv_src,
|
||||
pu4_rgb_dst_tmp,
|
||||
ps_codec->i4_disp_wd,
|
||||
num_rows,
|
||||
ps_codec->i4_strd,
|
||||
ps_codec->i4_strd,
|
||||
ps_codec->i4_disp_strd,
|
||||
is_u_first);
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
return (ret);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -43,27 +43,6 @@
|
|||
#define COEFF3 -6664
|
||||
#define COEFF4 16530
|
||||
|
||||
typedef void ihevcd_fmt_conv_420sp_to_rgba8888_ft(UWORD8 *pu1_y_src,
|
||||
UWORD8 *pu1_uv_src,
|
||||
UWORD32 *pu4_rgba_dst,
|
||||
WORD32 wd,
|
||||
WORD32 ht,
|
||||
WORD32 src_y_strd,
|
||||
WORD32 src_uv_strd,
|
||||
WORD32 dst_strd,
|
||||
WORD32 is_u_first);
|
||||
|
||||
typedef void ihevcd_fmt_conv_420sp_to_rgb565_ft(UWORD8 *pu1_y_src,
|
||||
UWORD8 *pu1_uv_src,
|
||||
UWORD16 *pu2_rgb_dst,
|
||||
WORD32 wd,
|
||||
WORD32 ht,
|
||||
WORD32 src_y_strd,
|
||||
WORD32 src_uv_strd,
|
||||
WORD32 dst_strd,
|
||||
WORD32 is_u_first);
|
||||
|
||||
|
||||
typedef void ihevcd_fmt_conv_420sp_to_420sp_ft(UWORD8 *pu1_y_src,
|
||||
UWORD8 *pu1_uv_src,
|
||||
UWORD8 *pu1_y_dst,
|
||||
|
|
@ -87,20 +66,28 @@ typedef void ihevcd_fmt_conv_420sp_to_420p_ft(UWORD8 *pu1_y_src,
|
|||
WORD32 dst_uv_strd,
|
||||
WORD32 is_u_first,
|
||||
WORD32 disable_luma_copy);
|
||||
typedef void ihevcd_fmt_conv_444sp_to_444p_ft(UWORD8 *pu1_y_src,
|
||||
UWORD8 *pu1_uv_src,
|
||||
UWORD8 *pu1_y_dst,
|
||||
UWORD8 *pu1_u_dst,
|
||||
UWORD8 *pu1_v_dst,
|
||||
WORD32 wd,
|
||||
WORD32 ht,
|
||||
WORD32 src_y_strd,
|
||||
WORD32 src_uv_strd,
|
||||
WORD32 dst_y_strd,
|
||||
WORD32 dst_uv_strd);
|
||||
|
||||
/* C function declarations */
|
||||
ihevcd_fmt_conv_420sp_to_rgba8888_ft ihevcd_fmt_conv_420sp_to_rgba8888;
|
||||
ihevcd_fmt_conv_420sp_to_rgb565_ft ihevcd_fmt_conv_420sp_to_rgb565;
|
||||
ihevcd_fmt_conv_420sp_to_420sp_ft ihevcd_fmt_conv_420sp_to_420sp;
|
||||
ihevcd_fmt_conv_420sp_to_420p_ft ihevcd_fmt_conv_420sp_to_420p;
|
||||
ihevcd_fmt_conv_444sp_to_444p_ft ihevcd_fmt_conv_444sp_to_444p;
|
||||
|
||||
/* A9Q function declarations */
|
||||
ihevcd_fmt_conv_420sp_to_rgba8888_ft ihevcd_fmt_conv_420sp_to_rgba8888_a9q;
|
||||
ihevcd_fmt_conv_420sp_to_420sp_ft ihevcd_fmt_conv_420sp_to_420sp_a9q;
|
||||
ihevcd_fmt_conv_420sp_to_420p_ft ihevcd_fmt_conv_420sp_to_420p_a9q;
|
||||
|
||||
/* A9A function declarations */
|
||||
ihevcd_fmt_conv_420sp_to_rgba8888_ft ihevcd_fmt_conv_420sp_to_rgba8888_a9a;
|
||||
ihevcd_fmt_conv_420sp_to_420sp_ft ihevcd_fmt_conv_420sp_to_420sp_a9a;
|
||||
ihevcd_fmt_conv_420sp_to_420p_ft ihevcd_fmt_conv_420sp_to_420p_a9a;
|
||||
|
||||
|
|
@ -111,7 +98,6 @@ ihevcd_fmt_conv_420sp_to_420p_ft ihevcd_fmt_conv_420sp_to_420p_ssse3;
|
|||
ihevcd_fmt_conv_420sp_to_420p_ft ihevcd_fmt_conv_420sp_to_420p_sse42;
|
||||
|
||||
/* armv8 function declarations */
|
||||
ihevcd_fmt_conv_420sp_to_rgba8888_ft ihevcd_fmt_conv_420sp_to_rgba8888_av8;
|
||||
ihevcd_fmt_conv_420sp_to_420sp_ft ihevcd_fmt_conv_420sp_to_420sp_av8;
|
||||
ihevcd_fmt_conv_420sp_to_420p_ft ihevcd_fmt_conv_420sp_to_420p_av8;
|
||||
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
|
||||
#include "ihevc_deblk.h"
|
||||
#include "ihevc_itrans.h"
|
||||
#include "ihevc_itrans_res.h"
|
||||
#include "ihevc_itrans_recon.h"
|
||||
#include "ihevc_chroma_itrans_recon.h"
|
||||
#include "ihevc_chroma_intra_pred.h"
|
||||
|
|
@ -71,18 +72,6 @@
|
|||
#define D_ARCH_MIPS_GENERIC 15
|
||||
#define D_ARCH_MIPS_32 16
|
||||
|
||||
void ihevcd_init_arch(void *pv_codec);
|
||||
|
||||
void ihevcd_init_function_ptr(void *pv_codec);
|
||||
|
||||
void ihevcd_init_function_ptr_generic(void *pv_codec);
|
||||
void ihevcd_init_function_ptr_ssse3(void *pv_codec);
|
||||
void ihevcd_init_function_ptr_sse42(void *pv_codec);
|
||||
|
||||
#ifndef DISABLE_AVX2
|
||||
void ihevcd_init_function_ptr_avx2(void *pv_codec);
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
ihevc_deblk_chroma_horz_ft *ihevc_deblk_chroma_horz_fptr;
|
||||
|
|
@ -111,6 +100,7 @@ typedef struct
|
|||
ihevc_intra_pred_luma_ref_substitution_ft *ihevc_intra_pred_luma_ref_substitution_fptr;
|
||||
ihevc_intra_pred_luma_ref_subst_all_avlble_ft *ihevc_intra_pred_luma_ref_subst_all_avlble_fptr;
|
||||
ihevc_intra_pred_ref_filtering_ft *ihevc_intra_pred_ref_filtering_fptr;
|
||||
ihevc_intra_pred_chroma_ref_filtering_ft *ihevc_intra_pred_chroma_ref_filtering_fptr;
|
||||
ihevc_intra_pred_chroma_dc_ft *ihevc_intra_pred_chroma_dc_fptr;
|
||||
ihevc_intra_pred_chroma_horz_ft *ihevc_intra_pred_chroma_horz_fptr;
|
||||
ihevc_intra_pred_chroma_mode2_ft *ihevc_intra_pred_chroma_mode2_fptr;
|
||||
|
|
@ -136,6 +126,11 @@ typedef struct
|
|||
ihevc_itrans_8x8_ft *ihevc_itrans_8x8_fptr;
|
||||
ihevc_itrans_16x16_ft *ihevc_itrans_16x16_fptr;
|
||||
ihevc_itrans_32x32_ft *ihevc_itrans_32x32_fptr;
|
||||
ihevc_itrans_res_4x4_ttype1_ft *ihevc_itrans_res_4x4_ttype1_fptr;
|
||||
ihevc_itrans_res_4x4_ft *ihevc_itrans_res_4x4_fptr;
|
||||
ihevc_itrans_res_8x8_ft *ihevc_itrans_res_8x8_fptr;
|
||||
ihevc_itrans_res_16x16_ft *ihevc_itrans_res_16x16_fptr;
|
||||
ihevc_itrans_res_32x32_ft *ihevc_itrans_res_32x32_fptr;
|
||||
ihevc_itrans_recon_4x4_ttype1_ft *ihevc_itrans_recon_4x4_ttype1_fptr;
|
||||
ihevc_itrans_recon_4x4_ft *ihevc_itrans_recon_4x4_fptr;
|
||||
ihevc_itrans_recon_8x8_ft *ihevc_itrans_recon_8x8_fptr;
|
||||
|
|
@ -144,6 +139,7 @@ typedef struct
|
|||
ihevc_chroma_itrans_recon_4x4_ft *ihevc_chroma_itrans_recon_4x4_fptr;
|
||||
ihevc_chroma_itrans_recon_8x8_ft *ihevc_chroma_itrans_recon_8x8_fptr;
|
||||
ihevc_chroma_itrans_recon_16x16_ft *ihevc_chroma_itrans_recon_16x16_fptr;
|
||||
ihevc_chroma_itrans_recon_32x32_ft *ihevc_chroma_itrans_recon_32x32_fptr;
|
||||
ihevc_recon_4x4_ttype1_ft *ihevc_recon_4x4_ttype1_fptr;
|
||||
ihevc_recon_4x4_ft *ihevc_recon_4x4_fptr;
|
||||
ihevc_recon_8x8_ft *ihevc_recon_8x8_fptr;
|
||||
|
|
@ -152,6 +148,7 @@ typedef struct
|
|||
ihevc_chroma_recon_4x4_ft *ihevc_chroma_recon_4x4_fptr;
|
||||
ihevc_chroma_recon_8x8_ft *ihevc_chroma_recon_8x8_fptr;
|
||||
ihevc_chroma_recon_16x16_ft *ihevc_chroma_recon_16x16_fptr;
|
||||
ihevc_chroma_recon_32x32_ft *ihevc_chroma_recon_32x32_fptr;
|
||||
ihevc_memcpy_mul_8_ft *ihevc_memcpy_mul_8_fptr;
|
||||
ihevc_memcpy_ft *ihevc_memcpy_fptr;
|
||||
ihevc_memset_mul_8_ft *ihevc_memset_mul_8_fptr;
|
||||
|
|
@ -178,12 +175,36 @@ typedef struct
|
|||
ihevc_sao_edge_offset_class2_chroma_ft *ihevc_sao_edge_offset_class2_chroma_fptr;
|
||||
ihevc_sao_edge_offset_class3_ft *ihevc_sao_edge_offset_class3_fptr;
|
||||
ihevc_sao_edge_offset_class3_chroma_ft *ihevc_sao_edge_offset_class3_chroma_fptr;
|
||||
ihevcd_fmt_conv_420sp_to_rgba8888_ft *ihevcd_fmt_conv_420sp_to_rgba8888_fptr;
|
||||
ihevcd_fmt_conv_420sp_to_rgb565_ft *ihevcd_fmt_conv_420sp_to_rgb565_fptr;
|
||||
ihevcd_fmt_conv_420sp_to_420sp_ft *ihevcd_fmt_conv_420sp_to_420sp_fptr;
|
||||
ihevcd_fmt_conv_420sp_to_420p_ft *ihevcd_fmt_conv_420sp_to_420p_fptr;
|
||||
ihevcd_fmt_conv_444sp_to_444p_ft *ihevcd_fmt_conv_444sp_to_444p_fptr;
|
||||
ihevcd_itrans_recon_dc_luma_ft *ihevcd_itrans_recon_dc_luma_fptr;
|
||||
ihevcd_itrans_recon_dc_chroma_ft *ihevcd_itrans_recon_dc_chroma_fptr;
|
||||
ihevcd_itrans_res_dc_ft *ihevcd_itrans_res_dc_fptr;
|
||||
}func_selector_t;
|
||||
|
||||
void ihevcd_init_arch(void *pv_codec);
|
||||
|
||||
void ihevcd_init_function_ptr(void *pv_codec);
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
void ihevcd_init_function_ptr_generic(func_selector_t *ps_func_selector);
|
||||
void ihevcd_init_function_ptr_ssse3(func_selector_t *ps_func_selector);
|
||||
void ihevcd_init_function_ptr_sse42(func_selector_t *ps_func_selector);
|
||||
|
||||
#ifndef DISABLE_AVX2
|
||||
void ihevcd_init_function_ptr_avx2(func_selector_t *ps_func_selector);
|
||||
#endif
|
||||
|
||||
void ihevcd_init_function_ptr_neonintr(func_selector_t *ps_func_selector);
|
||||
void ihevcd_init_function_ptr_noneon(func_selector_t *ps_func_selector);
|
||||
void ihevcd_init_function_ptr_a9q(func_selector_t *ps_func_selector);
|
||||
void ihevcd_init_function_ptr_av8(func_selector_t *ps_func_selector);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* _IHEVCD_FUNCTION_SELECTOR_H_ */
|
||||
|
|
|
|||
|
|
@ -154,8 +154,7 @@ void ihevcd_ilf_pad_frame(deblk_ctxt_t *ps_deblk_ctxt, sao_ctxt_t *ps_sao_ctxt)
|
|||
{
|
||||
UWORD8 *pu1_cur_ctb_luma = ps_deblk_ctxt->pu1_cur_pic_luma
|
||||
+ (i4_ctb_x * ctb_size
|
||||
+ i4_ctb_y * ctb_size
|
||||
* ps_codec->i4_strd);
|
||||
+ i4_ctb_y * ctb_size * ps_codec->i4_strd);
|
||||
UWORD8 *pu1_cur_ctb_chroma = ps_deblk_ctxt->pu1_cur_pic_chroma
|
||||
+ i4_ctb_x * ctb_size
|
||||
+ (i4_ctb_y * ctb_size * ps_codec->i4_strd / 2);
|
||||
|
|
@ -163,46 +162,56 @@ void ihevcd_ilf_pad_frame(deblk_ctxt_t *ps_deblk_ctxt, sao_ctxt_t *ps_sao_ctxt)
|
|||
if(0 == i4_ctb_x)
|
||||
{
|
||||
WORD32 pad_ht_luma;
|
||||
WORD32 pad_ht_chroma;
|
||||
|
||||
pad_ht_luma = ctb_size;
|
||||
pad_ht_luma += (ps_sps->i2_pic_ht_in_ctb - 1) == i4_ctb_y ? 8 : 0;
|
||||
pad_ht_chroma = ctb_size / 2;
|
||||
pad_ht_chroma += (ps_sps->i2_pic_ht_in_ctb - 1) == i4_ctb_y ? 8 : 0;
|
||||
/* Pad left after 1st CTB is processed */
|
||||
ps_codec->s_func_selector.ihevc_pad_left_luma_fptr(pu1_cur_ctb_luma - 8 * ps_codec->i4_strd, ps_codec->i4_strd, pad_ht_luma, PAD_LEFT);
|
||||
ps_codec->s_func_selector.ihevc_pad_left_chroma_fptr(pu1_cur_ctb_chroma - 8 * ps_codec->i4_strd, ps_codec->i4_strd, pad_ht_chroma, PAD_LEFT);
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
WORD32 pad_ht_chroma = ctb_size / 2;
|
||||
pad_ht_chroma += (ps_sps->i2_pic_ht_in_ctb - 1) == i4_ctb_y ? 8 : 0;
|
||||
ps_codec->s_func_selector.ihevc_pad_left_chroma_fptr(pu1_cur_ctb_chroma - 8 * ps_codec->i4_strd, ps_codec->i4_strd, pad_ht_chroma, PAD_LEFT);
|
||||
}
|
||||
}
|
||||
else if((ps_sps->i2_pic_wd_in_ctb - 1) == i4_ctb_x)
|
||||
{
|
||||
WORD32 pad_ht_luma;
|
||||
WORD32 pad_ht_chroma;
|
||||
WORD32 cols_remaining = ps_sps->i2_pic_width_in_luma_samples - (i4_ctb_x << ps_sps->i1_log2_ctb_size);
|
||||
|
||||
pad_ht_luma = ctb_size;
|
||||
pad_ht_luma += (ps_sps->i2_pic_ht_in_ctb - 1) == i4_ctb_y ? 8 : 0;
|
||||
pad_ht_chroma = ctb_size / 2;
|
||||
pad_ht_chroma += (ps_sps->i2_pic_ht_in_ctb - 1) == i4_ctb_y ? 8 : 0;
|
||||
/* Pad right after last CTB in the current row is processed */
|
||||
ps_codec->s_func_selector.ihevc_pad_right_luma_fptr(pu1_cur_ctb_luma + cols_remaining - 8 * ps_codec->i4_strd, ps_codec->i4_strd, pad_ht_luma, PAD_RIGHT);
|
||||
ps_codec->s_func_selector.ihevc_pad_right_chroma_fptr(pu1_cur_ctb_chroma + cols_remaining - 8 * ps_codec->i4_strd, ps_codec->i4_strd, pad_ht_chroma, PAD_RIGHT);
|
||||
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
WORD32 pad_ht_chroma = ctb_size / 2;
|
||||
pad_ht_chroma += (ps_sps->i2_pic_ht_in_ctb - 1) == i4_ctb_y ? 8 : 0;
|
||||
ps_codec->s_func_selector.ihevc_pad_right_chroma_fptr(pu1_cur_ctb_chroma + cols_remaining - 8 * ps_codec->i4_strd, ps_codec->i4_strd, pad_ht_chroma, PAD_RIGHT);
|
||||
}
|
||||
|
||||
if((ps_sps->i2_pic_ht_in_ctb - 1) == i4_ctb_y)
|
||||
{
|
||||
UWORD8 *pu1_buf;
|
||||
|
||||
/* Since SAO is shifted by 8x8, chroma padding can not be done till second row is processed */
|
||||
/* Hence moving top padding to to end of frame, Moving it to second row also results in problems when there is only one row */
|
||||
/* Pad top after padding left and right for current rows after processing 1st CTB row */
|
||||
ihevc_pad_top(ps_deblk_ctxt->pu1_cur_pic_luma - PAD_LEFT, ps_codec->i4_strd, ps_sps->i2_pic_width_in_luma_samples + PAD_WD, PAD_TOP);
|
||||
ihevc_pad_top(ps_deblk_ctxt->pu1_cur_pic_chroma - PAD_LEFT, ps_codec->i4_strd, ps_sps->i2_pic_width_in_luma_samples + PAD_WD, PAD_TOP / 2);
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
ihevc_pad_top(ps_deblk_ctxt->pu1_cur_pic_chroma - PAD_LEFT, ps_codec->i4_strd, ps_sps->i2_pic_width_in_luma_samples + PAD_WD, PAD_TOP / 2);
|
||||
}
|
||||
|
||||
pu1_buf = ps_deblk_ctxt->pu1_cur_pic_luma + ps_codec->i4_strd * ps_sps->i2_pic_height_in_luma_samples - PAD_LEFT;
|
||||
/* Pad top after padding left and right for current rows after processing 1st CTB row */
|
||||
ihevc_pad_bottom(pu1_buf, ps_codec->i4_strd, ps_sps->i2_pic_width_in_luma_samples + PAD_WD, PAD_BOT);
|
||||
|
||||
pu1_buf = ps_deblk_ctxt->pu1_cur_pic_chroma + ps_codec->i4_strd * (ps_sps->i2_pic_height_in_luma_samples / 2) - PAD_LEFT;
|
||||
ihevc_pad_bottom(pu1_buf, ps_codec->i4_strd, ps_sps->i2_pic_width_in_luma_samples + PAD_WD, PAD_BOT / 2);
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
pu1_buf = ps_deblk_ctxt->pu1_cur_pic_chroma + ps_codec->i4_strd * (ps_sps->i2_pic_height_in_luma_samples / 2) - PAD_LEFT;
|
||||
ihevc_pad_bottom(pu1_buf, ps_codec->i4_strd, ps_sps->i2_pic_width_in_luma_samples + PAD_WD, PAD_BOT / 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -70,25 +70,6 @@
|
|||
#include "ihevc_inter_pred.h"
|
||||
#include "ihevcd_profile.h"
|
||||
|
||||
static WORD8 gai1_luma_filter[4][NTAPS_LUMA] =
|
||||
{
|
||||
{ 0, 0, 0, 64, 0, 0, 0, 0 },
|
||||
{ -1, 4, -10, 58, 17, -5, 1, 0 },
|
||||
{ -1, 4, -11, 40, 40, -11, 4, -1 },
|
||||
{ 0, 1, -5, 17, 58, -10, 4, -1 } };
|
||||
|
||||
/* The filter uses only the first four elements in each array */
|
||||
static WORD8 gai1_chroma_filter[8][NTAPS_LUMA] =
|
||||
{
|
||||
{ 0, 64, 0, 0, 0, 0, 0, 0 },
|
||||
{ -2, 58, 10, -2, 0, 0, 0, 0 },
|
||||
{ -4, 54, 16, -2, 0, 0, 0, 0 },
|
||||
{ -6, 46, 28, -4, 0, 0, 0, 0 },
|
||||
{ -4, 36, 36, -4, 0, 0, 0, 0 },
|
||||
{ -4, 28, 46, -6, 0, 0, 0, 0 },
|
||||
{ -2, 16, 54, -4, 0, 0, 0, 0 },
|
||||
{ -2, 10, 58, -2, 0, 0, 0, 0 } };
|
||||
|
||||
/**
|
||||
*******************************************************************************
|
||||
*
|
||||
|
|
@ -163,6 +144,10 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
|
|||
WORD32 next_ctb_idx;
|
||||
WORD8(*coeff)[8];
|
||||
WORD32 chroma_yuv420sp_vu;
|
||||
WORD32 num_comp;
|
||||
WORD32 h_samp_factor, v_samp_factor;
|
||||
WORD32 chroma_pixel_strd = 2;
|
||||
WORD32 is_yuv420, is_yuv444;
|
||||
|
||||
PROFILE_DISABLE_INTER_PRED();
|
||||
ps_codec = ps_proc->ps_codec;
|
||||
|
|
@ -211,6 +196,12 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
|
|||
chroma_offset_l1_cb = 0;
|
||||
chroma_offset_l1_cr = 0;
|
||||
|
||||
num_comp = ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_MONOCHROME ? 1 : 2;
|
||||
is_yuv420 = (CHROMA_FMT_IDC_YUV420 == ps_sps->i1_chroma_format_idc) ? 1 : 0;
|
||||
is_yuv444 = (CHROMA_FMT_IDC_YUV444 == ps_sps->i1_chroma_format_idc) ? 1 : 0;
|
||||
h_samp_factor = is_yuv444 ? 1 : 2;
|
||||
v_samp_factor = is_yuv420 ? 2 : 1;
|
||||
|
||||
for(pu_indx = 0; pu_indx < i4_pu_cnt; pu_indx++, ps_pu++)
|
||||
{
|
||||
/* If the PU is intra then proceed to the next */
|
||||
|
|
@ -233,15 +224,20 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
|
|||
ps_pic_buf_l0 = (pic_buf_t *)((ps_slice_hdr->as_ref_pic_list0[ps_pu->mv.i1_l0_ref_idx].pv_pic_buf));
|
||||
|
||||
ref_pic_luma_l0 = ps_pic_buf_l0->pu1_luma;
|
||||
ref_pic_chroma_l0 = ps_pic_buf_l0->pu1_chroma;
|
||||
|
||||
luma_weight_l0 = ps_slice_hdr->s_wt_ofst.i2_luma_weight_l0[ps_pu->mv.i1_l0_ref_idx];
|
||||
chroma_weight_l0_cb = ps_slice_hdr->s_wt_ofst.i2_chroma_weight_l0_cb[ps_pu->mv.i1_l0_ref_idx];
|
||||
chroma_weight_l0_cr = ps_slice_hdr->s_wt_ofst.i2_chroma_weight_l0_cr[ps_pu->mv.i1_l0_ref_idx];
|
||||
|
||||
luma_offset_l0 = ps_slice_hdr->s_wt_ofst.i2_luma_offset_l0[ps_pu->mv.i1_l0_ref_idx];
|
||||
chroma_offset_l0_cb = ps_slice_hdr->s_wt_ofst.i2_chroma_offset_l0_cb[ps_pu->mv.i1_l0_ref_idx];
|
||||
chroma_offset_l0_cr = ps_slice_hdr->s_wt_ofst.i2_chroma_offset_l0_cr[ps_pu->mv.i1_l0_ref_idx];
|
||||
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
ref_pic_chroma_l0 = ps_pic_buf_l0->pu1_chroma;
|
||||
chroma_weight_l0_cb = ps_slice_hdr->s_wt_ofst.i2_chroma_weight_l0_cb[ps_pu->mv.i1_l0_ref_idx];
|
||||
chroma_weight_l0_cr = ps_slice_hdr->s_wt_ofst.i2_chroma_weight_l0_cr[ps_pu->mv.i1_l0_ref_idx];
|
||||
|
||||
chroma_offset_l0_cb = ps_slice_hdr->s_wt_ofst.i2_chroma_offset_l0_cb[ps_pu->mv.i1_l0_ref_idx];
|
||||
chroma_offset_l0_cr = ps_slice_hdr->s_wt_ofst.i2_chroma_offset_l0_cr[ps_pu->mv.i1_l0_ref_idx];
|
||||
}
|
||||
}
|
||||
|
||||
if(ps_pu->b2_pred_mode != PRED_L0)
|
||||
|
|
@ -249,19 +245,24 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
|
|||
pic_buf_t *ps_pic_buf_l1;
|
||||
ps_pic_buf_l1 = (pic_buf_t *)((ps_slice_hdr->as_ref_pic_list1[ps_pu->mv.i1_l1_ref_idx].pv_pic_buf));
|
||||
ref_pic_luma_l1 = ps_pic_buf_l1->pu1_luma;
|
||||
ref_pic_chroma_l1 = ps_pic_buf_l1->pu1_chroma;
|
||||
|
||||
luma_weight_l1 = ps_slice_hdr->s_wt_ofst.i2_luma_weight_l1[ps_pu->mv.i1_l1_ref_idx];
|
||||
chroma_weight_l1_cb = ps_slice_hdr->s_wt_ofst.i2_chroma_weight_l1_cb[ps_pu->mv.i1_l1_ref_idx];
|
||||
chroma_weight_l1_cr = ps_slice_hdr->s_wt_ofst.i2_chroma_weight_l1_cr[ps_pu->mv.i1_l1_ref_idx];
|
||||
|
||||
luma_offset_l1 = ps_slice_hdr->s_wt_ofst.i2_luma_offset_l1[ps_pu->mv.i1_l1_ref_idx];
|
||||
chroma_offset_l1_cb = ps_slice_hdr->s_wt_ofst.i2_chroma_offset_l1_cb[ps_pu->mv.i1_l1_ref_idx];
|
||||
chroma_offset_l1_cr = ps_slice_hdr->s_wt_ofst.i2_chroma_offset_l1_cr[ps_pu->mv.i1_l1_ref_idx];
|
||||
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
ref_pic_chroma_l1 = ps_pic_buf_l1->pu1_chroma;
|
||||
chroma_weight_l1_cb = ps_slice_hdr->s_wt_ofst.i2_chroma_weight_l1_cb[ps_pu->mv.i1_l1_ref_idx];
|
||||
chroma_weight_l1_cr = ps_slice_hdr->s_wt_ofst.i2_chroma_weight_l1_cr[ps_pu->mv.i1_l1_ref_idx];
|
||||
|
||||
chroma_offset_l1_cb = ps_slice_hdr->s_wt_ofst.i2_chroma_offset_l1_cb[ps_pu->mv.i1_l1_ref_idx];
|
||||
chroma_offset_l1_cr = ps_slice_hdr->s_wt_ofst.i2_chroma_offset_l1_cr[ps_pu->mv.i1_l1_ref_idx];
|
||||
}
|
||||
}
|
||||
|
||||
/*luma and chroma components*/
|
||||
for(clr_indx = 0; clr_indx < 2; clr_indx++)
|
||||
for(clr_indx = 0; clr_indx < num_comp; clr_indx++)
|
||||
{
|
||||
PROFILE_DISABLE_INTER_PRED_LUMA(clr_indx);
|
||||
PROFILE_DISABLE_INTER_PRED_CHROMA(clr_indx);
|
||||
|
|
@ -308,7 +309,7 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
|
|||
pu1_dst = pu1_dst_luma + pu_y * ref_strd + pu_x;
|
||||
|
||||
ntaps = NTAPS_LUMA;
|
||||
coeff = gai1_luma_filter;
|
||||
coeff = gai1_ihevc_luma_filter;
|
||||
}
|
||||
|
||||
else
|
||||
|
|
@ -319,15 +320,14 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
|
|||
if(ps_pu->b2_pred_mode != PRED_L1)
|
||||
{
|
||||
mv = CLIP3(ps_pu->mv.s_l0_mv.i2_mvx, (-((MAX_CTB_SIZE + pu_x + 7) << 2)), ((ps_sps->i2_pic_width_in_luma_samples - pu_x + 7) << 2));
|
||||
ai2_xint[0] = (pu_x / 2 + (mv >> 3)) << 1;
|
||||
ai2_xfrac[0] = mv & 7;
|
||||
ai2_xint[0] = (pu_x * chroma_pixel_strd / h_samp_factor) + (mv >> (2 + h_samp_factor - 1)) * chroma_pixel_strd;
|
||||
ai2_xfrac[0] = mv & (is_yuv420 ? 7 : 3);
|
||||
|
||||
mv = CLIP3(ps_pu->mv.s_l0_mv.i2_mvy, (-((MAX_CTB_SIZE + pu_y + 7) << 2)), ((ps_sps->i2_pic_height_in_luma_samples - pu_y + 7) << 2));
|
||||
ai2_yint[0] = pu_y / 2 + (mv >> 3);
|
||||
ai2_yfrac[0] = mv & 7;
|
||||
ai2_yint[0] = ((pu_y / v_samp_factor) + (mv >> (2 + v_samp_factor - 1)));
|
||||
ai2_yfrac[0] = mv & (is_yuv444 ? 3 : 7);
|
||||
|
||||
ref_pic_l0 = ref_pic_chroma_l0 + ai2_yint[0] * ref_strd
|
||||
+ ai2_xint[0];
|
||||
ref_pic_l0 = ref_pic_chroma_l0 + ai2_yint[0] * (ref_strd * chroma_pixel_strd / h_samp_factor) + ai2_xint[0];
|
||||
|
||||
ai2_xfrac[0] &= ps_codec->i4_mv_frac_mask;
|
||||
ai2_yfrac[0] &= ps_codec->i4_mv_frac_mask;
|
||||
|
|
@ -337,24 +337,25 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
|
|||
if(ps_pu->b2_pred_mode != PRED_L0)
|
||||
{
|
||||
mv = CLIP3(ps_pu->mv.s_l1_mv.i2_mvx, (-((MAX_CTB_SIZE + pu_x + 7) << 2)), ((ps_sps->i2_pic_width_in_luma_samples - pu_x + 7) << 2));
|
||||
ai2_xint[1] = (pu_x / 2 + (mv >> 3)) << 1;
|
||||
ai2_xfrac[1] = mv & 7;
|
||||
ai2_xint[1] = (pu_x * chroma_pixel_strd / h_samp_factor) + (mv >> (2 + h_samp_factor - 1)) * chroma_pixel_strd;
|
||||
ai2_xfrac[1] = mv & (is_yuv420 ? 7 : 3);
|
||||
|
||||
mv = CLIP3(ps_pu->mv.s_l1_mv.i2_mvy, (-((MAX_CTB_SIZE + pu_y + 7) << 2)), ((ps_sps->i2_pic_height_in_luma_samples - pu_y + 7) << 2));
|
||||
ai2_yint[1] = pu_y / 2 + (mv >> 3);
|
||||
ai2_yfrac[1] = mv & 7;
|
||||
ai2_yint[1] = ((pu_y / v_samp_factor) + (mv >> (2 + v_samp_factor - 1)));
|
||||
ai2_yfrac[1] = mv & (is_yuv444 ? 3 : 7);
|
||||
|
||||
ref_pic_l1 = ref_pic_chroma_l1 + ai2_yint[1] * (ref_strd * chroma_pixel_strd / h_samp_factor) + ai2_xint[1];
|
||||
|
||||
ref_pic_l1 = ref_pic_chroma_l1 + ai2_yint[1] * ref_strd
|
||||
+ ai2_xint[1];
|
||||
ai2_xfrac[1] &= ps_codec->i4_mv_frac_mask;
|
||||
ai2_yfrac[1] &= ps_codec->i4_mv_frac_mask;
|
||||
|
||||
}
|
||||
|
||||
pu1_dst = pu1_dst_chroma + pu_y * ref_strd / 2 + pu_x;
|
||||
pu1_dst = pu1_dst_chroma + (pu_y / v_samp_factor) * (ref_strd * chroma_pixel_strd / h_samp_factor) +
|
||||
(pu_x * chroma_pixel_strd / h_samp_factor);
|
||||
|
||||
ntaps = NTAPS_CHROMA;
|
||||
coeff = gai1_chroma_filter;
|
||||
coeff = gai1_ihevc_chroma_filter;
|
||||
}
|
||||
|
||||
if(ps_pu->b2_pred_mode != PRED_L1)
|
||||
|
|
@ -396,6 +397,10 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
|
|||
if(func_ptr1 != NULL)
|
||||
{
|
||||
func_src_strd = ref_strd;
|
||||
if (clr_indx != 0)
|
||||
{
|
||||
func_src_strd *= (chroma_pixel_strd / h_samp_factor);
|
||||
}
|
||||
func_src = (ai2_xfrac[0] && ai2_yfrac[0]) ?
|
||||
ref_pic_l0 - (ntaps / 2 - 1) * func_src_strd :
|
||||
ref_pic_l0;
|
||||
|
|
@ -409,10 +414,14 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
|
|||
func_dst_strd = (weighted_pred || bi_pred
|
||||
|| (ai2_xfrac[0] && ai2_yfrac[0])) ?
|
||||
pu_wd : ref_strd;
|
||||
func_coeff = ai2_xfrac[0] ?
|
||||
coeff[ai2_xfrac[0]] : coeff[ai2_yfrac[0]];
|
||||
func_wd = pu_wd >> clr_indx;
|
||||
func_ht = pu_ht >> clr_indx;
|
||||
if (clr_indx != 0)
|
||||
{
|
||||
func_dst_strd *= (chroma_pixel_strd / h_samp_factor);
|
||||
}
|
||||
func_coeff = ai2_xfrac[0] ? coeff[ai2_xfrac[0] << (is_yuv444 ? clr_indx : 0)]
|
||||
: coeff[ai2_yfrac[0] << (is_yuv444 ? clr_indx : 0)];
|
||||
func_wd = pu_wd >> (is_yuv420 ? clr_indx : 0);
|
||||
func_ht = pu_ht >> (is_yuv444 ? 0 : clr_indx);
|
||||
func_ht += (ai2_xfrac[0] && ai2_yfrac[0]) ? ntaps - 1 : 0;
|
||||
func_ptr1(func_src, func_dst, func_src_strd, func_dst_strd,
|
||||
func_coeff, func_ht, func_wd);
|
||||
|
|
@ -422,15 +431,23 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
|
|||
if(func_ptr2 != NULL)
|
||||
{
|
||||
func_src_strd = pu_wd;
|
||||
if (clr_indx != 0)
|
||||
{
|
||||
func_src_strd *= (chroma_pixel_strd / h_samp_factor);
|
||||
}
|
||||
func_src = pi2_tmp1 + (ntaps / 2 - 1) * func_src_strd;
|
||||
func_dst = (weighted_pred || bi_pred) ?
|
||||
(void *)pi2_tmp1 : (void *)pu1_dst;
|
||||
|
||||
func_dst_strd = (weighted_pred || bi_pred) ?
|
||||
pu_wd : ref_strd;
|
||||
func_coeff = coeff[ai2_yfrac[0]];
|
||||
func_wd = pu_wd >> clr_indx;
|
||||
func_ht = pu_ht >> clr_indx;
|
||||
if (clr_indx != 0)
|
||||
{
|
||||
func_dst_strd *= (chroma_pixel_strd / h_samp_factor);
|
||||
}
|
||||
func_coeff = coeff[ai2_yfrac[0] << (is_yuv444 ? clr_indx : 0)];
|
||||
func_wd = pu_wd >> (is_yuv420 ? clr_indx : 0);
|
||||
func_ht = pu_ht >> (is_yuv444 ? 0 : clr_indx);
|
||||
func_ptr2(func_src, func_dst, func_src_strd, func_dst_strd,
|
||||
func_coeff, func_ht, func_wd);
|
||||
}
|
||||
|
|
@ -438,6 +455,10 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
|
|||
if(func_ptr3 != NULL)
|
||||
{
|
||||
func_src_strd = ref_strd;
|
||||
if (clr_indx != 0)
|
||||
{
|
||||
func_src_strd *= (chroma_pixel_strd / h_samp_factor);
|
||||
}
|
||||
func_src = (ai2_xfrac[1] && ai2_yfrac[1]) ?
|
||||
ref_pic_l1 - (ntaps / 2 - 1) * func_src_strd :
|
||||
ref_pic_l1;
|
||||
|
|
@ -451,28 +472,42 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
|
|||
func_dst_strd = (weighted_pred || bi_pred
|
||||
|| (ai2_xfrac[1] && ai2_yfrac[1])) ?
|
||||
pu_wd : ref_strd;
|
||||
func_coeff = ai2_xfrac[1] ?
|
||||
coeff[ai2_xfrac[1]] : coeff[ai2_yfrac[1]];
|
||||
func_wd = pu_wd >> clr_indx;
|
||||
func_ht = pu_ht >> clr_indx;
|
||||
if (clr_indx != 0)
|
||||
{
|
||||
func_dst_strd *= (chroma_pixel_strd / h_samp_factor);
|
||||
}
|
||||
func_coeff = ai2_xfrac[1] ? coeff[ai2_xfrac[1] << (is_yuv444 ? clr_indx : 0)]
|
||||
: coeff[ai2_yfrac[1] << (is_yuv444 ? clr_indx : 0)];
|
||||
func_wd = pu_wd >> (is_yuv420 ? clr_indx : 0);
|
||||
func_ht = pu_ht >> (is_yuv444 ? 0 : clr_indx);
|
||||
|
||||
func_ht += (ai2_xfrac[1] && ai2_yfrac[1]) ? ntaps - 1 : 0;
|
||||
func_ptr3(func_src, func_dst, func_src_strd, func_dst_strd,
|
||||
func_coeff, func_ht, func_wd);
|
||||
|
||||
|
||||
}
|
||||
|
||||
if(func_ptr4 != NULL)
|
||||
{
|
||||
func_src_strd = pu_wd;
|
||||
if (clr_indx != 0)
|
||||
{
|
||||
func_src_strd *= (chroma_pixel_strd / h_samp_factor);
|
||||
}
|
||||
func_src = pi2_tmp2 + (ntaps / 2 - 1) * func_src_strd;
|
||||
|
||||
func_dst = (weighted_pred || bi_pred) ?
|
||||
(void *)pi2_tmp2 : (void *)pu1_dst;
|
||||
func_dst_strd = (weighted_pred || bi_pred) ?
|
||||
pu_wd : ref_strd;
|
||||
func_coeff = coeff[ai2_yfrac[1]];
|
||||
func_wd = pu_wd >> clr_indx;
|
||||
func_ht = pu_ht >> clr_indx;
|
||||
if (clr_indx != 0)
|
||||
{
|
||||
func_dst_strd *= (chroma_pixel_strd / h_samp_factor);
|
||||
}
|
||||
func_coeff = coeff[ai2_yfrac[1] << (is_yuv444 ? clr_indx : 0)];
|
||||
func_wd = pu_wd >> (is_yuv420 ? clr_indx : 0);
|
||||
func_ht = pu_ht >> (is_yuv444 ? 0 : clr_indx);
|
||||
func_ptr4(func_src, func_dst, func_src_strd, func_dst_strd,
|
||||
func_coeff, func_ht, func_wd);
|
||||
|
||||
|
|
@ -518,15 +553,17 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
|
|||
{
|
||||
shift = ps_slice_hdr->s_wt_ofst.i1_chroma_log2_weight_denom
|
||||
+ SHIFT_14_MINUS_BIT_DEPTH + 1;
|
||||
func_src_strd = pu_wd * (chroma_pixel_strd / h_samp_factor);
|
||||
func_dst_strd = ref_strd * (chroma_pixel_strd / h_samp_factor);
|
||||
|
||||
if(chroma_yuv420sp_vu)
|
||||
{
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_bi_fptr(pi2_tmp1,
|
||||
pi2_tmp2,
|
||||
pu1_dst,
|
||||
pu_wd,
|
||||
pu_wd,
|
||||
ref_strd,
|
||||
func_src_strd,
|
||||
func_src_strd,
|
||||
func_dst_strd,
|
||||
chroma_weight_l0_cr,
|
||||
chroma_weight_l0_cb,
|
||||
chroma_offset_l0_cr,
|
||||
|
|
@ -538,17 +575,17 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
|
|||
shift,
|
||||
lvl_shift1,
|
||||
lvl_shift2,
|
||||
pu_ht >> 1,
|
||||
pu_wd >> 1);
|
||||
pu_ht >> (is_yuv444 ? 0 : clr_indx),
|
||||
pu_wd >> (is_yuv420 ? clr_indx : 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_bi_fptr(pi2_tmp1,
|
||||
pi2_tmp2,
|
||||
pu1_dst,
|
||||
pu_wd,
|
||||
pu_wd,
|
||||
ref_strd,
|
||||
func_src_strd,
|
||||
func_src_strd,
|
||||
func_dst_strd,
|
||||
chroma_weight_l0_cb,
|
||||
chroma_weight_l0_cr,
|
||||
chroma_offset_l0_cb,
|
||||
|
|
@ -560,8 +597,8 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
|
|||
shift,
|
||||
lvl_shift1,
|
||||
lvl_shift2,
|
||||
pu_ht >> 1,
|
||||
pu_wd >> 1);
|
||||
pu_ht >> (is_yuv444 ? 0 : clr_indx),
|
||||
pu_wd >> (is_yuv420 ? clr_indx : 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -600,36 +637,38 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
|
|||
{
|
||||
shift = ps_slice_hdr->s_wt_ofst.i1_chroma_log2_weight_denom
|
||||
+ SHIFT_14_MINUS_BIT_DEPTH;
|
||||
func_src_strd = pu_wd * (chroma_pixel_strd / h_samp_factor);
|
||||
func_dst_strd = ref_strd * (chroma_pixel_strd / h_samp_factor);
|
||||
|
||||
if(chroma_yuv420sp_vu)
|
||||
{
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_uni_fptr(ps_pu->b2_pred_mode == PRED_L0 ? pi2_tmp1 : pi2_tmp2,
|
||||
pu1_dst,
|
||||
pu_wd,
|
||||
ref_strd,
|
||||
func_src_strd,
|
||||
func_dst_strd,
|
||||
ps_pu->b2_pred_mode == PRED_L0 ? chroma_weight_l0_cr : chroma_weight_l1_cr,
|
||||
ps_pu->b2_pred_mode == PRED_L0 ? chroma_weight_l0_cb : chroma_weight_l1_cb,
|
||||
ps_pu->b2_pred_mode == PRED_L0 ? chroma_offset_l0_cr : chroma_offset_l1_cr,
|
||||
ps_pu->b2_pred_mode == PRED_L0 ? chroma_offset_l0_cb : chroma_offset_l1_cb,
|
||||
shift,
|
||||
lvl_shift1,
|
||||
pu_ht >> 1,
|
||||
pu_wd >> 1);
|
||||
pu_ht >> (is_yuv444 ? 0 : clr_indx),
|
||||
pu_wd >> (is_yuv420 ? clr_indx : 0));
|
||||
}
|
||||
else
|
||||
{
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_uni_fptr(ps_pu->b2_pred_mode == PRED_L0 ? pi2_tmp1 : pi2_tmp2,
|
||||
pu1_dst,
|
||||
pu_wd,
|
||||
ref_strd,
|
||||
func_src_strd,
|
||||
func_dst_strd,
|
||||
ps_pu->b2_pred_mode == PRED_L0 ? chroma_weight_l0_cb : chroma_weight_l1_cb,
|
||||
ps_pu->b2_pred_mode == PRED_L0 ? chroma_weight_l0_cr : chroma_weight_l1_cr,
|
||||
ps_pu->b2_pred_mode == PRED_L0 ? chroma_offset_l0_cb : chroma_offset_l1_cb,
|
||||
ps_pu->b2_pred_mode == PRED_L0 ? chroma_offset_l0_cr : chroma_offset_l1_cr,
|
||||
shift,
|
||||
lvl_shift1,
|
||||
pu_ht >> 1,
|
||||
pu_wd >> 1);
|
||||
pu_ht >> (is_yuv444 ? 0 : clr_indx),
|
||||
pu_wd >> (is_yuv420 ? clr_indx : 0));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -638,26 +677,33 @@ void ihevcd_inter_pred_ctb(process_ctxt_t *ps_proc)
|
|||
{
|
||||
lvl_shift1 = 0;
|
||||
lvl_shift2 = 0;
|
||||
|
||||
if((0 == clr_indx) && (ai2_xfrac[0] && ai2_yfrac[0]))
|
||||
lvl_shift1 = (1 << 13);
|
||||
|
||||
if((0 == clr_indx) && (ai2_xfrac[1] && ai2_yfrac[1]))
|
||||
lvl_shift2 = (1 << 13);
|
||||
|
||||
if(clr_indx != 0)
|
||||
func_src_strd = pu_wd;
|
||||
func_dst_strd = ref_strd;
|
||||
if (clr_indx != 0)
|
||||
{
|
||||
pu_ht = (pu_ht >> 1);
|
||||
func_src_strd *= (chroma_pixel_strd / h_samp_factor);
|
||||
func_dst_strd *= (chroma_pixel_strd / h_samp_factor);
|
||||
}
|
||||
func_ht = pu_ht >> (is_yuv444 ? 0 : clr_indx);
|
||||
func_wd = pu_wd << (is_yuv444 ? clr_indx : 0);
|
||||
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_bi_default_fptr(pi2_tmp1,
|
||||
pi2_tmp2,
|
||||
pu1_dst,
|
||||
pu_wd,
|
||||
pu_wd,
|
||||
ref_strd,
|
||||
func_src_strd,
|
||||
func_src_strd,
|
||||
func_dst_strd,
|
||||
lvl_shift1,
|
||||
lvl_shift2,
|
||||
pu_ht,
|
||||
pu_wd);
|
||||
func_ht,
|
||||
func_wd);
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
|
|
@ -44,12 +44,6 @@
|
|||
#define LOGO_WD_Y LOGO_WD
|
||||
#define LOGO_HT_Y LOGO_HT
|
||||
|
||||
#define LOGO_WD_RGBA8888 160
|
||||
#define LOGO_HT_RGBA8888 64
|
||||
|
||||
#define LOGO_WD_RGB565 160
|
||||
#define LOGO_HT_RGB565 64
|
||||
|
||||
#define LOGO_WD_444_UV LOGO_WD
|
||||
#define LOGO_HT_444_UV LOGO_HT
|
||||
|
||||
|
|
@ -63,15 +57,6 @@
|
|||
#define LOGO_WD_420SP_VU (LOGO_WD)
|
||||
#define LOGO_HT_420SP_VU (LOGO_HT >> 1)
|
||||
|
||||
#define LOGO_WD_422_UV (LOGO_WD >> 1)
|
||||
#define LOGO_HT_422_UV (LOGO_HT)
|
||||
|
||||
#define LOGO_WD_422V_UV (LOGO_WD)
|
||||
#define LOGO_HT_422V_UV (LOGO_HT >> 1)
|
||||
|
||||
#define LOGO_WD_411_UV (LOGO_WD >> 2)
|
||||
#define LOGO_HT_411_UV (LOGO_HT)
|
||||
|
||||
#define LOGO_CODEC_WD 80
|
||||
#define LOGO_CODEC_HT 24
|
||||
|
||||
|
|
@ -92,18 +77,6 @@
|
|||
#define LOGO_CODEC_WD_420SP_VU (LOGO_CODEC_WD)
|
||||
#define LOGO_CODEC_HT_420SP_VU (LOGO_CODEC_HT >> 1)
|
||||
|
||||
#define LOGO_CODEC_WD_422_UV (LOGO_CODEC_WD >> 1)
|
||||
#define LOGO_CODEC_HT_422_UV (LOGO_CODEC_HT)
|
||||
|
||||
#define LOGO_CODEC_WD_422V_UV (LOGO_CODEC_WD)
|
||||
#define LOGO_CODEC_HT_422V_UV (LOGO_CODEC_HT >> 1)
|
||||
|
||||
#define LOGO_CODEC_WD_411_UV (LOGO_CODEC_WD >> 2)
|
||||
#define LOGO_CODEC_HT_411_UV (LOGO_CODEC_HT)
|
||||
|
||||
|
||||
|
||||
|
||||
#define START_X_ITT_LOGO 0
|
||||
#define START_Y_ITT_LOGO 0
|
||||
|
||||
|
|
|
|||
|
|
@ -451,6 +451,7 @@ IHEVCD_ERROR_T ihevcd_nal_unit(codec_t *ps_codec)
|
|||
DEBUG_PRINT_NAL_INFO(ps_codec, s_nal.i1_nal_unit_type);
|
||||
break;
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
case NAL_PREFIX_SEI:
|
||||
case NAL_SUFFIX_SEI:
|
||||
if(IVD_DECODE_HEADER == ps_codec->i4_header_mode)
|
||||
|
|
@ -461,6 +462,7 @@ IHEVCD_ERROR_T ihevcd_nal_unit(codec_t *ps_codec)
|
|||
ret = ihevcd_parse_sei(ps_codec, &s_nal);
|
||||
break;
|
||||
|
||||
#endif
|
||||
case NAL_EOS :
|
||||
ps_codec->i4_cra_as_first_pic = 1;
|
||||
break;
|
||||
|
|
|
|||
|
|
@ -75,11 +75,12 @@
|
|||
|
||||
#define COPY_DEFAULT_SCALING_LIST(pi2_scaling_mat) \
|
||||
{ \
|
||||
WORD32 scaling_mat_offset[]={0, 16, 32, 48, 64, 80, 96, 160, 224, 288, 352, 416, 480, 736, 992, 1248, 1504, 1760, 2016, 3040}; \
|
||||
WORD32 scaling_mat_offset[] = {0, 16, 32, 48, 64, 80, 96, 160, 224, 288, 352, 416, \
|
||||
480, 736, 992, 1248, 1504, 1760, 2016, 3040, 4064, 5088, 6112, 7136}; \
|
||||
\
|
||||
/* scaling matrix for 4x4 */ \
|
||||
memcpy(pi2_scaling_mat, gi2_flat_scale_mat_32x32, 6*16*sizeof(WORD16)); \
|
||||
/* scaling matrix for 8x8 */ \
|
||||
/* scaling matrix for 8x8 */ \
|
||||
memcpy(pi2_scaling_mat + scaling_mat_offset[6], gi2_intra_default_scale_mat_8x8, 64*sizeof(WORD16)); \
|
||||
memcpy(pi2_scaling_mat + scaling_mat_offset[7], gi2_intra_default_scale_mat_8x8, 64*sizeof(WORD16)); \
|
||||
memcpy(pi2_scaling_mat + scaling_mat_offset[8], gi2_intra_default_scale_mat_8x8, 64*sizeof(WORD16)); \
|
||||
|
|
@ -95,12 +96,17 @@
|
|||
memcpy(pi2_scaling_mat + scaling_mat_offset[17], gi2_inter_default_scale_mat_16x16, 256*sizeof(WORD16)); \
|
||||
/* scaling matrix for 32x32 */ \
|
||||
memcpy(pi2_scaling_mat + scaling_mat_offset[18], gi2_intra_default_scale_mat_32x32, 1024*sizeof(WORD16)); \
|
||||
memcpy(pi2_scaling_mat + scaling_mat_offset[19], gi2_inter_default_scale_mat_32x32, 1024*sizeof(WORD16)); \
|
||||
memcpy(pi2_scaling_mat + scaling_mat_offset[19], gi2_intra_default_scale_mat_32x32, 1024*sizeof(WORD16)); \
|
||||
memcpy(pi2_scaling_mat + scaling_mat_offset[20], gi2_intra_default_scale_mat_32x32, 1024*sizeof(WORD16)); \
|
||||
memcpy(pi2_scaling_mat + scaling_mat_offset[21], gi2_inter_default_scale_mat_32x32, 1024*sizeof(WORD16)); \
|
||||
memcpy(pi2_scaling_mat + scaling_mat_offset[22], gi2_inter_default_scale_mat_32x32, 1024*sizeof(WORD16)); \
|
||||
memcpy(pi2_scaling_mat + scaling_mat_offset[23], gi2_inter_default_scale_mat_32x32, 1024*sizeof(WORD16)); \
|
||||
}
|
||||
|
||||
#define COPY_FLAT_SCALING_LIST(pi2_scaling_mat) \
|
||||
{ \
|
||||
WORD32 scaling_mat_offset[]={0, 16, 32, 48, 64, 80, 96, 160, 224, 288, 352, 416, 480, 736, 992, 1248, 1504, 1760, 2016, 3040}; \
|
||||
WORD32 scaling_mat_offset[] = {0, 16, 32, 48, 64, 80, 96, 160, 224, 288, 352, 416, \
|
||||
480, 736, 992, 1248, 1504, 1760, 2016, 3040, 4064, 5088, 6112, 7136}; \
|
||||
\
|
||||
/* scaling matrix for 4x4 */ \
|
||||
memcpy(pi2_scaling_mat, gi2_flat_scale_mat_32x32, 6*16*sizeof(WORD16)); \
|
||||
|
|
@ -110,8 +116,10 @@
|
|||
memcpy(pi2_scaling_mat + scaling_mat_offset[12], gi2_flat_scale_mat_32x32, 3*256*sizeof(WORD16)); \
|
||||
memcpy(pi2_scaling_mat + scaling_mat_offset[15], gi2_flat_scale_mat_32x32, 3*256*sizeof(WORD16)); \
|
||||
/* scaling matrix for 32x32 */ \
|
||||
memcpy(pi2_scaling_mat + scaling_mat_offset[18], gi2_flat_scale_mat_32x32, 1024*sizeof(WORD16)); \
|
||||
memcpy(pi2_scaling_mat + scaling_mat_offset[19], gi2_flat_scale_mat_32x32, 1024*sizeof(WORD16)); \
|
||||
for (WORD32 i = 0; i < 6; i++) \
|
||||
{ \
|
||||
memcpy(pi2_scaling_mat + scaling_mat_offset[18 + i], gi2_flat_scale_mat_32x32, 1024*sizeof(WORD16)); \
|
||||
} \
|
||||
}
|
||||
|
||||
/* Function declarations */
|
||||
|
|
@ -165,7 +173,7 @@ WORD32 ihevcd_parse_pred_wt_ofst(bitstrm_t *ps_bitstrm,
|
|||
}
|
||||
ps_wt_ofst->i1_luma_log2_weight_denom = u4_value;
|
||||
|
||||
if(ps_sps->i1_chroma_format_idc != 0)
|
||||
if(ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_MONOCHROME)
|
||||
{
|
||||
SEV_PARSE("delta_chroma_log2_weight_denom", value, ps_bitstrm);
|
||||
if((value < -7) || (value > 7))
|
||||
|
|
@ -189,7 +197,7 @@ WORD32 ihevcd_parse_pred_wt_ofst(bitstrm_t *ps_bitstrm,
|
|||
|
||||
|
||||
|
||||
if(ps_sps->i1_chroma_format_idc != 0)
|
||||
if(ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_MONOCHROME)
|
||||
{
|
||||
for(i = 0; i < ps_slice_hdr->i1_num_ref_idx_l0_active; i++)
|
||||
{
|
||||
|
|
@ -289,7 +297,7 @@ WORD32 ihevcd_parse_pred_wt_ofst(bitstrm_t *ps_bitstrm,
|
|||
ps_wt_ofst->i1_luma_weight_l1_flag[i] = value;
|
||||
}
|
||||
|
||||
if(ps_sps->i1_chroma_format_idc != 0)
|
||||
if(ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_MONOCHROME)
|
||||
{
|
||||
for(i = 0; i < ps_slice_hdr->i1_num_ref_idx_l1_active; i++)
|
||||
{
|
||||
|
|
@ -988,6 +996,22 @@ static WORD32 ihevcd_parse_vui_parameters(bitstrm_t *ps_bitstrm,
|
|||
return ret;
|
||||
}
|
||||
|
||||
static WORD32 ihevcd_get_profile(profile_tier_lvl_t *ps_ptl)
|
||||
{
|
||||
WORD32 profile = IHEVC_PROFILE_UNKNOWN;
|
||||
|
||||
if(ps_ptl->i1_profile_idc == 1 || ps_ptl->ai1_profile_compatibility_flag[1] == 1)
|
||||
profile = IHEVC_PROFILE_MAIN;
|
||||
else if(ps_ptl->i1_profile_idc == 3 || ps_ptl->ai1_profile_compatibility_flag[3] == 1)
|
||||
profile = IHEVC_PROFILE_MAIN_STILL;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
else if(ps_ptl->i1_profile_idc == 4 || ps_ptl->ai1_profile_compatibility_flag[4] == 1)
|
||||
profile = IHEVC_PROFILE_MAIN_REXT;
|
||||
#endif
|
||||
|
||||
return profile;
|
||||
}
|
||||
|
||||
/**
|
||||
*******************************************************************************
|
||||
*
|
||||
|
|
@ -1166,7 +1190,7 @@ static IHEVCD_ERROR_T ihevcd_profile_tier_level(bitstrm_t *ps_bitstrm,
|
|||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
IHEVCD_ERROR_T ihevcd_scaling_list_data(codec_t *ps_codec, WORD16 *pi2_scaling_mat)
|
||||
IHEVCD_ERROR_T ihevcd_scaling_list_data(codec_t *ps_codec, WORD16 *pi2_scaling_mat, WORD8 chroma_format_idc)
|
||||
{
|
||||
IHEVCD_ERROR_T ret = (IHEVCD_ERROR_T)IHEVCD_SUCCESS;
|
||||
WORD32 size_id;
|
||||
|
|
@ -1175,15 +1199,16 @@ IHEVCD_ERROR_T ihevcd_scaling_list_data(codec_t *ps_codec, WORD16 *pi2_scaling_
|
|||
UWORD32 u4_value;
|
||||
WORD32 next_coef;
|
||||
WORD32 coef_num;
|
||||
WORD32 i, j, offset;
|
||||
WORD32 i, j, k, offset;
|
||||
bitstrm_t *ps_bitstrm = &ps_codec->s_parse.s_bitstrm;
|
||||
WORD16 *pi2_scaling_mat_offset;
|
||||
WORD32 scaling_mat_offset[] = { 0, 16, 32, 48, 64, 80, 96, 160, 224, 288, 352, 416, 480, 736, 992, 1248, 1504, 1760, 2016, 3040 };
|
||||
WORD32 scaling_mat_offset[] = {0, 16, 32, 48, 64, 80, 96, 160, 224, 288, 352, 416,
|
||||
480, 736, 992, 1248, 1504, 1760, 2016, 3040, 4064, 5088, 6112, 7136};
|
||||
UWORD8 *scan_table;
|
||||
|
||||
for(size_id = 0; size_id < 4; size_id++)
|
||||
{
|
||||
for(matrix_id = 0; matrix_id < ((size_id == 3) ? 2 : 6); matrix_id++)
|
||||
for(matrix_id = 0; matrix_id < 6; matrix_id += (size_id == 3) ? 3 : 1)
|
||||
{
|
||||
WORD32 scaling_list_pred_mode_flag;
|
||||
WORD32 scaling_list_delta_coef;
|
||||
|
|
@ -1197,14 +1222,24 @@ IHEVCD_ERROR_T ihevcd_scaling_list_data(codec_t *ps_codec, WORD16 *pi2_scaling_
|
|||
WORD32 num_elements;
|
||||
UEV_PARSE("scaling_list_pred_matrix_id_delta", u4_value,
|
||||
ps_bitstrm);
|
||||
if(u4_value > matrix_id)
|
||||
if(size_id <= 2)
|
||||
{
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
if(u4_value > matrix_id)
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
}
|
||||
else
|
||||
{
|
||||
if(u4_value > matrix_id / 3)
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
num_elements = (1 << (4 + (size_id << 1)));
|
||||
if(0 != u4_value)
|
||||
memmove(pi2_scaling_mat_offset, pi2_scaling_mat_offset - u4_value * num_elements, num_elements * sizeof(WORD16));
|
||||
{
|
||||
memmove(pi2_scaling_mat_offset,
|
||||
pi2_scaling_mat_offset - (u4_value * (size_id == 3 ? 3 : 1)) * num_elements,
|
||||
num_elements * sizeof(WORD16));
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1294,6 +1329,40 @@ IHEVCD_ERROR_T ihevcd_scaling_list_data(codec_t *ps_codec, WORD16 *pi2_scaling_
|
|||
}
|
||||
}
|
||||
}
|
||||
// derive 32x32 CbCr scaling list from 16x16 CbCr scaling list
|
||||
if(chroma_format_idc == CHROMA_FMT_IDC_YUV444)
|
||||
{
|
||||
WORD32 matrix_ids[] = { 1, 2, 4, 5 };
|
||||
WORD16 *pi2_ref_scaling_mat;
|
||||
|
||||
scan_table = (UWORD8 *)gapv_ihevc_invscan[2];
|
||||
for(i = 0; i < 4; i++)
|
||||
{
|
||||
matrix_id = matrix_ids[i];
|
||||
pi2_ref_scaling_mat = pi2_scaling_mat + scaling_mat_offset[2 * 6 + matrix_id];
|
||||
pi2_scaling_mat_offset = pi2_scaling_mat + scaling_mat_offset[3 * 6 + matrix_id];
|
||||
|
||||
for(j = 0; j < 64; j++)
|
||||
{
|
||||
offset = scan_table[j];
|
||||
offset = (offset >> 3) * 16 * 2 + (offset & 0x7) * 2;
|
||||
// the index 0 value may be overwritten by scaling_list_dc_coef. pick its alternative
|
||||
next_coef = offset == 0 ? pi2_ref_scaling_mat[1] : pi2_ref_scaling_mat[offset];
|
||||
|
||||
offset = scan_table[j];
|
||||
offset = (offset >> 3) * 32 * 4 + (offset & 0x7) * 4;
|
||||
|
||||
for(k = 0; k < 4; k++)
|
||||
{
|
||||
pi2_scaling_mat_offset[offset + k * 32] = next_coef;
|
||||
pi2_scaling_mat_offset[offset + 1 + k * 32] = next_coef;
|
||||
pi2_scaling_mat_offset[offset + 2 + k * 32] = next_coef;
|
||||
pi2_scaling_mat_offset[offset + 3 + k * 32] = next_coef;
|
||||
}
|
||||
}
|
||||
pi2_scaling_mat_offset[0] = pi2_ref_scaling_mat[0];
|
||||
}
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
@ -1506,15 +1575,34 @@ IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec)
|
|||
{
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
}
|
||||
ps_sps->i1_chroma_format_idc = value;
|
||||
|
||||
if(ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_YUV420)
|
||||
WORD32 profile = ihevcd_get_profile(&ps_sps->s_ptl.s_ptl_gen);
|
||||
if(profile == IHEVC_PROFILE_UNKNOWN)
|
||||
{
|
||||
ps_codec->s_parse.i4_error_code = IHEVCD_UNSUPPORTED_CHROMA_FMT_IDC;
|
||||
return (IHEVCD_ERROR_T)IHEVCD_UNSUPPORTED_CHROMA_FMT_IDC;
|
||||
return IHEVCD_UNSUPPORTED_TOOL_SET;
|
||||
}
|
||||
|
||||
if(CHROMA_FMT_IDC_YUV444_PLANES == ps_sps->i1_chroma_format_idc)
|
||||
switch(value) {
|
||||
case CHROMA_FMT_IDC_MONOCHROME: {
|
||||
if (!(ps_codec->u4_enable_yuv_formats & (1 << CHROMA_FMT_IDC_MONOCHROME))) {
|
||||
ps_codec->s_parse.i4_error_code = IHEVCD_UNSUPPORTED_CHROMA_FMT_IDC;
|
||||
return (IHEVCD_ERROR_T)IHEVCD_UNSUPPORTED_CHROMA_FMT_IDC;
|
||||
}
|
||||
if(profile != IHEVC_PROFILE_MAIN_REXT)
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
}
|
||||
break;
|
||||
case CHROMA_FMT_IDC_YUV420:
|
||||
break;
|
||||
default: {
|
||||
ps_codec->s_parse.i4_error_code = IHEVCD_UNSUPPORTED_CHROMA_FMT_IDC;
|
||||
return (IHEVCD_ERROR_T)IHEVCD_UNSUPPORTED_CHROMA_FMT_IDC;
|
||||
}
|
||||
break;
|
||||
}
|
||||
ps_sps->i1_chroma_format_idc = value;
|
||||
|
||||
if(CHROMA_FMT_IDC_YUV444 == ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
BITS_PARSE("separate_colour_plane_flag", value, ps_bitstrm, 1);
|
||||
ps_sps->i1_separate_colour_plane_flag = value;
|
||||
|
|
@ -1749,7 +1837,7 @@ IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec)
|
|||
ps_sps->i1_sps_scaling_list_data_present_flag = value;
|
||||
|
||||
if(ps_sps->i1_sps_scaling_list_data_present_flag)
|
||||
ihevcd_scaling_list_data(ps_codec, ps_sps->pi2_scaling_mat);
|
||||
ihevcd_scaling_list_data(ps_codec, ps_sps->pi2_scaling_mat, ps_sps->i1_chroma_format_idc);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -1844,9 +1932,107 @@ IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec)
|
|||
&ps_sps->s_vui_parameters,
|
||||
ps_sps->i1_sps_max_sub_layers - 1);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
|
||||
if (0 != ps_codec->u4_allocate_dynamic_done) {
|
||||
|
||||
vui_t *ps_vui = &ps_sps->s_vui_parameters;
|
||||
sps_t *ps_sps_old = ps_codec->s_parse.ps_sps;
|
||||
vui_t *ps_vui_old = &ps_sps_old->s_vui_parameters;
|
||||
|
||||
if (ps_vui->u1_video_full_range_flag != ps_vui_old->u1_video_full_range_flag ||
|
||||
ps_vui->u1_colour_primaries != ps_vui_old->u1_colour_primaries ||
|
||||
ps_vui->u1_transfer_characteristics != ps_vui_old->u1_transfer_characteristics ||
|
||||
ps_vui->u1_matrix_coefficients != ps_vui_old->u1_matrix_coefficients) {
|
||||
ps_codec->i4_reset_flag = 1;
|
||||
return (IHEVCD_ERROR_T)IVD_RES_CHANGED;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
BITS_PARSE("sps_extension_flag", value, ps_bitstrm, 1);
|
||||
BITS_PARSE("sps_extension_present_flag", value, ps_bitstrm, 1);
|
||||
ps_sps->i1_sps_extension_present_flag = value;
|
||||
|
||||
if(ps_sps->i1_sps_extension_present_flag)
|
||||
{
|
||||
BITS_PARSE("sps_range_extension_flag", value, ps_bitstrm, 1);
|
||||
ps_sps->i1_sps_range_extension_flag = value;
|
||||
|
||||
BITS_PARSE("sps_multilayer_extension_flag", value, ps_bitstrm, 1);
|
||||
ps_sps->i1_sps_multilayer_extension_flag = value;
|
||||
|
||||
BITS_PARSE("sps_3d_extension_flag", value, ps_bitstrm, 1);
|
||||
ps_sps->i1_sps_3d_extension_flag = value;
|
||||
|
||||
BITS_PARSE("sps_scc_extension_flag", value, ps_bitstrm, 1);
|
||||
ps_sps->i1_sps_scc_extension_flag = value;
|
||||
|
||||
BITS_PARSE("sps_extension_4bits", value, ps_bitstrm, 4);
|
||||
ps_sps->i1_sps_extension_4bits = value;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
if(ps_sps->i1_sps_range_extension_flag)
|
||||
{
|
||||
/* ITU-T H.265 Section 7.3.2.2.2 Range extension sequence parameter set syntax */
|
||||
BITS_PARSE("transform_skip_rotation_enabled_flag", value, ps_bitstrm, 1);
|
||||
ps_sps->i1_transform_skip_rotation_enabled_flag = value;
|
||||
|
||||
BITS_PARSE("transform_skip_context_enabled_flag", value, ps_bitstrm, 1);
|
||||
ps_sps->i1_transform_skip_context_enabled_flag = value;
|
||||
|
||||
BITS_PARSE("implicit_rdpcm_enabled_flag", value, ps_bitstrm, 1);
|
||||
ps_sps->i1_implicit_rdpcm_enabled_flag = value;
|
||||
|
||||
BITS_PARSE("explicit_rdpcm_enabled_flag", value, ps_bitstrm, 1);
|
||||
ps_sps->i1_explicit_rdpcm_enabled_flag = value;
|
||||
|
||||
BITS_PARSE("extended_precision_processing_flag", value, ps_bitstrm, 1);
|
||||
ps_sps->i1_extended_precision_processing_flag = value;
|
||||
|
||||
BITS_PARSE("intra_smoothing_disabled_flag", value, ps_bitstrm, 1);
|
||||
ps_sps->i1_intra_smoothing_disabled_flag = value;
|
||||
|
||||
BITS_PARSE("high_precision_offsets_enabled_flag", value, ps_bitstrm, 1);
|
||||
ps_sps->i1_use_high_precision_pred_wt = value;
|
||||
|
||||
BITS_PARSE("persistent_rice_adaptation_enabled_flag", value, ps_bitstrm, 1);
|
||||
ps_sps->i1_persistent_rice_adaptation_enabled_flag = value;
|
||||
|
||||
BITS_PARSE("cabac_bypass_alignment_enabled_flag", value, ps_bitstrm, 1);
|
||||
ps_sps->i1_align_cabac_before_bypass = value;
|
||||
}
|
||||
if(profile != IHEVC_PROFILE_MAIN_REXT)
|
||||
{
|
||||
if(ps_sps->i1_transform_skip_rotation_enabled_flag
|
||||
|| ps_sps->i1_transform_skip_context_enabled_flag
|
||||
|| ps_sps->i1_implicit_rdpcm_enabled_flag
|
||||
|| ps_sps->i1_explicit_rdpcm_enabled_flag
|
||||
|| ps_sps->i1_extended_precision_processing_flag
|
||||
|| ps_sps->i1_intra_smoothing_disabled_flag
|
||||
|| ps_sps->i1_persistent_rice_adaptation_enabled_flag
|
||||
|| ps_sps->i1_align_cabac_before_bypass)
|
||||
{
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
if(ps_sps->i1_extended_precision_processing_flag || ps_sps->i1_align_cabac_before_bypass)
|
||||
{
|
||||
// main-rext 8-bit profiles require these fields to be off
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
}
|
||||
if(ps_sps->i1_sps_multilayer_extension_flag || ps_sps->i1_sps_3d_extension_flag
|
||||
|| ps_sps->i1_sps_scc_extension_flag)
|
||||
{
|
||||
return IHEVCD_UNSUPPORTED_TOOL_SET;
|
||||
}
|
||||
#else
|
||||
if(ps_sps->i1_sps_range_extension_flag || ps_sps->i1_sps_multilayer_extension_flag
|
||||
|| ps_sps->i1_sps_3d_extension_flag || ps_sps->i1_sps_scc_extension_flag)
|
||||
{
|
||||
// TODO: add support for parsing these syntax elements
|
||||
return IHEVCD_UNSUPPORTED_TOOL_SET;
|
||||
}
|
||||
#endif
|
||||
|
||||
if((UWORD8 *)ps_bitstrm->pu4_buf > ps_bitstrm->pu1_buf_max)
|
||||
{
|
||||
|
|
@ -1893,13 +2079,33 @@ IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec)
|
|||
return (IHEVCD_ERROR_T)IVD_RES_CHANGED;
|
||||
}
|
||||
|
||||
// Ensure both i2_pic_width_in_luma_samples and i2_pic_height_in_luma_samples do
|
||||
// not exceed MAX_WD and their product doesn't exceed MAX_WD * MAX_HT
|
||||
if((ps_sps->i2_pic_width_in_luma_samples > MAX_WD) ||
|
||||
(ps_sps->i2_pic_height_in_luma_samples > MAX_WD) ||
|
||||
((ps_sps->i2_pic_width_in_luma_samples * ps_sps->i2_pic_height_in_luma_samples) >
|
||||
(MAX_WD * MAX_HT)))
|
||||
{
|
||||
return (IHEVCD_ERROR_T)IVD_STREAM_WIDTH_HEIGHT_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
// limit format conversions
|
||||
if(ps_codec->e_chroma_fmt == IV_YUV_444P
|
||||
&& ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_YUV444)
|
||||
{
|
||||
return (IHEVCD_ERROR_T)IVD_INIT_DEC_COL_FMT_NOT_SUPPORTED;
|
||||
}
|
||||
if(ps_codec->e_chroma_fmt == IV_YUV_422P
|
||||
&& ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_YUV422)
|
||||
{
|
||||
return (IHEVCD_ERROR_T)IVD_INIT_DEC_COL_FMT_NOT_SUPPORTED;
|
||||
}
|
||||
if((ps_codec->e_chroma_fmt == IV_YUV_420SP_UV || ps_codec->e_chroma_fmt == IV_YUV_420SP_VU)
|
||||
&& ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_YUV420)
|
||||
{
|
||||
return (IHEVCD_ERROR_T)IVD_INIT_DEC_COL_FMT_NOT_SUPPORTED;
|
||||
}
|
||||
|
||||
/* Update display width and display height */
|
||||
{
|
||||
WORD32 disp_wd, disp_ht;
|
||||
|
|
@ -1912,6 +2118,11 @@ IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec)
|
|||
crop_unit_x = 2;
|
||||
crop_unit_y = 2;
|
||||
}
|
||||
else if(CHROMA_FMT_IDC_YUV422 == ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
crop_unit_x = 2;
|
||||
crop_unit_y = 1;
|
||||
}
|
||||
|
||||
disp_wd = ps_sps->i2_pic_width_in_luma_samples;
|
||||
disp_wd -= ps_sps->i2_pic_crop_left_offset * crop_unit_x;
|
||||
|
|
@ -2399,7 +2610,7 @@ IHEVCD_ERROR_T ihevcd_parse_pps(codec_t *ps_codec)
|
|||
if(ps_pps->i1_pps_scaling_list_data_present_flag)
|
||||
{
|
||||
COPY_DEFAULT_SCALING_LIST(ps_pps->pi2_scaling_mat);
|
||||
ihevcd_scaling_list_data(ps_codec, ps_pps->pi2_scaling_mat);
|
||||
ihevcd_scaling_list_data(ps_codec, ps_pps->pi2_scaling_mat, ps_sps->i1_chroma_format_idc);
|
||||
}
|
||||
|
||||
BITS_PARSE("lists_modification_present_flag", value, ps_bitstrm, 1);
|
||||
|
|
@ -2413,8 +2624,117 @@ IHEVCD_ERROR_T ihevcd_parse_pps(codec_t *ps_codec)
|
|||
|
||||
BITS_PARSE("slice_header_extension_present_flag", value, ps_bitstrm, 1);
|
||||
ps_pps->i1_slice_header_extension_present_flag = value;
|
||||
/* Not present in HM */
|
||||
BITS_PARSE("pps_extension_flag", value, ps_bitstrm, 1);
|
||||
|
||||
BITS_PARSE("pps_extension_present_flag", value, ps_bitstrm, 1);
|
||||
ps_pps->i1_pps_extension_present_flag = value;
|
||||
|
||||
if(ps_pps->i1_pps_extension_present_flag)
|
||||
{
|
||||
BITS_PARSE("pps_range_extension_flag", value, ps_bitstrm, 1);
|
||||
ps_pps->i1_pps_range_extension_flag = value;
|
||||
|
||||
BITS_PARSE("pps_multilayer_extension_flag", value, ps_bitstrm, 1);
|
||||
ps_pps->i1_pps_multilayer_extension_flag = value;
|
||||
|
||||
BITS_PARSE("pps_3d_extension_flag", value, ps_bitstrm, 1);
|
||||
ps_pps->i1_pps_3d_extension_flag = value;
|
||||
|
||||
BITS_PARSE("pps_scc_extension_flag", value, ps_bitstrm, 1);
|
||||
ps_pps->i1_pps_scc_extension_flag = value;
|
||||
|
||||
BITS_PARSE("pps_extension_4bits", value, ps_bitstrm, 4);
|
||||
ps_pps->i1_pps_extension_4bits = value;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
if(ps_pps->i1_pps_range_extension_flag)
|
||||
{
|
||||
/* ITU-T H.265 Section 7.3.2.3.2 Range extension PPS syntax */
|
||||
if(ps_pps->i1_transform_skip_enabled_flag)
|
||||
{
|
||||
UEV_PARSE("log2_max_transform_skip_block_size_minus2", value, ps_bitstrm);
|
||||
ps_pps->i1_log2_max_transform_skip_block_size_minus2 = value;
|
||||
}
|
||||
|
||||
BITS_PARSE("cross_component_prediction_enabled_flag", value, ps_bitstrm, 1);
|
||||
ps_pps->i1_cross_component_prediction_enabled_flag = value;
|
||||
|
||||
// Parse other bits to maintain bitstream alignment
|
||||
BITS_PARSE("chroma_qp_offset_list_enabled_flag", value, ps_bitstrm, 1);
|
||||
ps_pps->i1_chroma_qp_offset_list_enabled_flag = value;
|
||||
|
||||
if(ps_pps->i1_chroma_qp_offset_list_enabled_flag)
|
||||
{
|
||||
UEV_PARSE("diff_cu_chroma_qp_offset_depth", value, ps_bitstrm);
|
||||
ps_pps->i4_diff_cu_chroma_qp_offset_depth = value;
|
||||
|
||||
UEV_PARSE("chroma_qp_offset_list_len_minus1", value, ps_bitstrm);
|
||||
ps_pps->i4_chroma_qp_offset_list_len_minus1 = value;
|
||||
if(ps_pps->i4_chroma_qp_offset_list_len_minus1 < 0
|
||||
|| ps_pps->i4_chroma_qp_offset_list_len_minus1 > 5)
|
||||
{
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
for(int i = 0; i <= ps_pps->i4_chroma_qp_offset_list_len_minus1; i++)
|
||||
{
|
||||
// cb_qp_offset_list[i] (se-v)
|
||||
SEV_PARSE("cb_qp_offset_list", value, ps_bitstrm);
|
||||
ps_pps->i4_cb_qp_offset_list[i] = value;
|
||||
|
||||
// cr_qp_offset_list[i] (se-v)
|
||||
SEV_PARSE("cr_qp_offset_list", value, ps_bitstrm);
|
||||
ps_pps->i4_cr_qp_offset_list[i] = value;
|
||||
}
|
||||
}
|
||||
|
||||
// log2_sao_offset_scale_luma (ue-v)
|
||||
UEV_PARSE("log2_sao_ofst_scale_luma", value, ps_bitstrm);
|
||||
ps_pps->i1_log2_sao_ofst_scale_luma = value;
|
||||
|
||||
// log2_sao_offset_scale_chroma (ue-v)
|
||||
UEV_PARSE("log2_sao_ofst_scale_chroma", value, ps_bitstrm);
|
||||
ps_pps->i1_log2_sao_ofst_scale_chroma = value;
|
||||
}
|
||||
|
||||
WORD32 profile = ihevcd_get_profile(&ps_sps->s_ptl.s_ptl_gen);
|
||||
if(profile != IHEVC_PROFILE_MAIN_REXT)
|
||||
{
|
||||
if(ps_pps->i1_log2_max_transform_skip_block_size_minus2
|
||||
|| ps_pps->i1_cross_component_prediction_enabled_flag
|
||||
|| ps_pps->i1_chroma_qp_offset_list_enabled_flag
|
||||
|| ps_pps->i1_log2_sao_ofst_scale_luma
|
||||
|| ps_pps->i1_log2_sao_ofst_scale_chroma)
|
||||
{
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
}
|
||||
}
|
||||
if(ps_pps->i1_log2_sao_ofst_scale_luma
|
||||
|| ps_pps->i1_log2_sao_ofst_scale_chroma)
|
||||
{
|
||||
// main-rext 8-bit profiles require these fields to be off
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
}
|
||||
|
||||
if(ps_pps->i1_chroma_qp_offset_list_enabled_flag)
|
||||
{
|
||||
// TODO: decoder does not yet supports these tool-sets
|
||||
return IHEVCD_UNSUPPORTED_TOOL_SET;
|
||||
}
|
||||
if(ps_pps->i1_pps_multilayer_extension_flag || ps_pps->i1_pps_3d_extension_flag
|
||||
|| ps_pps->i1_pps_scc_extension_flag)
|
||||
{
|
||||
// TODO: add support for parsing these syntax elements
|
||||
return IHEVCD_UNSUPPORTED_TOOL_SET;
|
||||
}
|
||||
#else
|
||||
if(ps_pps->i1_pps_range_extension_flag || ps_pps->i1_pps_multilayer_extension_flag
|
||||
|| ps_pps->i1_pps_3d_extension_flag || ps_pps->i1_pps_scc_extension_flag)
|
||||
{
|
||||
// TODO: add support for parsing these syntax elements
|
||||
return IHEVCD_UNSUPPORTED_TOOL_SET;
|
||||
}
|
||||
#endif
|
||||
|
||||
if((UWORD8 *)ps_bitstrm->pu4_buf > ps_bitstrm->pu1_buf_max)
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
|
|
@ -2457,6 +2777,7 @@ void ihevcd_copy_pps(codec_t *ps_codec, WORD32 pps_id, WORD32 pps_id_ref)
|
|||
}
|
||||
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
IHEVCD_ERROR_T ihevcd_parse_buffering_period_sei(codec_t *ps_codec,
|
||||
sps_t *ps_sps)
|
||||
{
|
||||
|
|
@ -3167,6 +3488,7 @@ IHEVCD_ERROR_T ihevcd_parse_sei(codec_t *ps_codec, nal_header_t *ps_nal)
|
|||
|
||||
return ret;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
*******************************************************************************
|
||||
|
|
|
|||
|
|
@ -42,12 +42,14 @@ void ihevcd_copy_slice_hdr(codec_t *ps_codec, WORD32 slice_idx, WORD32 slice_idx
|
|||
IHEVCD_ERROR_T ihevcd_parse_vps(codec_t *ps_codec);
|
||||
IHEVCD_ERROR_T ihevcd_parse_sps(codec_t *ps_codec);
|
||||
IHEVCD_ERROR_T ihevcd_parse_pps(codec_t *ps_codec);
|
||||
#ifndef DISABLE_SEI
|
||||
IHEVCD_ERROR_T ihevcd_parse_sei(codec_t *ps_codec, nal_header_t *ps_nal);
|
||||
IHEVCD_ERROR_T ihevcd_parse_pic_timing_sei(codec_t *ps_codec, sps_t *ps_sps);
|
||||
IHEVCD_ERROR_T ihevcd_parse_buffering_period_sei(codec_t *ps_codec, sps_t *ps_sps);
|
||||
IHEVCD_ERROR_T ihevcd_parse_time_code_sei(codec_t *ps_codec);
|
||||
IHEVCD_ERROR_T ihevcd_parse_user_data_registered_itu_t_t35(codec_t *ps_codec, UWORD32 u4_payload_size);
|
||||
IHEVCD_ERROR_T ihevcd_parse_active_parameter_sets_sei(codec_t *ps_codec, sps_t *ps_sps);
|
||||
#endif
|
||||
IHEVCD_ERROR_T ihevcd_read_rbsp_trailing_bits(codec_t *ps_codec, UWORD32 u4_bits_left);
|
||||
IHEVCD_ERROR_T ihevcd_parse_slice_header(codec_t *ps_codec,
|
||||
nal_header_t *ps_nal);
|
||||
|
|
|
|||
|
|
@ -185,7 +185,11 @@ WORD32 ihevcd_parse_residual_coding(codec_t *ps_codec,
|
|||
{
|
||||
IHEVCD_ERROR_T ret = (IHEVCD_ERROR_T)IHEVCD_SUCCESS;
|
||||
WORD32 transform_skip_flag;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
WORD32 explicit_rdpcm_flag, explicit_rdpcm_dir;
|
||||
#endif
|
||||
WORD32 value;
|
||||
sps_t *ps_sps;
|
||||
pps_t *ps_pps;
|
||||
WORD32 last_scan_pos, last_sub_blk;
|
||||
bitstrm_t *ps_bitstrm = &ps_codec->s_parse.s_bitstrm;
|
||||
|
|
@ -205,13 +209,23 @@ WORD32 ihevcd_parse_residual_coding(codec_t *ps_codec,
|
|||
WORD32 sig_coeff_base_ctxt, abs_gt1_base_ctxt;
|
||||
UNUSED(x0);
|
||||
UNUSED(y0);
|
||||
ps_sps = ps_codec->s_parse.ps_sps;
|
||||
ps_pps = ps_codec->s_parse.ps_pps;
|
||||
|
||||
sign_data_hiding_flag = ps_pps->i1_sign_data_hiding_flag;
|
||||
transform_skip_flag = 0;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
explicit_rdpcm_flag = 0;
|
||||
explicit_rdpcm_dir = 0;
|
||||
#endif
|
||||
if(ps_pps->i1_transform_skip_enabled_flag &&
|
||||
!ps_codec->s_parse.s_cu.i4_cu_transquant_bypass &&
|
||||
(log2_trafo_size == 2))
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
(log2_trafo_size <= ps_pps->i1_log2_max_transform_skip_block_size_minus2 + 2)
|
||||
#else
|
||||
(log2_trafo_size == 2)
|
||||
#endif
|
||||
)
|
||||
{
|
||||
WORD32 ctxt_idx;
|
||||
|
||||
|
|
@ -231,6 +245,29 @@ WORD32 ihevcd_parse_residual_coding(codec_t *ps_codec,
|
|||
transform_skip_flag = value;
|
||||
}
|
||||
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
if(PRED_MODE_INTER == ps_codec->s_parse.s_cu.i4_pred_mode
|
||||
&& ps_sps->i1_explicit_rdpcm_enabled_flag
|
||||
&& (transform_skip_flag || ps_codec->s_parse.s_cu.i4_cu_transquant_bypass))
|
||||
|
||||
{
|
||||
WORD32 ctxt_idx = IHEVC_CAB_EXPLICIT_RDPCM_FLAG + (c_idx != 0);
|
||||
TRACE_CABAC_CTXT("explicit_rdpcm_flag", ps_cabac->u4_range, ctxt_idx);
|
||||
value = ihevcd_cabac_decode_bin(ps_cabac, ps_bitstrm, ctxt_idx);
|
||||
AEV_TRACE("explicit_rdpcm_flag", value, ps_cabac->u4_range);
|
||||
explicit_rdpcm_flag = value;
|
||||
|
||||
if(explicit_rdpcm_flag)
|
||||
{
|
||||
ctxt_idx = IHEVC_CAB_EXPLICIT_RDPCM_DIR + (c_idx != 0);
|
||||
TRACE_CABAC_CTXT("explicit_rdpcm_dir_flag", ps_cabac->u4_range, ctxt_idx);
|
||||
value = ihevcd_cabac_decode_bin(ps_cabac, ps_bitstrm, ctxt_idx);
|
||||
AEV_TRACE("explicit_rdpcm_dir_flag", value, ps_cabac->u4_range);
|
||||
explicit_rdpcm_dir = value;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* code the last_coeff_x_prefix as tunary binarized code */
|
||||
{
|
||||
WORD32 ctxt_idx_x, ctxt_idx_y, ctx_shift;
|
||||
|
|
@ -311,7 +348,8 @@ WORD32 ihevcd_parse_residual_coding(codec_t *ps_codec,
|
|||
scan_idx = SCAN_DIAG_UPRIGHT;
|
||||
if(PRED_MODE_INTRA == ps_codec->s_parse.s_cu.i4_pred_mode)
|
||||
{
|
||||
if((2 == log2_trafo_size) || ((3 == log2_trafo_size) && (0 == c_idx)))
|
||||
int is_YUV444 = ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV444;
|
||||
if((2 == log2_trafo_size) || ((3 == log2_trafo_size) && (0 == c_idx || is_YUV444)))
|
||||
{
|
||||
if((6 <= intra_pred_mode) &&
|
||||
(14 >= intra_pred_mode))
|
||||
|
|
@ -343,9 +381,15 @@ WORD32 ihevcd_parse_residual_coding(codec_t *ps_codec,
|
|||
/* This will be updated later */
|
||||
*pi1_num_coded_subblks = 0;
|
||||
|
||||
/* Second WORD8 gives (scan idx << 1) | trans_skip */
|
||||
pi1_scan_idx = pi1_buf++;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
/* Second WORD8 gives (explicit_rdpcm_dir << 5) | (explicit_rdpcm_flag << 4) | (scan idx << 1) | trans_skip */
|
||||
*pi1_scan_idx = (explicit_rdpcm_dir << 5) | (explicit_rdpcm_flag << 4) | (scan_idx << 1)
|
||||
| transform_skip_flag;
|
||||
#else
|
||||
/* Second WORD8 gives (scan idx << 1) | trans_skip */
|
||||
*pi1_scan_idx = (scan_idx << 1) | transform_skip_flag;
|
||||
#endif
|
||||
|
||||
/* Store the incremented pointer in pv_tu_coeff_data */
|
||||
ps_codec->s_parse.pv_tu_coeff_data = pi1_buf;
|
||||
|
|
@ -473,6 +517,9 @@ WORD32 ihevcd_parse_residual_coding(codec_t *ps_codec,
|
|||
WORD32 rice_param;
|
||||
WORD32 xs, ys;
|
||||
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
WORD8 i1_update_stats = ps_sps->i1_persistent_rice_adaptation_enabled_flag;
|
||||
#endif
|
||||
|
||||
sub_blk_pos = 0;
|
||||
if(i && (log2_trafo_size > 2))
|
||||
|
|
@ -572,7 +619,18 @@ WORD32 ihevcd_parse_residual_coding(codec_t *ps_codec,
|
|||
//coeff_pos = pu1_scan_coeff[n];
|
||||
/* derive the context inc as per section 9.3.3.1.4 */
|
||||
sig_ctxinc = 0;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
if(ps_sps->i1_transform_skip_context_enabled_flag
|
||||
&& (ps_codec->s_parse.s_cu.i4_cu_transquant_bypass
|
||||
|| transform_skip_flag))
|
||||
{
|
||||
sig_coeff_base_ctxt = IHEVC_CAB_COEFF_FLAG;
|
||||
sig_coeff_base_ctxt += (0 == c_idx) ? 42 : 43;
|
||||
}
|
||||
else if(2 == log2_trafo_size)
|
||||
#else
|
||||
if(2 == log2_trafo_size)
|
||||
#endif
|
||||
{
|
||||
|
||||
/* 4x4 transform size increment uses lookup */
|
||||
|
|
@ -727,7 +785,26 @@ WORD32 ihevcd_parse_residual_coding(codec_t *ps_codec,
|
|||
/* At this level u4_sig_coeff_map is non-zero i.e. has atleast one non-zero coeff */
|
||||
last_sig_scan_pos = (31 - CLZ(u4_sig_coeff_map));
|
||||
first_sig_scan_pos = CTZ(u4_sig_coeff_map);
|
||||
sign_hidden = (((last_sig_scan_pos - first_sig_scan_pos) > 3) && !ps_codec->s_parse.s_cu.i4_cu_transquant_bypass);
|
||||
|
||||
if(ps_codec->s_parse.s_cu.i4_cu_transquant_bypass
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
|| explicit_rdpcm_flag
|
||||
#endif
|
||||
|| (PRED_MODE_INTRA == ps_codec->s_parse.s_cu.i4_pred_mode
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
&& ps_sps->i1_implicit_rdpcm_enabled_flag
|
||||
#else
|
||||
&& 0
|
||||
#endif
|
||||
&& transform_skip_flag
|
||||
&& (intra_pred_mode == 10 || intra_pred_mode == 26)))
|
||||
{
|
||||
sign_hidden = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
sign_hidden = ((last_sig_scan_pos - first_sig_scan_pos) > 3);
|
||||
}
|
||||
|
||||
u4_coeff_abs_level_greater2_map = 0;
|
||||
|
||||
|
|
@ -766,7 +843,22 @@ WORD32 ihevcd_parse_residual_coding(codec_t *ps_codec,
|
|||
|
||||
num_sig_coeff = 0;
|
||||
sum_abs_level = 0;
|
||||
rice_param = 0;
|
||||
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
WORD32 sb_type = 2 * (c_idx == 0 ? 1 : 0);
|
||||
if(ps_sps->i1_persistent_rice_adaptation_enabled_flag)
|
||||
{
|
||||
if(!(transform_skip_flag == 0 && ps_codec->s_parse.s_cu.i4_cu_transquant_bypass == 0))
|
||||
{
|
||||
sb_type += 1;
|
||||
}
|
||||
rice_param = ps_cabac->ai4_rice_stat_coeff[sb_type] / 4;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
rice_param = 0;
|
||||
}
|
||||
{
|
||||
UWORD32 clz;
|
||||
UWORD32 u4_sig_coeff_map_shift;
|
||||
|
|
@ -852,10 +944,36 @@ WORD32 ihevcd_parse_residual_coding(codec_t *ps_codec,
|
|||
}
|
||||
|
||||
/* update the rice param based on coeff level */
|
||||
if((base_lvl > (3 << rice_param)) && (rice_param < 4))
|
||||
if(base_lvl > (3 << rice_param))
|
||||
{
|
||||
rice_param++;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
if(ps_sps->i1_persistent_rice_adaptation_enabled_flag)
|
||||
{
|
||||
rice_param += 1;
|
||||
}
|
||||
else
|
||||
#endif
|
||||
{
|
||||
rice_param = MIN((rice_param + 1), 4);
|
||||
}
|
||||
}
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
if(i1_update_stats)
|
||||
{
|
||||
if(coeff_abs_level_remaining
|
||||
>= (3 << (ps_cabac->ai4_rice_stat_coeff[sb_type] / 4)))
|
||||
{
|
||||
ps_cabac->ai4_rice_stat_coeff[sb_type]++;
|
||||
}
|
||||
else if((2 * coeff_abs_level_remaining
|
||||
< (1 << (ps_cabac->ai4_rice_stat_coeff[sb_type] / 4)))
|
||||
&& ps_cabac->ai4_rice_stat_coeff[sb_type] > 0)
|
||||
{
|
||||
ps_cabac->ai4_rice_stat_coeff[sb_type]--;
|
||||
}
|
||||
i1_update_stats = 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* Compute absolute level */
|
||||
level = base_lvl;
|
||||
|
|
|
|||
|
|
@ -120,7 +120,8 @@ WORD32 ihevcd_parse_transform_tree(codec_t *ps_codec,
|
|||
WORD32 log2_trafo_size,
|
||||
WORD32 trafo_depth,
|
||||
WORD32 blk_idx,
|
||||
WORD32 intra_pred_mode)
|
||||
WORD32 intra_pred_mode,
|
||||
WORD32 chroma_intra_pred_mode_idx)
|
||||
{
|
||||
IHEVCD_ERROR_T ret = (IHEVCD_ERROR_T)IHEVCD_SUCCESS;
|
||||
sps_t *ps_sps;
|
||||
|
|
@ -180,13 +181,30 @@ WORD32 ihevcd_parse_transform_tree(codec_t *ps_codec,
|
|||
{
|
||||
ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth] = 0;
|
||||
ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth] = 0;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV422)
|
||||
{
|
||||
ps_codec->s_parse.s_cu.ai1_cbf_cr_subtu[trafo_depth] = 0;
|
||||
ps_codec->s_parse.s_cu.ai1_cbf_cb_subtu[trafo_depth] = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth] = ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth - 1];
|
||||
ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth] = ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth - 1];
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV422)
|
||||
{
|
||||
ps_codec->s_parse.s_cu.ai1_cbf_cb_subtu[trafo_depth] =
|
||||
ps_codec->s_parse.s_cu.ai1_cbf_cb_subtu[trafo_depth - 1];
|
||||
ps_codec->s_parse.s_cu.ai1_cbf_cr_subtu[trafo_depth] =
|
||||
ps_codec->s_parse.s_cu.ai1_cbf_cr_subtu[trafo_depth - 1];
|
||||
}
|
||||
#endif
|
||||
}
|
||||
if(trafo_depth == 0 || log2_trafo_size > 2)
|
||||
if ((CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc && log2_trafo_size > 2) ||
|
||||
ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV444)
|
||||
{
|
||||
ctxt_idx = IHEVC_CAB_CBCR_IDX + trafo_depth;
|
||||
/* CBF for Cb/Cr is sent only if the parent CBF for Cb/Cr is non-zero */
|
||||
|
|
@ -196,6 +214,16 @@ WORD32 ihevcd_parse_transform_tree(codec_t *ps_codec,
|
|||
value = ihevcd_cabac_decode_bin(ps_cabac, ps_bitstrm, ctxt_idx);
|
||||
AEV_TRACE("cbf_cb", value, ps_cabac->u4_range);
|
||||
ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth] = value;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV422
|
||||
&& (!split_transform_flag || log2_trafo_size == 3))
|
||||
{
|
||||
TRACE_CABAC_CTXT("cbf_cb", ps_cabac->u4_range, ctxt_idx);
|
||||
value = ihevcd_cabac_decode_bin(ps_cabac, ps_bitstrm, ctxt_idx);
|
||||
AEV_TRACE("cbf_cb", value, ps_cabac->u4_range);
|
||||
ps_codec->s_parse.s_cu.ai1_cbf_cb_subtu[trafo_depth] = value;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if((trafo_depth == 0) || ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth - 1])
|
||||
|
|
@ -204,11 +232,22 @@ WORD32 ihevcd_parse_transform_tree(codec_t *ps_codec,
|
|||
value = ihevcd_cabac_decode_bin(ps_cabac, ps_bitstrm, ctxt_idx);
|
||||
AEV_TRACE("cbf_cr", value, ps_cabac->u4_range);
|
||||
ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth] = value;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV422
|
||||
&& (!split_transform_flag || log2_trafo_size == 3))
|
||||
{
|
||||
TRACE_CABAC_CTXT("cbf_cr", ps_cabac->u4_range, ctxt_idx);
|
||||
value = ihevcd_cabac_decode_bin(ps_cabac, ps_bitstrm, ctxt_idx);
|
||||
AEV_TRACE("cbf_cr", value, ps_cabac->u4_range);
|
||||
ps_codec->s_parse.s_cu.ai1_cbf_cr_subtu[trafo_depth] = value;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
}
|
||||
if(split_transform_flag)
|
||||
{
|
||||
WORD32 intra_pred_mode_tmp;
|
||||
WORD32 chroma_intra_pred_mode_tmp_idx = ps_codec->s_parse.s_cu.ai4_intra_chroma_pred_mode_idx[0];
|
||||
x1 = x0 + ((1 << log2_trafo_size) >> 1);
|
||||
y1 = y0 + ((1 << log2_trafo_size) >> 1);
|
||||
|
||||
|
|
@ -217,19 +256,27 @@ WORD32 ihevcd_parse_transform_tree(codec_t *ps_codec,
|
|||
/* When depth is non-zero intra pred mode of parent node is sent */
|
||||
/* This takes care of passing correct mode to all the child nodes */
|
||||
intra_pred_mode_tmp = trafo_depth ? intra_pred_mode : ps_codec->s_parse.s_cu.ai4_intra_luma_pred_mode[0];
|
||||
ret = ihevcd_parse_transform_tree(ps_codec, x0, y0, x0, y0, log2_trafo_size - 1, trafo_depth + 1, 0, intra_pred_mode_tmp);
|
||||
if (ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV444)
|
||||
chroma_intra_pred_mode_tmp_idx = trafo_depth ? chroma_intra_pred_mode_idx : ps_codec->s_parse.s_cu.ai4_intra_chroma_pred_mode_idx[0];
|
||||
ret = ihevcd_parse_transform_tree(ps_codec, x0, y0, x0, y0, log2_trafo_size - 1, trafo_depth + 1, 0, intra_pred_mode_tmp, chroma_intra_pred_mode_tmp_idx);
|
||||
RETURN_IF((IHEVCD_ERROR_T)IHEVCD_SUCCESS != ret, ret);
|
||||
|
||||
intra_pred_mode_tmp = trafo_depth ? intra_pred_mode : ps_codec->s_parse.s_cu.ai4_intra_luma_pred_mode[1];
|
||||
ret = ihevcd_parse_transform_tree(ps_codec, x1, y0, x0, y0, log2_trafo_size - 1, trafo_depth + 1, 1, intra_pred_mode_tmp);
|
||||
if (ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV444)
|
||||
chroma_intra_pred_mode_tmp_idx = trafo_depth ? chroma_intra_pred_mode_idx : ps_codec->s_parse.s_cu.ai4_intra_chroma_pred_mode_idx[1];
|
||||
ret = ihevcd_parse_transform_tree(ps_codec, x1, y0, x0, y0, log2_trafo_size - 1, trafo_depth + 1, 1, intra_pred_mode_tmp, chroma_intra_pred_mode_tmp_idx);
|
||||
RETURN_IF((IHEVCD_ERROR_T)IHEVCD_SUCCESS != ret, ret);
|
||||
|
||||
intra_pred_mode_tmp = trafo_depth ? intra_pred_mode : ps_codec->s_parse.s_cu.ai4_intra_luma_pred_mode[2];
|
||||
ret = ihevcd_parse_transform_tree(ps_codec, x0, y1, x0, y0, log2_trafo_size - 1, trafo_depth + 1, 2, intra_pred_mode_tmp);
|
||||
if (ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV444)
|
||||
chroma_intra_pred_mode_tmp_idx = trafo_depth ? chroma_intra_pred_mode_idx : ps_codec->s_parse.s_cu.ai4_intra_chroma_pred_mode_idx[2];
|
||||
ret = ihevcd_parse_transform_tree(ps_codec, x0, y1, x0, y0, log2_trafo_size - 1, trafo_depth + 1, 2, intra_pred_mode_tmp, chroma_intra_pred_mode_tmp_idx);
|
||||
RETURN_IF((IHEVCD_ERROR_T)IHEVCD_SUCCESS != ret, ret);
|
||||
|
||||
intra_pred_mode_tmp = trafo_depth ? intra_pred_mode : ps_codec->s_parse.s_cu.ai4_intra_luma_pred_mode[3];
|
||||
ret = ihevcd_parse_transform_tree(ps_codec, x1, y1, x0, y0, log2_trafo_size - 1, trafo_depth + 1, 3, intra_pred_mode_tmp);
|
||||
if (ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV444)
|
||||
chroma_intra_pred_mode_tmp_idx = trafo_depth ? chroma_intra_pred_mode_idx : ps_codec->s_parse.s_cu.ai4_intra_chroma_pred_mode_idx[3];
|
||||
ret = ihevcd_parse_transform_tree(ps_codec, x1, y1, x0, y0, log2_trafo_size - 1, trafo_depth + 1, 3, intra_pred_mode_tmp, chroma_intra_pred_mode_tmp_idx);
|
||||
RETURN_IF((IHEVCD_ERROR_T)IHEVCD_SUCCESS != ret, ret);
|
||||
|
||||
}
|
||||
|
|
@ -238,6 +285,7 @@ WORD32 ihevcd_parse_transform_tree(codec_t *ps_codec,
|
|||
WORD32 ctb_x_base;
|
||||
WORD32 ctb_y_base;
|
||||
WORD32 cu_qp_delta_abs;
|
||||
WORD32 cbf_chroma;
|
||||
|
||||
|
||||
|
||||
|
|
@ -245,11 +293,19 @@ WORD32 ihevcd_parse_transform_tree(codec_t *ps_codec,
|
|||
cu_qp_delta_abs = 0;
|
||||
ctb_x_base = ps_codec->s_parse.i4_ctb_x << ps_sps->i1_log2_ctb_size;
|
||||
ctb_y_base = ps_codec->s_parse.i4_ctb_y << ps_sps->i1_log2_ctb_size;
|
||||
cbf_chroma = ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth]
|
||||
|| ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth];
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV422)
|
||||
{
|
||||
cbf_chroma |= ps_codec->s_parse.s_cu.ai1_cbf_cb_subtu[trafo_depth]
|
||||
|| ps_codec->s_parse.s_cu.ai1_cbf_cr_subtu[trafo_depth];
|
||||
}
|
||||
#endif
|
||||
|
||||
if((ps_codec->s_parse.s_cu.i4_pred_mode == PRED_MODE_INTRA) ||
|
||||
(trafo_depth != 0) ||
|
||||
(ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth]) ||
|
||||
(ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth]))
|
||||
(cbf_chroma))
|
||||
{
|
||||
ctxt_idx = IHEVC_CAB_CBF_LUMA_IDX;
|
||||
ctxt_idx += (trafo_depth == 0) ? 1 : 0;
|
||||
|
|
@ -268,21 +324,31 @@ WORD32 ihevcd_parse_transform_tree(codec_t *ps_codec,
|
|||
/* Initialize ps_tu to default values */
|
||||
/* If required change this to WORD32 packed write */
|
||||
ps_tu->b1_cb_cbf = 0;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
ps_tu->b1_cb_cbf_subtu1 = 0;
|
||||
#endif
|
||||
ps_tu->b1_cr_cbf = 0;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
ps_tu->b1_cr_cbf_subtu1 = 0;
|
||||
#endif
|
||||
ps_tu->b1_y_cbf = 0;
|
||||
ps_tu->b4_pos_x = ((x0 - ctb_x_base) >> 2);
|
||||
ps_tu->b4_pos_y = ((y0 - ctb_y_base) >> 2);
|
||||
ps_tu->b1_transquant_bypass = ps_codec->s_parse.s_cu.i4_cu_transquant_bypass;
|
||||
ps_tu->b3_size = (log2_trafo_size - 2);
|
||||
ps_tu->b7_qp = ps_codec->s_parse.u4_qp;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
ps_tu->b3_cb_log2_res_scale_abs_plus1 = 0;
|
||||
ps_tu->b1_cb_log2_res_sign = 0;
|
||||
ps_tu->b3_cr_log2_res_scale_abs_plus1 = 0;
|
||||
ps_tu->b1_cr_log2_res_sign = 0;
|
||||
#endif
|
||||
|
||||
ps_tu->b6_luma_intra_mode = intra_pred_mode;
|
||||
ps_tu->b3_chroma_intra_mode_idx = ps_codec->s_parse.s_cu.i4_intra_chroma_pred_mode_idx;
|
||||
ps_tu->b3_chroma_intra_mode_idx = chroma_intra_pred_mode_idx;
|
||||
|
||||
/* Section:7.3.12 Transform unit syntax inlined here */
|
||||
if(ps_codec->s_parse.s_cu.i1_cbf_luma ||
|
||||
ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth] ||
|
||||
ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth])
|
||||
if(ps_codec->s_parse.s_cu.i1_cbf_luma || cbf_chroma)
|
||||
{
|
||||
WORD32 intra_pred_mode_chroma;
|
||||
if(ps_pps->i1_cu_qp_delta_enabled_flag && !ps_codec->s_parse.i4_is_cu_qp_delta_coded)
|
||||
|
|
@ -338,32 +404,98 @@ WORD32 ihevcd_parse_transform_tree(codec_t *ps_codec,
|
|||
ihevcd_parse_residual_coding(ps_codec, x0, y0, log2_trafo_size, 0, intra_pred_mode);
|
||||
}
|
||||
|
||||
if(4 == ps_codec->s_parse.s_cu.i4_intra_chroma_pred_mode_idx)
|
||||
intra_pred_mode_chroma = ps_codec->s_parse.s_cu.ai4_intra_luma_pred_mode[0];
|
||||
WORD32 chroma_blk_luma_intra_pred_mode =
|
||||
ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV444 ?
|
||||
intra_pred_mode :
|
||||
ps_codec->s_parse.s_cu.ai4_intra_luma_pred_mode[0];
|
||||
if(4 == chroma_intra_pred_mode_idx)
|
||||
intra_pred_mode_chroma = chroma_blk_luma_intra_pred_mode;
|
||||
else
|
||||
{
|
||||
intra_pred_mode_chroma = gau1_intra_pred_chroma_modes[ps_codec->s_parse.s_cu.i4_intra_chroma_pred_mode_idx];
|
||||
intra_pred_mode_chroma = gau1_intra_pred_chroma_modes[chroma_intra_pred_mode_idx];
|
||||
|
||||
if(intra_pred_mode_chroma ==
|
||||
ps_codec->s_parse.s_cu.ai4_intra_luma_pred_mode[0])
|
||||
if(intra_pred_mode_chroma == chroma_blk_luma_intra_pred_mode)
|
||||
{
|
||||
intra_pred_mode_chroma = INTRA_ANGULAR(34);
|
||||
}
|
||||
|
||||
}
|
||||
if(log2_trafo_size > 2)
|
||||
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV422)
|
||||
{
|
||||
intra_pred_mode_chroma = gau1_intra_pred_chroma_modes_422[intra_pred_mode_chroma];
|
||||
}
|
||||
if(log2_trafo_size > 2 || ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV444)
|
||||
{
|
||||
WORD32 trafo_offset = (ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV444 ? 0 : 1);
|
||||
WORD32 log2_trafo_size_c = MAX(2, log2_trafo_size - trafo_offset);
|
||||
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
if(ps_pps->i1_cross_component_prediction_enabled_flag
|
||||
&& ps_codec->s_parse.s_cu.i1_cbf_luma
|
||||
&& (ps_codec->s_parse.s_cu.i4_pred_mode == PRED_MODE_INTER
|
||||
|| chroma_intra_pred_mode_idx == 4))
|
||||
{
|
||||
ctxt_idx = IHEVC_CAB_CCP_LOG2_RES_ABS;
|
||||
TRACE_CABAC_CTXT("log2_res_scale_abs_plus1", ps_cabac->u4_range, ctxt_idx);
|
||||
value = ihevcd_cabac_decode_bins_tunary(ps_cabac, ps_bitstrm, 4, ctxt_idx,
|
||||
0, 3);
|
||||
AEV_TRACE("log2_res_scale_abs_plus1", value, ps_cabac->u4_range);
|
||||
|
||||
if(value != 0)
|
||||
{
|
||||
ctxt_idx = IHEVC_CAB_CCP_RES_SIGN_FLAG;
|
||||
TRACE_CABAC_CTXT("res_scale_sign_flag", ps_cabac->u4_range, ctxt_idx);
|
||||
ps_tu->b1_cb_log2_res_sign = ihevcd_cabac_decode_bin(ps_cabac, ps_bitstrm, ctxt_idx);
|
||||
AEV_TRACE("res_scale_sign_flag", value, ps_cabac->u4_range);
|
||||
ps_tu->b3_cb_log2_res_scale_abs_plus1 = value;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if(ps_codec->s_parse.s_cu.ai1_cbf_cb[trafo_depth])
|
||||
{
|
||||
ps_tu->b1_cb_cbf = 1;
|
||||
ihevcd_parse_residual_coding(ps_codec, x0, y0, log2_trafo_size - 1, 1, intra_pred_mode_chroma);
|
||||
ihevcd_parse_residual_coding(ps_codec, x0, y0, log2_trafo_size_c, 1, intra_pred_mode_chroma);
|
||||
}
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV422 && ps_codec->s_parse.s_cu.ai1_cbf_cb_subtu[trafo_depth])
|
||||
{
|
||||
ps_tu->b1_cb_cbf_subtu1 = 1;
|
||||
ihevcd_parse_residual_coding(ps_codec, x0, y0 + (1 << log2_trafo_size_c), log2_trafo_size_c, 1, intra_pred_mode_chroma);
|
||||
}
|
||||
#endif
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
if(ps_pps->i1_cross_component_prediction_enabled_flag
|
||||
&& ps_codec->s_parse.s_cu.i1_cbf_luma
|
||||
&& (ps_codec->s_parse.s_cu.i4_pred_mode == PRED_MODE_INTER
|
||||
|| chroma_intra_pred_mode_idx == 4))
|
||||
{
|
||||
ctxt_idx = IHEVC_CAB_CCP_LOG2_RES_ABS + 4;
|
||||
TRACE_CABAC_CTXT("log2_res_scale_abs_plus1", ps_cabac->u4_range, ctxt_idx);
|
||||
value = ihevcd_cabac_decode_bins_tunary(ps_cabac, ps_bitstrm, 4, ctxt_idx,
|
||||
0, 3);
|
||||
AEV_TRACE("log2_res_scale_abs_plus1", value, ps_cabac->u4_range);
|
||||
|
||||
if(value != 0)
|
||||
{
|
||||
ctxt_idx = IHEVC_CAB_CCP_RES_SIGN_FLAG + 1;
|
||||
TRACE_CABAC_CTXT("res_scale_sign_flag", ps_cabac->u4_range, ctxt_idx);
|
||||
ps_tu->b1_cr_log2_res_sign = ihevcd_cabac_decode_bin(ps_cabac, ps_bitstrm, ctxt_idx);
|
||||
AEV_TRACE("res_scale_sign_flag", value, ps_cabac->u4_range);
|
||||
ps_tu->b3_cr_log2_res_scale_abs_plus1 = value;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
if(ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth])
|
||||
{
|
||||
ps_tu->b1_cr_cbf = 1;
|
||||
ihevcd_parse_residual_coding(ps_codec, x0, y0, log2_trafo_size - 1, 2, intra_pred_mode_chroma);
|
||||
ihevcd_parse_residual_coding(ps_codec, x0, y0, log2_trafo_size_c, 2, intra_pred_mode_chroma);
|
||||
}
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV422 && ps_codec->s_parse.s_cu.ai1_cbf_cr_subtu[trafo_depth])
|
||||
{
|
||||
ps_tu->b1_cr_cbf_subtu1 = 1;
|
||||
ihevcd_parse_residual_coding(ps_codec, x0, y0 + (1 << log2_trafo_size_c), log2_trafo_size_c, 1, intra_pred_mode_chroma);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else if(blk_idx == 3)
|
||||
{
|
||||
|
|
@ -372,12 +504,26 @@ WORD32 ihevcd_parse_transform_tree(codec_t *ps_codec,
|
|||
ps_tu->b1_cb_cbf = 1;
|
||||
ihevcd_parse_residual_coding(ps_codec, cu_x_base, cu_y_base, log2_trafo_size, 1, intra_pred_mode_chroma);
|
||||
}
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV422 && ps_codec->s_parse.s_cu.ai1_cbf_cb_subtu[trafo_depth])
|
||||
{
|
||||
ps_tu->b1_cb_cbf_subtu1 = 1;
|
||||
ihevcd_parse_residual_coding(ps_codec, x0, y0, log2_trafo_size, 1, intra_pred_mode_chroma);
|
||||
}
|
||||
#endif
|
||||
|
||||
if(ps_codec->s_parse.s_cu.ai1_cbf_cr[trafo_depth])
|
||||
{
|
||||
ps_tu->b1_cr_cbf = 1;
|
||||
ihevcd_parse_residual_coding(ps_codec, cu_x_base, cu_y_base, log2_trafo_size, 2, intra_pred_mode_chroma);
|
||||
}
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV422 && ps_codec->s_parse.s_cu.ai1_cbf_cr_subtu[trafo_depth])
|
||||
{
|
||||
ps_tu->b1_cr_cbf_subtu1 = 1;
|
||||
ihevcd_parse_residual_coding(ps_codec, x0, y0, log2_trafo_size, 1, intra_pred_mode_chroma);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
@ -387,7 +533,7 @@ WORD32 ihevcd_parse_transform_tree(codec_t *ps_codec,
|
|||
}
|
||||
else
|
||||
{
|
||||
if((3 != blk_idx) && (2 == log2_trafo_size))
|
||||
if((3 != blk_idx) && (2 == log2_trafo_size && ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_YUV444))
|
||||
{
|
||||
ps_tu->b3_chroma_intra_mode_idx = INTRA_PRED_CHROMA_IDX_NONE;
|
||||
}
|
||||
|
|
@ -590,7 +736,8 @@ IHEVCD_ERROR_T ihevcd_parse_pcm_sample(codec_t *ps_codec,
|
|||
|
||||
num_bits = ps_sps->i1_pcm_sample_bit_depth_luma;
|
||||
|
||||
for(i = 0; i < 1 << (log2_cb_size << 1); i++)
|
||||
WORD32 luma_samples = 1 << (log2_cb_size << 1);
|
||||
for(i = 0; i < luma_samples; i++)
|
||||
{
|
||||
TRACE_CABAC_CTXT("pcm_sample_luma", ps_cabac->u4_range, 0);
|
||||
BITS_PARSE("pcm_sample_luma", value, ps_bitstrm, num_bits);
|
||||
|
|
@ -599,15 +746,25 @@ IHEVCD_ERROR_T ihevcd_parse_pcm_sample(codec_t *ps_codec,
|
|||
*pu1_coeff_data++ = value << (BIT_DEPTH_LUMA - num_bits);
|
||||
}
|
||||
|
||||
num_bits = ps_sps->i1_pcm_sample_bit_depth_chroma;
|
||||
|
||||
for(i = 0; i < (1 << (log2_cb_size << 1)) >> 1; i++)
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
TRACE_CABAC_CTXT("pcm_sample_chroma", ps_cabac->u4_range, 0);
|
||||
BITS_PARSE("pcm_sample_chroma", value, ps_bitstrm, num_bits);
|
||||
WORD32 chroma_samples = 0;
|
||||
|
||||
// ps_pcmsample_t->i1_pcm_sample_chroma[i] = value;
|
||||
*pu1_coeff_data++ = value << (BIT_DEPTH_CHROMA - num_bits);
|
||||
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV444)
|
||||
chroma_samples = luma_samples << 1;
|
||||
else if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV422)
|
||||
chroma_samples = luma_samples;
|
||||
else if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV420)
|
||||
chroma_samples = luma_samples >> 1;
|
||||
num_bits = ps_sps->i1_pcm_sample_bit_depth_chroma;
|
||||
for(i = 0; i < chroma_samples; i++)
|
||||
{
|
||||
TRACE_CABAC_CTXT("pcm_sample_chroma", ps_cabac->u4_range, 0);
|
||||
BITS_PARSE("pcm_sample_chroma", value, ps_bitstrm, num_bits);
|
||||
|
||||
// ps_pcmsample_t->i1_pcm_sample_chroma[i] = value;
|
||||
*pu1_coeff_data++ = value << (BIT_DEPTH_CHROMA - num_bits);
|
||||
}
|
||||
}
|
||||
|
||||
ps_codec->s_parse.pv_tu_coeff_data = pu1_coeff_data;
|
||||
|
|
@ -1016,7 +1173,13 @@ IHEVCD_ERROR_T ihevcd_parse_coding_unit_intra(codec_t *ps_codec,
|
|||
|
||||
ps_tu = ps_codec->s_parse.ps_tu;
|
||||
ps_tu->b1_cb_cbf = 1;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
ps_tu->b1_cb_cbf_subtu1 = 1;
|
||||
#endif
|
||||
ps_tu->b1_cr_cbf = 1;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
ps_tu->b1_cr_cbf_subtu1 = 1;
|
||||
#endif
|
||||
ps_tu->b1_y_cbf = 1;
|
||||
ps_tu->b4_pos_x = ((x0 - ctb_x_base) >> 2);
|
||||
ps_tu->b4_pos_y = ((y0 - ctb_y_base) >> 2);
|
||||
|
|
@ -1025,6 +1188,12 @@ IHEVCD_ERROR_T ihevcd_parse_coding_unit_intra(codec_t *ps_codec,
|
|||
ps_tu->b7_qp = ps_codec->s_parse.u4_qp;
|
||||
ps_tu->b3_chroma_intra_mode_idx = INTRA_PRED_CHROMA_IDX_NONE;
|
||||
ps_tu->b6_luma_intra_mode = INTRA_PRED_NONE;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
ps_tu->b3_cb_log2_res_scale_abs_plus1 = 0;
|
||||
ps_tu->b1_cb_log2_res_sign = 0;
|
||||
ps_tu->b3_cr_log2_res_scale_abs_plus1 = 0;
|
||||
ps_tu->b1_cr_log2_res_sign = 0;
|
||||
#endif
|
||||
|
||||
/* Set the first TU in CU flag */
|
||||
{
|
||||
|
|
@ -1116,23 +1285,52 @@ IHEVCD_ERROR_T ihevcd_parse_coding_unit_intra(codec_t *ps_codec,
|
|||
}
|
||||
cnt++;
|
||||
}
|
||||
TRACE_CABAC_CTXT("intra_chroma_pred_mode", ps_cabac->u4_range, IHEVC_CAB_CHROMA_PRED_MODE);
|
||||
value = ihevcd_cabac_decode_bin(ps_cabac,
|
||||
ps_bitstrm,
|
||||
IHEVC_CAB_CHROMA_PRED_MODE);
|
||||
ps_codec->s_parse.s_cu.i4_intra_chroma_pred_mode_idx = 4;
|
||||
if(value)
|
||||
if(CHROMA_FMT_IDC_YUV444 == ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
ps_codec->s_parse.s_cu.i4_intra_chroma_pred_mode_idx =
|
||||
ihevcd_cabac_decode_bypass_bins(ps_cabac,
|
||||
ps_bitstrm, 2);
|
||||
for(i = 0; i < part_cnt; i++)
|
||||
{
|
||||
TRACE_CABAC_CTXT("intra_chroma_pred_mode", ps_cabac->u4_range, IHEVC_CAB_CHROMA_PRED_MODE);
|
||||
value = ihevcd_cabac_decode_bin(ps_cabac, ps_bitstrm,
|
||||
IHEVC_CAB_CHROMA_PRED_MODE);
|
||||
ps_codec->s_parse.s_cu.ai4_intra_chroma_pred_mode_idx[i] = 4;
|
||||
if(value)
|
||||
{
|
||||
ps_codec->s_parse.s_cu.ai4_intra_chroma_pred_mode_idx[i] =
|
||||
ihevcd_cabac_decode_bypass_bins(ps_cabac,
|
||||
ps_bitstrm,
|
||||
2);
|
||||
}
|
||||
AEV_TRACE("intra_chroma_pred_mode",
|
||||
ps_codec->s_parse.s_cu.ai4_intra_chroma_pred_mode_idx[i],
|
||||
ps_cabac->u4_range);
|
||||
}
|
||||
}
|
||||
AEV_TRACE("intra_chroma_pred_mode",
|
||||
ps_codec->s_parse.s_cu.i4_intra_chroma_pred_mode_idx,
|
||||
ps_cabac->u4_range);
|
||||
|
||||
else if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
TRACE_CABAC_CTXT("intra_chroma_pred_mode", ps_cabac->u4_range, IHEVC_CAB_CHROMA_PRED_MODE);
|
||||
value = ihevcd_cabac_decode_bin(ps_cabac, ps_bitstrm,
|
||||
IHEVC_CAB_CHROMA_PRED_MODE);
|
||||
ps_codec->s_parse.s_cu.ai4_intra_chroma_pred_mode_idx[0] = 4;
|
||||
if (value) {
|
||||
ps_codec->s_parse.s_cu.ai4_intra_chroma_pred_mode_idx[0] =
|
||||
ihevcd_cabac_decode_bypass_bins(ps_cabac, ps_bitstrm,
|
||||
2);
|
||||
}
|
||||
AEV_TRACE("intra_chroma_pred_mode",
|
||||
ps_codec->s_parse.s_cu.ai4_intra_chroma_pred_mode_idx[0],
|
||||
ps_cabac->u4_range);
|
||||
|
||||
}
|
||||
ihevcd_intra_pred_mode_prediction(ps_codec, log2_cb_size, x0, y0);
|
||||
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc && part_mode != PART_NxN)
|
||||
{
|
||||
// Only required for YUV444, but done for all formats to simplify calling arguments for ihevcd_parse_transform_tree
|
||||
parse_cu_t *ps_cu = &ps_codec->s_parse.s_cu;
|
||||
ps_cu->ai4_intra_chroma_pred_mode_idx[1] = ps_cu->ai4_intra_chroma_pred_mode_idx[0];
|
||||
ps_cu->ai4_intra_chroma_pred_mode_idx[2] = ps_cu->ai4_intra_chroma_pred_mode_idx[0];
|
||||
ps_cu->ai4_intra_chroma_pred_mode_idx[3] = ps_cu->ai4_intra_chroma_pred_mode_idx[0];
|
||||
}
|
||||
}
|
||||
STATS_UPDATE_PU_SIZE(ps_pu);
|
||||
/* Increment PU pointer */
|
||||
|
|
@ -1328,7 +1526,13 @@ IHEVCD_ERROR_T ihevcd_parse_coding_unit(codec_t *ps_codec,
|
|||
ctb_y_base = ps_codec->s_parse.i4_ctb_y << ps_sps->i1_log2_ctb_size;
|
||||
|
||||
ps_tu->b1_cb_cbf = 0;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
ps_tu->b1_cb_cbf_subtu1 = 0;
|
||||
#endif
|
||||
ps_tu->b1_cr_cbf = 0;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
ps_tu->b1_cr_cbf_subtu1 = 0;
|
||||
#endif
|
||||
ps_tu->b1_y_cbf = 0;
|
||||
ps_tu->b4_pos_x = ((x0 - ctb_x_base) >> 2);
|
||||
ps_tu->b4_pos_y = ((y0 - ctb_y_base) >> 2);
|
||||
|
|
@ -1337,6 +1541,12 @@ IHEVCD_ERROR_T ihevcd_parse_coding_unit(codec_t *ps_codec,
|
|||
ps_tu->b7_qp = ps_codec->s_parse.u4_qp;
|
||||
ps_tu->b3_chroma_intra_mode_idx = INTRA_PRED_CHROMA_IDX_NONE;
|
||||
ps_tu->b6_luma_intra_mode = INTRA_PRED_NONE;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
ps_tu->b3_cb_log2_res_scale_abs_plus1 = 0;
|
||||
ps_tu->b1_cb_log2_res_sign = 0;
|
||||
ps_tu->b3_cr_log2_res_scale_abs_plus1 = 0;
|
||||
ps_tu->b1_cr_log2_res_sign = 0;
|
||||
#endif
|
||||
|
||||
/* Set the first TU in CU flag */
|
||||
{
|
||||
|
|
@ -1609,7 +1819,8 @@ IHEVCD_ERROR_T ihevcd_parse_coding_unit(codec_t *ps_codec,
|
|||
(ps_sps->i1_max_transform_hierarchy_depth_inter);
|
||||
ret = ihevcd_parse_transform_tree(ps_codec, x0, y0, x0, y0,
|
||||
log2_cb_size, 0, 0,
|
||||
ps_codec->s_parse.s_cu.ai4_intra_luma_pred_mode[0]);
|
||||
ps_codec->s_parse.s_cu.ai4_intra_luma_pred_mode[0],
|
||||
ps_codec->s_parse.s_cu.ai4_intra_chroma_pred_mode_idx[0]);
|
||||
RETURN_IF((IHEVCD_ERROR_T)IHEVCD_SUCCESS != ret, ret);
|
||||
}
|
||||
else
|
||||
|
|
@ -1622,7 +1833,13 @@ IHEVCD_ERROR_T ihevcd_parse_coding_unit(codec_t *ps_codec,
|
|||
|
||||
ps_tu = ps_codec->s_parse.ps_tu;
|
||||
ps_tu->b1_cb_cbf = 0;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
ps_tu->b1_cb_cbf_subtu1 = 0;
|
||||
#endif
|
||||
ps_tu->b1_cr_cbf = 0;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
ps_tu->b1_cr_cbf_subtu1 = 0;
|
||||
#endif
|
||||
ps_tu->b1_y_cbf = 0;
|
||||
ps_tu->b4_pos_x = ((x0 - ctb_x_base) >> 2);
|
||||
ps_tu->b4_pos_y = ((y0 - ctb_y_base) >> 2);
|
||||
|
|
@ -1631,6 +1848,12 @@ IHEVCD_ERROR_T ihevcd_parse_coding_unit(codec_t *ps_codec,
|
|||
ps_tu->b7_qp = ps_codec->s_parse.u4_qp;
|
||||
ps_tu->b3_chroma_intra_mode_idx = INTRA_PRED_CHROMA_IDX_NONE;
|
||||
ps_tu->b6_luma_intra_mode = ps_codec->s_parse.s_cu.ai4_intra_luma_pred_mode[0];
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
ps_tu->b3_cb_log2_res_scale_abs_plus1 = 0;
|
||||
ps_tu->b1_cb_log2_res_sign = 0;
|
||||
ps_tu->b3_cr_log2_res_scale_abs_plus1 = 0;
|
||||
ps_tu->b1_cr_log2_res_sign = 0;
|
||||
#endif
|
||||
|
||||
/* Set the first TU in CU flag */
|
||||
{
|
||||
|
|
@ -2070,7 +2293,7 @@ IHEVCD_ERROR_T ihevcd_parse_sao(codec_t *ps_codec)
|
|||
{
|
||||
WORD32 c_idx;
|
||||
WORD32 sao_type_idx = 0;
|
||||
for(c_idx = 0; c_idx < 3; c_idx++)
|
||||
for(c_idx = 0; c_idx < (CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc ? 3 : 1); c_idx++)
|
||||
{
|
||||
if((ps_slice_hdr->i1_slice_sao_luma_flag && c_idx == 0) || (ps_slice_hdr->i1_slice_sao_chroma_flag && c_idx > 0))
|
||||
{
|
||||
|
|
@ -2250,7 +2473,13 @@ void ihevcd_set_ctb_skip(codec_t *ps_codec)
|
|||
{
|
||||
ps_tu = ps_codec->s_parse.ps_tu;
|
||||
ps_tu->b1_cb_cbf = 0;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
ps_tu->b1_cb_cbf_subtu1 = 0;
|
||||
#endif
|
||||
ps_tu->b1_cr_cbf = 0;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
ps_tu->b1_cr_cbf_subtu1 = 0;
|
||||
#endif
|
||||
ps_tu->b1_y_cbf = 0;
|
||||
ps_tu->b4_pos_x = pu_x >> 2;
|
||||
ps_tu->b4_pos_y = pu_y >> 2;
|
||||
|
|
@ -2259,6 +2488,12 @@ void ihevcd_set_ctb_skip(codec_t *ps_codec)
|
|||
ps_tu->b7_qp = ps_codec->s_parse.u4_qp;
|
||||
ps_tu->b3_chroma_intra_mode_idx = INTRA_PRED_CHROMA_IDX_NONE;
|
||||
ps_tu->b6_luma_intra_mode = INTRA_PRED_NONE;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
ps_tu->b3_cb_log2_res_scale_abs_plus1 = 0;
|
||||
ps_tu->b1_cb_log2_res_sign = 0;
|
||||
ps_tu->b3_cr_log2_res_scale_abs_plus1 = 0;
|
||||
ps_tu->b1_cr_log2_res_sign = 0;
|
||||
#endif
|
||||
ps_tu->b1_first_tu_in_cu = 1;
|
||||
|
||||
ps_codec->s_parse.ps_tu++;
|
||||
|
|
@ -2506,11 +2741,19 @@ IHEVCD_ERROR_T ihevcd_parse_slice_data(codec_t *ps_codec)
|
|||
}
|
||||
else if((0 == ps_pps->i1_entropy_coding_sync_enabled_flag) || (ps_pps->i1_entropy_coding_sync_enabled_flag && (0 != ps_codec->s_parse.i4_ctb_x)))
|
||||
{
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
WORD32 ai4_stats[4] = {0};
|
||||
#endif
|
||||
ret = ihevcd_cabac_init(&ps_codec->s_parse.s_cabac,
|
||||
&ps_codec->s_parse.s_bitstrm,
|
||||
slice_qp,
|
||||
cabac_init_idc,
|
||||
&gau1_ihevc_cab_ctxts[cabac_init_idc][slice_qp][0]);
|
||||
&gau1_ihevc_cab_ctxts[cabac_init_idc][slice_qp][0]
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
,
|
||||
ps_sps->i1_persistent_rice_adaptation_enabled_flag ? ai4_stats : NULL
|
||||
#endif
|
||||
);
|
||||
if(ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS)
|
||||
{
|
||||
ps_codec->i4_slice_error = 1;
|
||||
|
|
@ -2602,11 +2845,19 @@ IHEVCD_ERROR_T ihevcd_parse_slice_data(codec_t *ps_codec)
|
|||
* of whether it is a dependent or an independent slice */
|
||||
if(0 == ps_codec->i4_slice_error)
|
||||
{
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
WORD32 ai4_stats[4] = {0};
|
||||
#endif
|
||||
ret = ihevcd_cabac_init(&ps_codec->s_parse.s_cabac,
|
||||
&ps_codec->s_parse.s_bitstrm,
|
||||
slice_qp,
|
||||
cabac_init_idc,
|
||||
&gau1_ihevc_cab_ctxts[cabac_init_idc][slice_qp][0]);
|
||||
&gau1_ihevc_cab_ctxts[cabac_init_idc][slice_qp][0]
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
,
|
||||
ps_sps->i1_persistent_rice_adaptation_enabled_flag ? ai4_stats : NULL
|
||||
#endif
|
||||
);
|
||||
if(ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS)
|
||||
{
|
||||
ps_codec->i4_slice_error = 1;
|
||||
|
|
@ -2677,12 +2928,20 @@ IHEVCD_ERROR_T ihevcd_parse_slice_data(codec_t *ps_codec)
|
|||
ps_codec->s_parse.u4_qp = slice_qp;
|
||||
if(default_ctxt)
|
||||
{
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
WORD32 ai4_stats[4] = {0};
|
||||
#endif
|
||||
//memcpy(&ps_codec->s_parse.s_cabac.au1_ctxt_models, &gau1_ihevc_cab_ctxts[cabac_init_idc][slice_qp][0], size);
|
||||
ret = ihevcd_cabac_init(&ps_codec->s_parse.s_cabac,
|
||||
&ps_codec->s_parse.s_bitstrm,
|
||||
slice_qp,
|
||||
cabac_init_idc,
|
||||
&gau1_ihevc_cab_ctxts[cabac_init_idc][slice_qp][0]);
|
||||
&gau1_ihevc_cab_ctxts[cabac_init_idc][slice_qp][0]
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
,
|
||||
ps_sps->i1_persistent_rice_adaptation_enabled_flag ? ai4_stats : NULL
|
||||
#endif
|
||||
);
|
||||
|
||||
if(ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS)
|
||||
{
|
||||
|
|
@ -2698,7 +2957,14 @@ IHEVCD_ERROR_T ihevcd_parse_slice_data(codec_t *ps_codec)
|
|||
&ps_codec->s_parse.s_bitstrm,
|
||||
slice_qp,
|
||||
cabac_init_idc,
|
||||
(const UWORD8 *)&ps_codec->s_parse.s_cabac.au1_ctxt_models_sync);
|
||||
(const UWORD8 *)&ps_codec->s_parse.s_cabac.au1_ctxt_models_sync
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
,
|
||||
ps_sps->i1_persistent_rice_adaptation_enabled_flag ?
|
||||
ps_codec->s_parse.s_cabac.ai4_rice_stat_coeff_sync :
|
||||
NULL
|
||||
#endif
|
||||
);
|
||||
|
||||
if(ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS)
|
||||
{
|
||||
|
|
@ -2809,6 +3075,11 @@ IHEVCD_ERROR_T ihevcd_parse_slice_data(codec_t *ps_codec)
|
|||
{
|
||||
WORD32 size = sizeof(ps_codec->s_parse.s_cabac.au1_ctxt_models);
|
||||
memcpy(&ps_codec->s_parse.s_cabac.au1_ctxt_models_sync, &ps_codec->s_parse.s_cabac.au1_ctxt_models, size);
|
||||
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
size = sizeof(ps_codec->s_parse.s_cabac.ai4_rice_stat_coeff_sync);
|
||||
memcpy(&ps_codec->s_parse.s_cabac.ai4_rice_stat_coeff_sync, &ps_codec->s_parse.s_cabac.ai4_rice_stat_coeff, size);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -403,6 +403,7 @@ IHEVCD_ERROR_T ihevcd_parse_slice_header(codec_t *ps_codec,
|
|||
(ps_slice_hdr->i1_slice_type > 2))
|
||||
return IHEVCD_IGNORE_SLICE;
|
||||
|
||||
|
||||
if(ps_pps->i1_output_flag_present_flag)
|
||||
{
|
||||
BITS_PARSE("pic_output_flag", value, ps_bitstrm, 1);
|
||||
|
|
@ -440,6 +441,9 @@ IHEVCD_ERROR_T ihevcd_parse_slice_header(codec_t *ps_codec,
|
|||
{
|
||||
numbits = 32 - CLZ(ps_sps->i1_num_short_term_ref_pic_sets - 1);
|
||||
BITS_PARSE("short_term_ref_pic_set_idx", value, ps_bitstrm, numbits);
|
||||
if (value >= ps_sps->i1_num_short_term_ref_pic_sets) {
|
||||
return IHEVCD_INVALID_PARAMETER;
|
||||
}
|
||||
ps_slice_hdr->i1_short_term_ref_pic_set_idx = value;
|
||||
}
|
||||
|
||||
|
|
@ -566,8 +570,10 @@ IHEVCD_ERROR_T ihevcd_parse_slice_header(codec_t *ps_codec,
|
|||
BITS_PARSE("slice_sao_luma_flag", value, ps_bitstrm, 1);
|
||||
ps_slice_hdr->i1_slice_sao_luma_flag = value;
|
||||
|
||||
BITS_PARSE("slice_sao_chroma_flag", value, ps_bitstrm, 1);
|
||||
ps_slice_hdr->i1_slice_sao_chroma_flag = value;
|
||||
if (CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc) {
|
||||
BITS_PARSE("slice_sao_chroma_flag", value, ps_bitstrm, 1);
|
||||
ps_slice_hdr->i1_slice_sao_chroma_flag = value;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -805,11 +811,12 @@ IHEVCD_ERROR_T ihevcd_parse_slice_header(codec_t *ps_codec,
|
|||
if(ps_codec->i4_pic_present)
|
||||
{
|
||||
prev_slice_incomplete_flag = 1;
|
||||
ps_codec->i4_slice_error = 1;
|
||||
ps_codec->s_parse.i4_cur_slice_idx--;
|
||||
if(ps_codec->s_parse.i4_cur_slice_idx < 0)
|
||||
ps_codec->s_parse.i4_cur_slice_idx = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
return IHEVCD_IGNORE_SLICE;
|
||||
}
|
||||
return IHEVCD_IGNORE_SLICE;
|
||||
}
|
||||
/* If the slice address is less than the next CTB's index,
|
||||
* extra CTBs have been decoded in the previous slice.
|
||||
|
|
|
|||
|
|
@ -536,6 +536,13 @@ IHEVCD_ERROR_T ihevcd_process(process_ctxt_t *ps_proc)
|
|||
|
||||
WORD32 ctb_size = 1 << ps_sps->i1_log2_ctb_size;
|
||||
|
||||
WORD32 h_samp_factor, v_samp_factor;
|
||||
WORD32 chroma_row_strd;
|
||||
WORD32 chroma_pixel_strd = 2;
|
||||
|
||||
h_samp_factor = (CHROMA_FMT_IDC_YUV444 == ps_sps->i1_chroma_format_idc) ? 1 : 2;
|
||||
v_samp_factor = (CHROMA_FMT_IDC_YUV420 == ps_sps->i1_chroma_format_idc) ? 2 : 1;
|
||||
|
||||
PROFILE_DISABLE_PROCESS_CTB();
|
||||
|
||||
ps_codec = ps_proc->ps_codec;
|
||||
|
|
@ -968,15 +975,17 @@ IHEVCD_ERROR_T ihevcd_process(process_ctxt_t *ps_proc)
|
|||
/*TODO: Add support for custom scaling matrices */
|
||||
}
|
||||
|
||||
|
||||
/* CTB Level pointers */
|
||||
ps_proc->pu1_cur_ctb_luma = ps_proc->pu1_cur_pic_luma
|
||||
+ (ps_proc->i4_ctb_x * ctb_size
|
||||
+ ps_proc->i4_ctb_y * ctb_size
|
||||
* ps_codec->i4_strd);
|
||||
ps_proc->pu1_cur_ctb_chroma = ps_proc->pu1_cur_pic_chroma
|
||||
+ ps_proc->i4_ctb_x * ctb_size
|
||||
+ (ps_proc->i4_ctb_y * ctb_size * ps_codec->i4_strd / 2);
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
ps_proc->pu1_cur_ctb_chroma = ps_proc->pu1_cur_pic_chroma
|
||||
+ (ps_proc->i4_ctb_x * ctb_size * chroma_pixel_strd / h_samp_factor)
|
||||
+ (ps_proc->i4_ctb_y * ctb_size * ps_codec->i4_strd * chroma_pixel_strd / (h_samp_factor * v_samp_factor));
|
||||
}
|
||||
|
||||
ihevcd_iquant_itrans_recon_ctb(ps_proc);
|
||||
}
|
||||
|
|
@ -1201,6 +1210,8 @@ IHEVCD_ERROR_T ihevcd_process(process_ctxt_t *ps_proc)
|
|||
|
||||
/* Call padding if required */
|
||||
{
|
||||
chroma_row_strd = ps_codec->i4_strd * chroma_pixel_strd / h_samp_factor;
|
||||
|
||||
#if SAO_PROCESS_SHIFT_CTB
|
||||
|
||||
if(0 == ps_proc->i4_ctb_x)
|
||||
|
|
@ -1212,16 +1223,21 @@ IHEVCD_ERROR_T ihevcd_process(process_ctxt_t *ps_proc)
|
|||
+ (ps_proc->i4_ctb_x * ctb_size
|
||||
+ ps_proc->i4_ctb_y * ctb_size
|
||||
* ps_codec->i4_strd);
|
||||
ps_proc->pu1_cur_ctb_chroma = ps_proc->pu1_cur_pic_chroma
|
||||
+ ps_proc->i4_ctb_x * ctb_size
|
||||
+ (ps_proc->i4_ctb_y * ctb_size * ps_codec->i4_strd / 2);
|
||||
|
||||
pad_ht_luma = ctb_size;
|
||||
pad_ht_luma += (ps_sps->i2_pic_ht_in_ctb - 1) == ps_proc->i4_ctb_y ? 8 : 0;
|
||||
pad_ht_chroma = ctb_size / 2;
|
||||
/* Pad left after 1st CTB is processed */
|
||||
ps_codec->s_func_selector.ihevc_pad_left_luma_fptr(ps_proc->pu1_cur_ctb_luma - 8 * ps_codec->i4_strd, ps_codec->i4_strd, pad_ht_luma, PAD_LEFT);
|
||||
ps_codec->s_func_selector.ihevc_pad_left_chroma_fptr(ps_proc->pu1_cur_ctb_chroma - 16 * ps_codec->i4_strd, ps_codec->i4_strd, pad_ht_chroma, PAD_LEFT);
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
ps_proc->pu1_cur_ctb_chroma = ps_proc->pu1_cur_pic_chroma
|
||||
+ (ps_proc->i4_ctb_x * ctb_size * chroma_pixel_strd / h_samp_factor)
|
||||
+ (ps_proc->i4_ctb_y * ctb_size * chroma_row_strd / v_samp_factor);
|
||||
pad_ht_chroma = ctb_size / v_samp_factor;
|
||||
ps_codec->s_func_selector.ihevc_pad_left_chroma_fptr(
|
||||
ps_proc->pu1_cur_ctb_chroma - (8 * v_samp_factor) * chroma_row_strd,
|
||||
chroma_row_strd, pad_ht_chroma, PAD_LEFT * chroma_pixel_strd / h_samp_factor);
|
||||
}
|
||||
}
|
||||
|
||||
if((ps_sps->i2_pic_wd_in_ctb - 1) == ps_proc->i4_ctb_x)
|
||||
|
|
@ -1234,22 +1250,35 @@ IHEVCD_ERROR_T ihevcd_process(process_ctxt_t *ps_proc)
|
|||
+ (ps_proc->i4_ctb_x * ctb_size
|
||||
+ ps_proc->i4_ctb_y * ctb_size
|
||||
* ps_codec->i4_strd);
|
||||
ps_proc->pu1_cur_ctb_chroma = ps_proc->pu1_cur_pic_chroma
|
||||
+ ps_proc->i4_ctb_x * ctb_size
|
||||
+ (ps_proc->i4_ctb_y * ctb_size * ps_codec->i4_strd / 2);
|
||||
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
ps_proc->pu1_cur_ctb_chroma = ps_proc->pu1_cur_pic_chroma
|
||||
+ (ps_proc->i4_ctb_x * ctb_size * chroma_pixel_strd / h_samp_factor)
|
||||
+ (ps_proc->i4_ctb_y * ctb_size * chroma_row_strd / v_samp_factor);
|
||||
pad_ht_chroma = ctb_size / v_samp_factor;
|
||||
}
|
||||
pad_ht_luma = ctb_size;
|
||||
pad_ht_chroma = ctb_size / 2;
|
||||
if((ps_sps->i2_pic_ht_in_ctb - 1) == ps_proc->i4_ctb_y)
|
||||
{
|
||||
pad_ht_luma += 8;
|
||||
pad_ht_chroma += 16;
|
||||
ps_codec->s_func_selector.ihevc_pad_left_chroma_fptr(ps_proc->pu1_cur_pic_chroma + (ps_sps->i2_pic_height_in_luma_samples / 2 - 16) * ps_codec->i4_strd,
|
||||
ps_codec->i4_strd, 16, PAD_LEFT);
|
||||
if (CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
pad_ht_chroma += (8 * v_samp_factor);
|
||||
ps_codec->s_func_selector.ihevc_pad_left_chroma_fptr(
|
||||
ps_proc->pu1_cur_pic_chroma + ((ps_sps->i2_pic_height_in_luma_samples / v_samp_factor) - (8 * v_samp_factor)) * chroma_row_strd,
|
||||
chroma_row_strd, (8 * v_samp_factor),
|
||||
PAD_LEFT * chroma_pixel_strd / h_samp_factor);
|
||||
}
|
||||
}
|
||||
/* Pad right after last CTB in the current row is processed */
|
||||
ps_codec->s_func_selector.ihevc_pad_right_luma_fptr(ps_proc->pu1_cur_ctb_luma + cols_remaining - 8 * ps_codec->i4_strd, ps_codec->i4_strd, pad_ht_luma, PAD_RIGHT);
|
||||
ps_codec->s_func_selector.ihevc_pad_right_chroma_fptr(ps_proc->pu1_cur_ctb_chroma + cols_remaining - 16 * ps_codec->i4_strd, ps_codec->i4_strd, pad_ht_chroma, PAD_RIGHT);
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
ps_codec->s_func_selector.ihevc_pad_right_chroma_fptr(
|
||||
ps_proc->pu1_cur_ctb_chroma + (cols_remaining * chroma_pixel_strd / h_samp_factor) - (8 * v_samp_factor) * chroma_row_strd,
|
||||
chroma_row_strd, pad_ht_chroma,
|
||||
PAD_RIGHT * chroma_pixel_strd / h_samp_factor);
|
||||
}
|
||||
|
||||
if((ps_sps->i2_pic_ht_in_ctb - 1) == ps_proc->i4_ctb_y)
|
||||
{
|
||||
|
|
@ -1258,14 +1287,27 @@ IHEVCD_ERROR_T ihevcd_process(process_ctxt_t *ps_proc)
|
|||
/* Hence moving top padding to to end of frame, Moving it to second row also results in problems when there is only one row */
|
||||
/* Pad top after padding left and right for current rows after processing 1st CTB row */
|
||||
ihevc_pad_top(ps_proc->pu1_cur_pic_luma - PAD_LEFT, ps_codec->i4_strd, ps_sps->i2_pic_width_in_luma_samples + PAD_WD, PAD_TOP);
|
||||
ihevc_pad_top(ps_proc->pu1_cur_pic_chroma - PAD_LEFT, ps_codec->i4_strd, ps_sps->i2_pic_width_in_luma_samples + PAD_WD, PAD_TOP / 2);
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
ihevc_pad_top(ps_proc->pu1_cur_pic_chroma - PAD_LEFT * (chroma_pixel_strd / h_samp_factor),
|
||||
chroma_row_strd,
|
||||
(ps_sps->i2_pic_width_in_luma_samples + PAD_WD) * (chroma_pixel_strd / h_samp_factor),
|
||||
PAD_TOP / v_samp_factor);
|
||||
}
|
||||
|
||||
/* Pad bottom after padding left and right for current rows after processing 1st CTB row */
|
||||
pu1_buf = ps_proc->pu1_cur_pic_luma + ps_codec->i4_strd * ps_sps->i2_pic_height_in_luma_samples - PAD_LEFT;
|
||||
/* Pad top after padding left and right for current rows after processing 1st CTB row */
|
||||
ihevc_pad_bottom(pu1_buf, ps_codec->i4_strd, ps_sps->i2_pic_width_in_luma_samples + PAD_WD, PAD_BOT);
|
||||
|
||||
pu1_buf = ps_proc->pu1_cur_pic_chroma + ps_codec->i4_strd * (ps_sps->i2_pic_height_in_luma_samples / 2) - PAD_LEFT;
|
||||
ihevc_pad_bottom(pu1_buf, ps_codec->i4_strd, ps_sps->i2_pic_width_in_luma_samples + PAD_WD, PAD_BOT / 2);
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
pu1_buf = ps_proc->pu1_cur_pic_chroma
|
||||
+ chroma_row_strd * (ps_sps->i2_pic_height_in_luma_samples / v_samp_factor)
|
||||
- (PAD_LEFT * chroma_pixel_strd / h_samp_factor);
|
||||
ihevc_pad_bottom(pu1_buf,
|
||||
chroma_row_strd,
|
||||
(ps_sps->i2_pic_width_in_luma_samples + PAD_WD) * (chroma_pixel_strd / h_samp_factor),
|
||||
PAD_BOT / v_samp_factor);
|
||||
}
|
||||
}
|
||||
}
|
||||
#else
|
||||
|
|
@ -1280,7 +1322,10 @@ IHEVCD_ERROR_T ihevcd_process(process_ctxt_t *ps_proc)
|
|||
pad_ht_chroma = ctb_size / 2;
|
||||
/* Pad left after 1st CTB is processed */
|
||||
ps_codec->s_func_selector.ihevc_pad_left_luma_fptr(ps_proc->pu1_cur_ctb_luma - 2 * ctb_size * ps_codec->i4_strd, ps_codec->i4_strd, pad_ht_luma, PAD_LEFT);
|
||||
ps_codec->s_func_selector.ihevc_pad_left_chroma_fptr(ps_proc->pu1_cur_ctb_chroma - ctb_size * ps_codec->i4_strd, ps_codec->i4_strd, pad_ht_chroma, PAD_LEFT);
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
ps_codec->s_func_selector.ihevc_pad_left_chroma_fptr(ps_proc->pu1_cur_ctb_chroma - ctb_size * ps_codec->i4_strd, ps_codec->i4_strd, pad_ht_chroma, PAD_LEFT);
|
||||
}
|
||||
}
|
||||
else if((ps_sps->i2_pic_wd_in_ctb - 1) == ps_proc->i4_ctb_x)
|
||||
{
|
||||
|
|
@ -1292,7 +1337,10 @@ IHEVCD_ERROR_T ihevcd_process(process_ctxt_t *ps_proc)
|
|||
pad_ht_chroma = ((ps_sps->i2_pic_ht_in_ctb - 1) == ps_proc->i4_ctb_y) ? 3 * ctb_size / 2 : ctb_size / 2;
|
||||
/* Pad right after last CTB in the current row is processed */
|
||||
ps_codec->s_func_selector.ihevc_pad_right_luma_fptr(ps_proc->pu1_cur_ctb_luma + cols_remaining - 2 * ctb_size * ps_codec->i4_strd, ps_codec->i4_strd, pad_ht_luma, PAD_RIGHT);
|
||||
ps_codec->s_func_selector.ihevc_pad_right_chroma_fptr(ps_proc->pu1_cur_ctb_chroma + cols_remaining - ctb_size * ps_codec->i4_strd, ps_codec->i4_strd, pad_ht_chroma, PAD_RIGHT);
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
ps_codec->s_func_selector.ihevc_pad_right_chroma_fptr(ps_proc->pu1_cur_ctb_chroma + cols_remaining - ctb_size * ps_codec->i4_strd, ps_codec->i4_strd, pad_ht_chroma, PAD_RIGHT);
|
||||
}
|
||||
|
||||
if((ps_sps->i2_pic_ht_in_ctb - 1) == ps_proc->i4_ctb_y)
|
||||
{
|
||||
|
|
@ -1305,21 +1353,30 @@ IHEVCD_ERROR_T ihevcd_process(process_ctxt_t *ps_proc)
|
|||
|
||||
ps_codec->s_func_selector.ihevc_pad_left_luma_fptr(ps_proc->pu1_cur_pic_luma + ps_codec->i4_strd * (ps_sps->i2_pic_height_in_luma_samples - 2 * ctb_size),
|
||||
ps_codec->i4_strd, pad_ht_luma, PAD_LEFT);
|
||||
ps_codec->s_func_selector.ihevc_pad_left_chroma_fptr(ps_proc->pu1_cur_pic_chroma + ps_codec->i4_strd * (ps_sps->i2_pic_height_in_luma_samples / 2 - ctb_size),
|
||||
ps_codec->i4_strd, pad_ht_chroma, PAD_LEFT);
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
ps_codec->s_func_selector.ihevc_pad_left_chroma_fptr(ps_proc->pu1_cur_pic_chroma + ps_codec->i4_strd * (ps_sps->i2_pic_height_in_luma_samples / 2 - ctb_size),
|
||||
ps_codec->i4_strd, pad_ht_chroma, PAD_LEFT);
|
||||
|
||||
}
|
||||
/* Since SAO is shifted by 8x8, chroma padding can not be done till second row is processed */
|
||||
/* Hence moving top padding to to end of frame, Moving it to second row also results in problems when there is only one row */
|
||||
/* Pad top after padding left and right for current rows after processing 1st CTB row */
|
||||
ihevc_pad_top(ps_proc->pu1_cur_pic_luma - PAD_LEFT, ps_codec->i4_strd, ps_sps->i2_pic_width_in_luma_samples + PAD_WD, PAD_TOP);
|
||||
ihevc_pad_top(ps_proc->pu1_cur_pic_chroma - PAD_LEFT, ps_codec->i4_strd, ps_sps->i2_pic_width_in_luma_samples + PAD_WD, PAD_TOP / 2);
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
ihevc_pad_top(ps_proc->pu1_cur_pic_chroma - PAD_LEFT, ps_codec->i4_strd, ps_sps->i2_pic_width_in_luma_samples + PAD_WD, PAD_TOP / 2);
|
||||
}
|
||||
|
||||
pu1_buf = ps_proc->pu1_cur_pic_luma + ps_codec->i4_strd * ps_sps->i2_pic_height_in_luma_samples - PAD_LEFT;
|
||||
/* Pad top after padding left and right for current rows after processing 1st CTB row */
|
||||
ihevc_pad_bottom(pu1_buf, ps_codec->i4_strd, ps_sps->i2_pic_width_in_luma_samples + PAD_WD, PAD_BOT);
|
||||
|
||||
pu1_buf = ps_proc->pu1_cur_pic_chroma + ps_codec->i4_strd * (ps_sps->i2_pic_height_in_luma_samples / 2) - PAD_LEFT;
|
||||
ihevc_pad_bottom(pu1_buf, ps_codec->i4_strd, ps_sps->i2_pic_width_in_luma_samples + PAD_WD, PAD_BOT / 2);
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
pu1_buf = ps_proc->pu1_cur_pic_chroma + ps_codec->i4_strd * (ps_sps->i2_pic_height_in_luma_samples / 2) - PAD_LEFT;
|
||||
ihevc_pad_bottom(pu1_buf, ps_codec->i4_strd, ps_sps->i2_pic_width_in_luma_samples + PAD_WD, PAD_BOT / 2);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -1596,31 +1653,32 @@ void ihevcd_process_thread(process_ctxt_t *ps_proc)
|
|||
ithread_set_affinity(ps_proc->i4_id + 1);
|
||||
}
|
||||
|
||||
#ifdef KEEP_THREADS_ACTIVE
|
||||
while(1)
|
||||
{
|
||||
codec_t *ps_dec = ps_proc->ps_codec;
|
||||
DEBUG("In ihevcd_process_thread \n");
|
||||
|
||||
ret = ithread_mutex_lock(ps_dec->apv_proc_start_mutex[ps_proc->i4_id]);
|
||||
if((IHEVCD_ERROR_T)IHEVCD_SUCCESS != ret)
|
||||
break;
|
||||
|
||||
while(!ps_dec->ai4_process_start[ps_proc->i4_id])
|
||||
if(ps_proc->ps_codec->i4_threads_active)
|
||||
{
|
||||
ithread_cond_wait(ps_dec->apv_proc_start_condition[ps_proc->i4_id],
|
||||
ps_dec->apv_proc_start_mutex[ps_proc->i4_id]);
|
||||
DEBUG("In ihevcd_process_thread \n");
|
||||
|
||||
ret = ithread_mutex_lock(ps_dec->apv_proc_start_mutex[ps_proc->i4_id]);
|
||||
if((IHEVCD_ERROR_T)IHEVCD_SUCCESS != ret)
|
||||
break;
|
||||
|
||||
while(!ps_dec->ai4_process_start[ps_proc->i4_id])
|
||||
{
|
||||
ithread_cond_wait(ps_dec->apv_proc_start_condition[ps_proc->i4_id],
|
||||
ps_dec->apv_proc_start_mutex[ps_proc->i4_id]);
|
||||
}
|
||||
ps_dec->ai4_process_start[ps_proc->i4_id] = 0;
|
||||
ret = ithread_mutex_unlock(ps_dec->apv_proc_start_mutex[ps_proc->i4_id]);
|
||||
if((IHEVCD_ERROR_T)IHEVCD_SUCCESS != ret)
|
||||
break;
|
||||
|
||||
DEBUG(" Got control at ihevcd_process_thread \n");
|
||||
|
||||
if(ps_dec->i4_break_threads == 1)
|
||||
break;
|
||||
}
|
||||
ps_dec->ai4_process_start[ps_proc->i4_id] = 0;
|
||||
ret = ithread_mutex_unlock(ps_dec->apv_proc_start_mutex[ps_proc->i4_id]);
|
||||
if((IHEVCD_ERROR_T)IHEVCD_SUCCESS != ret)
|
||||
break;
|
||||
|
||||
DEBUG(" Got control at ihevcd_process_thread \n");
|
||||
|
||||
if(ps_dec->i4_break_threads == 1)
|
||||
break;
|
||||
#endif
|
||||
while(1)
|
||||
{
|
||||
proc_job_t s_job;
|
||||
|
|
@ -1670,19 +1728,24 @@ void ihevcd_process_thread(process_ctxt_t *ps_proc)
|
|||
s_job.i2_ctb_y << ps_sps->i1_log2_ctb_size, num_rows);
|
||||
}
|
||||
}
|
||||
#ifdef KEEP_THREADS_ACTIVE
|
||||
ret = ithread_mutex_lock(ps_dec->apv_proc_done_mutex[ps_proc->i4_id]);
|
||||
if((IHEVCD_ERROR_T)IHEVCD_SUCCESS != ret)
|
||||
break;
|
||||
if(ps_proc->ps_codec->i4_threads_active)
|
||||
{
|
||||
ret = ithread_mutex_lock(ps_dec->apv_proc_done_mutex[ps_proc->i4_id]);
|
||||
if((IHEVCD_ERROR_T)IHEVCD_SUCCESS != ret)
|
||||
break;
|
||||
|
||||
ps_dec->ai4_process_done[ps_proc->i4_id] = 1;
|
||||
ithread_cond_signal(ps_dec->apv_proc_done_condition[ps_proc->i4_id]);
|
||||
ps_dec->ai4_process_done[ps_proc->i4_id] = 1;
|
||||
ithread_cond_signal(ps_dec->apv_proc_done_condition[ps_proc->i4_id]);
|
||||
|
||||
ret = ithread_mutex_unlock(ps_dec->apv_proc_done_mutex[ps_proc->i4_id]);
|
||||
if((IHEVCD_ERROR_T)IHEVCD_SUCCESS != ret)
|
||||
ret = ithread_mutex_unlock(ps_dec->apv_proc_done_mutex[ps_proc->i4_id]);
|
||||
if((IHEVCD_ERROR_T)IHEVCD_SUCCESS != ret)
|
||||
break;
|
||||
}
|
||||
else
|
||||
{
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
//ithread_exit(0);
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -364,6 +364,9 @@ void ihevcd_sao_ctb(sao_ctxt_t *ps_sao_ctxt)
|
|||
|
||||
}
|
||||
|
||||
/* Chroma */
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
if(0 == ps_sao->b3_cb_type_idx)
|
||||
{
|
||||
for(row = 0; row < sao_ht_chroma; row++)
|
||||
|
|
@ -517,7 +520,7 @@ void ihevcd_sao_ctb(sao_ctxt_t *ps_sao_ctxt)
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -693,6 +696,7 @@ void ihevcd_sao_shift_ctb(sao_ctxt_t *ps_sao_ctxt)
|
|||
|
||||
/* Chroma */
|
||||
|
||||
if (CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
UWORD32 u4_no_loop_filter_flag;
|
||||
WORD32 loop_filter_bit_pos;
|
||||
|
|
@ -1114,7 +1118,7 @@ void ihevcd_sao_shift_ctb(sao_ctxt_t *ps_sao_ctxt)
|
|||
ps_codec->s_func_selector.ihevc_memcpy_fptr(pu1_src_top_luma, &pu1_src_luma[(sao_ht_luma - 1) * src_strd], sao_wd_luma);
|
||||
}
|
||||
|
||||
if(ps_slice_hdr_top_left->i1_slice_sao_chroma_flag)
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc && ps_slice_hdr_top_left->i1_slice_sao_chroma_flag)
|
||||
{
|
||||
if(0 == ps_sao->b3_cb_type_idx)
|
||||
{
|
||||
|
|
@ -1435,7 +1439,7 @@ void ihevcd_sao_shift_ctb(sao_ctxt_t *ps_sao_ctxt)
|
|||
}
|
||||
}
|
||||
}
|
||||
else if((!ps_slice_hdr->i1_first_slice_in_pic_flag) || (ps_pps->i1_tiles_enabled_flag))
|
||||
else if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc && ((!ps_slice_hdr->i1_first_slice_in_pic_flag) || (ps_pps->i1_tiles_enabled_flag)))
|
||||
{
|
||||
for(row = 0; row < sao_ht_chroma; row++)
|
||||
{
|
||||
|
|
@ -1761,7 +1765,7 @@ void ihevcd_sao_shift_ctb(sao_ctxt_t *ps_sao_ctxt)
|
|||
}
|
||||
}
|
||||
|
||||
if(0 != sao_wd_chroma)
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc && 0 != sao_wd_chroma)
|
||||
{
|
||||
if(ps_slice_hdr_top->i1_slice_sao_chroma_flag)
|
||||
{
|
||||
|
|
@ -2360,7 +2364,7 @@ void ihevcd_sao_shift_ctb(sao_ctxt_t *ps_sao_ctxt)
|
|||
}
|
||||
}
|
||||
|
||||
if(0 != sao_ht_chroma)
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc && 0 != sao_ht_chroma)
|
||||
{
|
||||
if(ps_slice_hdr_left->i1_slice_sao_chroma_flag)
|
||||
{
|
||||
|
|
@ -2995,7 +2999,7 @@ void ihevcd_sao_shift_ctb(sao_ctxt_t *ps_sao_ctxt)
|
|||
}
|
||||
}
|
||||
|
||||
if((0 != sao_wd_chroma) && (0 != sao_ht_chroma))
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc && (0 != sao_wd_chroma) && (0 != sao_ht_chroma))
|
||||
{
|
||||
if(ps_sao_ctxt->ps_slice_hdr->i1_slice_sao_chroma_flag)
|
||||
{
|
||||
|
|
@ -3415,7 +3419,7 @@ void ihevcd_sao_shift_ctb(sao_ctxt_t *ps_sao_ctxt)
|
|||
}
|
||||
|
||||
/* Chroma */
|
||||
if(no_loop_filter_enabled_chroma)
|
||||
if(CHROMA_FMT_IDC_MONOCHROME != ps_sps->i1_chroma_format_idc && no_loop_filter_enabled_chroma)
|
||||
{
|
||||
UWORD32 u4_no_loop_filter_flag;
|
||||
WORD32 loop_filter_bit_pos;
|
||||
|
|
|
|||
|
|
@ -119,6 +119,13 @@ typedef struct cab_ctxt
|
|||
*/
|
||||
UWORD8 au1_ctxt_models_sync[IHEVC_CAB_CTXT_END];
|
||||
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
/** golomb rice adaptation statistics */
|
||||
WORD32 ai4_rice_stat_coeff[4];
|
||||
|
||||
WORD32 ai4_rice_stat_coeff_sync[4];
|
||||
#endif
|
||||
|
||||
}cab_ctxt_t;
|
||||
|
||||
typedef enum
|
||||
|
|
@ -736,7 +743,7 @@ typedef struct
|
|||
/**
|
||||
* Chroma pred mode index to be used to compute intra pred mode for chroma
|
||||
*/
|
||||
WORD32 i4_intra_chroma_pred_mode_idx;
|
||||
WORD32 ai4_intra_chroma_pred_mode_idx[4];
|
||||
/**
|
||||
* Maximum transform depth
|
||||
*/
|
||||
|
|
@ -751,11 +758,17 @@ typedef struct
|
|||
* Cb CBF
|
||||
*/
|
||||
UWORD8 ai1_cbf_cb[MAX_TRAFO_DEPTH];
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
UWORD8 ai1_cbf_cb_subtu[MAX_TRAFO_DEPTH];
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Cr CBF
|
||||
*/
|
||||
UWORD8 ai1_cbf_cr[MAX_TRAFO_DEPTH];
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
UWORD8 ai1_cbf_cr_subtu[MAX_TRAFO_DEPTH];
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Intra split flag
|
||||
|
|
@ -1161,10 +1174,12 @@ typedef struct
|
|||
*/
|
||||
WORD32 i4_next_tu_ctb_cnt;
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
/**
|
||||
* SEI parameters
|
||||
*/
|
||||
sei_params_t s_sei_params;
|
||||
#endif
|
||||
}parse_ctxt_t;
|
||||
|
||||
/**
|
||||
|
|
@ -1463,8 +1478,20 @@ typedef struct
|
|||
/** Intermediate buffer to be used during inverse transform */
|
||||
WORD16 *pi2_itrans_intrmd_buf;
|
||||
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
/**
|
||||
* residue buffer to be store output of inverse transform.
|
||||
* Only used for frext tool sets
|
||||
*/
|
||||
WORD16 *pi2_res_luma_buf;
|
||||
WORD16 *pi2_res_chroma_buf;
|
||||
#endif
|
||||
|
||||
/** Buffer to hold output of inverse scan */
|
||||
WORD16 *pi2_invscan_out;
|
||||
#ifdef ENABLE_MAIN_REXT_PROFILE
|
||||
WORD16 *pi2_invscan_out_subtu;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Top availability for current CTB level
|
||||
|
|
@ -1588,6 +1615,14 @@ typedef void (*pf_intra_pred)(UWORD8 *pu1_ref,
|
|||
WORD32 nt,
|
||||
WORD32 mode);
|
||||
|
||||
typedef void (*pf_itrans_res)(WORD16 *pi2_src,
|
||||
WORD16 *pi2_tmp,
|
||||
WORD16 *pi2_dst,
|
||||
WORD32 i4_src_strd,
|
||||
WORD32 i4_dst_strd,
|
||||
WORD32 zero_cols,
|
||||
WORD32 zero_rows);
|
||||
|
||||
typedef void (*pf_itrans_recon)(WORD16 *pi2_src,
|
||||
WORD16 *pi2_tmp,
|
||||
UWORD8 *pu1_pred,
|
||||
|
|
@ -1613,6 +1648,11 @@ typedef void (*pf_itrans_recon_dc)(UWORD8 *pu1_pred,
|
|||
WORD32 log2_trans_size,
|
||||
WORD16 i2_coeff_value);
|
||||
|
||||
typedef void (*pf_itrans_res_dc)(WORD16 *pi2_dst,
|
||||
WORD32 dst_strd,
|
||||
WORD32 log2_trans_size,
|
||||
WORD16 i2_coeff_value);
|
||||
|
||||
|
||||
typedef void (*pf_sao_luma)(UWORD8 *,
|
||||
WORD32,
|
||||
|
|
@ -1904,6 +1944,11 @@ struct _codec_t
|
|||
*/
|
||||
UWORD32 u4_bitsbuf_size_dynamic;
|
||||
|
||||
/**
|
||||
* Bitmask specifying the set of supported YUV output formats
|
||||
*/
|
||||
UWORD32 u4_enable_yuv_formats;
|
||||
|
||||
/**
|
||||
* Pointer to hold TU data for a set of CTBs or a picture
|
||||
*/
|
||||
|
|
@ -2080,7 +2125,6 @@ struct _codec_t
|
|||
*/
|
||||
parse_ctxt_t s_parse;
|
||||
|
||||
#ifdef KEEP_THREADS_ACTIVE
|
||||
/**
|
||||
* Condition variable to signal process start
|
||||
*/
|
||||
|
|
@ -2115,7 +2159,6 @@ struct _codec_t
|
|||
* Flag to signal processing thread to exit
|
||||
*/
|
||||
WORD32 i4_break_threads;
|
||||
#endif
|
||||
|
||||
/**
|
||||
* Processing context - One for each processing thread
|
||||
|
|
@ -2212,15 +2255,21 @@ struct _codec_t
|
|||
/** Funtion pointers for inter_pred_chroma leaf level functions */
|
||||
pf_intra_pred apf_intra_pred_chroma[11];
|
||||
|
||||
/** Funtion pointers for itrans leaf level functions */
|
||||
pf_itrans_res apf_itrans_res[5];
|
||||
|
||||
/** Funtion pointers for itrans_recon leaf level functions */
|
||||
pf_itrans_recon apf_itrans_recon[8];
|
||||
pf_itrans_recon apf_itrans_recon[9];
|
||||
|
||||
/** Funtion pointers for recon leaf level functions */
|
||||
pf_recon apf_recon[8];
|
||||
pf_recon apf_recon[9];
|
||||
|
||||
/** Funtion pointers for itrans_recon_dc leaf level functions */
|
||||
pf_itrans_recon_dc apf_itrans_recon_dc[2];
|
||||
|
||||
/** Funtion pointers for itrans dc leaf level functions */
|
||||
pf_itrans_res_dc apf_itrans_res_dc;
|
||||
|
||||
/** Funtion pointers for sao_luma leaf level functions */
|
||||
pf_sao_luma apf_sao_luma[4];
|
||||
|
||||
|
|
@ -2239,6 +2288,8 @@ struct _codec_t
|
|||
|
||||
/** Number of active display buffers - for shared mode */
|
||||
WORD32 i4_share_disp_buf_cnt;
|
||||
|
||||
WORD32 i4_threads_active;
|
||||
};
|
||||
|
||||
#endif /* _IHEVCD_STRUCTS_H_ */
|
||||
|
|
|
|||
203
decoder/ihevcd_utils.c
Executable file → Normal file
203
decoder/ihevcd_utils.c
Executable file → Normal file
|
|
@ -216,7 +216,22 @@ WORD32 ihevcd_get_total_pic_buf_size(codec_t *ps_codec,
|
|||
num_luma_samples = (wd + PAD_WD) * (ht + PAD_HT);
|
||||
|
||||
/* Account for chroma */
|
||||
num_samples = num_luma_samples * 3 / 2;
|
||||
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV444)
|
||||
{
|
||||
num_samples = num_luma_samples * 3;
|
||||
}
|
||||
else if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV422)
|
||||
{
|
||||
num_samples = num_luma_samples * 2;
|
||||
}
|
||||
else if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV420)
|
||||
{
|
||||
num_samples = num_luma_samples * 3 / 2;
|
||||
}
|
||||
else
|
||||
{
|
||||
num_samples = num_luma_samples;
|
||||
}
|
||||
|
||||
/* Number of bytes in reference pictures */
|
||||
size = num_samples * max_dpb_size;
|
||||
|
|
@ -298,17 +313,33 @@ WORD32 ihevcd_get_pic_mv_bank_size(WORD32 num_luma_samples)
|
|||
*
|
||||
*******************************************************************************
|
||||
*/
|
||||
WORD32 ihevcd_get_tu_data_size(WORD32 num_luma_samples)
|
||||
WORD32 ihevcd_get_tu_data_size(codec_t *ps_codec, WORD32 num_luma_samples)
|
||||
{
|
||||
|
||||
|
||||
sps_t *ps_sps = (ps_codec->s_parse.ps_sps_base + ps_codec->i4_sps_id);
|
||||
WORD32 tu_data_size;
|
||||
WORD32 num_ctb;
|
||||
WORD32 num_luma_tu, num_chroma_tu, num_tu;
|
||||
num_ctb = num_luma_samples / (MIN_CTB_SIZE * MIN_CTB_SIZE);
|
||||
|
||||
num_luma_tu = num_luma_samples / (MIN_TU_SIZE * MIN_TU_SIZE);
|
||||
num_chroma_tu = num_luma_tu >> 1;
|
||||
|
||||
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV444)
|
||||
{
|
||||
num_chroma_tu = num_luma_tu << 1;
|
||||
}
|
||||
else if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV422)
|
||||
{
|
||||
num_chroma_tu = num_luma_tu;
|
||||
}
|
||||
else if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV420)
|
||||
{
|
||||
num_chroma_tu = num_luma_tu >> 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
num_chroma_tu = 0;
|
||||
}
|
||||
|
||||
num_tu = num_luma_tu + num_chroma_tu;
|
||||
tu_data_size = 0;
|
||||
|
|
@ -459,13 +490,16 @@ IHEVCD_ERROR_T ihevcd_pic_buf_mgr_add_bufs(codec_t *ps_codec)
|
|||
UWORD8 *pu1_buf;
|
||||
pic_buf_t *ps_pic_buf;
|
||||
WORD32 pic_buf_size_allocated;
|
||||
|
||||
|
||||
WORD32 h_samp_factor, v_samp_factor;
|
||||
WORD32 chroma_pixel_strd = 2;
|
||||
|
||||
|
||||
/* Initialize Pic buffer manager */
|
||||
ps_sps = ps_codec->s_parse.ps_sps;
|
||||
|
||||
h_samp_factor = (CHROMA_FMT_IDC_YUV444 == ps_sps->i1_chroma_format_idc) ? 1 : 2;
|
||||
v_samp_factor = (CHROMA_FMT_IDC_YUV420 == ps_sps->i1_chroma_format_idc) ? 2 : 1;
|
||||
|
||||
/* Compute the number of Pic buffers needed */
|
||||
max_dpb_size = ps_sps->ai1_sps_max_dec_pic_buffering[ps_sps->i1_sps_max_sub_layers - 1];
|
||||
|
||||
|
|
@ -496,7 +530,14 @@ IHEVCD_ERROR_T ihevcd_pic_buf_mgr_add_bufs(codec_t *ps_codec)
|
|||
luma_samples = (ps_codec->i4_strd) *
|
||||
(ps_sps->i2_pic_height_in_luma_samples + PAD_HT);
|
||||
|
||||
chroma_samples = luma_samples / 2;
|
||||
if(CHROMA_FMT_IDC_MONOCHROME == ps_sps->i1_chroma_format_idc)
|
||||
{
|
||||
chroma_samples = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
chroma_samples = luma_samples * 2 / (h_samp_factor * v_samp_factor);
|
||||
}
|
||||
|
||||
/* Try to add as many buffers as possible since memory is already allocated */
|
||||
/* If the number of buffers that can be added is less than max_num_bufs
|
||||
|
|
@ -515,8 +556,17 @@ IHEVCD_ERROR_T ihevcd_pic_buf_mgr_add_bufs(codec_t *ps_codec)
|
|||
ps_pic_buf->pu1_luma = pu1_buf + ps_codec->i4_strd * PAD_TOP + PAD_LEFT;
|
||||
pu1_buf += luma_samples;
|
||||
|
||||
ps_pic_buf->pu1_chroma = pu1_buf + ps_codec->i4_strd * (PAD_TOP / 2) + PAD_LEFT;
|
||||
pu1_buf += chroma_samples;
|
||||
if(chroma_samples)
|
||||
{
|
||||
ps_pic_buf->pu1_chroma = pu1_buf
|
||||
+ (ps_codec->i4_strd * chroma_pixel_strd / h_samp_factor) * (PAD_TOP / v_samp_factor)
|
||||
+ (PAD_LEFT * chroma_pixel_strd / h_samp_factor);
|
||||
pu1_buf += chroma_samples;
|
||||
}
|
||||
else
|
||||
{
|
||||
ps_pic_buf->pu1_chroma = NULL;
|
||||
}
|
||||
|
||||
/* Pad boundary pixels (one pixel on all sides) */
|
||||
/* This ensures SAO does not read uninitialized pixels */
|
||||
|
|
@ -542,21 +592,25 @@ IHEVCD_ERROR_T ihevcd_pic_buf_mgr_add_bufs(codec_t *ps_codec)
|
|||
pu1_buf += strd * ht;
|
||||
memset(pu1_buf - 1, 0, wd + 2);
|
||||
|
||||
pu1_buf = ps_pic_buf->pu1_chroma;
|
||||
ht >>= 1;
|
||||
for(i = 0; i < ht; i++)
|
||||
if(ps_pic_buf->pu1_chroma)
|
||||
{
|
||||
pu1_buf[-1] = 0;
|
||||
pu1_buf[-2] = 0;
|
||||
pu1_buf[wd] = 0;
|
||||
pu1_buf[wd + 1] = 0;
|
||||
pu1_buf += strd;
|
||||
}
|
||||
pu1_buf = ps_pic_buf->pu1_chroma;
|
||||
memset(pu1_buf - strd - 2, 0, wd + 4);
|
||||
pu1_buf = ps_pic_buf->pu1_chroma;
|
||||
ht /= v_samp_factor;
|
||||
WORD32 chroma_strd_scale = chroma_pixel_strd / h_samp_factor;
|
||||
for(i = 0; i < ht; i++)
|
||||
{
|
||||
pu1_buf[-1] = 0;
|
||||
pu1_buf[-2] = 0;
|
||||
pu1_buf[wd * chroma_strd_scale] = 0;
|
||||
pu1_buf[wd * chroma_strd_scale + 1] = 0;
|
||||
pu1_buf += (strd * chroma_strd_scale);
|
||||
}
|
||||
pu1_buf = ps_pic_buf->pu1_chroma;
|
||||
memset(pu1_buf - (strd * chroma_strd_scale) - 2, 0, wd * chroma_strd_scale + 4);
|
||||
|
||||
pu1_buf += strd * ht;
|
||||
memset(pu1_buf - 2, 0, wd + 4);
|
||||
pu1_buf += (strd * chroma_strd_scale) * ht;
|
||||
memset(pu1_buf - 2, 0, wd * chroma_strd_scale + 4);
|
||||
}
|
||||
}
|
||||
|
||||
buf_ret = ihevc_buf_mgr_add((buf_mgr_t *)ps_codec->pv_pic_buf_mgr, ps_pic_buf, i);
|
||||
|
|
@ -587,7 +641,8 @@ IHEVCD_ERROR_T ihevcd_pic_buf_mgr_add_bufs(codec_t *ps_codec)
|
|||
break;
|
||||
}
|
||||
ps_pic_buf->pu1_luma += ps_codec->i4_strd * PAD_TOP + PAD_LEFT;
|
||||
ps_pic_buf->pu1_chroma += ps_codec->i4_strd * (PAD_TOP / 2) + PAD_LEFT;
|
||||
ps_pic_buf->pu1_chroma += (ps_codec->i4_strd * chroma_pixel_strd / h_samp_factor) * (PAD_TOP / v_samp_factor)
|
||||
+ (PAD_LEFT * chroma_pixel_strd / h_samp_factor);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -741,15 +796,15 @@ IHEVCD_ERROR_T ihevcd_check_out_buf_size(codec_t *ps_codec)
|
|||
|
||||
if(ps_codec->e_chroma_fmt == IV_YUV_420P)
|
||||
u4_min_num_out_bufs = MIN_OUT_BUFS_420;
|
||||
else if(ps_codec->e_chroma_fmt == IV_YUV_422ILE)
|
||||
u4_min_num_out_bufs = MIN_OUT_BUFS_422ILE;
|
||||
else if(ps_codec->e_chroma_fmt == IV_RGB_565)
|
||||
u4_min_num_out_bufs = MIN_OUT_BUFS_RGB565;
|
||||
else if(ps_codec->e_chroma_fmt == IV_RGBA_8888)
|
||||
u4_min_num_out_bufs = MIN_OUT_BUFS_RGBA8888;
|
||||
else if(ps_codec->e_chroma_fmt == IV_YUV_444P)
|
||||
u4_min_num_out_bufs = MIN_OUT_BUFS_444;
|
||||
else if(ps_codec->e_chroma_fmt == IV_YUV_422P)
|
||||
u4_min_num_out_bufs = MIN_OUT_BUFS_422;
|
||||
else if((ps_codec->e_chroma_fmt == IV_YUV_420SP_UV)
|
||||
|| (ps_codec->e_chroma_fmt == IV_YUV_420SP_VU))
|
||||
u4_min_num_out_bufs = MIN_OUT_BUFS_420SP;
|
||||
else if(ps_codec->e_chroma_fmt == IV_GRAY)
|
||||
u4_min_num_out_bufs = MIN_OUT_BUFS_GRAY;
|
||||
|
||||
if(ps_codec->e_chroma_fmt == IV_YUV_420P)
|
||||
{
|
||||
|
|
@ -757,23 +812,11 @@ IHEVCD_ERROR_T ihevcd_check_out_buf_size(codec_t *ps_codec)
|
|||
au4_min_out_buf_size[1] = (wd * ht) >> 2;
|
||||
au4_min_out_buf_size[2] = (wd * ht) >> 2;
|
||||
}
|
||||
else if(ps_codec->e_chroma_fmt == IV_YUV_422ILE)
|
||||
else if(ps_codec->e_chroma_fmt == IV_YUV_444P)
|
||||
{
|
||||
au4_min_out_buf_size[0] = (wd * ht) * 2;
|
||||
au4_min_out_buf_size[1] =
|
||||
au4_min_out_buf_size[2] = 0;
|
||||
}
|
||||
else if(ps_codec->e_chroma_fmt == IV_RGB_565)
|
||||
{
|
||||
au4_min_out_buf_size[0] = (wd * ht) * 2;
|
||||
au4_min_out_buf_size[1] =
|
||||
au4_min_out_buf_size[2] = 0;
|
||||
}
|
||||
else if(ps_codec->e_chroma_fmt == IV_RGBA_8888)
|
||||
{
|
||||
au4_min_out_buf_size[0] = (wd * ht) * 4;
|
||||
au4_min_out_buf_size[1] =
|
||||
au4_min_out_buf_size[2] = 0;
|
||||
au4_min_out_buf_size[0] = (wd * ht);
|
||||
au4_min_out_buf_size[1] = (wd * ht);
|
||||
au4_min_out_buf_size[2] = (wd * ht);
|
||||
}
|
||||
else if((ps_codec->e_chroma_fmt == IV_YUV_420SP_UV)
|
||||
|| (ps_codec->e_chroma_fmt == IV_YUV_420SP_VU))
|
||||
|
|
@ -782,6 +825,19 @@ IHEVCD_ERROR_T ihevcd_check_out_buf_size(codec_t *ps_codec)
|
|||
au4_min_out_buf_size[1] = (wd * ht) >> 1;
|
||||
au4_min_out_buf_size[2] = 0;
|
||||
}
|
||||
else if(ps_codec->e_chroma_fmt == IV_GRAY)
|
||||
{
|
||||
au4_min_out_buf_size[0] = (wd * ht);
|
||||
au4_min_out_buf_size[1] = 0;
|
||||
au4_min_out_buf_size[2] = 0;
|
||||
}
|
||||
else if(ps_codec->e_chroma_fmt == IV_YUV_422P)
|
||||
{
|
||||
au4_min_out_buf_size[0] = (wd * ht);
|
||||
au4_min_out_buf_size[1] = (wd * ht) >> 1;
|
||||
au4_min_out_buf_size[2] = (wd * ht) >> 1;
|
||||
}
|
||||
|
||||
|
||||
if(ps_out_buffer->u4_num_bufs < u4_min_num_out_bufs)
|
||||
{
|
||||
|
|
@ -830,6 +886,8 @@ IHEVCD_ERROR_T ihevcd_parse_pic_init(codec_t *ps_codec)
|
|||
pic_buf_t *ps_cur_pic;
|
||||
slice_header_t *ps_slice_hdr;
|
||||
UWORD8 *pu1_cur_pic_luma, *pu1_cur_pic_chroma;
|
||||
WORD32 h_samp_factor, v_samp_factor;
|
||||
WORD32 chroma_pixel_strd = 2;
|
||||
WORD32 i;
|
||||
|
||||
ps_codec->s_parse.i4_error_code = IHEVCD_SUCCESS;
|
||||
|
|
@ -841,7 +899,8 @@ IHEVCD_ERROR_T ihevcd_parse_pic_init(codec_t *ps_codec)
|
|||
memset(ps_codec->s_parse.pu1_pic_intra_flag, 0, num_min_cu);
|
||||
memset(ps_codec->s_parse.pu1_pic_no_loop_filter_flag, 0, num_min_cu);
|
||||
|
||||
|
||||
h_samp_factor = (CHROMA_FMT_IDC_YUV444 == ps_sps->i1_chroma_format_idc) ? 1 : 2;
|
||||
v_samp_factor = (CHROMA_FMT_IDC_YUV420 == ps_sps->i1_chroma_format_idc) ? 2 : 1;
|
||||
|
||||
if(0 == ps_codec->s_parse.i4_first_pic_init)
|
||||
{
|
||||
|
|
@ -925,9 +984,9 @@ IHEVCD_ERROR_T ihevcd_parse_pic_init(codec_t *ps_codec)
|
|||
pu1_cur_pic_luma = pu1_buf;
|
||||
|
||||
pu1_buf = ps_cur_pic->pu1_chroma;
|
||||
|
||||
pu1_cur_pic_chroma = pu1_buf;
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
ps_cur_pic->s_sei_params.i1_sei_parameters_present_flag = 0;
|
||||
if(ps_codec->s_parse.s_sei_params.i1_sei_parameters_present_flag)
|
||||
{
|
||||
|
|
@ -948,12 +1007,19 @@ IHEVCD_ERROR_T ihevcd_parse_pic_init(codec_t *ps_codec)
|
|||
ps_sei->i1_active_parameter_set = 0;
|
||||
ps_sei->i4_sei_mastering_disp_colour_vol_params_present_flags = 0;
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
if(0 == ps_codec->u4_pic_cnt)
|
||||
{
|
||||
memset(ps_cur_pic->pu1_luma, 128, (ps_sps->i2_pic_width_in_luma_samples + PAD_WD) * ps_sps->i2_pic_height_in_luma_samples);
|
||||
memset(ps_cur_pic->pu1_chroma, 128, (ps_sps->i2_pic_width_in_luma_samples + PAD_WD) * ps_sps->i2_pic_height_in_luma_samples / 2);
|
||||
if(ps_sps->i1_chroma_format_idc != CHROMA_FMT_IDC_MONOCHROME)
|
||||
{
|
||||
memset(ps_cur_pic->pu1_chroma,
|
||||
128,
|
||||
(((ps_sps->i2_pic_width_in_luma_samples + PAD_WD) * (chroma_pixel_strd / h_samp_factor))
|
||||
* ps_sps->i2_pic_height_in_luma_samples / v_samp_factor));
|
||||
}
|
||||
}
|
||||
|
||||
/* Fill the remaining entries of the reference lists with the nearest POC
|
||||
|
|
@ -1040,9 +1106,10 @@ IHEVCD_ERROR_T ihevcd_parse_pic_init(codec_t *ps_codec)
|
|||
/* Reset the jobq to start of the jobq buffer */
|
||||
ihevcd_jobq_reset((jobq_t *)ps_codec->pv_proc_jobq);
|
||||
|
||||
#ifdef KEEP_THREADS_ACTIVE
|
||||
ps_codec->i4_break_threads = 0;
|
||||
#endif
|
||||
if(ps_codec->i4_threads_active)
|
||||
{
|
||||
ps_codec->i4_break_threads = 0;
|
||||
}
|
||||
ps_codec->s_parse.i4_pic_pu_idx = 0;
|
||||
ps_codec->s_parse.i4_pic_tu_idx = 0;
|
||||
|
||||
|
|
@ -1068,7 +1135,22 @@ IHEVCD_ERROR_T ihevcd_parse_pic_init(codec_t *ps_codec)
|
|||
|
||||
ctb_luma_min_tu_cnt = pic_size / (MIN_TU_SIZE * MIN_TU_SIZE);
|
||||
|
||||
ctb_chroma_min_tu_cnt = ctb_luma_min_tu_cnt >> 1;
|
||||
if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV444)
|
||||
{
|
||||
ctb_chroma_min_tu_cnt = ctb_luma_min_tu_cnt << 1;
|
||||
}
|
||||
else if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV422)
|
||||
{
|
||||
ctb_chroma_min_tu_cnt = ctb_luma_min_tu_cnt;
|
||||
}
|
||||
else if(ps_sps->i1_chroma_format_idc == CHROMA_FMT_IDC_YUV420)
|
||||
{
|
||||
ctb_chroma_min_tu_cnt = ctb_luma_min_tu_cnt >> 1;
|
||||
}
|
||||
else
|
||||
{
|
||||
ctb_chroma_min_tu_cnt = 0;
|
||||
}
|
||||
|
||||
ctb_min_tu_cnt = ctb_luma_min_tu_cnt + ctb_chroma_min_tu_cnt;
|
||||
|
||||
|
|
@ -1248,16 +1330,17 @@ IHEVCD_ERROR_T ihevcd_parse_pic_init(codec_t *ps_codec)
|
|||
(void *)&ps_codec->as_process[i]);
|
||||
ps_codec->ai4_process_thread_created[i] = 1;
|
||||
}
|
||||
#ifdef KEEP_THREADS_ACTIVE
|
||||
ret = ithread_mutex_lock(ps_codec->apv_proc_start_mutex[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
if(ps_codec->i4_threads_active)
|
||||
{
|
||||
ret = ithread_mutex_lock(ps_codec->apv_proc_start_mutex[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
|
||||
ps_codec->ai4_process_start[i] = 1;
|
||||
ithread_cond_signal(ps_codec->apv_proc_start_condition[i]);
|
||||
ps_codec->ai4_process_start[i] = 1;
|
||||
ithread_cond_signal(ps_codec->apv_proc_start_condition[i]);
|
||||
|
||||
ret = ithread_mutex_unlock(ps_codec->apv_proc_start_mutex[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
#endif
|
||||
ret = ithread_mutex_unlock(ps_codec->apv_proc_start_mutex[i]);
|
||||
RETURN_IF((ret != (IHEVCD_ERROR_T)IHEVCD_SUCCESS), ret);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@
|
|||
WORD32 ihevcd_get_lvl_idx(WORD32 level);
|
||||
WORD32 ihevcd_get_dpb_size(WORD32 level, WORD32 pic_size);
|
||||
WORD32 ihevcd_get_pic_mv_bank_size(WORD32 num_luma_samples);
|
||||
WORD32 ihevcd_get_tu_data_size(WORD32 num_luma_samples);
|
||||
WORD32 ihevcd_get_tu_data_size(codec_t *ps_codec, WORD32 num_luma_samples);
|
||||
WORD32 ihevcd_nctb_cnt(codec_t *ps_codec, sps_t *ps_sps);
|
||||
WORD32 ihevcd_get_max_luma_samples(WORD32 level);
|
||||
IHEVCD_ERROR_T ihevcd_get_tile_pos(pps_t *ps_pps,
|
||||
|
|
|
|||
7
decoder/libhevcdec.cmake
Executable file → Normal file
7
decoder/libhevcdec.cmake
Executable file → Normal file
|
|
@ -33,13 +33,12 @@ list(
|
|||
include_directories(${HEVC_ROOT}/decoder)
|
||||
|
||||
# arm/x86 sources
|
||||
if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64")
|
||||
if("${SYSTEM_PROCESSOR}" STREQUAL "aarch64" OR "${SYSTEM_PROCESSOR}" STREQUAL "arm64")
|
||||
list(
|
||||
APPEND
|
||||
LIBHEVCDEC_ASMS
|
||||
"${HEVC_ROOT}/decoder/arm64/ihevcd_fmt_conv_420sp_to_420p.s"
|
||||
"${HEVC_ROOT}/decoder/arm64/ihevcd_fmt_conv_420sp_to_420sp.s"
|
||||
"${HEVC_ROOT}/decoder/arm64/ihevcd_fmt_conv_420sp_to_rgba8888.s"
|
||||
"${HEVC_ROOT}/decoder/arm/ihevcd_function_selector.c"
|
||||
"${HEVC_ROOT}/decoder/arm/ihevcd_function_selector_noneon.c"
|
||||
"${HEVC_ROOT}/decoder/arm64/ihevcd_function_selector_av8.c"
|
||||
|
|
@ -47,13 +46,12 @@ if("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch64")
|
|||
"${HEVC_ROOT}/decoder/arm64/ihevcd_itrans_recon_dc_luma.s")
|
||||
|
||||
include_directories(${HEVC_ROOT}/decoder/arm64)
|
||||
elseif("${CMAKE_SYSTEM_PROCESSOR}" STREQUAL "aarch32")
|
||||
elseif("${SYSTEM_PROCESSOR}" STREQUAL "aarch32")
|
||||
list(
|
||||
APPEND
|
||||
LIBHEVCDEC_ASMS
|
||||
"${HEVC_ROOT}/decoder/arm/ihevcd_fmt_conv_420sp_to_420p.s"
|
||||
"${HEVC_ROOT}/decoder/arm/ihevcd_fmt_conv_420sp_to_420sp.s"
|
||||
"${HEVC_ROOT}/decoder/arm/ihevcd_fmt_conv_420sp_to_rgba8888.s"
|
||||
"${HEVC_ROOT}/decoder/arm/ihevcd_function_selector_a9q.c"
|
||||
"${HEVC_ROOT}/decoder/arm/ihevcd_function_selector.c"
|
||||
"${HEVC_ROOT}/decoder/arm/ihevcd_function_selector_noneon.c"
|
||||
|
|
@ -78,3 +76,4 @@ endif()
|
|||
|
||||
add_library(libhevcdec STATIC ${LIBHEVC_COMMON_SRCS} ${LIBHEVC_COMMON_ASMS}
|
||||
${LIBHEVCDEC_ASMS} ${LIBHEVCDEC_SRCS})
|
||||
target_compile_definitions(libhevcdec PRIVATE ENABLE_MAIN_REXT_PROFILE)
|
||||
|
|
|
|||
|
|
@ -54,9 +54,7 @@
|
|||
#include "ihevc_dpb_mgr.h"
|
||||
#include "ihevc_error.h"
|
||||
|
||||
#include "ihevcd_defs.h"
|
||||
#include "ihevcd_function_selector.h"
|
||||
#include "ihevcd_structs.h"
|
||||
|
||||
void ihevcd_init_function_ptr(void *pv_codec)
|
||||
{
|
||||
|
|
@ -65,7 +63,7 @@ void ihevcd_init_function_ptr(void *pv_codec)
|
|||
{
|
||||
default:
|
||||
case ARCH_RISCV64_GENERIC:
|
||||
ihevcd_init_function_ptr_generic(pv_codec);
|
||||
ihevcd_init_function_ptr_generic(&ps_codec->s_func_selector);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -54,109 +54,113 @@
|
|||
#include "ihevc_dpb_mgr.h"
|
||||
#include "ihevc_error.h"
|
||||
|
||||
#include "ihevcd_defs.h"
|
||||
#include "ihevcd_function_selector.h"
|
||||
#include "ihevcd_structs.h"
|
||||
|
||||
void ihevcd_init_function_ptr_generic(void *pv_codec)
|
||||
void ihevcd_init_function_ptr_generic(func_selector_t *ps_func_selector)
|
||||
{
|
||||
codec_t *ps_codec = (codec_t *)pv_codec;
|
||||
|
||||
ps_codec->s_func_selector.ihevc_deblk_chroma_horz_fptr = &ihevc_deblk_chroma_horz;
|
||||
ps_codec->s_func_selector.ihevc_deblk_chroma_vert_fptr = &ihevc_deblk_chroma_vert;
|
||||
ps_codec->s_func_selector.ihevc_deblk_luma_vert_fptr = &ihevc_deblk_luma_vert;
|
||||
ps_codec->s_func_selector.ihevc_deblk_luma_horz_fptr = &ihevc_deblk_luma_horz;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_copy_fptr = &ihevc_inter_pred_chroma_copy;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_copy_w16out_fptr = &ihevc_inter_pred_chroma_copy_w16out;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_horz_fptr = &ihevc_inter_pred_chroma_horz;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_horz_w16out_fptr = &ihevc_inter_pred_chroma_horz_w16out;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_fptr = &ihevc_inter_pred_chroma_vert;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_w16inp_fptr = &ihevc_inter_pred_chroma_vert_w16inp;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16inp_w16out;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16out;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_horz_fptr = &ihevc_inter_pred_luma_horz;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_fptr = &ihevc_inter_pred_luma_vert;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_w16out_fptr = &ihevc_inter_pred_luma_vert_w16out;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_w16inp_fptr = &ihevc_inter_pred_luma_vert_w16inp;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_copy_fptr = &ihevc_inter_pred_luma_copy;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_copy_w16out_fptr = &ihevc_inter_pred_luma_copy_w16out;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_horz_w16out_fptr = &ihevc_inter_pred_luma_horz_w16out;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_luma_vert_w16inp_w16out;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_ref_substitution_fptr = &ihevc_intra_pred_chroma_ref_substitution;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_ref_substitution_fptr = &ihevc_intra_pred_luma_ref_substitution;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_ref_subst_all_avlble_fptr = &ihevc_intra_pred_luma_ref_subst_all_avlble;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_ref_filtering_fptr = &ihevc_intra_pred_ref_filtering;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_dc_fptr = &ihevc_intra_pred_chroma_dc;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_horz_fptr = &ihevc_intra_pred_chroma_horz;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode2_fptr = &ihevc_intra_pred_chroma_mode2;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_18_34_fptr = &ihevc_intra_pred_chroma_mode_18_34;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_27_to_33_fptr = &ihevc_intra_pred_chroma_mode_27_to_33;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_3_to_9_fptr = &ihevc_intra_pred_chroma_mode_3_to_9;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_planar_fptr = &ihevc_intra_pred_chroma_planar;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_ver_fptr = &ihevc_intra_pred_chroma_ver;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_11_to_17_fptr = &ihevc_intra_pred_chroma_mode_11_to_17;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_19_to_25_fptr = &ihevc_intra_pred_chroma_mode_19_to_25;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_11_to_17_fptr = &ihevc_intra_pred_luma_mode_11_to_17;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_19_to_25_fptr = &ihevc_intra_pred_luma_mode_19_to_25;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_dc_fptr = &ihevc_intra_pred_luma_dc;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_horz_fptr = &ihevc_intra_pred_luma_horz;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode2_fptr = &ihevc_intra_pred_luma_mode2;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_18_34_fptr = &ihevc_intra_pred_luma_mode_18_34;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_27_to_33_fptr = &ihevc_intra_pred_luma_mode_27_to_33;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_3_to_9_fptr = &ihevc_intra_pred_luma_mode_3_to_9;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_planar_fptr = &ihevc_intra_pred_luma_planar;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_ver_fptr = &ihevc_intra_pred_luma_ver;
|
||||
ps_codec->s_func_selector.ihevc_itrans_4x4_ttype1_fptr = &ihevc_itrans_4x4_ttype1;
|
||||
ps_codec->s_func_selector.ihevc_itrans_4x4_fptr = &ihevc_itrans_4x4;
|
||||
ps_codec->s_func_selector.ihevc_itrans_8x8_fptr = &ihevc_itrans_8x8;
|
||||
ps_codec->s_func_selector.ihevc_itrans_16x16_fptr = &ihevc_itrans_16x16;
|
||||
ps_codec->s_func_selector.ihevc_itrans_32x32_fptr = &ihevc_itrans_32x32;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_4x4_ttype1_fptr = &ihevc_itrans_recon_4x4_ttype1;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_4x4_fptr = &ihevc_itrans_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_8x8_fptr = &ihevc_itrans_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_16x16_fptr = &ihevc_itrans_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_32x32_fptr = &ihevc_itrans_recon_32x32;
|
||||
ps_codec->s_func_selector.ihevc_chroma_itrans_recon_4x4_fptr = &ihevc_chroma_itrans_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_chroma_itrans_recon_8x8_fptr = &ihevc_chroma_itrans_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_chroma_itrans_recon_16x16_fptr = &ihevc_chroma_itrans_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_recon_4x4_ttype1_fptr = &ihevc_recon_4x4_ttype1;
|
||||
ps_codec->s_func_selector.ihevc_recon_4x4_fptr = &ihevc_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_recon_8x8_fptr = &ihevc_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_recon_16x16_fptr = &ihevc_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_recon_32x32_fptr = &ihevc_recon_32x32;
|
||||
ps_codec->s_func_selector.ihevc_chroma_recon_4x4_fptr = &ihevc_chroma_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_chroma_recon_8x8_fptr = &ihevc_chroma_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_chroma_recon_16x16_fptr = &ihevc_chroma_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_memcpy_mul_8_fptr = &ihevc_memcpy_mul_8;
|
||||
ps_codec->s_func_selector.ihevc_memcpy_fptr = &ihevc_memcpy;
|
||||
ps_codec->s_func_selector.ihevc_memset_mul_8_fptr = &ihevc_memset_mul_8;
|
||||
ps_codec->s_func_selector.ihevc_memset_fptr = &ihevc_memset;
|
||||
ps_codec->s_func_selector.ihevc_memset_16bit_mul_8_fptr = &ihevc_memset_16bit_mul_8;
|
||||
ps_codec->s_func_selector.ihevc_memset_16bit_fptr = &ihevc_memset_16bit;
|
||||
ps_codec->s_func_selector.ihevc_pad_left_luma_fptr = &ihevc_pad_left_luma;
|
||||
ps_codec->s_func_selector.ihevc_pad_left_chroma_fptr = &ihevc_pad_left_chroma;
|
||||
ps_codec->s_func_selector.ihevc_pad_right_luma_fptr = &ihevc_pad_right_luma;
|
||||
ps_codec->s_func_selector.ihevc_pad_right_chroma_fptr = &ihevc_pad_right_chroma;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_bi_fptr = &ihevc_weighted_pred_bi;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_bi_default_fptr = &ihevc_weighted_pred_bi_default;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_uni_fptr = &ihevc_weighted_pred_uni;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_bi_fptr = &ihevc_weighted_pred_chroma_bi;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_bi_default_fptr = &ihevc_weighted_pred_chroma_bi_default;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_uni_fptr = &ihevc_weighted_pred_chroma_uni;
|
||||
ps_codec->s_func_selector.ihevc_sao_band_offset_luma_fptr = &ihevc_sao_band_offset_luma;
|
||||
ps_codec->s_func_selector.ihevc_sao_band_offset_chroma_fptr = &ihevc_sao_band_offset_chroma;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class0_fptr = &ihevc_sao_edge_offset_class0;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class0_chroma_fptr = &ihevc_sao_edge_offset_class0_chroma;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class1_fptr = &ihevc_sao_edge_offset_class1;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class1_chroma_fptr = &ihevc_sao_edge_offset_class1_chroma;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class2_fptr = &ihevc_sao_edge_offset_class2;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class2_chroma_fptr = &ihevc_sao_edge_offset_class2_chroma;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class3_fptr = &ihevc_sao_edge_offset_class3;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class3_chroma_fptr = &ihevc_sao_edge_offset_class3_chroma;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_rgba8888_fptr = &ihevcd_fmt_conv_420sp_to_rgba8888;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_rgb565_fptr = &ihevcd_fmt_conv_420sp_to_rgb565;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_420sp_fptr = &ihevcd_fmt_conv_420sp_to_420sp;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_420p_fptr = &ihevcd_fmt_conv_420sp_to_420p;
|
||||
ps_codec->s_func_selector.ihevcd_itrans_recon_dc_luma_fptr = &ihevcd_itrans_recon_dc_luma;
|
||||
ps_codec->s_func_selector.ihevcd_itrans_recon_dc_chroma_fptr = &ihevcd_itrans_recon_dc_chroma;
|
||||
ps_func_selector->ihevc_deblk_chroma_horz_fptr = &ihevc_deblk_chroma_horz;
|
||||
ps_func_selector->ihevc_deblk_chroma_vert_fptr = &ihevc_deblk_chroma_vert;
|
||||
ps_func_selector->ihevc_deblk_luma_vert_fptr = &ihevc_deblk_luma_vert;
|
||||
ps_func_selector->ihevc_deblk_luma_horz_fptr = &ihevc_deblk_luma_horz;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_copy_fptr = &ihevc_inter_pred_chroma_copy;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_copy_w16out_fptr = &ihevc_inter_pred_chroma_copy_w16out;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_horz_fptr = &ihevc_inter_pred_chroma_horz;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_horz_w16out_fptr = &ihevc_inter_pred_chroma_horz_w16out;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_fptr = &ihevc_inter_pred_chroma_vert;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_w16inp_fptr = &ihevc_inter_pred_chroma_vert_w16inp;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16inp_w16out;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16out;
|
||||
ps_func_selector->ihevc_inter_pred_luma_horz_fptr = &ihevc_inter_pred_luma_horz;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_fptr = &ihevc_inter_pred_luma_vert;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_w16out_fptr = &ihevc_inter_pred_luma_vert_w16out;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_w16inp_fptr = &ihevc_inter_pred_luma_vert_w16inp;
|
||||
ps_func_selector->ihevc_inter_pred_luma_copy_fptr = &ihevc_inter_pred_luma_copy;
|
||||
ps_func_selector->ihevc_inter_pred_luma_copy_w16out_fptr = &ihevc_inter_pred_luma_copy_w16out;
|
||||
ps_func_selector->ihevc_inter_pred_luma_horz_w16out_fptr = &ihevc_inter_pred_luma_horz_w16out;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_luma_vert_w16inp_w16out;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_ref_substitution_fptr = &ihevc_intra_pred_chroma_ref_substitution;
|
||||
ps_func_selector->ihevc_intra_pred_luma_ref_substitution_fptr = &ihevc_intra_pred_luma_ref_substitution;
|
||||
ps_func_selector->ihevc_intra_pred_luma_ref_subst_all_avlble_fptr = &ihevc_intra_pred_luma_ref_subst_all_avlble;
|
||||
ps_func_selector->ihevc_intra_pred_ref_filtering_fptr = &ihevc_intra_pred_ref_filtering;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_ref_filtering_fptr = &ihevc_intra_pred_chroma_ref_filtering;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_dc_fptr = &ihevc_intra_pred_chroma_dc;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_horz_fptr = &ihevc_intra_pred_chroma_horz;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode2_fptr = &ihevc_intra_pred_chroma_mode2;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_18_34_fptr = &ihevc_intra_pred_chroma_mode_18_34;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_27_to_33_fptr = &ihevc_intra_pred_chroma_mode_27_to_33;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_3_to_9_fptr = &ihevc_intra_pred_chroma_mode_3_to_9;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_planar_fptr = &ihevc_intra_pred_chroma_planar;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_ver_fptr = &ihevc_intra_pred_chroma_ver;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_11_to_17_fptr = &ihevc_intra_pred_chroma_mode_11_to_17;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_19_to_25_fptr = &ihevc_intra_pred_chroma_mode_19_to_25;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_11_to_17_fptr = &ihevc_intra_pred_luma_mode_11_to_17;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_19_to_25_fptr = &ihevc_intra_pred_luma_mode_19_to_25;
|
||||
ps_func_selector->ihevc_intra_pred_luma_dc_fptr = &ihevc_intra_pred_luma_dc;
|
||||
ps_func_selector->ihevc_intra_pred_luma_horz_fptr = &ihevc_intra_pred_luma_horz;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode2_fptr = &ihevc_intra_pred_luma_mode2;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_18_34_fptr = &ihevc_intra_pred_luma_mode_18_34;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_27_to_33_fptr = &ihevc_intra_pred_luma_mode_27_to_33;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_3_to_9_fptr = &ihevc_intra_pred_luma_mode_3_to_9;
|
||||
ps_func_selector->ihevc_intra_pred_luma_planar_fptr = &ihevc_intra_pred_luma_planar;
|
||||
ps_func_selector->ihevc_intra_pred_luma_ver_fptr = &ihevc_intra_pred_luma_ver;
|
||||
ps_func_selector->ihevc_itrans_4x4_ttype1_fptr = &ihevc_itrans_4x4_ttype1;
|
||||
ps_func_selector->ihevc_itrans_4x4_fptr = &ihevc_itrans_4x4;
|
||||
ps_func_selector->ihevc_itrans_8x8_fptr = &ihevc_itrans_8x8;
|
||||
ps_func_selector->ihevc_itrans_16x16_fptr = &ihevc_itrans_16x16;
|
||||
ps_func_selector->ihevc_itrans_32x32_fptr = &ihevc_itrans_32x32;
|
||||
ps_func_selector->ihevc_itrans_res_4x4_ttype1_fptr = &ihevc_itrans_res_4x4_ttype1;
|
||||
ps_func_selector->ihevc_itrans_res_4x4_fptr = &ihevc_itrans_res_4x4;
|
||||
ps_func_selector->ihevc_itrans_res_8x8_fptr = &ihevc_itrans_res_8x8;
|
||||
ps_func_selector->ihevc_itrans_res_16x16_fptr = &ihevc_itrans_res_16x16;
|
||||
ps_func_selector->ihevc_itrans_res_32x32_fptr = &ihevc_itrans_res_32x32;
|
||||
ps_func_selector->ihevc_itrans_recon_4x4_ttype1_fptr = &ihevc_itrans_recon_4x4_ttype1;
|
||||
ps_func_selector->ihevc_itrans_recon_4x4_fptr = &ihevc_itrans_recon_4x4;
|
||||
ps_func_selector->ihevc_itrans_recon_8x8_fptr = &ihevc_itrans_recon_8x8;
|
||||
ps_func_selector->ihevc_itrans_recon_16x16_fptr = &ihevc_itrans_recon_16x16;
|
||||
ps_func_selector->ihevc_itrans_recon_32x32_fptr = &ihevc_itrans_recon_32x32;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_4x4_fptr = &ihevc_chroma_itrans_recon_4x4;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_8x8_fptr = &ihevc_chroma_itrans_recon_8x8;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_16x16_fptr = &ihevc_chroma_itrans_recon_16x16;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_32x32_fptr = &ihevc_chroma_itrans_recon_32x32;
|
||||
ps_func_selector->ihevc_recon_4x4_ttype1_fptr = &ihevc_recon_4x4_ttype1;
|
||||
ps_func_selector->ihevc_recon_4x4_fptr = &ihevc_recon_4x4;
|
||||
ps_func_selector->ihevc_recon_8x8_fptr = &ihevc_recon_8x8;
|
||||
ps_func_selector->ihevc_recon_16x16_fptr = &ihevc_recon_16x16;
|
||||
ps_func_selector->ihevc_recon_32x32_fptr = &ihevc_recon_32x32;
|
||||
ps_func_selector->ihevc_chroma_recon_4x4_fptr = &ihevc_chroma_recon_4x4;
|
||||
ps_func_selector->ihevc_chroma_recon_8x8_fptr = &ihevc_chroma_recon_8x8;
|
||||
ps_func_selector->ihevc_chroma_recon_16x16_fptr = &ihevc_chroma_recon_16x16;
|
||||
ps_func_selector->ihevc_chroma_recon_32x32_fptr = &ihevc_chroma_recon_32x32;
|
||||
ps_func_selector->ihevc_memcpy_mul_8_fptr = &ihevc_memcpy_mul_8;
|
||||
ps_func_selector->ihevc_memcpy_fptr = &ihevc_memcpy;
|
||||
ps_func_selector->ihevc_memset_mul_8_fptr = &ihevc_memset_mul_8;
|
||||
ps_func_selector->ihevc_memset_fptr = &ihevc_memset;
|
||||
ps_func_selector->ihevc_memset_16bit_mul_8_fptr = &ihevc_memset_16bit_mul_8;
|
||||
ps_func_selector->ihevc_memset_16bit_fptr = &ihevc_memset_16bit;
|
||||
ps_func_selector->ihevc_pad_left_luma_fptr = &ihevc_pad_left_luma;
|
||||
ps_func_selector->ihevc_pad_left_chroma_fptr = &ihevc_pad_left_chroma;
|
||||
ps_func_selector->ihevc_pad_right_luma_fptr = &ihevc_pad_right_luma;
|
||||
ps_func_selector->ihevc_pad_right_chroma_fptr = &ihevc_pad_right_chroma;
|
||||
ps_func_selector->ihevc_weighted_pred_bi_fptr = &ihevc_weighted_pred_bi;
|
||||
ps_func_selector->ihevc_weighted_pred_bi_default_fptr = &ihevc_weighted_pred_bi_default;
|
||||
ps_func_selector->ihevc_weighted_pred_uni_fptr = &ihevc_weighted_pred_uni;
|
||||
ps_func_selector->ihevc_weighted_pred_chroma_bi_fptr = &ihevc_weighted_pred_chroma_bi;
|
||||
ps_func_selector->ihevc_weighted_pred_chroma_bi_default_fptr = &ihevc_weighted_pred_chroma_bi_default;
|
||||
ps_func_selector->ihevc_weighted_pred_chroma_uni_fptr = &ihevc_weighted_pred_chroma_uni;
|
||||
ps_func_selector->ihevc_sao_band_offset_luma_fptr = &ihevc_sao_band_offset_luma;
|
||||
ps_func_selector->ihevc_sao_band_offset_chroma_fptr = &ihevc_sao_band_offset_chroma;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class0_fptr = &ihevc_sao_edge_offset_class0;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class0_chroma_fptr = &ihevc_sao_edge_offset_class0_chroma;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class1_fptr = &ihevc_sao_edge_offset_class1;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class1_chroma_fptr = &ihevc_sao_edge_offset_class1_chroma;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class2_fptr = &ihevc_sao_edge_offset_class2;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class2_chroma_fptr = &ihevc_sao_edge_offset_class2_chroma;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class3_fptr = &ihevc_sao_edge_offset_class3;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class3_chroma_fptr = &ihevc_sao_edge_offset_class3_chroma;
|
||||
ps_func_selector->ihevcd_fmt_conv_420sp_to_420sp_fptr = &ihevcd_fmt_conv_420sp_to_420sp;
|
||||
ps_func_selector->ihevcd_fmt_conv_420sp_to_420p_fptr = &ihevcd_fmt_conv_420sp_to_420p;
|
||||
ps_func_selector->ihevcd_fmt_conv_444sp_to_444p_fptr = &ihevcd_fmt_conv_444sp_to_444p;
|
||||
ps_func_selector->ihevcd_itrans_recon_dc_luma_fptr = &ihevcd_itrans_recon_dc_luma;
|
||||
ps_func_selector->ihevcd_itrans_recon_dc_chroma_fptr = &ihevcd_itrans_recon_dc_chroma;
|
||||
ps_func_selector->ihevcd_itrans_res_dc_fptr = &ihevcd_itrans_res_dc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -64,23 +64,23 @@ void ihevcd_init_function_ptr(void *pv_codec)
|
|||
switch(ps_codec->e_processor_arch)
|
||||
{
|
||||
case ARCH_X86_GENERIC:
|
||||
ihevcd_init_function_ptr_generic(pv_codec);
|
||||
ihevcd_init_function_ptr_generic(&ps_codec->s_func_selector);
|
||||
break;
|
||||
case ARCH_X86_SSSE3:
|
||||
ihevcd_init_function_ptr_ssse3(pv_codec);
|
||||
ihevcd_init_function_ptr_ssse3(&ps_codec->s_func_selector);
|
||||
break;
|
||||
case ARCH_X86_SSE42:
|
||||
ihevcd_init_function_ptr_sse42(pv_codec);
|
||||
ihevcd_init_function_ptr_sse42(&ps_codec->s_func_selector);
|
||||
break;
|
||||
case ARCH_X86_AVX2:
|
||||
#ifndef DISABLE_AVX2
|
||||
ihevcd_init_function_ptr_avx2(pv_codec);
|
||||
ihevcd_init_function_ptr_avx2(&ps_codec->s_func_selector);
|
||||
#else
|
||||
ihevcd_init_function_ptr_sse42(pv_codec);
|
||||
ihevcd_init_function_ptr_sse42(&ps_codec->s_func_selector);
|
||||
#endif
|
||||
break;
|
||||
default:
|
||||
ihevcd_init_function_ptr_ssse3(pv_codec);
|
||||
ihevcd_init_function_ptr_ssse3(&ps_codec->s_func_selector);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,109 +54,113 @@
|
|||
#include "ihevc_dpb_mgr.h"
|
||||
#include "ihevc_error.h"
|
||||
|
||||
#include "ihevcd_defs.h"
|
||||
#include "ihevcd_function_selector.h"
|
||||
#include "ihevcd_structs.h"
|
||||
|
||||
void ihevcd_init_function_ptr_generic(void *pv_codec)
|
||||
void ihevcd_init_function_ptr_generic(func_selector_t *ps_func_selector)
|
||||
{
|
||||
codec_t *ps_codec = (codec_t *)pv_codec;
|
||||
|
||||
ps_codec->s_func_selector.ihevc_deblk_chroma_horz_fptr = &ihevc_deblk_chroma_horz;
|
||||
ps_codec->s_func_selector.ihevc_deblk_chroma_vert_fptr = &ihevc_deblk_chroma_vert;
|
||||
ps_codec->s_func_selector.ihevc_deblk_luma_vert_fptr = &ihevc_deblk_luma_vert;
|
||||
ps_codec->s_func_selector.ihevc_deblk_luma_horz_fptr = &ihevc_deblk_luma_horz;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_copy_fptr = &ihevc_inter_pred_chroma_copy;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_copy_w16out_fptr = &ihevc_inter_pred_chroma_copy_w16out;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_horz_fptr = &ihevc_inter_pred_chroma_horz;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_horz_w16out_fptr = &ihevc_inter_pred_chroma_horz_w16out;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_fptr = &ihevc_inter_pred_chroma_vert;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_w16inp_fptr = &ihevc_inter_pred_chroma_vert_w16inp;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16inp_w16out;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16out;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_horz_fptr = &ihevc_inter_pred_luma_horz;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_fptr = &ihevc_inter_pred_luma_vert;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_w16out_fptr = &ihevc_inter_pred_luma_vert_w16out;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_w16inp_fptr = &ihevc_inter_pred_luma_vert_w16inp;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_copy_fptr = &ihevc_inter_pred_luma_copy;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_copy_w16out_fptr = &ihevc_inter_pred_luma_copy_w16out;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_horz_w16out_fptr = &ihevc_inter_pred_luma_horz_w16out;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_luma_vert_w16inp_w16out;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_ref_substitution_fptr = &ihevc_intra_pred_chroma_ref_substitution;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_ref_substitution_fptr = &ihevc_intra_pred_luma_ref_substitution;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_ref_subst_all_avlble_fptr = &ihevc_intra_pred_luma_ref_subst_all_avlble;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_ref_filtering_fptr = &ihevc_intra_pred_ref_filtering;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_dc_fptr = &ihevc_intra_pred_chroma_dc;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_horz_fptr = &ihevc_intra_pred_chroma_horz;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode2_fptr = &ihevc_intra_pred_chroma_mode2;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_18_34_fptr = &ihevc_intra_pred_chroma_mode_18_34;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_27_to_33_fptr = &ihevc_intra_pred_chroma_mode_27_to_33;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_3_to_9_fptr = &ihevc_intra_pred_chroma_mode_3_to_9;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_planar_fptr = &ihevc_intra_pred_chroma_planar;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_ver_fptr = &ihevc_intra_pred_chroma_ver;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_11_to_17_fptr = &ihevc_intra_pred_chroma_mode_11_to_17;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_19_to_25_fptr = &ihevc_intra_pred_chroma_mode_19_to_25;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_11_to_17_fptr = &ihevc_intra_pred_luma_mode_11_to_17;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_19_to_25_fptr = &ihevc_intra_pred_luma_mode_19_to_25;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_dc_fptr = &ihevc_intra_pred_luma_dc;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_horz_fptr = &ihevc_intra_pred_luma_horz;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode2_fptr = &ihevc_intra_pred_luma_mode2;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_18_34_fptr = &ihevc_intra_pred_luma_mode_18_34;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_27_to_33_fptr = &ihevc_intra_pred_luma_mode_27_to_33;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_3_to_9_fptr = &ihevc_intra_pred_luma_mode_3_to_9;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_planar_fptr = &ihevc_intra_pred_luma_planar;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_ver_fptr = &ihevc_intra_pred_luma_ver;
|
||||
ps_codec->s_func_selector.ihevc_itrans_4x4_ttype1_fptr = &ihevc_itrans_4x4_ttype1;
|
||||
ps_codec->s_func_selector.ihevc_itrans_4x4_fptr = &ihevc_itrans_4x4;
|
||||
ps_codec->s_func_selector.ihevc_itrans_8x8_fptr = &ihevc_itrans_8x8;
|
||||
ps_codec->s_func_selector.ihevc_itrans_16x16_fptr = &ihevc_itrans_16x16;
|
||||
ps_codec->s_func_selector.ihevc_itrans_32x32_fptr = &ihevc_itrans_32x32;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_4x4_ttype1_fptr = &ihevc_itrans_recon_4x4_ttype1;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_4x4_fptr = &ihevc_itrans_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_8x8_fptr = &ihevc_itrans_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_16x16_fptr = &ihevc_itrans_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_32x32_fptr = &ihevc_itrans_recon_32x32;
|
||||
ps_codec->s_func_selector.ihevc_chroma_itrans_recon_4x4_fptr = &ihevc_chroma_itrans_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_chroma_itrans_recon_8x8_fptr = &ihevc_chroma_itrans_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_chroma_itrans_recon_16x16_fptr = &ihevc_chroma_itrans_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_recon_4x4_ttype1_fptr = &ihevc_recon_4x4_ttype1;
|
||||
ps_codec->s_func_selector.ihevc_recon_4x4_fptr = &ihevc_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_recon_8x8_fptr = &ihevc_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_recon_16x16_fptr = &ihevc_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_recon_32x32_fptr = &ihevc_recon_32x32;
|
||||
ps_codec->s_func_selector.ihevc_chroma_recon_4x4_fptr = &ihevc_chroma_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_chroma_recon_8x8_fptr = &ihevc_chroma_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_chroma_recon_16x16_fptr = &ihevc_chroma_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_memcpy_mul_8_fptr = &ihevc_memcpy_mul_8;
|
||||
ps_codec->s_func_selector.ihevc_memcpy_fptr = &ihevc_memcpy;
|
||||
ps_codec->s_func_selector.ihevc_memset_mul_8_fptr = &ihevc_memset_mul_8;
|
||||
ps_codec->s_func_selector.ihevc_memset_fptr = &ihevc_memset;
|
||||
ps_codec->s_func_selector.ihevc_memset_16bit_mul_8_fptr = &ihevc_memset_16bit_mul_8;
|
||||
ps_codec->s_func_selector.ihevc_memset_16bit_fptr = &ihevc_memset_16bit;
|
||||
ps_codec->s_func_selector.ihevc_pad_left_luma_fptr = &ihevc_pad_left_luma;
|
||||
ps_codec->s_func_selector.ihevc_pad_left_chroma_fptr = &ihevc_pad_left_chroma;
|
||||
ps_codec->s_func_selector.ihevc_pad_right_luma_fptr = &ihevc_pad_right_luma;
|
||||
ps_codec->s_func_selector.ihevc_pad_right_chroma_fptr = &ihevc_pad_right_chroma;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_bi_fptr = &ihevc_weighted_pred_bi;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_bi_default_fptr = &ihevc_weighted_pred_bi_default;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_uni_fptr = &ihevc_weighted_pred_uni;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_bi_fptr = &ihevc_weighted_pred_chroma_bi;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_bi_default_fptr = &ihevc_weighted_pred_chroma_bi_default;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_uni_fptr = &ihevc_weighted_pred_chroma_uni;
|
||||
ps_codec->s_func_selector.ihevc_sao_band_offset_luma_fptr = &ihevc_sao_band_offset_luma;
|
||||
ps_codec->s_func_selector.ihevc_sao_band_offset_chroma_fptr = &ihevc_sao_band_offset_chroma;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class0_fptr = &ihevc_sao_edge_offset_class0;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class0_chroma_fptr = &ihevc_sao_edge_offset_class0_chroma;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class1_fptr = &ihevc_sao_edge_offset_class1;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class1_chroma_fptr = &ihevc_sao_edge_offset_class1_chroma;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class2_fptr = &ihevc_sao_edge_offset_class2;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class2_chroma_fptr = &ihevc_sao_edge_offset_class2_chroma;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class3_fptr = &ihevc_sao_edge_offset_class3;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class3_chroma_fptr = &ihevc_sao_edge_offset_class3_chroma;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_rgba8888_fptr = &ihevcd_fmt_conv_420sp_to_rgba8888;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_rgb565_fptr = &ihevcd_fmt_conv_420sp_to_rgb565;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_420sp_fptr = &ihevcd_fmt_conv_420sp_to_420sp;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_420p_fptr = &ihevcd_fmt_conv_420sp_to_420p;
|
||||
ps_codec->s_func_selector.ihevcd_itrans_recon_dc_luma_fptr = &ihevcd_itrans_recon_dc_luma;
|
||||
ps_codec->s_func_selector.ihevcd_itrans_recon_dc_chroma_fptr = &ihevcd_itrans_recon_dc_chroma;
|
||||
ps_func_selector->ihevc_deblk_chroma_horz_fptr = &ihevc_deblk_chroma_horz;
|
||||
ps_func_selector->ihevc_deblk_chroma_vert_fptr = &ihevc_deblk_chroma_vert;
|
||||
ps_func_selector->ihevc_deblk_luma_vert_fptr = &ihevc_deblk_luma_vert;
|
||||
ps_func_selector->ihevc_deblk_luma_horz_fptr = &ihevc_deblk_luma_horz;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_copy_fptr = &ihevc_inter_pred_chroma_copy;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_copy_w16out_fptr = &ihevc_inter_pred_chroma_copy_w16out;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_horz_fptr = &ihevc_inter_pred_chroma_horz;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_horz_w16out_fptr = &ihevc_inter_pred_chroma_horz_w16out;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_fptr = &ihevc_inter_pred_chroma_vert;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_w16inp_fptr = &ihevc_inter_pred_chroma_vert_w16inp;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16inp_w16out;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16out;
|
||||
ps_func_selector->ihevc_inter_pred_luma_horz_fptr = &ihevc_inter_pred_luma_horz;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_fptr = &ihevc_inter_pred_luma_vert;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_w16out_fptr = &ihevc_inter_pred_luma_vert_w16out;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_w16inp_fptr = &ihevc_inter_pred_luma_vert_w16inp;
|
||||
ps_func_selector->ihevc_inter_pred_luma_copy_fptr = &ihevc_inter_pred_luma_copy;
|
||||
ps_func_selector->ihevc_inter_pred_luma_copy_w16out_fptr = &ihevc_inter_pred_luma_copy_w16out;
|
||||
ps_func_selector->ihevc_inter_pred_luma_horz_w16out_fptr = &ihevc_inter_pred_luma_horz_w16out;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_luma_vert_w16inp_w16out;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_ref_substitution_fptr = &ihevc_intra_pred_chroma_ref_substitution;
|
||||
ps_func_selector->ihevc_intra_pred_luma_ref_substitution_fptr = &ihevc_intra_pred_luma_ref_substitution;
|
||||
ps_func_selector->ihevc_intra_pred_luma_ref_subst_all_avlble_fptr = &ihevc_intra_pred_luma_ref_subst_all_avlble;
|
||||
ps_func_selector->ihevc_intra_pred_ref_filtering_fptr = &ihevc_intra_pred_ref_filtering;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_ref_filtering_fptr = &ihevc_intra_pred_chroma_ref_filtering;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_dc_fptr = &ihevc_intra_pred_chroma_dc;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_horz_fptr = &ihevc_intra_pred_chroma_horz;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode2_fptr = &ihevc_intra_pred_chroma_mode2;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_18_34_fptr = &ihevc_intra_pred_chroma_mode_18_34;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_27_to_33_fptr = &ihevc_intra_pred_chroma_mode_27_to_33;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_3_to_9_fptr = &ihevc_intra_pred_chroma_mode_3_to_9;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_planar_fptr = &ihevc_intra_pred_chroma_planar;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_ver_fptr = &ihevc_intra_pred_chroma_ver;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_11_to_17_fptr = &ihevc_intra_pred_chroma_mode_11_to_17;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_19_to_25_fptr = &ihevc_intra_pred_chroma_mode_19_to_25;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_11_to_17_fptr = &ihevc_intra_pred_luma_mode_11_to_17;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_19_to_25_fptr = &ihevc_intra_pred_luma_mode_19_to_25;
|
||||
ps_func_selector->ihevc_intra_pred_luma_dc_fptr = &ihevc_intra_pred_luma_dc;
|
||||
ps_func_selector->ihevc_intra_pred_luma_horz_fptr = &ihevc_intra_pred_luma_horz;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode2_fptr = &ihevc_intra_pred_luma_mode2;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_18_34_fptr = &ihevc_intra_pred_luma_mode_18_34;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_27_to_33_fptr = &ihevc_intra_pred_luma_mode_27_to_33;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_3_to_9_fptr = &ihevc_intra_pred_luma_mode_3_to_9;
|
||||
ps_func_selector->ihevc_intra_pred_luma_planar_fptr = &ihevc_intra_pred_luma_planar;
|
||||
ps_func_selector->ihevc_intra_pred_luma_ver_fptr = &ihevc_intra_pred_luma_ver;
|
||||
ps_func_selector->ihevc_itrans_4x4_ttype1_fptr = &ihevc_itrans_4x4_ttype1;
|
||||
ps_func_selector->ihevc_itrans_4x4_fptr = &ihevc_itrans_4x4;
|
||||
ps_func_selector->ihevc_itrans_8x8_fptr = &ihevc_itrans_8x8;
|
||||
ps_func_selector->ihevc_itrans_16x16_fptr = &ihevc_itrans_16x16;
|
||||
ps_func_selector->ihevc_itrans_32x32_fptr = &ihevc_itrans_32x32;
|
||||
ps_func_selector->ihevc_itrans_res_4x4_ttype1_fptr = &ihevc_itrans_res_4x4_ttype1;
|
||||
ps_func_selector->ihevc_itrans_res_4x4_fptr = &ihevc_itrans_res_4x4;
|
||||
ps_func_selector->ihevc_itrans_res_8x8_fptr = &ihevc_itrans_res_8x8;
|
||||
ps_func_selector->ihevc_itrans_res_16x16_fptr = &ihevc_itrans_res_16x16;
|
||||
ps_func_selector->ihevc_itrans_res_32x32_fptr = &ihevc_itrans_res_32x32;
|
||||
ps_func_selector->ihevc_itrans_recon_4x4_ttype1_fptr = &ihevc_itrans_recon_4x4_ttype1;
|
||||
ps_func_selector->ihevc_itrans_recon_4x4_fptr = &ihevc_itrans_recon_4x4;
|
||||
ps_func_selector->ihevc_itrans_recon_8x8_fptr = &ihevc_itrans_recon_8x8;
|
||||
ps_func_selector->ihevc_itrans_recon_16x16_fptr = &ihevc_itrans_recon_16x16;
|
||||
ps_func_selector->ihevc_itrans_recon_32x32_fptr = &ihevc_itrans_recon_32x32;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_4x4_fptr = &ihevc_chroma_itrans_recon_4x4;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_8x8_fptr = &ihevc_chroma_itrans_recon_8x8;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_16x16_fptr = &ihevc_chroma_itrans_recon_16x16;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_32x32_fptr = &ihevc_chroma_itrans_recon_32x32;
|
||||
ps_func_selector->ihevc_recon_4x4_ttype1_fptr = &ihevc_recon_4x4_ttype1;
|
||||
ps_func_selector->ihevc_recon_4x4_fptr = &ihevc_recon_4x4;
|
||||
ps_func_selector->ihevc_recon_8x8_fptr = &ihevc_recon_8x8;
|
||||
ps_func_selector->ihevc_recon_16x16_fptr = &ihevc_recon_16x16;
|
||||
ps_func_selector->ihevc_recon_32x32_fptr = &ihevc_recon_32x32;
|
||||
ps_func_selector->ihevc_chroma_recon_4x4_fptr = &ihevc_chroma_recon_4x4;
|
||||
ps_func_selector->ihevc_chroma_recon_8x8_fptr = &ihevc_chroma_recon_8x8;
|
||||
ps_func_selector->ihevc_chroma_recon_16x16_fptr = &ihevc_chroma_recon_16x16;
|
||||
ps_func_selector->ihevc_chroma_recon_32x32_fptr = &ihevc_chroma_recon_32x32;
|
||||
ps_func_selector->ihevc_memcpy_mul_8_fptr = &ihevc_memcpy_mul_8;
|
||||
ps_func_selector->ihevc_memcpy_fptr = &ihevc_memcpy;
|
||||
ps_func_selector->ihevc_memset_mul_8_fptr = &ihevc_memset_mul_8;
|
||||
ps_func_selector->ihevc_memset_fptr = &ihevc_memset;
|
||||
ps_func_selector->ihevc_memset_16bit_mul_8_fptr = &ihevc_memset_16bit_mul_8;
|
||||
ps_func_selector->ihevc_memset_16bit_fptr = &ihevc_memset_16bit;
|
||||
ps_func_selector->ihevc_pad_left_luma_fptr = &ihevc_pad_left_luma;
|
||||
ps_func_selector->ihevc_pad_left_chroma_fptr = &ihevc_pad_left_chroma;
|
||||
ps_func_selector->ihevc_pad_right_luma_fptr = &ihevc_pad_right_luma;
|
||||
ps_func_selector->ihevc_pad_right_chroma_fptr = &ihevc_pad_right_chroma;
|
||||
ps_func_selector->ihevc_weighted_pred_bi_fptr = &ihevc_weighted_pred_bi;
|
||||
ps_func_selector->ihevc_weighted_pred_bi_default_fptr = &ihevc_weighted_pred_bi_default;
|
||||
ps_func_selector->ihevc_weighted_pred_uni_fptr = &ihevc_weighted_pred_uni;
|
||||
ps_func_selector->ihevc_weighted_pred_chroma_bi_fptr = &ihevc_weighted_pred_chroma_bi;
|
||||
ps_func_selector->ihevc_weighted_pred_chroma_bi_default_fptr = &ihevc_weighted_pred_chroma_bi_default;
|
||||
ps_func_selector->ihevc_weighted_pred_chroma_uni_fptr = &ihevc_weighted_pred_chroma_uni;
|
||||
ps_func_selector->ihevc_sao_band_offset_luma_fptr = &ihevc_sao_band_offset_luma;
|
||||
ps_func_selector->ihevc_sao_band_offset_chroma_fptr = &ihevc_sao_band_offset_chroma;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class0_fptr = &ihevc_sao_edge_offset_class0;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class0_chroma_fptr = &ihevc_sao_edge_offset_class0_chroma;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class1_fptr = &ihevc_sao_edge_offset_class1;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class1_chroma_fptr = &ihevc_sao_edge_offset_class1_chroma;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class2_fptr = &ihevc_sao_edge_offset_class2;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class2_chroma_fptr = &ihevc_sao_edge_offset_class2_chroma;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class3_fptr = &ihevc_sao_edge_offset_class3;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class3_chroma_fptr = &ihevc_sao_edge_offset_class3_chroma;
|
||||
ps_func_selector->ihevcd_fmt_conv_420sp_to_420sp_fptr = &ihevcd_fmt_conv_420sp_to_420sp;
|
||||
ps_func_selector->ihevcd_fmt_conv_420sp_to_420p_fptr = &ihevcd_fmt_conv_420sp_to_420p;
|
||||
ps_func_selector->ihevcd_fmt_conv_444sp_to_444p_fptr = &ihevcd_fmt_conv_444sp_to_444p;
|
||||
ps_func_selector->ihevcd_itrans_recon_dc_luma_fptr = &ihevcd_itrans_recon_dc_luma;
|
||||
ps_func_selector->ihevcd_itrans_recon_dc_chroma_fptr = &ihevcd_itrans_recon_dc_chroma;
|
||||
ps_func_selector->ihevcd_itrans_res_dc_fptr = &ihevcd_itrans_res_dc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,109 +54,113 @@
|
|||
#include "ihevc_dpb_mgr.h"
|
||||
#include "ihevc_error.h"
|
||||
|
||||
#include "ihevcd_defs.h"
|
||||
#include "ihevcd_function_selector.h"
|
||||
#include "ihevcd_structs.h"
|
||||
|
||||
void ihevcd_init_function_ptr_sse42(void *pv_codec)
|
||||
void ihevcd_init_function_ptr_sse42(func_selector_t *ps_func_selector)
|
||||
{
|
||||
codec_t *ps_codec = (codec_t *)pv_codec;
|
||||
|
||||
ps_codec->s_func_selector.ihevc_deblk_chroma_horz_fptr = &ihevc_deblk_chroma_horz_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_deblk_chroma_vert_fptr = &ihevc_deblk_chroma_vert_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_deblk_luma_vert_fptr = &ihevc_deblk_luma_vert_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_deblk_luma_horz_fptr = &ihevc_deblk_luma_horz_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_copy_fptr = &ihevc_inter_pred_chroma_copy_sse42;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_copy_w16out_fptr = &ihevc_inter_pred_chroma_copy_w16out_sse42;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_horz_fptr = &ihevc_inter_pred_chroma_horz_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_horz_w16out_fptr = &ihevc_inter_pred_chroma_horz_w16out_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_fptr = &ihevc_inter_pred_chroma_vert_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_w16inp_fptr = &ihevc_inter_pred_chroma_vert_w16inp_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16inp_w16out_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16out_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_horz_fptr = &ihevc_inter_pred_luma_horz_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_fptr = &ihevc_inter_pred_luma_vert_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_w16out_fptr = &ihevc_inter_pred_luma_vert_w16out_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_w16inp_fptr = &ihevc_inter_pred_luma_vert_w16inp_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_copy_fptr = &ihevc_inter_pred_luma_copy_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_copy_w16out_fptr = &ihevc_inter_pred_luma_copy_w16out_sse42;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_horz_w16out_fptr = &ihevc_inter_pred_luma_horz_w16out_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_luma_vert_w16inp_w16out_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_ref_substitution_fptr = &ihevc_intra_pred_chroma_ref_substitution;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_ref_substitution_fptr = &ihevc_intra_pred_luma_ref_substitution;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_ref_subst_all_avlble_fptr = &ihevc_intra_pred_luma_ref_subst_all_avlble;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_ref_filtering_fptr = &ihevc_intra_pred_ref_filtering_sse42;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_dc_fptr = &ihevc_intra_pred_chroma_dc_sse42;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_horz_fptr = &ihevc_intra_pred_chroma_horz_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode2_fptr = &ihevc_intra_pred_chroma_mode2_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_18_34_fptr = &ihevc_intra_pred_chroma_mode_18_34_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_27_to_33_fptr = &ihevc_intra_pred_chroma_mode_27_to_33_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_3_to_9_fptr = &ihevc_intra_pred_chroma_mode_3_to_9_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_planar_fptr = &ihevc_intra_pred_chroma_planar_sse42;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_ver_fptr = &ihevc_intra_pred_chroma_ver_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_11_to_17_fptr = &ihevc_intra_pred_chroma_mode_11_to_17_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_19_to_25_fptr = &ihevc_intra_pred_chroma_mode_19_to_25_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_11_to_17_fptr = &ihevc_intra_pred_luma_mode_11_to_17_sse42;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_19_to_25_fptr = &ihevc_intra_pred_luma_mode_19_to_25_sse42;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_dc_fptr = &ihevc_intra_pred_luma_dc_sse42;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_horz_fptr = &ihevc_intra_pred_luma_horz_sse42;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode2_fptr = &ihevc_intra_pred_luma_mode2_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_18_34_fptr = &ihevc_intra_pred_luma_mode_18_34_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_27_to_33_fptr = &ihevc_intra_pred_luma_mode_27_to_33_sse42;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_3_to_9_fptr = &ihevc_intra_pred_luma_mode_3_to_9_sse42;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_planar_fptr = &ihevc_intra_pred_luma_planar_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_ver_fptr = &ihevc_intra_pred_luma_ver_sse42;
|
||||
ps_codec->s_func_selector.ihevc_itrans_4x4_ttype1_fptr = &ihevc_itrans_4x4_ttype1;
|
||||
ps_codec->s_func_selector.ihevc_itrans_4x4_fptr = &ihevc_itrans_4x4;
|
||||
ps_codec->s_func_selector.ihevc_itrans_8x8_fptr = &ihevc_itrans_8x8;
|
||||
ps_codec->s_func_selector.ihevc_itrans_16x16_fptr = &ihevc_itrans_16x16;
|
||||
ps_codec->s_func_selector.ihevc_itrans_32x32_fptr = &ihevc_itrans_32x32;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_4x4_ttype1_fptr = &ihevc_itrans_recon_4x4_ttype1_sse42;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_4x4_fptr = &ihevc_itrans_recon_4x4_sse42;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_8x8_fptr = &ihevc_itrans_recon_8x8_sse42;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_16x16_fptr = &ihevc_itrans_recon_16x16_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_32x32_fptr = &ihevc_itrans_recon_32x32_sse42;
|
||||
ps_codec->s_func_selector.ihevc_chroma_itrans_recon_4x4_fptr = &ihevc_chroma_itrans_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_chroma_itrans_recon_8x8_fptr = &ihevc_chroma_itrans_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_chroma_itrans_recon_16x16_fptr = &ihevc_chroma_itrans_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_recon_4x4_ttype1_fptr = &ihevc_recon_4x4_ttype1;
|
||||
ps_codec->s_func_selector.ihevc_recon_4x4_fptr = &ihevc_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_recon_8x8_fptr = &ihevc_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_recon_16x16_fptr = &ihevc_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_recon_32x32_fptr = &ihevc_recon_32x32;
|
||||
ps_codec->s_func_selector.ihevc_chroma_recon_4x4_fptr = &ihevc_chroma_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_chroma_recon_8x8_fptr = &ihevc_chroma_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_chroma_recon_16x16_fptr = &ihevc_chroma_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_memcpy_mul_8_fptr = &ihevc_memcpy_mul_8;
|
||||
ps_codec->s_func_selector.ihevc_memcpy_fptr = &ihevc_memcpy;
|
||||
ps_codec->s_func_selector.ihevc_memset_mul_8_fptr = &ihevc_memset_mul_8;
|
||||
ps_codec->s_func_selector.ihevc_memset_fptr = &ihevc_memset;
|
||||
ps_codec->s_func_selector.ihevc_memset_16bit_mul_8_fptr = &ihevc_memset_16bit_mul_8;
|
||||
ps_codec->s_func_selector.ihevc_memset_16bit_fptr = &ihevc_memset_16bit;
|
||||
ps_codec->s_func_selector.ihevc_pad_left_luma_fptr = &ihevc_pad_left_luma;
|
||||
ps_codec->s_func_selector.ihevc_pad_left_chroma_fptr = &ihevc_pad_left_chroma;
|
||||
ps_codec->s_func_selector.ihevc_pad_right_luma_fptr = &ihevc_pad_right_luma;
|
||||
ps_codec->s_func_selector.ihevc_pad_right_chroma_fptr = &ihevc_pad_right_chroma;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_bi_fptr = &ihevc_weighted_pred_bi_sse42;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_bi_default_fptr = &ihevc_weighted_pred_bi_default_sse42;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_uni_fptr = &ihevc_weighted_pred_uni_sse42;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_bi_fptr = &ihevc_weighted_pred_chroma_bi_sse42;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_bi_default_fptr = &ihevc_weighted_pred_chroma_bi_default_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_uni_fptr = &ihevc_weighted_pred_chroma_uni_sse42;
|
||||
ps_codec->s_func_selector.ihevc_sao_band_offset_luma_fptr = &ihevc_sao_band_offset_luma_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_sao_band_offset_chroma_fptr = &ihevc_sao_band_offset_chroma_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class0_fptr = &ihevc_sao_edge_offset_class0_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class0_chroma_fptr = &ihevc_sao_edge_offset_class0_chroma_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class1_fptr = &ihevc_sao_edge_offset_class1_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class1_chroma_fptr = &ihevc_sao_edge_offset_class1_chroma_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class2_fptr = &ihevc_sao_edge_offset_class2_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class2_chroma_fptr = &ihevc_sao_edge_offset_class2_chroma_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class3_fptr = &ihevc_sao_edge_offset_class3_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class3_chroma_fptr = &ihevc_sao_edge_offset_class3_chroma_ssse3;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_rgba8888_fptr = &ihevcd_fmt_conv_420sp_to_rgba8888;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_rgb565_fptr = &ihevcd_fmt_conv_420sp_to_rgb565;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_420sp_fptr = &ihevcd_fmt_conv_420sp_to_420sp;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_420p_fptr = &ihevcd_fmt_conv_420sp_to_420p_ssse3;
|
||||
ps_codec->s_func_selector.ihevcd_itrans_recon_dc_luma_fptr = &ihevcd_itrans_recon_dc_luma_sse42;
|
||||
ps_codec->s_func_selector.ihevcd_itrans_recon_dc_chroma_fptr = &ihevcd_itrans_recon_dc_chroma_sse42;
|
||||
ps_func_selector->ihevc_deblk_chroma_horz_fptr = &ihevc_deblk_chroma_horz_ssse3;
|
||||
ps_func_selector->ihevc_deblk_chroma_vert_fptr = &ihevc_deblk_chroma_vert_ssse3;
|
||||
ps_func_selector->ihevc_deblk_luma_vert_fptr = &ihevc_deblk_luma_vert_ssse3;
|
||||
ps_func_selector->ihevc_deblk_luma_horz_fptr = &ihevc_deblk_luma_horz_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_copy_fptr = &ihevc_inter_pred_chroma_copy_sse42;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_copy_w16out_fptr = &ihevc_inter_pred_chroma_copy_w16out_sse42;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_horz_fptr = &ihevc_inter_pred_chroma_horz_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_horz_w16out_fptr = &ihevc_inter_pred_chroma_horz_w16out_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_fptr = &ihevc_inter_pred_chroma_vert_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_w16inp_fptr = &ihevc_inter_pred_chroma_vert_w16inp_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16inp_w16out_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16out_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_luma_horz_fptr = &ihevc_inter_pred_luma_horz_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_fptr = &ihevc_inter_pred_luma_vert_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_w16out_fptr = &ihevc_inter_pred_luma_vert_w16out_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_w16inp_fptr = &ihevc_inter_pred_luma_vert_w16inp_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_luma_copy_fptr = &ihevc_inter_pred_luma_copy_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_luma_copy_w16out_fptr = &ihevc_inter_pred_luma_copy_w16out_sse42;
|
||||
ps_func_selector->ihevc_inter_pred_luma_horz_w16out_fptr = &ihevc_inter_pred_luma_horz_w16out_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_luma_vert_w16inp_w16out_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_ref_substitution_fptr = &ihevc_intra_pred_chroma_ref_substitution;
|
||||
ps_func_selector->ihevc_intra_pred_luma_ref_substitution_fptr = &ihevc_intra_pred_luma_ref_substitution;
|
||||
ps_func_selector->ihevc_intra_pred_luma_ref_subst_all_avlble_fptr = &ihevc_intra_pred_luma_ref_subst_all_avlble;
|
||||
ps_func_selector->ihevc_intra_pred_ref_filtering_fptr = &ihevc_intra_pred_ref_filtering_sse42;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_ref_filtering_fptr = &ihevc_intra_pred_chroma_ref_filtering;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_dc_fptr = &ihevc_intra_pred_chroma_dc_sse42;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_horz_fptr = &ihevc_intra_pred_chroma_horz_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode2_fptr = &ihevc_intra_pred_chroma_mode2_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_18_34_fptr = &ihevc_intra_pred_chroma_mode_18_34_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_27_to_33_fptr = &ihevc_intra_pred_chroma_mode_27_to_33_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_3_to_9_fptr = &ihevc_intra_pred_chroma_mode_3_to_9_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_planar_fptr = &ihevc_intra_pred_chroma_planar_sse42;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_ver_fptr = &ihevc_intra_pred_chroma_ver_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_11_to_17_fptr = &ihevc_intra_pred_chroma_mode_11_to_17_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_19_to_25_fptr = &ihevc_intra_pred_chroma_mode_19_to_25_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_11_to_17_fptr = &ihevc_intra_pred_luma_mode_11_to_17_sse42;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_19_to_25_fptr = &ihevc_intra_pred_luma_mode_19_to_25_sse42;
|
||||
ps_func_selector->ihevc_intra_pred_luma_dc_fptr = &ihevc_intra_pred_luma_dc_sse42;
|
||||
ps_func_selector->ihevc_intra_pred_luma_horz_fptr = &ihevc_intra_pred_luma_horz_sse42;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode2_fptr = &ihevc_intra_pred_luma_mode2_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_18_34_fptr = &ihevc_intra_pred_luma_mode_18_34_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_27_to_33_fptr = &ihevc_intra_pred_luma_mode_27_to_33_sse42;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_3_to_9_fptr = &ihevc_intra_pred_luma_mode_3_to_9_sse42;
|
||||
ps_func_selector->ihevc_intra_pred_luma_planar_fptr = &ihevc_intra_pred_luma_planar_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_luma_ver_fptr = &ihevc_intra_pred_luma_ver_sse42;
|
||||
ps_func_selector->ihevc_itrans_4x4_ttype1_fptr = &ihevc_itrans_4x4_ttype1;
|
||||
ps_func_selector->ihevc_itrans_4x4_fptr = &ihevc_itrans_4x4;
|
||||
ps_func_selector->ihevc_itrans_8x8_fptr = &ihevc_itrans_8x8;
|
||||
ps_func_selector->ihevc_itrans_16x16_fptr = &ihevc_itrans_16x16;
|
||||
ps_func_selector->ihevc_itrans_32x32_fptr = &ihevc_itrans_32x32;
|
||||
ps_func_selector->ihevc_itrans_res_4x4_ttype1_fptr = &ihevc_itrans_res_4x4_ttype1;
|
||||
ps_func_selector->ihevc_itrans_res_4x4_fptr = &ihevc_itrans_res_4x4;
|
||||
ps_func_selector->ihevc_itrans_res_8x8_fptr = &ihevc_itrans_res_8x8;
|
||||
ps_func_selector->ihevc_itrans_res_16x16_fptr = &ihevc_itrans_res_16x16;
|
||||
ps_func_selector->ihevc_itrans_res_32x32_fptr = &ihevc_itrans_res_32x32;
|
||||
ps_func_selector->ihevc_itrans_recon_4x4_ttype1_fptr = &ihevc_itrans_recon_4x4_ttype1_sse42;
|
||||
ps_func_selector->ihevc_itrans_recon_4x4_fptr = &ihevc_itrans_recon_4x4_sse42;
|
||||
ps_func_selector->ihevc_itrans_recon_8x8_fptr = &ihevc_itrans_recon_8x8_sse42;
|
||||
ps_func_selector->ihevc_itrans_recon_16x16_fptr = &ihevc_itrans_recon_16x16_ssse3;
|
||||
ps_func_selector->ihevc_itrans_recon_32x32_fptr = &ihevc_itrans_recon_32x32_sse42;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_4x4_fptr = &ihevc_chroma_itrans_recon_4x4;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_8x8_fptr = &ihevc_chroma_itrans_recon_8x8;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_16x16_fptr = &ihevc_chroma_itrans_recon_16x16;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_32x32_fptr = &ihevc_chroma_itrans_recon_32x32;
|
||||
ps_func_selector->ihevc_recon_4x4_ttype1_fptr = &ihevc_recon_4x4_ttype1;
|
||||
ps_func_selector->ihevc_recon_4x4_fptr = &ihevc_recon_4x4;
|
||||
ps_func_selector->ihevc_recon_8x8_fptr = &ihevc_recon_8x8;
|
||||
ps_func_selector->ihevc_recon_16x16_fptr = &ihevc_recon_16x16;
|
||||
ps_func_selector->ihevc_recon_32x32_fptr = &ihevc_recon_32x32;
|
||||
ps_func_selector->ihevc_chroma_recon_4x4_fptr = &ihevc_chroma_recon_4x4;
|
||||
ps_func_selector->ihevc_chroma_recon_8x8_fptr = &ihevc_chroma_recon_8x8;
|
||||
ps_func_selector->ihevc_chroma_recon_16x16_fptr = &ihevc_chroma_recon_16x16;
|
||||
ps_func_selector->ihevc_chroma_recon_32x32_fptr = &ihevc_chroma_recon_32x32;
|
||||
ps_func_selector->ihevc_memcpy_mul_8_fptr = &ihevc_memcpy_mul_8;
|
||||
ps_func_selector->ihevc_memcpy_fptr = &ihevc_memcpy;
|
||||
ps_func_selector->ihevc_memset_mul_8_fptr = &ihevc_memset_mul_8;
|
||||
ps_func_selector->ihevc_memset_fptr = &ihevc_memset;
|
||||
ps_func_selector->ihevc_memset_16bit_mul_8_fptr = &ihevc_memset_16bit_mul_8;
|
||||
ps_func_selector->ihevc_memset_16bit_fptr = &ihevc_memset_16bit;
|
||||
ps_func_selector->ihevc_pad_left_luma_fptr = &ihevc_pad_left_luma;
|
||||
ps_func_selector->ihevc_pad_left_chroma_fptr = &ihevc_pad_left_chroma;
|
||||
ps_func_selector->ihevc_pad_right_luma_fptr = &ihevc_pad_right_luma;
|
||||
ps_func_selector->ihevc_pad_right_chroma_fptr = &ihevc_pad_right_chroma;
|
||||
ps_func_selector->ihevc_weighted_pred_bi_fptr = &ihevc_weighted_pred_bi_sse42;
|
||||
ps_func_selector->ihevc_weighted_pred_bi_default_fptr = &ihevc_weighted_pred_bi_default_sse42;
|
||||
ps_func_selector->ihevc_weighted_pred_uni_fptr = &ihevc_weighted_pred_uni_sse42;
|
||||
ps_func_selector->ihevc_weighted_pred_chroma_bi_fptr = &ihevc_weighted_pred_chroma_bi_sse42;
|
||||
ps_func_selector->ihevc_weighted_pred_chroma_bi_default_fptr = &ihevc_weighted_pred_chroma_bi_default_ssse3;
|
||||
ps_func_selector->ihevc_weighted_pred_chroma_uni_fptr = &ihevc_weighted_pred_chroma_uni_sse42;
|
||||
ps_func_selector->ihevc_sao_band_offset_luma_fptr = &ihevc_sao_band_offset_luma_ssse3;
|
||||
ps_func_selector->ihevc_sao_band_offset_chroma_fptr = &ihevc_sao_band_offset_chroma_ssse3;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class0_fptr = &ihevc_sao_edge_offset_class0_ssse3;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class0_chroma_fptr = &ihevc_sao_edge_offset_class0_chroma_ssse3;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class1_fptr = &ihevc_sao_edge_offset_class1_ssse3;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class1_chroma_fptr = &ihevc_sao_edge_offset_class1_chroma_ssse3;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class2_fptr = &ihevc_sao_edge_offset_class2_ssse3;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class2_chroma_fptr = &ihevc_sao_edge_offset_class2_chroma_ssse3;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class3_fptr = &ihevc_sao_edge_offset_class3_ssse3;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class3_chroma_fptr = &ihevc_sao_edge_offset_class3_chroma_ssse3;
|
||||
ps_func_selector->ihevcd_fmt_conv_420sp_to_420sp_fptr = &ihevcd_fmt_conv_420sp_to_420sp;
|
||||
ps_func_selector->ihevcd_fmt_conv_420sp_to_420p_fptr = &ihevcd_fmt_conv_420sp_to_420p_ssse3;
|
||||
ps_func_selector->ihevcd_fmt_conv_444sp_to_444p_fptr = &ihevcd_fmt_conv_444sp_to_444p;
|
||||
ps_func_selector->ihevcd_itrans_recon_dc_luma_fptr = &ihevcd_itrans_recon_dc_luma_sse42;
|
||||
ps_func_selector->ihevcd_itrans_recon_dc_chroma_fptr = &ihevcd_itrans_recon_dc_chroma_sse42;
|
||||
ps_func_selector->ihevcd_itrans_res_dc_fptr = &ihevcd_itrans_res_dc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -54,109 +54,113 @@
|
|||
#include "ihevc_dpb_mgr.h"
|
||||
#include "ihevc_error.h"
|
||||
|
||||
#include "ihevcd_defs.h"
|
||||
#include "ihevcd_function_selector.h"
|
||||
#include "ihevcd_structs.h"
|
||||
|
||||
void ihevcd_init_function_ptr_ssse3(void *pv_codec)
|
||||
void ihevcd_init_function_ptr_ssse3(func_selector_t *ps_func_selector)
|
||||
{
|
||||
codec_t *ps_codec = (codec_t *)pv_codec;
|
||||
|
||||
ps_codec->s_func_selector.ihevc_deblk_chroma_horz_fptr = &ihevc_deblk_chroma_horz_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_deblk_chroma_vert_fptr = &ihevc_deblk_chroma_vert_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_deblk_luma_vert_fptr = &ihevc_deblk_luma_vert_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_deblk_luma_horz_fptr = &ihevc_deblk_luma_horz_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_copy_fptr = &ihevc_inter_pred_chroma_copy_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_copy_w16out_fptr = &ihevc_inter_pred_chroma_copy_w16out_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_horz_fptr = &ihevc_inter_pred_chroma_horz_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_horz_w16out_fptr = &ihevc_inter_pred_chroma_horz_w16out_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_fptr = &ihevc_inter_pred_chroma_vert_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_w16inp_fptr = &ihevc_inter_pred_chroma_vert_w16inp_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16inp_w16out_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_chroma_vert_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16out_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_horz_fptr = &ihevc_inter_pred_luma_horz_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_fptr = &ihevc_inter_pred_luma_vert_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_w16out_fptr = &ihevc_inter_pred_luma_vert_w16out_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_w16inp_fptr = &ihevc_inter_pred_luma_vert_w16inp_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_copy_fptr = &ihevc_inter_pred_luma_copy_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_copy_w16out_fptr = &ihevc_inter_pred_luma_copy_w16out_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_horz_w16out_fptr = &ihevc_inter_pred_luma_horz_w16out_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_inter_pred_luma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_luma_vert_w16inp_w16out_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_ref_substitution_fptr = &ihevc_intra_pred_chroma_ref_substitution;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_ref_substitution_fptr = &ihevc_intra_pred_luma_ref_substitution;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_ref_subst_all_avlble_fptr = &ihevc_intra_pred_luma_ref_subst_all_avlble;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_ref_filtering_fptr = &ihevc_intra_pred_ref_filtering_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_dc_fptr = &ihevc_intra_pred_chroma_dc_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_horz_fptr = &ihevc_intra_pred_chroma_horz_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode2_fptr = &ihevc_intra_pred_chroma_mode2_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_18_34_fptr = &ihevc_intra_pred_chroma_mode_18_34_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_27_to_33_fptr = &ihevc_intra_pred_chroma_mode_27_to_33_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_3_to_9_fptr = &ihevc_intra_pred_chroma_mode_3_to_9_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_planar_fptr = &ihevc_intra_pred_chroma_planar_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_ver_fptr = &ihevc_intra_pred_chroma_ver_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_11_to_17_fptr = &ihevc_intra_pred_chroma_mode_11_to_17_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_chroma_mode_19_to_25_fptr = &ihevc_intra_pred_chroma_mode_19_to_25_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_11_to_17_fptr = &ihevc_intra_pred_luma_mode_11_to_17_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_19_to_25_fptr = &ihevc_intra_pred_luma_mode_19_to_25_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_dc_fptr = &ihevc_intra_pred_luma_dc_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_horz_fptr = &ihevc_intra_pred_luma_horz_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode2_fptr = &ihevc_intra_pred_luma_mode2_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_18_34_fptr = &ihevc_intra_pred_luma_mode_18_34_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_27_to_33_fptr = &ihevc_intra_pred_luma_mode_27_to_33_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_mode_3_to_9_fptr = &ihevc_intra_pred_luma_mode_3_to_9_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_planar_fptr = &ihevc_intra_pred_luma_planar_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_intra_pred_luma_ver_fptr = &ihevc_intra_pred_luma_ver_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_itrans_4x4_ttype1_fptr = &ihevc_itrans_4x4_ttype1;
|
||||
ps_codec->s_func_selector.ihevc_itrans_4x4_fptr = &ihevc_itrans_4x4;
|
||||
ps_codec->s_func_selector.ihevc_itrans_8x8_fptr = &ihevc_itrans_8x8;
|
||||
ps_codec->s_func_selector.ihevc_itrans_16x16_fptr = &ihevc_itrans_16x16;
|
||||
ps_codec->s_func_selector.ihevc_itrans_32x32_fptr = &ihevc_itrans_32x32;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_4x4_ttype1_fptr = &ihevc_itrans_recon_4x4_ttype1_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_4x4_fptr = &ihevc_itrans_recon_4x4_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_8x8_fptr = &ihevc_itrans_recon_8x8_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_16x16_fptr = &ihevc_itrans_recon_16x16_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_itrans_recon_32x32_fptr = &ihevc_itrans_recon_32x32_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_chroma_itrans_recon_4x4_fptr = &ihevc_chroma_itrans_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_chroma_itrans_recon_8x8_fptr = &ihevc_chroma_itrans_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_chroma_itrans_recon_16x16_fptr = &ihevc_chroma_itrans_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_recon_4x4_ttype1_fptr = &ihevc_recon_4x4_ttype1;
|
||||
ps_codec->s_func_selector.ihevc_recon_4x4_fptr = &ihevc_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_recon_8x8_fptr = &ihevc_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_recon_16x16_fptr = &ihevc_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_recon_32x32_fptr = &ihevc_recon_32x32;
|
||||
ps_codec->s_func_selector.ihevc_chroma_recon_4x4_fptr = &ihevc_chroma_recon_4x4;
|
||||
ps_codec->s_func_selector.ihevc_chroma_recon_8x8_fptr = &ihevc_chroma_recon_8x8;
|
||||
ps_codec->s_func_selector.ihevc_chroma_recon_16x16_fptr = &ihevc_chroma_recon_16x16;
|
||||
ps_codec->s_func_selector.ihevc_memcpy_mul_8_fptr = &ihevc_memcpy_mul_8;
|
||||
ps_codec->s_func_selector.ihevc_memcpy_fptr = &ihevc_memcpy;
|
||||
ps_codec->s_func_selector.ihevc_memset_mul_8_fptr = &ihevc_memset_mul_8;
|
||||
ps_codec->s_func_selector.ihevc_memset_fptr = &ihevc_memset;
|
||||
ps_codec->s_func_selector.ihevc_memset_16bit_mul_8_fptr = &ihevc_memset_16bit_mul_8;
|
||||
ps_codec->s_func_selector.ihevc_memset_16bit_fptr = &ihevc_memset_16bit;
|
||||
ps_codec->s_func_selector.ihevc_pad_left_luma_fptr = &ihevc_pad_left_luma;
|
||||
ps_codec->s_func_selector.ihevc_pad_left_chroma_fptr = &ihevc_pad_left_chroma;
|
||||
ps_codec->s_func_selector.ihevc_pad_right_luma_fptr = &ihevc_pad_right_luma;
|
||||
ps_codec->s_func_selector.ihevc_pad_right_chroma_fptr = &ihevc_pad_right_chroma;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_bi_fptr = &ihevc_weighted_pred_bi_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_bi_default_fptr = &ihevc_weighted_pred_bi_default_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_uni_fptr = &ihevc_weighted_pred_uni_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_bi_fptr = &ihevc_weighted_pred_chroma_bi_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_bi_default_fptr = &ihevc_weighted_pred_chroma_bi_default_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_weighted_pred_chroma_uni_fptr = &ihevc_weighted_pred_chroma_uni_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_sao_band_offset_luma_fptr = &ihevc_sao_band_offset_luma_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_sao_band_offset_chroma_fptr = &ihevc_sao_band_offset_chroma_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class0_fptr = &ihevc_sao_edge_offset_class0_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class0_chroma_fptr = &ihevc_sao_edge_offset_class0_chroma_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class1_fptr = &ihevc_sao_edge_offset_class1_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class1_chroma_fptr = &ihevc_sao_edge_offset_class1_chroma_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class2_fptr = &ihevc_sao_edge_offset_class2_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class2_chroma_fptr = &ihevc_sao_edge_offset_class2_chroma_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class3_fptr = &ihevc_sao_edge_offset_class3_ssse3;
|
||||
ps_codec->s_func_selector.ihevc_sao_edge_offset_class3_chroma_fptr = &ihevc_sao_edge_offset_class3_chroma_ssse3;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_rgba8888_fptr = &ihevcd_fmt_conv_420sp_to_rgba8888;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_rgb565_fptr = &ihevcd_fmt_conv_420sp_to_rgb565;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_420sp_fptr = &ihevcd_fmt_conv_420sp_to_420sp;
|
||||
ps_codec->s_func_selector.ihevcd_fmt_conv_420sp_to_420p_fptr = &ihevcd_fmt_conv_420sp_to_420p;
|
||||
ps_codec->s_func_selector.ihevcd_itrans_recon_dc_luma_fptr = &ihevcd_itrans_recon_dc_luma_ssse3;
|
||||
ps_codec->s_func_selector.ihevcd_itrans_recon_dc_chroma_fptr = &ihevcd_itrans_recon_dc_chroma_ssse3;
|
||||
ps_func_selector->ihevc_deblk_chroma_horz_fptr = &ihevc_deblk_chroma_horz_ssse3;
|
||||
ps_func_selector->ihevc_deblk_chroma_vert_fptr = &ihevc_deblk_chroma_vert_ssse3;
|
||||
ps_func_selector->ihevc_deblk_luma_vert_fptr = &ihevc_deblk_luma_vert_ssse3;
|
||||
ps_func_selector->ihevc_deblk_luma_horz_fptr = &ihevc_deblk_luma_horz_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_copy_fptr = &ihevc_inter_pred_chroma_copy_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_copy_w16out_fptr = &ihevc_inter_pred_chroma_copy_w16out_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_horz_fptr = &ihevc_inter_pred_chroma_horz_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_horz_w16out_fptr = &ihevc_inter_pred_chroma_horz_w16out_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_fptr = &ihevc_inter_pred_chroma_vert_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_w16inp_fptr = &ihevc_inter_pred_chroma_vert_w16inp_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16inp_w16out_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_chroma_vert_w16out_fptr = &ihevc_inter_pred_chroma_vert_w16out_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_luma_horz_fptr = &ihevc_inter_pred_luma_horz_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_fptr = &ihevc_inter_pred_luma_vert_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_w16out_fptr = &ihevc_inter_pred_luma_vert_w16out_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_w16inp_fptr = &ihevc_inter_pred_luma_vert_w16inp_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_luma_copy_fptr = &ihevc_inter_pred_luma_copy_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_luma_copy_w16out_fptr = &ihevc_inter_pred_luma_copy_w16out_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_luma_horz_w16out_fptr = &ihevc_inter_pred_luma_horz_w16out_ssse3;
|
||||
ps_func_selector->ihevc_inter_pred_luma_vert_w16inp_w16out_fptr = &ihevc_inter_pred_luma_vert_w16inp_w16out_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_ref_substitution_fptr = &ihevc_intra_pred_chroma_ref_substitution;
|
||||
ps_func_selector->ihevc_intra_pred_luma_ref_substitution_fptr = &ihevc_intra_pred_luma_ref_substitution;
|
||||
ps_func_selector->ihevc_intra_pred_luma_ref_subst_all_avlble_fptr = &ihevc_intra_pred_luma_ref_subst_all_avlble;
|
||||
ps_func_selector->ihevc_intra_pred_ref_filtering_fptr = &ihevc_intra_pred_ref_filtering_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_ref_filtering_fptr = &ihevc_intra_pred_chroma_ref_filtering;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_dc_fptr = &ihevc_intra_pred_chroma_dc_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_horz_fptr = &ihevc_intra_pred_chroma_horz_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode2_fptr = &ihevc_intra_pred_chroma_mode2_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_18_34_fptr = &ihevc_intra_pred_chroma_mode_18_34_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_27_to_33_fptr = &ihevc_intra_pred_chroma_mode_27_to_33_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_3_to_9_fptr = &ihevc_intra_pred_chroma_mode_3_to_9_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_planar_fptr = &ihevc_intra_pred_chroma_planar_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_ver_fptr = &ihevc_intra_pred_chroma_ver_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_11_to_17_fptr = &ihevc_intra_pred_chroma_mode_11_to_17_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_chroma_mode_19_to_25_fptr = &ihevc_intra_pred_chroma_mode_19_to_25_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_11_to_17_fptr = &ihevc_intra_pred_luma_mode_11_to_17_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_19_to_25_fptr = &ihevc_intra_pred_luma_mode_19_to_25_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_luma_dc_fptr = &ihevc_intra_pred_luma_dc_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_luma_horz_fptr = &ihevc_intra_pred_luma_horz_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode2_fptr = &ihevc_intra_pred_luma_mode2_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_18_34_fptr = &ihevc_intra_pred_luma_mode_18_34_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_27_to_33_fptr = &ihevc_intra_pred_luma_mode_27_to_33_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_luma_mode_3_to_9_fptr = &ihevc_intra_pred_luma_mode_3_to_9_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_luma_planar_fptr = &ihevc_intra_pred_luma_planar_ssse3;
|
||||
ps_func_selector->ihevc_intra_pred_luma_ver_fptr = &ihevc_intra_pred_luma_ver_ssse3;
|
||||
ps_func_selector->ihevc_itrans_4x4_ttype1_fptr = &ihevc_itrans_4x4_ttype1;
|
||||
ps_func_selector->ihevc_itrans_4x4_fptr = &ihevc_itrans_4x4;
|
||||
ps_func_selector->ihevc_itrans_8x8_fptr = &ihevc_itrans_8x8;
|
||||
ps_func_selector->ihevc_itrans_16x16_fptr = &ihevc_itrans_16x16;
|
||||
ps_func_selector->ihevc_itrans_32x32_fptr = &ihevc_itrans_32x32;
|
||||
ps_func_selector->ihevc_itrans_res_4x4_ttype1_fptr = &ihevc_itrans_res_4x4_ttype1;
|
||||
ps_func_selector->ihevc_itrans_res_4x4_fptr = &ihevc_itrans_res_4x4;
|
||||
ps_func_selector->ihevc_itrans_res_8x8_fptr = &ihevc_itrans_res_8x8;
|
||||
ps_func_selector->ihevc_itrans_res_16x16_fptr = &ihevc_itrans_res_16x16;
|
||||
ps_func_selector->ihevc_itrans_res_32x32_fptr = &ihevc_itrans_res_32x32;
|
||||
ps_func_selector->ihevc_itrans_recon_4x4_ttype1_fptr = &ihevc_itrans_recon_4x4_ttype1_ssse3;
|
||||
ps_func_selector->ihevc_itrans_recon_4x4_fptr = &ihevc_itrans_recon_4x4_ssse3;
|
||||
ps_func_selector->ihevc_itrans_recon_8x8_fptr = &ihevc_itrans_recon_8x8_ssse3;
|
||||
ps_func_selector->ihevc_itrans_recon_16x16_fptr = &ihevc_itrans_recon_16x16_ssse3;
|
||||
ps_func_selector->ihevc_itrans_recon_32x32_fptr = &ihevc_itrans_recon_32x32_ssse3;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_4x4_fptr = &ihevc_chroma_itrans_recon_4x4;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_8x8_fptr = &ihevc_chroma_itrans_recon_8x8;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_16x16_fptr = &ihevc_chroma_itrans_recon_16x16;
|
||||
ps_func_selector->ihevc_chroma_itrans_recon_32x32_fptr = &ihevc_chroma_itrans_recon_32x32;
|
||||
ps_func_selector->ihevc_recon_4x4_ttype1_fptr = &ihevc_recon_4x4_ttype1;
|
||||
ps_func_selector->ihevc_recon_4x4_fptr = &ihevc_recon_4x4;
|
||||
ps_func_selector->ihevc_recon_8x8_fptr = &ihevc_recon_8x8;
|
||||
ps_func_selector->ihevc_recon_16x16_fptr = &ihevc_recon_16x16;
|
||||
ps_func_selector->ihevc_recon_32x32_fptr = &ihevc_recon_32x32;
|
||||
ps_func_selector->ihevc_chroma_recon_4x4_fptr = &ihevc_chroma_recon_4x4;
|
||||
ps_func_selector->ihevc_chroma_recon_8x8_fptr = &ihevc_chroma_recon_8x8;
|
||||
ps_func_selector->ihevc_chroma_recon_16x16_fptr = &ihevc_chroma_recon_16x16;
|
||||
ps_func_selector->ihevc_chroma_recon_32x32_fptr = &ihevc_chroma_recon_32x32;
|
||||
ps_func_selector->ihevc_memcpy_mul_8_fptr = &ihevc_memcpy_mul_8;
|
||||
ps_func_selector->ihevc_memcpy_fptr = &ihevc_memcpy;
|
||||
ps_func_selector->ihevc_memset_mul_8_fptr = &ihevc_memset_mul_8;
|
||||
ps_func_selector->ihevc_memset_fptr = &ihevc_memset;
|
||||
ps_func_selector->ihevc_memset_16bit_mul_8_fptr = &ihevc_memset_16bit_mul_8;
|
||||
ps_func_selector->ihevc_memset_16bit_fptr = &ihevc_memset_16bit;
|
||||
ps_func_selector->ihevc_pad_left_luma_fptr = &ihevc_pad_left_luma;
|
||||
ps_func_selector->ihevc_pad_left_chroma_fptr = &ihevc_pad_left_chroma;
|
||||
ps_func_selector->ihevc_pad_right_luma_fptr = &ihevc_pad_right_luma;
|
||||
ps_func_selector->ihevc_pad_right_chroma_fptr = &ihevc_pad_right_chroma;
|
||||
ps_func_selector->ihevc_weighted_pred_bi_fptr = &ihevc_weighted_pred_bi_ssse3;
|
||||
ps_func_selector->ihevc_weighted_pred_bi_default_fptr = &ihevc_weighted_pred_bi_default_ssse3;
|
||||
ps_func_selector->ihevc_weighted_pred_uni_fptr = &ihevc_weighted_pred_uni_ssse3;
|
||||
ps_func_selector->ihevc_weighted_pred_chroma_bi_fptr = &ihevc_weighted_pred_chroma_bi_ssse3;
|
||||
ps_func_selector->ihevc_weighted_pred_chroma_bi_default_fptr = &ihevc_weighted_pred_chroma_bi_default_ssse3;
|
||||
ps_func_selector->ihevc_weighted_pred_chroma_uni_fptr = &ihevc_weighted_pred_chroma_uni_ssse3;
|
||||
ps_func_selector->ihevc_sao_band_offset_luma_fptr = &ihevc_sao_band_offset_luma_ssse3;
|
||||
ps_func_selector->ihevc_sao_band_offset_chroma_fptr = &ihevc_sao_band_offset_chroma_ssse3;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class0_fptr = &ihevc_sao_edge_offset_class0_ssse3;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class0_chroma_fptr = &ihevc_sao_edge_offset_class0_chroma_ssse3;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class1_fptr = &ihevc_sao_edge_offset_class1_ssse3;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class1_chroma_fptr = &ihevc_sao_edge_offset_class1_chroma_ssse3;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class2_fptr = &ihevc_sao_edge_offset_class2_ssse3;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class2_chroma_fptr = &ihevc_sao_edge_offset_class2_chroma_ssse3;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class3_fptr = &ihevc_sao_edge_offset_class3_ssse3;
|
||||
ps_func_selector->ihevc_sao_edge_offset_class3_chroma_fptr = &ihevc_sao_edge_offset_class3_chroma_ssse3;
|
||||
ps_func_selector->ihevcd_fmt_conv_420sp_to_420sp_fptr = &ihevcd_fmt_conv_420sp_to_420sp;
|
||||
ps_func_selector->ihevcd_fmt_conv_420sp_to_420p_fptr = &ihevcd_fmt_conv_420sp_to_420p;
|
||||
ps_func_selector->ihevcd_fmt_conv_444sp_to_444p_fptr = &ihevcd_fmt_conv_444sp_to_444p;
|
||||
ps_func_selector->ihevcd_itrans_recon_dc_luma_fptr = &ihevcd_itrans_recon_dc_luma_ssse3;
|
||||
ps_func_selector->ihevcd_itrans_recon_dc_chroma_fptr = &ihevcd_itrans_recon_dc_chroma_ssse3;
|
||||
ps_func_selector->ihevcd_itrans_res_dc_fptr = &ihevcd_itrans_res_dc;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -158,8 +158,7 @@ typedef enum
|
|||
ME_MEDIUM_SPEED,
|
||||
ME_HIGH_SPEED,
|
||||
ME_XTREME_SPEED,
|
||||
ME_XTREME_SPEED_25,
|
||||
ME_USER_DEFINED
|
||||
ME_XTREME_SPEED_25
|
||||
} ME_QUALITY_PRESETS_T;
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
|
|||
|
|
@ -5129,7 +5129,7 @@ void hme_populate_cu_tree(
|
|||
|
||||
#if ENABLE_CU_TREE_CULLING
|
||||
{
|
||||
cur_ctb_cu_tree_t *ps_32x32_root;
|
||||
cur_ctb_cu_tree_t *ps_32x32_root = NULL;
|
||||
|
||||
switch(e_parent_blk_pos)
|
||||
{
|
||||
|
|
@ -5157,6 +5157,11 @@ void hme_populate_cu_tree(
|
|||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
DBG_PRINTF("Invalid block position %d\n", e_parent_blk_pos);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
if(ps_32x32_root->is_node_valid)
|
||||
|
|
@ -5249,6 +5254,11 @@ void hme_populate_cu_tree(
|
|||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
DBG_PRINTF("Invalid block position %d\n", e_grandparent_blk_pos);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
switch(e_parent_blk_pos)
|
||||
|
|
@ -5277,6 +5287,11 @@ void hme_populate_cu_tree(
|
|||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
DBG_PRINTF("Invalid block position %d\n", e_parent_blk_pos);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ps_32x32_blk = &ps_ctb_cluster_info->ps_32x32_blk[e_grandparent_blk_pos];
|
||||
|
|
|
|||
|
|
@ -88,7 +88,7 @@
|
|||
|
||||
#define IHEVCE_PAYLOAD_TYPE_SHIFT (16)
|
||||
|
||||
#define MAX_FRAME_RATE 120.0
|
||||
#define MAX_FRAME_RATE 300.0
|
||||
#define MIN_FRAME_RATE 1.0
|
||||
|
||||
/*****************************************************************************/
|
||||
|
|
@ -682,7 +682,7 @@ typedef struct
|
|||
* parameters of encoder
|
||||
*
|
||||
* these new params can be passed as async commands
|
||||
* to the enocder by sending a IHEVCE_CMD_CTL_SETPARAMS command
|
||||
* to the encoder by sending a IHEVCE_CMD_CTL_SETPARAMS command
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
|
|
@ -707,7 +707,7 @@ typedef struct
|
|||
* parameters of encoder for dynamic resolution change
|
||||
*
|
||||
* these new params can be passed as synchromous commands
|
||||
* to the enocder by sending a IHEVCE_SYNCH_API_SET_RES_TAG command
|
||||
* to the encoder by sending a IHEVCE_SYNCH_API_SET_RES_TAG command
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
|
|
|
|||
|
|
@ -859,7 +859,7 @@ WORD32 ihevce_cu_level_qp_mod(
|
|||
*pi4_act_factor = (1 << QP_LEVEL_MOD_ACT_FACTOR);
|
||||
if(cu_satd != -1 && (WORD32)frm_avg_activity != 0)
|
||||
{
|
||||
ULWORD64 sq_cur_satd = (cu_satd * cu_satd);
|
||||
ULWORD64 sq_cur_satd = ((ULWORD64)cu_satd * (ULWORD64)cu_satd);
|
||||
float log2_sq_cur_satd = fast_log2(1 + sq_cur_satd);
|
||||
WORD32 qp_offset = f_mod_strength * (log2_sq_cur_satd - frm_avg_activity);
|
||||
|
||||
|
|
|
|||
|
|
@ -426,8 +426,8 @@ static WORD8 ihevce_merge_cand_pred_buffer_preparation(
|
|||
WORD32 i4_part_wd_pu2;
|
||||
WORD32 i4_part_ht_pu2;
|
||||
WORD32 i4_buf_offset;
|
||||
UWORD8 *pu1_pred_src;
|
||||
UWORD8 *pu1_pred_dst;
|
||||
UWORD8 *pu1_pred_src = NULL;
|
||||
UWORD8 *pu1_pred_dst = NULL;
|
||||
WORD8 i1_retval = pau1_final_pred_buf_id[MERGE_DERIVED][0];
|
||||
|
||||
WORD32 i4_stride = i4_pred_stride * u1_num_bytes_per_pel;
|
||||
|
|
@ -557,6 +557,11 @@ static WORD8 ihevce_merge_cand_pred_buffer_preparation(
|
|||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
DBG_PRINTF("Invalid partition type %d\n", u1_part_type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
pf_copy_2d(
|
||||
|
|
@ -591,7 +596,7 @@ static WORD8 ihevce_mixed_mode_cand_type1_pred_buffer_preparation(
|
|||
WORD32 i4_part_ht;
|
||||
WORD32 i4_part_wd_pu2;
|
||||
WORD32 i4_part_ht_pu2;
|
||||
UWORD8 *pu1_pred_src;
|
||||
UWORD8 *pu1_pred_src = NULL;
|
||||
UWORD8 *pu1_pred_dst = NULL;
|
||||
WORD8 i1_retval = pau1_final_pred_buf_id[ME_OR_SKIP_DERIVED][0];
|
||||
|
||||
|
|
@ -669,6 +674,11 @@ static WORD8 ihevce_mixed_mode_cand_type1_pred_buffer_preparation(
|
|||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
DBG_PRINTF("Invalid partition type %d\n", u1_part_type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ps_cand->pu1_pred_data = (UWORD8 *)ppv_pred_buf_list[i1_retval];
|
||||
|
|
@ -910,7 +920,7 @@ static WORD8 ihevce_mixed_mode_cand_type0_pred_buffer_preparation(
|
|||
WORD32 i4_part_wd_pu2;
|
||||
WORD32 i4_part_ht_pu2;
|
||||
WORD32 i4_buf_offset;
|
||||
UWORD8 *pu1_pred_src;
|
||||
UWORD8 *pu1_pred_src = NULL;
|
||||
UWORD8 *pu1_pred_dst = NULL;
|
||||
WORD8 i1_retval = pau1_final_pred_buf_id[ME_OR_SKIP_DERIVED][0];
|
||||
|
||||
|
|
@ -981,6 +991,11 @@ static WORD8 ihevce_mixed_mode_cand_type0_pred_buffer_preparation(
|
|||
|
||||
break;
|
||||
}
|
||||
default:
|
||||
{
|
||||
DBG_PRINTF("Invalid partition type %d\n", u1_part_type);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
ps_cand->pu1_pred_data = (UWORD8 *)ppv_pred_buf_list[i1_retval];
|
||||
|
|
|
|||
|
|
@ -6244,7 +6244,8 @@ UWORD8 ihevce_distortion_based_intra_chroma_mode_selector(
|
|||
u1_trans_size,
|
||||
nbr_flags,
|
||||
pu1_ref_sub_out,
|
||||
1);
|
||||
1,
|
||||
CHROMA_FMT_IDC_YUV420);
|
||||
|
||||
/* use the look up to get the function idx */
|
||||
chrm_pred_func_idx = g_i4_ip_funcs[u1_chrm_mode];
|
||||
|
|
@ -6636,7 +6637,8 @@ void ihevce_intra_chroma_pred_mode_selector(
|
|||
trans_size,
|
||||
nbr_flags,
|
||||
(UWORD8 *)ps_ctxt->pv_ref_sub_out,
|
||||
1);
|
||||
1,
|
||||
CHROMA_FMT_IDC_YUV420);
|
||||
|
||||
/* use the look up to get the function idx */
|
||||
chrm_pred_func_idx = g_i4_ip_funcs[best_chrm_mode];
|
||||
|
|
@ -7396,7 +7398,8 @@ LWORD64 ihevce_chroma_cu_prcs_rdopt(
|
|||
trans_size,
|
||||
nbr_flags,
|
||||
(UWORD8 *)ps_ctxt->pv_ref_sub_out,
|
||||
1);
|
||||
1,
|
||||
CHROMA_FMT_IDC_YUV420);
|
||||
|
||||
/* use the look up to get the function idx */
|
||||
chrm_pred_func_idx = g_i4_ip_funcs[chrm_pred_mode];
|
||||
|
|
@ -9418,7 +9421,8 @@ void ihevce_final_rdopt_mode_prcs(
|
|||
chroma_trans_size,
|
||||
nbr_flags,
|
||||
(UWORD8 *)ps_ctxt->pv_ref_sub_out,
|
||||
1);
|
||||
1,
|
||||
CHROMA_FMT_IDC_YUV420);
|
||||
|
||||
/* use the look up to get the function idx */
|
||||
chrm_pred_func_idx = g_i4_ip_funcs[chroma_pred_mode];
|
||||
|
|
|
|||
|
|
@ -1589,8 +1589,10 @@ typedef struct
|
|||
/** Buffer pointer for CTB level information in pre intra pass*/
|
||||
ihevce_ed_ctb_l1_t *ps_ed_ctb_l1;
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
/** vps parameters activated by current slice */
|
||||
sei_params_t s_sei;
|
||||
#endif
|
||||
|
||||
/** nal_type for the slice to be encoded */
|
||||
WORD32 i4_slice_nal_type;
|
||||
|
|
@ -1826,6 +1828,7 @@ typedef struct
|
|||
ULWORD64 i8_frame_inter_cost;
|
||||
} s_pic_level_acc_info_t;
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
typedef struct
|
||||
{
|
||||
UWORD32 u4_target_bit_rate_sei_entropy;
|
||||
|
|
@ -1833,6 +1836,7 @@ typedef struct
|
|||
UWORD32 u4_dbf_entropy;
|
||||
|
||||
} s_pic_level_sei_info_t;
|
||||
#endif
|
||||
/**
|
||||
******************************************************************************
|
||||
* @brief ME pass and Main enocde pass shared variables and buffers
|
||||
|
|
@ -1912,12 +1916,14 @@ typedef struct
|
|||
|
||||
} me_enc_rdopt_ctxt_t;
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
typedef struct
|
||||
{
|
||||
UWORD32 u4_payload_type;
|
||||
UWORD32 u4_payload_length;
|
||||
UWORD8 *pu1_sei_payload;
|
||||
} sei_payload_t;
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
|
|
@ -1954,8 +1960,10 @@ typedef struct
|
|||
/** vps parameters activated by current slice */
|
||||
vps_t *ps_vps;
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
/** vps parameters activated by current slice */
|
||||
sei_params_t s_sei;
|
||||
#endif
|
||||
|
||||
/* Flag to indicate if AUD NAL is present */
|
||||
WORD8 i1_aud_present_flag;
|
||||
|
|
@ -2019,9 +2027,11 @@ typedef struct
|
|||
|
||||
WORD32 i4_is_end_of_idr_gop;
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
sei_payload_t as_sei_payload[MAX_NUMBER_OF_SEI_PAYLOAD];
|
||||
|
||||
UWORD32 u4_num_sei_payload;
|
||||
#endif
|
||||
/* Flag used only in mres single output case to flush out one res and start with next */
|
||||
WORD32 i4_out_flush_flag;
|
||||
|
||||
|
|
|
|||
|
|
@ -595,6 +595,7 @@ WORD32 ihevce_generate_vui(bitstrm_t *ps_bitstrm, sps_t *ps_sps, vui_t s_vui)
|
|||
return return_status;
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
/**
|
||||
******************************************************************************
|
||||
*
|
||||
|
|
@ -1608,7 +1609,7 @@ WORD32 ihevce_generate_sei(
|
|||
/*************************************************************************************************/
|
||||
/* NOTE: Need to terminate and start new SEI message after active parameter set SEI */
|
||||
/* Buffering period/pic timing SEI refering to active SPS cannot be embedded in same SEI message */
|
||||
/* This is because SPS is activated in HM deocder after completely parsing full SEI message. */
|
||||
/* This is because SPS is activated in HM decoder after completely parsing full SEI message. */
|
||||
/*************************************************************************************************/
|
||||
if(1) /* Insert New SEI for buffering period after active parameter set SEI */
|
||||
{
|
||||
|
|
@ -2470,6 +2471,7 @@ WORD32 ihevce_populate_hash_sei(
|
|||
|
||||
return IHEVCE_SUCCESS;
|
||||
}
|
||||
#endif
|
||||
|
||||
/**
|
||||
******************************************************************************
|
||||
|
|
|
|||
|
|
@ -40,6 +40,7 @@
|
|||
/* Function Macros */
|
||||
/*****************************************************************************/
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
/**
|
||||
******************************************************************************
|
||||
* @brief Macro to calculate the CRC for a bit index
|
||||
|
|
@ -93,17 +94,6 @@ typedef enum
|
|||
/* Extern Function Declarations */
|
||||
/*****************************************************************************/
|
||||
|
||||
WORD32 ihevce_generate_sub_layer_hrd_params(
|
||||
bitstrm_t *ps_bitstrm,
|
||||
sub_lyr_hrd_params_t *ps_sub_lyr_hrd_params,
|
||||
hrd_params_t *ps_hrd_params,
|
||||
WORD32 cpb_cnt_minus1);
|
||||
|
||||
WORD32
|
||||
ihevce_generate_hrd_params(bitstrm_t *ps_bitstrm, hrd_params_t *ps_hrd_params, sps_t *ps_sps);
|
||||
|
||||
WORD32 ihevce_generate_vui(bitstrm_t *ps_bitstrm, sps_t *ps_sps, vui_t s_vui);
|
||||
|
||||
WORD32 ihevce_put_buf_period_sei_params(
|
||||
buf_period_sei_params_t *ps_bp_sei, vui_t *ps_vui_params, bitstrm_t *ps_bitstrm);
|
||||
|
||||
|
|
@ -163,6 +153,18 @@ WORD32 ihevce_populate_hash_sei(
|
|||
WORD32 uv_strd,
|
||||
WORD32 i4_frame_pos_x,
|
||||
WORD32 i4_frame_pos_y);
|
||||
#endif
|
||||
|
||||
WORD32 ihevce_generate_sub_layer_hrd_params(
|
||||
bitstrm_t *ps_bitstrm,
|
||||
sub_lyr_hrd_params_t *ps_sub_lyr_hrd_params,
|
||||
hrd_params_t *ps_hrd_params,
|
||||
WORD32 cpb_cnt_minus1);
|
||||
|
||||
WORD32
|
||||
ihevce_generate_hrd_params(bitstrm_t *ps_bitstrm, hrd_params_t *ps_hrd_params, sps_t *ps_sps);
|
||||
|
||||
WORD32 ihevce_generate_vui(bitstrm_t *ps_bitstrm, sps_t *ps_sps, vui_t s_vui);
|
||||
|
||||
WORD32 ihevce_populate_vui(
|
||||
vui_t *ps_vui,
|
||||
|
|
|
|||
|
|
@ -282,6 +282,7 @@ WORD32 ihevce_ent_coding_thrd(void *pv_frm_proc_thrd_ctxt)
|
|||
|
||||
PROFILE_START(
|
||||
&ps_hle_ctxt->profile_entropy[ps_enc_ctxt->i4_resolution_id][i4_bitrate_instance_num]);
|
||||
#ifndef DISABLE_SEI
|
||||
/* Content Light Level Information */
|
||||
{
|
||||
ps_curr_inp->s_sei.i1_sei_cll_enable =
|
||||
|
|
@ -291,6 +292,7 @@ WORD32 ihevce_ent_coding_thrd(void *pv_frm_proc_thrd_ctxt)
|
|||
ps_curr_inp->s_sei.s_cll_info_sei_params.u2_sei_avg_cll =
|
||||
ps_enc_ctxt->ps_stat_prms->s_out_strm_prms.u2_sei_avg_cll;
|
||||
}
|
||||
#endif
|
||||
if((NULL != ps_curr_out) && (NULL != ps_curr_inp))
|
||||
|
||||
{
|
||||
|
|
@ -370,6 +372,7 @@ WORD32 ihevce_ent_coding_thrd(void *pv_frm_proc_thrd_ctxt)
|
|||
|
||||
if(1 == ps_curr_inp->i4_frm_proc_valid_flag)
|
||||
{
|
||||
#ifndef DISABLE_SEI
|
||||
/* --- Init of buffering period and pic timing SEI related params ----*/
|
||||
{
|
||||
UWORD32 i4_dbf, i4_buffersize, i4_trgt_bit_rate;
|
||||
|
|
@ -414,10 +417,12 @@ WORD32 ihevce_ent_coding_thrd(void *pv_frm_proc_thrd_ctxt)
|
|||
ps_curr_inp->ps_sps->ai1_sps_max_num_reorder_pics[0] +
|
||||
ps_curr_inp->i4_display_num - u4_encode_frm_num;
|
||||
}
|
||||
#endif
|
||||
/* call the core entropy coding entry point function */
|
||||
entropy_error = ihevce_entropy_encode_frame(
|
||||
pv_entropy_hdl, ps_curr_out, ps_curr_inp, ps_curr_out->i4_bitstream_buf_size);
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
/* ----------------- Derivation of u4_au_cpb_removal_delay_minus1 --------------------------------*/
|
||||
if(ps_curr_inp->s_sei.i1_buf_period_params_present_flag)
|
||||
{
|
||||
|
|
@ -438,6 +443,7 @@ WORD32 ihevce_ent_coding_thrd(void *pv_frm_proc_thrd_ctxt)
|
|||
u4_au_cpb_removal_delay_minus1 = (u4_au_cpb_removal_delay_minus1 + 1) &
|
||||
u4_max_cpb_removal_delay_val;
|
||||
}
|
||||
#endif
|
||||
/* Debug prints for entropy error */
|
||||
if(entropy_error)
|
||||
{
|
||||
|
|
@ -449,13 +455,20 @@ WORD32 ihevce_ent_coding_thrd(void *pv_frm_proc_thrd_ctxt)
|
|||
/* acquire mutex lock for rate control calls */
|
||||
osal_mutex_lock(ps_enc_ctxt->pv_rc_mutex_lock_hdl);
|
||||
|
||||
UWORD32 removal_delay_minus1;
|
||||
#ifndef DISABLE_SEI
|
||||
removal_delay_minus1 =
|
||||
ps_curr_inp->s_sei.s_pic_timing_sei_params.u4_au_cpb_removal_delay_minus1;
|
||||
#else
|
||||
removal_delay_minus1 = 0;
|
||||
#endif
|
||||
/* get frame rate/bit rate/max buffer size */
|
||||
ihevce_vbv_compliance_frame_level_update(
|
||||
ps_enc_ctxt->s_module_ctxt.apv_rc_ctxt[i4_bitrate_instance_num],
|
||||
(ps_curr_out->i4_bytes_generated << 3),
|
||||
i4_resolution_id,
|
||||
i4_bitrate_instance_num,
|
||||
ps_curr_inp->s_sei.s_pic_timing_sei_params.u4_au_cpb_removal_delay_minus1);
|
||||
removal_delay_minus1);
|
||||
/* release mutex lock after rate control calls */
|
||||
osal_mutex_unlock(ps_enc_ctxt->pv_rc_mutex_lock_hdl);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -322,7 +322,9 @@ WORD32 ihevce_entropy_encode_frame(
|
|||
vps_t *ps_vps = ps_curr_inp->ps_vps;
|
||||
sps_t *ps_sps = ps_curr_inp->ps_sps;
|
||||
pps_t *ps_pps = ps_curr_inp->ps_pps;
|
||||
#ifndef DISABLE_SEI
|
||||
sei_params_t *ps_sei = &ps_curr_inp->s_sei;
|
||||
#endif
|
||||
ihevce_tile_params_t *ps_tile_params_base;
|
||||
WORD32 out_buf_size = i4_out_buf_size;
|
||||
|
||||
|
|
@ -355,7 +357,9 @@ WORD32 ihevce_entropy_encode_frame(
|
|||
ps_entropy_ctxt->ps_vps = ps_vps;
|
||||
ps_entropy_ctxt->ps_sps = ps_sps;
|
||||
ps_entropy_ctxt->ps_pps = ps_pps;
|
||||
#ifndef DISABLE_SEI
|
||||
ps_entropy_ctxt->ps_sei = ps_sei;
|
||||
#endif
|
||||
ps_entropy_ctxt->ps_slice_hdr = &ps_curr_inp->s_slice_hdr;
|
||||
ps_entropy_ctxt->i4_is_cu_cbf_zero = 1;
|
||||
|
||||
|
|
@ -413,6 +417,7 @@ WORD32 ihevce_entropy_encode_frame(
|
|||
ret |= ihevce_generate_pps(ps_bitstrm, ps_entropy_ctxt->ps_pps);
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
/* generate sei */
|
||||
if(1 == ps_entropy_ctxt->ps_sei->i1_sei_parameters_present_flag)
|
||||
{
|
||||
|
|
@ -435,6 +440,7 @@ WORD32 ihevce_entropy_encode_frame(
|
|||
&ps_curr_inp->as_sei_payload[0]);
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*PIC INFO: Populate slice header bits */
|
||||
ps_entropy_ctxt->ps_pic_level_info->u8_bits_estimated_slice_header +=
|
||||
|
|
@ -674,6 +680,7 @@ WORD32 ihevce_entropy_encode_frame(
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
/* generate suffix sei */
|
||||
if(1 == ps_entropy_ctxt->ps_sei->i1_sei_parameters_present_flag)
|
||||
{
|
||||
|
|
@ -693,6 +700,7 @@ WORD32 ihevce_entropy_encode_frame(
|
|||
/* Updating bytes generated */
|
||||
ps_curr_out->i4_bytes_generated += ps_bitstrm->u4_strm_buf_offset;
|
||||
}
|
||||
#endif
|
||||
|
||||
/* generate end of sequence nal */
|
||||
if((1 == ps_curr_inp->i1_eos_present_flag) && (ps_curr_inp->i4_is_end_of_idr_gop == 1))
|
||||
|
|
|
|||
|
|
@ -213,8 +213,10 @@ typedef struct entropy_context
|
|||
/** pointer to current pps parameters */
|
||||
pps_t *ps_pps;
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
/** pointer to current sei parameters */
|
||||
sei_params_t *ps_sei;
|
||||
#endif
|
||||
|
||||
/** pointer to current slice header parameters */
|
||||
slice_header_t *ps_slice_hdr;
|
||||
|
|
|
|||
|
|
@ -350,6 +350,7 @@ WORD32 ihevce_hle_validate_static_params(ihevce_static_cfg_params_t *ps_static_c
|
|||
PRINTF(ps_sys_api->pv_cb_handle, i4_res_id, i4_br_id, "IHEVCE : i4_interop_flags %d \n", ps_static_cfg_prms->s_out_strm_prms.i4_interop_flags);
|
||||
PRINTF(ps_sys_api->pv_cb_handle, i4_res_id, i4_br_id, "IHEVCE : i4_sps_at_cdr_enable %d \n", ps_static_cfg_prms->s_out_strm_prms.i4_sps_at_cdr_enable);
|
||||
PRINTF(ps_sys_api->pv_cb_handle, i4_res_id, i4_br_id, "IHEVCE : i4_vui_enable %d \n", ps_static_cfg_prms->s_out_strm_prms.i4_vui_enable);
|
||||
#ifndef DISABLE_SEI
|
||||
PRINTF(ps_sys_api->pv_cb_handle, i4_res_id, i4_br_id, "IHEVCE : i4_sei_enable_flag %d \n", ps_static_cfg_prms->s_out_strm_prms.i4_sei_enable_flag);
|
||||
PRINTF(ps_sys_api->pv_cb_handle, i4_res_id, i4_br_id, "IHEVCE : i4_sei_payload_enable_flag %d \n", ps_static_cfg_prms->s_out_strm_prms.i4_sei_payload_enable_flag);
|
||||
PRINTF(ps_sys_api->pv_cb_handle, i4_res_id, i4_br_id, "IHEVCE : i4_sei_buffer_period_flags %d \n", ps_static_cfg_prms->s_out_strm_prms.i4_sei_buffer_period_flags);
|
||||
|
|
@ -368,6 +369,7 @@ WORD32 ihevce_hle_validate_static_params(ihevce_static_cfg_params_t *ps_static_c
|
|||
PRINTF(ps_sys_api->pv_cb_handle, i4_res_id, i4_br_id, "IHEVCE : u4_max_display_mastering_luminance %d \n", ps_static_cfg_prms->s_out_strm_prms.u4_max_display_mastering_luminance);
|
||||
PRINTF(ps_sys_api->pv_cb_handle, i4_res_id, i4_br_id, "IHEVCE : u4_min_display_mastering_luminance %d \n", ps_static_cfg_prms->s_out_strm_prms.u4_min_display_mastering_luminance);
|
||||
PRINTF(ps_sys_api->pv_cb_handle, i4_res_id, i4_br_id, "IHEVCE : i4_sei_hash_flags %d \n", ps_static_cfg_prms->s_out_strm_prms.i4_decoded_pic_hash_sei_flag);
|
||||
#endif
|
||||
|
||||
PRINTF(ps_sys_api->pv_cb_handle, i4_res_id, i4_br_id, "\nIHEVCE : ps_static_cfg_prms->s_app_tile_params\n");
|
||||
PRINTF(ps_sys_api->pv_cb_handle, i4_res_id, i4_br_id, "IHEVCE : i4_tiles_enabled_flag %d \n", ps_static_cfg_prms->s_app_tile_params.i4_tiles_enabled_flag);
|
||||
|
|
@ -644,6 +646,7 @@ WORD32 ihevce_hle_validate_static_params(ihevce_static_cfg_params_t *ps_static_c
|
|||
return IHEVCE_SETUNSUPPORTEDINPUT(error_code);
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
if((ps_static_cfg_prms->s_out_strm_prms.i4_sei_enable_flag > 1) ||
|
||||
(ps_static_cfg_prms->s_out_strm_prms.i4_sei_enable_flag < 0))
|
||||
{
|
||||
|
|
@ -661,6 +664,7 @@ WORD32 ihevce_hle_validate_static_params(ihevce_static_cfg_params_t *ps_static_c
|
|||
pv_cb_handle, "IHEVCE ERROR: i4_sei_payload_enable_flag should be set to 1 or 0 \n");
|
||||
return IHEVCE_SETUNSUPPORTEDINPUT(error_code);
|
||||
}
|
||||
#endif
|
||||
if((ps_static_cfg_prms->s_multi_thrd_prms.i4_max_num_cores > MAX_NUM_CORES) ||
|
||||
(ps_static_cfg_prms->s_multi_thrd_prms.i4_max_num_cores < 1))
|
||||
{
|
||||
|
|
@ -708,8 +712,6 @@ WORD32 ihevce_hle_validate_static_params(ihevce_static_cfg_params_t *ps_static_c
|
|||
}
|
||||
|
||||
{
|
||||
WORD32 sub_gop_size = (1 << ps_static_cfg_prms->s_coding_tools_prms.i4_max_temporal_layers)
|
||||
<< ps_static_cfg_prms->s_src_prms.i4_field_pic;
|
||||
WORD32 i4_max_idr_period, i4_min_idr_period, i4_max_cra_period, i4_max_i_period;
|
||||
WORD32 i4_max_i_distance;
|
||||
WORD32 i4_min_i_distance = 0, i4_non_zero_idr_period = 0x7FFFFFFF,
|
||||
|
|
@ -719,6 +721,12 @@ WORD32 ihevce_hle_validate_static_params(ihevce_static_cfg_params_t *ps_static_c
|
|||
i4_max_cra_period = ps_static_cfg_prms->s_coding_tools_prms.i4_max_cra_open_gop_period;
|
||||
i4_max_i_period = ps_static_cfg_prms->s_coding_tools_prms.i4_max_i_open_gop_period;
|
||||
i4_max_i_distance = MAX(MAX(i4_max_idr_period, i4_max_cra_period), i4_max_i_period);
|
||||
WORD32 num_b_frms =
|
||||
(1 << ps_static_cfg_prms->s_coding_tools_prms.i4_max_temporal_layers) - 1;
|
||||
if (i4_max_i_distance <= num_b_frms)
|
||||
ps_static_cfg_prms->s_coding_tools_prms.i4_max_temporal_layers = 0;
|
||||
WORD32 sub_gop_size = (1 << ps_static_cfg_prms->s_coding_tools_prms.i4_max_temporal_layers)
|
||||
<< ps_static_cfg_prms->s_src_prms.i4_field_pic;
|
||||
|
||||
if(sub_gop_size > 1)
|
||||
{
|
||||
|
|
@ -1340,6 +1348,7 @@ WORD32 ihevce_hle_validate_static_params(ihevce_static_cfg_params_t *ps_static_c
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
/* Check SEI related error checks */
|
||||
if(1 == ps_static_cfg_prms->s_out_strm_prms.i4_sei_enable_flag)
|
||||
{
|
||||
|
|
@ -1450,6 +1459,7 @@ WORD32 ihevce_hle_validate_static_params(ihevce_static_cfg_params_t *ps_static_c
|
|||
}
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
if(1 == ps_static_cfg_prms->s_out_strm_prms.i4_vui_enable)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -94,7 +94,9 @@ typedef enum
|
|||
|
||||
IHEVCE_VUI_ENABLE_OUT_OF_RANGE = IHEVCE_API_ERROR_START + 0x09,
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
IHEVCE_SEI_ENABLE_OUT_OF_RANGE = IHEVCE_API_ERROR_START + 0x0A,
|
||||
#endif
|
||||
|
||||
IHEVCE_SPS_AT_CDR_NOT_SUPPORTED = IHEVCE_API_ERROR_START + 0x0B,
|
||||
|
||||
|
|
@ -288,13 +290,17 @@ typedef enum
|
|||
|
||||
IHEVCE_INVALID_CORE_CONFIG = IHEVCE_API_ERROR_START + 0x67,
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
IHEVCE_SEI_MESSAGES_DEPENDENCY = IHEVCE_API_ERROR_START + 0x68,
|
||||
#endif
|
||||
|
||||
IHEVCE_VUI_DEPENDENCY = IHEVCE_API_ERROR_START + 0x69,
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
IHEVCE_SEI_ENABLED_VUI_DISABLED = IHEVCE_API_ERROR_START + 0x6A,
|
||||
|
||||
IHEVCE_SEI_HASH_VALUE_NOT_SUPPORTED = IHEVCE_API_ERROR_START + 0x6B,
|
||||
#endif
|
||||
|
||||
/* Level related error codes */
|
||||
IHEVCE_PIC_SIZE_NOT_SUPPORTED = IHEVCE_API_ERROR_START + 0x6C,
|
||||
|
|
@ -385,7 +391,9 @@ typedef enum
|
|||
|
||||
IHEVCE_ARCHITECTURE_TYPE_UNSUPPORTED = IHEVCE_API_ERROR_START + 0x95,
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
IHEVCE_SEI_PAYLOAD_ENABLE_OUT_OF_RANGE = IHEVCE_API_ERROR_START + 0x96,
|
||||
#endif
|
||||
|
||||
IHEVCE_BAD_DIST_CFG_PARAMETERS = IHEVCE_API_ERROR_START + 0x97,
|
||||
|
||||
|
|
@ -393,7 +401,9 @@ typedef enum
|
|||
|
||||
IHEVCE_INVALID_MRES_SINGLE_OUT = IHEVCE_API_ERROR_START + 0x99,
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
IHEVCE_SEI_CLL_ENABLE_OUT_OF_RANGE = IHEVCE_API_ERROR_START + 0x9A,
|
||||
#endif
|
||||
|
||||
/** max failure error code to ensure enum is 32 bits wide */
|
||||
IHEVCE_FAIL = 0xFFFFFFFF
|
||||
|
|
|
|||
|
|
@ -3097,12 +3097,15 @@ WORD32 ihevce_enc_frm_proc_slave_thrd(void *pv_frm_proc_thrd_ctxt)
|
|||
ps_curr_inp->s_lap_out.i4_is_ref_pic;
|
||||
|
||||
{
|
||||
WORD32 sei_hash_enabled =
|
||||
(ps_enc_ctxt->ps_stat_prms->s_out_strm_prms
|
||||
WORD32 sei_hash_enabled;
|
||||
#ifndef DISABLE_SEI
|
||||
sei_hash_enabled = (ps_enc_ctxt->ps_stat_prms->s_out_strm_prms
|
||||
.i4_sei_enable_flag == 1) &&
|
||||
(ps_enc_ctxt->ps_stat_prms->s_out_strm_prms
|
||||
.i4_decoded_pic_hash_sei_flag != 0);
|
||||
|
||||
#else
|
||||
sei_hash_enabled = 0;
|
||||
#endif
|
||||
/* Deblock a picture for all reference frames unconditionally. */
|
||||
/* Deblock non ref if psnr compute or save recon is enabled */
|
||||
ps_frm_recon->i4_deblk_pad_hpel_cur_pic =
|
||||
|
|
@ -3508,6 +3511,7 @@ WORD32 ihevce_enc_frm_proc_slave_thrd(void *pv_frm_proc_thrd_ctxt)
|
|||
ps_curr_out[i4_enc_frm_id][i4_bitrate_ctr];
|
||||
//ps_curr_out[i4_enc_frm_id][i4_bitrate_ctr]->i4_enc_order_num = ps_curr_inp->s_lap_out.i4_enc_order_num;
|
||||
/*registered User Data Call*/
|
||||
#ifndef DISABLE_SEI
|
||||
if(ps_enc_ctxt->ps_stat_prms->s_out_strm_prms.i4_sei_payload_enable_flag)
|
||||
{
|
||||
ihevce_fill_sei_payload(
|
||||
|
|
@ -3516,6 +3520,7 @@ WORD32 ihevce_enc_frm_proc_slave_thrd(void *pv_frm_proc_thrd_ctxt)
|
|||
ps_curr_out[i4_enc_frm_id][i4_bitrate_ctr]);
|
||||
}
|
||||
|
||||
#endif
|
||||
/*derive end flag and input valid flag in output buffer */
|
||||
if(NULL != ps_enc_ctxt->s_multi_thrd.aps_cur_inp_enc_prms[i4_enc_frm_id])
|
||||
{
|
||||
|
|
@ -3568,12 +3573,14 @@ WORD32 ihevce_enc_frm_proc_slave_thrd(void *pv_frm_proc_thrd_ctxt)
|
|||
ps_curr_out[i4_enc_frm_id][i4_bitrate_ctr]->ps_vps =
|
||||
&ps_enc_ctxt->as_vps[i4_bitrate_ctr];
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
/* SEI header will be populated in pre-enocde stage */
|
||||
memcpy(
|
||||
&ps_curr_out[i4_enc_frm_id][i4_bitrate_ctr]->s_sei,
|
||||
&ps_curr_inp_from_me->s_sei,
|
||||
sizeof(sei_params_t));
|
||||
|
||||
#endif
|
||||
/*AUD and EOS presnt flags are populated*/
|
||||
ps_curr_out[i4_enc_frm_id][i4_bitrate_ctr]->i1_aud_present_flag =
|
||||
ps_enc_ctxt->ps_stat_prms->s_out_strm_prms.i4_aud_enable_flags;
|
||||
|
|
@ -4168,6 +4175,7 @@ WORD32 ihevce_enc_frm_proc_slave_thrd(void *pv_frm_proc_thrd_ctxt)
|
|||
if(1 == ps_enc_ctxt->s_multi_thrd.aps_cur_inp_enc_prms[i4_enc_frm_id]
|
||||
->i4_frm_proc_valid_flag)
|
||||
{
|
||||
#ifndef DISABLE_SEI
|
||||
/* Calculate the SEI Hash if enabled */
|
||||
if(0 !=
|
||||
ps_enc_ctxt->s_multi_thrd.ps_curr_out_enc_grp[i4_enc_frm_id][i]
|
||||
|
|
@ -4198,6 +4206,7 @@ WORD32 ihevce_enc_frm_proc_slave_thrd(void *pv_frm_proc_thrd_ctxt)
|
|||
0,
|
||||
0);
|
||||
}
|
||||
#endif
|
||||
/* Sending qp, poc and pic-type to entropy thread for printing on console */
|
||||
if(ps_enc_ctxt->ps_stat_prms->i4_log_dump_level != 0)
|
||||
{
|
||||
|
|
@ -5259,6 +5268,7 @@ void ihevce_pre_enc_init(
|
|||
ps_curr_out->ps_vps = &ps_enc_ctxt->as_vps[0];
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
/* By default, Sei messages are set to 0, to avoid unintialised memory access */
|
||||
memset(&ps_curr_out->s_sei, 0, sizeof(sei_params_t));
|
||||
|
||||
|
|
@ -5340,6 +5350,7 @@ void ihevce_pre_enc_init(
|
|||
ps_enc_ctxt->ps_stat_prms->s_out_strm_prms.i4_decoded_pic_hash_sei_flag;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/* For interlace pictures, first_field depends on topfield_first and bottom field */
|
||||
if(i4_field_pic)
|
||||
|
|
|
|||
|
|
@ -308,6 +308,7 @@ unsigned int calc_block_ssim(
|
|||
}
|
||||
}
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
/*!
|
||||
******************************************************************************
|
||||
* \if Function name : ihevce_fill_sei_payload \endif
|
||||
|
|
@ -392,6 +393,7 @@ void ihevce_fill_sei_payload(
|
|||
pu4_tag += 2;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
/*!
|
||||
******************************************************************************
|
||||
|
|
|
|||
|
|
@ -76,10 +76,12 @@ WORD32 ihevce_get_cur_frame_qp(
|
|||
WORD32 max_qp,
|
||||
rc_quant_t *ps_rc_quant_ctxt);
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
void ihevce_fill_sei_payload(
|
||||
enc_ctxt_t *ps_enc_ctxt,
|
||||
ihevce_lap_enc_buf_t *ps_curr_inp,
|
||||
frm_proc_ent_cod_ctxt_t *ps_curr_out);
|
||||
#endif
|
||||
|
||||
void ihevce_dyn_bitrate(void *pv_hle_ctxt, void *pv_dyn_bitrate_prms);
|
||||
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@
|
|||
* \file ihevce_hle_interface.c
|
||||
*
|
||||
* \brief
|
||||
* This file contains all the functions related High level enocder
|
||||
* This file contains all the functions related High level encoder
|
||||
* Interface layer
|
||||
*
|
||||
* \date
|
||||
|
|
@ -163,7 +163,7 @@ void ihevce_context_reset(enc_ctxt_t *ps_enc_ctxt)
|
|||
* \brief
|
||||
* High level Encoder create function
|
||||
*
|
||||
* \param[in] High level enocder interface context pointer
|
||||
* \param[in] High level encoder interface context pointer
|
||||
*
|
||||
* \return
|
||||
* success or fail
|
||||
|
|
@ -515,11 +515,16 @@ IV_API_CALL_STATUS_T ihevce_query_io_buf_req(
|
|||
|
||||
ps_input_bufs_req->i4_yuv_format = ps_src_prms->i4_chr_format;
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
ps_input_bufs_req->i4_min_size_synch_ctrl_bufs =
|
||||
((MAX_SEI_PAYLOAD_PER_TLV + 16) * MAX_NUMBER_OF_SEI_PAYLOAD) + 16;
|
||||
|
||||
ps_input_bufs_req->i4_min_size_asynch_ctrl_bufs =
|
||||
((MAX_SEI_PAYLOAD_PER_TLV + 16) * (MAX_NUMBER_OF_SEI_PAYLOAD - 6)) + 16;
|
||||
#else
|
||||
ps_input_bufs_req->i4_min_size_synch_ctrl_bufs = 16;
|
||||
ps_input_bufs_req->i4_min_size_asynch_ctrl_bufs = 16;
|
||||
#endif
|
||||
|
||||
for(i4_resolution_id_ctr = 0; i4_resolution_id_ctr < i4_num_resolutions; i4_resolution_id_ctr++)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@
|
|||
* \file ihevce_hle_interface.h
|
||||
*
|
||||
* \brief
|
||||
* This file contains infertace prototypes of High level enocder interafce
|
||||
* This file contains infertace prototypes of High level encoder interafce
|
||||
* structure and interface functions.
|
||||
*
|
||||
* \date
|
||||
|
|
|
|||
|
|
@ -548,7 +548,9 @@ void ihevce_lap_parse_sync_cmd(
|
|||
WORD32 *pi4_tag_parse = pi4_cmd_buf;
|
||||
WORD32 i4_cmd_size = ps_lap_inp_buf->s_input_buf.i4_cmd_buf_size;
|
||||
WORD32 i4_buf_id = ps_lap_inp_buf->s_input_buf.i4_buf_id;
|
||||
#ifndef DISABLE_SEI
|
||||
UWORD32 u4_num_sei = 0;
|
||||
#endif
|
||||
WORD32 i4_end_flag = 0;
|
||||
|
||||
while(i4_cmd_size >= 4)
|
||||
|
|
@ -568,7 +570,9 @@ void ihevce_lap_parse_sync_cmd(
|
|||
(*pi4_flush_check) = 1;
|
||||
pi4_tag_parse += 2;
|
||||
i4_cmd_size -= 8;
|
||||
#ifndef DISABLE_SEI
|
||||
u4_num_sei++;
|
||||
#endif
|
||||
break;
|
||||
case IHEVCE_SYNCH_API_FORCE_IDR_TAG:
|
||||
if(i4_cmd_size < 8 || pi4_tag_parse[1])
|
||||
|
|
@ -583,7 +587,9 @@ void ihevce_lap_parse_sync_cmd(
|
|||
(*pi4_force_idr_check) = 1;
|
||||
pi4_tag_parse += 2;
|
||||
i4_cmd_size -= 8;
|
||||
#ifndef DISABLE_SEI
|
||||
u4_num_sei++;
|
||||
#endif
|
||||
break;
|
||||
case IHEVCE_SYNCH_API_END_TAG:
|
||||
i4_end_flag = 1;
|
||||
|
|
@ -597,9 +603,11 @@ void ihevce_lap_parse_sync_cmd(
|
|||
if(i4_end_flag)
|
||||
break;
|
||||
}
|
||||
#ifndef DISABLE_SEI
|
||||
if(u4_num_sei > MAX_NUMBER_OF_SEI_PAYLOAD) //Checking for max number of SEI messages.
|
||||
ps_hle_ctxt->ihevce_cmds_error_report(
|
||||
ps_hle_ctxt->pv_cmd_err_cb_handle, IHEVCE_SYNCH_ERR_TOO_MANY_SEI_MSG, 1, i4_buf_id);
|
||||
#endif
|
||||
|
||||
if(!i4_end_flag)
|
||||
ps_hle_ctxt->ihevce_cmds_error_report(
|
||||
|
|
|
|||
|
|
@ -1340,6 +1340,7 @@ void ihevce_mem_manager_init(enc_ctxt_t *ps_enc_ctxt, ihevce_hle_ctxt_t *ps_intr
|
|||
total_memtabs_used++;
|
||||
total_system_memtabs++;
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
/* SEI Payload Data */
|
||||
buf_size = sizeof(UWORD8) * MAX_NUMBER_OF_SEI_PAYLOAD * MAX_SEI_PAYLOAD_PER_TLV *
|
||||
NUM_FRMPROC_ENTCOD_BUFS;
|
||||
|
|
@ -1352,6 +1353,7 @@ void ihevce_mem_manager_init(enc_ctxt_t *ps_enc_ctxt, ihevce_hle_ctxt_t *ps_intr
|
|||
/* increment the memtab counter */
|
||||
total_memtabs_used++;
|
||||
total_system_memtabs++;
|
||||
#endif
|
||||
}
|
||||
|
||||
/* ------ Working mem frame level -------*/
|
||||
|
|
@ -1515,8 +1517,6 @@ void ihevce_mem_manager_init(enc_ctxt_t *ps_enc_ctxt, ihevce_hle_ctxt_t *ps_intr
|
|||
ps_intrf_ctxt->i4_error_code = IHEVCE_CANNOT_ALLOCATE_MEMORY;
|
||||
return;
|
||||
}
|
||||
|
||||
memset(pu1_mem, 0, ps_memtab[ctr].i4_mem_size);
|
||||
}
|
||||
|
||||
/* --------------------------------------------------------------------- */
|
||||
|
|
@ -2112,7 +2112,6 @@ void ihevce_mem_manager_init(enc_ctxt_t *ps_enc_ctxt, ihevce_hle_ctxt_t *ps_intr
|
|||
UWORD8 *pu1_coeffs;
|
||||
WORD32 num_ctb_in_frm;
|
||||
WORD32 coeff_size;
|
||||
UWORD8 *pu1_sei_payload;
|
||||
|
||||
/* frame process/entropy coding buffer pointer array */
|
||||
pps_frm_proc_ent_cod_bufs[i] = (frm_proc_ent_cod_ctxt_t **)ps_memtab->pv_base;
|
||||
|
|
@ -2149,9 +2148,12 @@ void ihevce_mem_manager_init(enc_ctxt_t *ps_enc_ctxt, ihevce_hle_ctxt_t *ps_intr
|
|||
/* increment the memtabs */
|
||||
ps_memtab++;
|
||||
|
||||
#ifndef DISABLE_SEI
|
||||
/* CC User Data */
|
||||
UWORD8 *pu1_sei_payload;
|
||||
pu1_sei_payload = (UWORD8 *)ps_memtab->pv_base;
|
||||
ps_memtab++;
|
||||
#endif
|
||||
|
||||
num_ctb_in_frm = num_ctb_horz * num_ctb_vert;
|
||||
|
||||
|
|
@ -2164,7 +2166,6 @@ void ihevce_mem_manager_init(enc_ctxt_t *ps_enc_ctxt, ihevce_hle_ctxt_t *ps_intr
|
|||
/* loop to initialise all the memories */
|
||||
for(ctr = 0; ctr < NUM_FRMPROC_ENTCOD_BUFS; ctr++)
|
||||
{
|
||||
WORD32 num_sei;
|
||||
pps_frm_proc_ent_cod_bufs[i][ctr] = ps_frmp_ent_bufs;
|
||||
|
||||
ps_frmp_ent_bufs->ps_frm_ctb_data = ps_ctb;
|
||||
|
|
@ -2186,7 +2187,8 @@ void ihevce_mem_manager_init(enc_ctxt_t *ps_enc_ctxt, ihevce_hle_ctxt_t *ps_intr
|
|||
|
||||
pu1_coeffs += coeff_size;
|
||||
|
||||
for(num_sei = 0; num_sei < MAX_NUMBER_OF_SEI_PAYLOAD; num_sei++)
|
||||
#ifndef DISABLE_SEI
|
||||
for(WORD32 num_sei = 0; num_sei < MAX_NUMBER_OF_SEI_PAYLOAD; num_sei++)
|
||||
{
|
||||
ps_frmp_ent_bufs->as_sei_payload[num_sei].pu1_sei_payload = pu1_sei_payload;
|
||||
ps_frmp_ent_bufs->as_sei_payload[num_sei].u4_payload_type = 0;
|
||||
|
|
@ -2194,6 +2196,7 @@ void ihevce_mem_manager_init(enc_ctxt_t *ps_enc_ctxt, ihevce_hle_ctxt_t *ps_intr
|
|||
pu1_sei_payload += MAX_SEI_PAYLOAD_PER_TLV;
|
||||
}
|
||||
|
||||
#endif
|
||||
ps_frmp_ent_bufs++;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -112,6 +112,8 @@
|
|||
*
|
||||
* \brief
|
||||
* Memory manager specific alloc function
|
||||
* it expects to reset the allocated memory and provide the zero initialised
|
||||
* memory whenever this function getting called
|
||||
*
|
||||
* \param[in] pv_handle : handle to memory manager
|
||||
* (currently not required can be set to null)
|
||||
|
|
@ -158,6 +160,10 @@ void mem_mngr_alloc(void *pv_handle, ihevce_sys_api_t *ps_sys_api, iv_mem_rec_t
|
|||
ps_sys_api->pv_cb_handle, "IHEVCE ERROR: Unable to allocate memory\n");
|
||||
ASSERT(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
memset(ps_memtab->pv_base, 0, ps_memtab->i4_mem_size);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -167,6 +173,8 @@ void mem_mngr_alloc(void *pv_handle, ihevce_sys_api_t *ps_sys_api, iv_mem_rec_t
|
|||
*
|
||||
* \brief
|
||||
* common memory allocate function should be used across all threads
|
||||
* it expects to reset the allocated memory and return the zero initialised
|
||||
* memory pointer whenever this function getting called
|
||||
*
|
||||
* \param[in] pv_handle : handle to memory manager
|
||||
* (currently not required can be set to null)
|
||||
|
|
@ -183,7 +191,12 @@ void mem_mngr_alloc(void *pv_handle, ihevce_sys_api_t *ps_sys_api, iv_mem_rec_t
|
|||
void *memory_alloc(void *pv_handle, UWORD32 u4_size)
|
||||
{
|
||||
(void)pv_handle;
|
||||
return (malloc(u4_size));
|
||||
void *pv_buf = malloc(u4_size);
|
||||
if(pv_buf)
|
||||
{
|
||||
memset(pv_buf, 0, u4_size);
|
||||
}
|
||||
return (pv_buf);
|
||||
}
|
||||
|
||||
/*!
|
||||
|
|
@ -341,6 +354,7 @@ IHEVCE_PLUGIN_STATUS_T ihevce_set_def_params(ihevce_static_cfg_params_t *ps_para
|
|||
ps_params->s_out_strm_prms.i4_codec_profile = 1;
|
||||
ps_params->s_out_strm_prms.i4_codec_tier = 0;
|
||||
ps_params->s_out_strm_prms.i4_codec_type = 0;
|
||||
#ifndef DISABLE_SEI
|
||||
ps_params->s_out_strm_prms.i4_sei_buffer_period_flags = 0;
|
||||
ps_params->s_out_strm_prms.i4_sei_enable_flag = 0;
|
||||
ps_params->s_out_strm_prms.i4_sei_payload_enable_flag = 0;
|
||||
|
|
@ -351,6 +365,7 @@ IHEVCE_PLUGIN_STATUS_T ihevce_set_def_params(ihevce_static_cfg_params_t *ps_para
|
|||
ps_params->s_out_strm_prms.i4_sei_recovery_point_flags = 0;
|
||||
ps_params->s_out_strm_prms.i4_sei_mastering_disp_colour_vol_flags = 0;
|
||||
ps_params->s_out_strm_prms.i4_decoded_pic_hash_sei_flag = 0;
|
||||
#endif
|
||||
ps_params->s_out_strm_prms.i4_sps_at_cdr_enable = 1;
|
||||
ps_params->s_out_strm_prms.i4_vui_enable = 0;
|
||||
/*Set the interoperability flag to 0*/
|
||||
|
|
@ -577,7 +592,7 @@ IV_API_CALL_STATUS_T
|
|||
* \if Function name : ihevce_plugin_init \endif
|
||||
*
|
||||
* \brief
|
||||
* Initialises the enocder context and threads
|
||||
* Initialises the encoder context and threads
|
||||
*
|
||||
* \param[in] Static params pointer
|
||||
*
|
||||
|
|
@ -629,7 +644,6 @@ IHEVCE_PLUGIN_STATUS_T ihevce_init(ihevce_static_cfg_params_t *ps_params, void *
|
|||
ps_sys_api->pv_cb_handle, "IHEVCE ERROR: Error in Plugin initialization\n");
|
||||
return (IHEVCE_EFAIL);
|
||||
}
|
||||
memset(ps_ctxt, 0, sizeof(plugin_ctxt_t));
|
||||
|
||||
/* initialise memory call backs */
|
||||
ps_ctxt->ihevce_mem_alloc = memory_alloc;
|
||||
|
|
@ -754,7 +768,6 @@ IHEVCE_PLUGIN_STATUS_T ihevce_init(ihevce_static_cfg_params_t *ps_params, void *
|
|||
"IHEVCE ERROR: Error in Plugin HLE memory initialization\n");
|
||||
return (IHEVCE_EFAIL);
|
||||
}
|
||||
memset(ps_interface_ctxt, 0, sizeof(ihevce_hle_ctxt_t));
|
||||
ps_interface_ctxt->i4_size = sizeof(ihevce_hle_ctxt_t);
|
||||
|
||||
ps_ctxt->pv_hle_interface_ctxt = ps_interface_ctxt;
|
||||
|
|
@ -1490,7 +1503,7 @@ static IHEVCE_PLUGIN_STATUS_T
|
|||
* \if Function name : ihevce_close \endif
|
||||
*
|
||||
* \brief
|
||||
* De-Initialises the enocder context and threads
|
||||
* De-Initialises the encoder context and threads
|
||||
*
|
||||
* \param[in] Static params pointer
|
||||
*
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue