max_stars_count
int64 301
224k
| text
stringlengths 6
1.05M
| token_count
int64 3
727k
|
---|---|---|
375 | <filename>src/Eclipse-IDE/org.robotframework.ide.eclipse.main.plugin/src/org/robotframework/ide/eclipse/main/plugin/launch/tabs/RemoteRobotLaunchConfigurationTabGroup.java
/*
* Copyright 2017 Nokia Solutions and Networks
* Licensed under the Apache License, Version 2.0,
* see license.txt file for details.
*/
package org.robotframework.ide.eclipse.main.plugin.launch.tabs;
import org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup;
import org.eclipse.debug.ui.CommonTab;
import org.eclipse.debug.ui.ILaunchConfigurationDialog;
import org.eclipse.debug.ui.ILaunchConfigurationTab;
public class RemoteRobotLaunchConfigurationTabGroup extends AbstractLaunchConfigurationTabGroup {
@Override
public void createTabs(final ILaunchConfigurationDialog dialog, final String mode) {
setTabs(new ILaunchConfigurationTab[] {
new LaunchConfigurationListenerTab(false),
new CommonTab()
});
}
}
| 330 |
389 | __all__ = ["Pregel"]
from typing import Optional
from arango.api import ApiGroup
from arango.exceptions import (
PregelJobCreateError,
PregelJobDeleteError,
PregelJobGetError,
)
from arango.formatter import format_pregel_job_data
from arango.request import Request
from arango.response import Response
from arango.result import Result
from arango.typings import Json
class Pregel(ApiGroup):
"""Pregel API wrapper."""
def __repr__(self) -> str:
return f"<Pregel in {self._conn.db_name}>"
def job(self, job_id: int) -> Result[Json]:
"""Return the details of a Pregel job.
:param job_id: Pregel job ID.
:type job_id: int
:return: Details of the Pregel job.
:rtype: dict
:raise arango.exceptions.PregelJobGetError: If retrieval fails.
"""
request = Request(method="get", endpoint=f"/_api/control_pregel/{job_id}")
def response_handler(resp: Response) -> Json:
if resp.is_success:
return format_pregel_job_data(resp.body)
raise PregelJobGetError(resp, request)
return self._execute(request, response_handler)
def create_job(
self,
graph: str,
algorithm: str,
store: bool = True,
max_gss: Optional[int] = None,
thread_count: Optional[int] = None,
async_mode: Optional[bool] = None,
result_field: Optional[str] = None,
algorithm_params: Optional[Json] = None,
) -> Result[int]:
"""Start a new Pregel job.
:param graph: Graph name.
:type graph: str
:param algorithm: Algorithm (e.g. "pagerank").
:type algorithm: str
:param store: If set to True, Pregel engine writes results back to the
database. If set to False, results can be queried via AQL.
:type store: bool
:param max_gss: Max number of global iterations for the algorithm.
:type max_gss: int | None
:param thread_count: Number of parallel threads to use per worker.
This does not influence the number of threads used to load or store
data from the database (it depends on the number of shards).
:type thread_count: int | None
:param async_mode: If set to True, algorithms which support async mode
run without synchronized global iterations. This might lead to
performance increase if there are load imbalances.
:type async_mode: bool | None
:param result_field: If specified, most algorithms will write their
results into this field.
:type result_field: str | None
:param algorithm_params: Additional algorithm parameters.
:type algorithm_params: dict | None
:return: Pregel job ID.
:rtype: int
:raise arango.exceptions.PregelJobCreateError: If create fails.
"""
data: Json = {"algorithm": algorithm, "graphName": graph}
if algorithm_params is None:
algorithm_params = {}
if store is not None:
algorithm_params["store"] = store
if max_gss is not None:
algorithm_params["maxGSS"] = max_gss
if thread_count is not None:
algorithm_params["parallelism"] = thread_count
if async_mode is not None:
algorithm_params["async"] = async_mode
if result_field is not None:
algorithm_params["resultField"] = result_field
if algorithm_params:
data["params"] = algorithm_params
request = Request(method="post", endpoint="/_api/control_pregel", data=data)
def response_handler(resp: Response) -> int:
if resp.is_success:
return int(resp.body)
raise PregelJobCreateError(resp, request)
return self._execute(request, response_handler)
def delete_job(self, job_id: int) -> Result[bool]:
"""Delete a Pregel job.
:param job_id: Pregel job ID.
:type job_id: int
:return: True if Pregel job was deleted successfully.
:rtype: bool
:raise arango.exceptions.PregelJobDeleteError: If delete fails.
"""
request = Request(method="delete", endpoint=f"/_api/control_pregel/{job_id}")
def response_handler(resp: Response) -> bool:
if resp.is_success:
return True
raise PregelJobDeleteError(resp, request)
return self._execute(request, response_handler)
| 1,863 |
573 | <reponame>capablevms/VIXL
// Copyright 2015, VIXL authors
// All rights reserved.
//
// Redistribution and use in source and binary forms, with or without
// modification, are permitted provided that the following conditions are met:
//
// * Redistributions of source code must retain the above copyright notice,
// this list of conditions and the following disclaimer.
// * Redistributions in binary form must reproduce the above copyright notice,
// this list of conditions and the following disclaimer in the documentation
// and/or other materials provided with the distribution.
// * Neither the name of ARM Limited nor the names of its contributors may be
// used to endorse or promote products derived from this software without
// specific prior written permission.
//
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS CONTRIBUTORS "AS IS" AND
// ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
// WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
// DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE
// FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
// DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
// SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
// CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
// OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// ---------------------------------------------------------------------
// This file is auto generated using tools/generate_simulator_traces.py.
//
// PLEASE DO NOT EDIT.
// ---------------------------------------------------------------------
#ifndef VIXL_SIMULATOR_COND_RD_OPERAND_RN_SHIFT_AMOUNT_1TO31_MVN_T32_H_
#define VIXL_SIMULATOR_COND_RD_OPERAND_RN_SHIFT_AMOUNT_1TO31_MVN_T32_H_
const Inputs kOutputs_Mvn_Condition_eq_r0_r0_LSL_1[] = {
{ 0x80000000, 0xabababab, 0xabababab },
{ 0x40000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x20000000, 0xabababab, 0xabababab },
{ 0x10000000, 0xabababab, 0xabababab },
{ 0xc0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xa0000000, 0xabababab, 0xabababab },
{ 0x90000000, 0xabababab, 0xabababab },
{ 0x60000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x50000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x30000000, 0xabababab, 0xabababab },
{ 0xe0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xd0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xb0000000, 0xabababab, 0xabababab },
{ 0x70000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xf0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
};
const Inputs kOutputs_Mvn_Condition_ne_r0_r0_LSL_1[] = {
{ 0x80000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x40000000, 0xabababab, 0xabababab },
{ 0x20000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x10000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xc0000000, 0xabababab, 0xabababab },
{ 0xa0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x90000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x60000000, 0xabababab, 0xabababab },
{ 0x50000000, 0xabababab, 0xabababab },
{ 0x30000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xe0000000, 0xabababab, 0xabababab },
{ 0xd0000000, 0xabababab, 0xabababab },
{ 0xb0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x70000000, 0xabababab, 0xabababab },
{ 0xf0000000, 0xabababab, 0xabababab },
};
const Inputs kOutputs_Mvn_Condition_cs_r0_r0_LSL_1[] = {
{ 0x80000000, 0xabababab, 0xabababab },
{ 0x40000000, 0xabababab, 0xabababab },
{ 0x20000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x10000000, 0xabababab, 0xabababab },
{ 0xc0000000, 0xabababab, 0xabababab },
{ 0xa0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x90000000, 0xabababab, 0xabababab },
{ 0x60000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x50000000, 0xabababab, 0xabababab },
{ 0x30000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xe0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xd0000000, 0xabababab, 0xabababab },
{ 0xb0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x70000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xf0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
};
const Inputs kOutputs_Mvn_Condition_cc_r0_r0_LSL_1[] = {
{ 0x80000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x40000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x20000000, 0xabababab, 0xabababab },
{ 0x10000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xc0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xa0000000, 0xabababab, 0xabababab },
{ 0x90000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x60000000, 0xabababab, 0xabababab },
{ 0x50000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x30000000, 0xabababab, 0xabababab },
{ 0xe0000000, 0xabababab, 0xabababab },
{ 0xd0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xb0000000, 0xabababab, 0xabababab },
{ 0x70000000, 0xabababab, 0xabababab },
{ 0xf0000000, 0xabababab, 0xabababab },
};
const Inputs kOutputs_Mvn_Condition_mi_r0_r0_LSL_1[] = {
{ 0x80000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x40000000, 0xabababab, 0xabababab },
{ 0x20000000, 0xabababab, 0xabababab },
{ 0x10000000, 0xabababab, 0xabababab },
{ 0xc0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xa0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x90000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x60000000, 0xabababab, 0xabababab },
{ 0x50000000, 0xabababab, 0xabababab },
{ 0x30000000, 0xabababab, 0xabababab },
{ 0xe0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xd0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xb0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x70000000, 0xabababab, 0xabababab },
{ 0xf0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
};
const Inputs kOutputs_Mvn_Condition_pl_r0_r0_LSL_1[] = {
{ 0x80000000, 0xabababab, 0xabababab },
{ 0x40000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x20000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x10000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xc0000000, 0xabababab, 0xabababab },
{ 0xa0000000, 0xabababab, 0xabababab },
{ 0x90000000, 0xabababab, 0xabababab },
{ 0x60000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x50000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x30000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xe0000000, 0xabababab, 0xabababab },
{ 0xd0000000, 0xabababab, 0xabababab },
{ 0xb0000000, 0xabababab, 0xabababab },
{ 0x70000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xf0000000, 0xabababab, 0xabababab },
};
const Inputs kOutputs_Mvn_Condition_vs_r0_r0_LSL_1[] = {
{ 0x80000000, 0xabababab, 0xabababab },
{ 0x40000000, 0xabababab, 0xabababab },
{ 0x20000000, 0xabababab, 0xabababab },
{ 0x10000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xc0000000, 0xabababab, 0xabababab },
{ 0xa0000000, 0xabababab, 0xabababab },
{ 0x90000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x60000000, 0xabababab, 0xabababab },
{ 0x50000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x30000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xe0000000, 0xabababab, 0xabababab },
{ 0xd0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xb0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x70000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xf0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
};
const Inputs kOutputs_Mvn_Condition_vc_r0_r0_LSL_1[] = {
{ 0x80000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x40000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x20000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x10000000, 0xabababab, 0xabababab },
{ 0xc0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xa0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x90000000, 0xabababab, 0xabababab },
{ 0x60000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x50000000, 0xabababab, 0xabababab },
{ 0x30000000, 0xabababab, 0xabababab },
{ 0xe0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xd0000000, 0xabababab, 0xabababab },
{ 0xb0000000, 0xabababab, 0xabababab },
{ 0x70000000, 0xabababab, 0xabababab },
{ 0xf0000000, 0xabababab, 0xabababab },
};
const Inputs kOutputs_Mvn_Condition_hi_r0_r0_LSL_1[] = {
{ 0x80000000, 0xabababab, 0xabababab },
{ 0x40000000, 0xabababab, 0xabababab },
{ 0x20000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x10000000, 0xabababab, 0xabababab },
{ 0xc0000000, 0xabababab, 0xabababab },
{ 0xa0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x90000000, 0xabababab, 0xabababab },
{ 0x60000000, 0xabababab, 0xabababab },
{ 0x50000000, 0xabababab, 0xabababab },
{ 0x30000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xe0000000, 0xabababab, 0xabababab },
{ 0xd0000000, 0xabababab, 0xabababab },
{ 0xb0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x70000000, 0xabababab, 0xabababab },
{ 0xf0000000, 0xabababab, 0xabababab },
};
const Inputs kOutputs_Mvn_Condition_ls_r0_r0_LSL_1[] = {
{ 0x80000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x40000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x20000000, 0xabababab, 0xabababab },
{ 0x10000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xc0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xa0000000, 0xabababab, 0xabababab },
{ 0x90000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x60000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x50000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x30000000, 0xabababab, 0xabababab },
{ 0xe0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xd0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xb0000000, 0xabababab, 0xabababab },
{ 0x70000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xf0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
};
const Inputs kOutputs_Mvn_Condition_ge_r0_r0_LSL_1[] = {
{ 0x80000000, 0xabababab, 0xabababab },
{ 0x40000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x20000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x10000000, 0xabababab, 0xabababab },
{ 0xc0000000, 0xabababab, 0xabababab },
{ 0xa0000000, 0xabababab, 0xabababab },
{ 0x90000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x60000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x50000000, 0xabababab, 0xabababab },
{ 0x30000000, 0xabababab, 0xabababab },
{ 0xe0000000, 0xabababab, 0xabababab },
{ 0xd0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xb0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x70000000, 0xabababab, 0xabababab },
{ 0xf0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
};
const Inputs kOutputs_Mvn_Condition_lt_r0_r0_LSL_1[] = {
{ 0x80000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x40000000, 0xabababab, 0xabababab },
{ 0x20000000, 0xabababab, 0xabababab },
{ 0x10000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xc0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xa0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x90000000, 0xabababab, 0xabababab },
{ 0x60000000, 0xabababab, 0xabababab },
{ 0x50000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x30000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xe0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xd0000000, 0xabababab, 0xabababab },
{ 0xb0000000, 0xabababab, 0xabababab },
{ 0x70000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xf0000000, 0xabababab, 0xabababab },
};
const Inputs kOutputs_Mvn_Condition_gt_r0_r0_LSL_1[] = {
{ 0x80000000, 0xabababab, 0xabababab },
{ 0x40000000, 0xabababab, 0xabababab },
{ 0x20000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x10000000, 0xabababab, 0xabababab },
{ 0xc0000000, 0xabababab, 0xabababab },
{ 0xa0000000, 0xabababab, 0xabababab },
{ 0x90000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x60000000, 0xabababab, 0xabababab },
{ 0x50000000, 0xabababab, 0xabababab },
{ 0x30000000, 0xabababab, 0xabababab },
{ 0xe0000000, 0xabababab, 0xabababab },
{ 0xd0000000, 0xabababab, 0xabababab },
{ 0xb0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x70000000, 0xabababab, 0xabababab },
{ 0xf0000000, 0xabababab, 0xabababab },
};
const Inputs kOutputs_Mvn_Condition_le_r0_r0_LSL_1[] = {
{ 0x80000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x40000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x20000000, 0xabababab, 0xabababab },
{ 0x10000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xc0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xa0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x90000000, 0xabababab, 0xabababab },
{ 0x60000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x50000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x30000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xe0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xd0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xb0000000, 0xabababab, 0xabababab },
{ 0x70000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xf0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
};
const Inputs kOutputs_Mvn_Condition_al_r0_r0_LSL_1[] = {
{ 0x80000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x40000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x20000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x10000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xc0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xa0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x90000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x60000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x50000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x30000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xe0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xd0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xb0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0x70000000, 0xa8a8a8a9, 0xa8a8a8a9 },
{ 0xf0000000, 0xa8a8a8a9, 0xa8a8a8a9 },
};
const Inputs kOutputs_Mvn_RdIsRn_al_r0_r0_LSL_1[] = {
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xfffffffb, 0xfffffffb },
{ 0x00000000, 0xffffffbf, 0xffffffbf },
{ 0x00000000, 0xffffff05, 0xffffff05 },
{ 0x00000000, 0xffffff03, 0xffffff03 },
{ 0x00000000, 0xffffff01, 0xffffff01 },
{ 0x00000000, 0xffff0005, 0xffff0005 },
{ 0x00000000, 0xffff0003, 0xffff0003 },
{ 0x00000000, 0xffff0001, 0xffff0001 },
{ 0x00000000, 0x99999999, 0x99999999 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaab },
{ 0x00000000, 0x66666667, 0x66666667 },
{ 0x00000000, 0x0000ffff, 0x0000ffff },
{ 0x00000000, 0x0000fffd, 0x0000fffd },
{ 0x00000000, 0x0000fffb, 0x0000fffb },
{ 0x00000000, 0x0000fff9, 0x0000fff9 },
{ 0x00000000, 0x000000ff, 0x000000ff },
{ 0x00000000, 0x000000fd, 0x000000fd },
{ 0x00000000, 0x000000fb, 0x000000fb },
{ 0x00000000, 0x000000f9, 0x000000f9 },
{ 0x00000000, 0x0000003f, 0x0000003f },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
};
const Inputs kOutputs_Mvn_RdIsRn_al_r1_r1_LSL_1[] = {
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xfffffffb, 0xfffffffb },
{ 0x00000000, 0xffffffbf, 0xffffffbf },
{ 0x00000000, 0xffffff05, 0xffffff05 },
{ 0x00000000, 0xffffff03, 0xffffff03 },
{ 0x00000000, 0xffffff01, 0xffffff01 },
{ 0x00000000, 0xffff0005, 0xffff0005 },
{ 0x00000000, 0xffff0003, 0xffff0003 },
{ 0x00000000, 0xffff0001, 0xffff0001 },
{ 0x00000000, 0x99999999, 0x99999999 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaab },
{ 0x00000000, 0x66666667, 0x66666667 },
{ 0x00000000, 0x0000ffff, 0x0000ffff },
{ 0x00000000, 0x0000fffd, 0x0000fffd },
{ 0x00000000, 0x0000fffb, 0x0000fffb },
{ 0x00000000, 0x0000fff9, 0x0000fff9 },
{ 0x00000000, 0x000000ff, 0x000000ff },
{ 0x00000000, 0x000000fd, 0x000000fd },
{ 0x00000000, 0x000000fb, 0x000000fb },
{ 0x00000000, 0x000000f9, 0x000000f9 },
{ 0x00000000, 0x0000003f, 0x0000003f },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
};
const Inputs kOutputs_Mvn_RdIsRn_al_r2_r2_LSL_1[] = {
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xfffffffb, 0xfffffffb },
{ 0x00000000, 0xffffffbf, 0xffffffbf },
{ 0x00000000, 0xffffff05, 0xffffff05 },
{ 0x00000000, 0xffffff03, 0xffffff03 },
{ 0x00000000, 0xffffff01, 0xffffff01 },
{ 0x00000000, 0xffff0005, 0xffff0005 },
{ 0x00000000, 0xffff0003, 0xffff0003 },
{ 0x00000000, 0xffff0001, 0xffff0001 },
{ 0x00000000, 0x99999999, 0x99999999 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaab },
{ 0x00000000, 0x66666667, 0x66666667 },
{ 0x00000000, 0x0000ffff, 0x0000ffff },
{ 0x00000000, 0x0000fffd, 0x0000fffd },
{ 0x00000000, 0x0000fffb, 0x0000fffb },
{ 0x00000000, 0x0000fff9, 0x0000fff9 },
{ 0x00000000, 0x000000ff, 0x000000ff },
{ 0x00000000, 0x000000fd, 0x000000fd },
{ 0x00000000, 0x000000fb, 0x000000fb },
{ 0x00000000, 0x000000f9, 0x000000f9 },
{ 0x00000000, 0x0000003f, 0x0000003f },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
};
const Inputs kOutputs_Mvn_RdIsRn_al_r3_r3_LSL_1[] = {
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xfffffffb, 0xfffffffb },
{ 0x00000000, 0xffffffbf, 0xffffffbf },
{ 0x00000000, 0xffffff05, 0xffffff05 },
{ 0x00000000, 0xffffff03, 0xffffff03 },
{ 0x00000000, 0xffffff01, 0xffffff01 },
{ 0x00000000, 0xffff0005, 0xffff0005 },
{ 0x00000000, 0xffff0003, 0xffff0003 },
{ 0x00000000, 0xffff0001, 0xffff0001 },
{ 0x00000000, 0x99999999, 0x99999999 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaab },
{ 0x00000000, 0x66666667, 0x66666667 },
{ 0x00000000, 0x0000ffff, 0x0000ffff },
{ 0x00000000, 0x0000fffd, 0x0000fffd },
{ 0x00000000, 0x0000fffb, 0x0000fffb },
{ 0x00000000, 0x0000fff9, 0x0000fff9 },
{ 0x00000000, 0x000000ff, 0x000000ff },
{ 0x00000000, 0x000000fd, 0x000000fd },
{ 0x00000000, 0x000000fb, 0x000000fb },
{ 0x00000000, 0x000000f9, 0x000000f9 },
{ 0x00000000, 0x0000003f, 0x0000003f },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
};
const Inputs kOutputs_Mvn_RdIsRn_al_r4_r4_LSL_1[] = {
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xfffffffb, 0xfffffffb },
{ 0x00000000, 0xffffffbf, 0xffffffbf },
{ 0x00000000, 0xffffff05, 0xffffff05 },
{ 0x00000000, 0xffffff03, 0xffffff03 },
{ 0x00000000, 0xffffff01, 0xffffff01 },
{ 0x00000000, 0xffff0005, 0xffff0005 },
{ 0x00000000, 0xffff0003, 0xffff0003 },
{ 0x00000000, 0xffff0001, 0xffff0001 },
{ 0x00000000, 0x99999999, 0x99999999 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaab },
{ 0x00000000, 0x66666667, 0x66666667 },
{ 0x00000000, 0x0000ffff, 0x0000ffff },
{ 0x00000000, 0x0000fffd, 0x0000fffd },
{ 0x00000000, 0x0000fffb, 0x0000fffb },
{ 0x00000000, 0x0000fff9, 0x0000fff9 },
{ 0x00000000, 0x000000ff, 0x000000ff },
{ 0x00000000, 0x000000fd, 0x000000fd },
{ 0x00000000, 0x000000fb, 0x000000fb },
{ 0x00000000, 0x000000f9, 0x000000f9 },
{ 0x00000000, 0x0000003f, 0x0000003f },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
};
const Inputs kOutputs_Mvn_RdIsRn_al_r5_r5_LSL_1[] = {
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xfffffffb, 0xfffffffb },
{ 0x00000000, 0xffffffbf, 0xffffffbf },
{ 0x00000000, 0xffffff05, 0xffffff05 },
{ 0x00000000, 0xffffff03, 0xffffff03 },
{ 0x00000000, 0xffffff01, 0xffffff01 },
{ 0x00000000, 0xffff0005, 0xffff0005 },
{ 0x00000000, 0xffff0003, 0xffff0003 },
{ 0x00000000, 0xffff0001, 0xffff0001 },
{ 0x00000000, 0x99999999, 0x99999999 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaab },
{ 0x00000000, 0x66666667, 0x66666667 },
{ 0x00000000, 0x0000ffff, 0x0000ffff },
{ 0x00000000, 0x0000fffd, 0x0000fffd },
{ 0x00000000, 0x0000fffb, 0x0000fffb },
{ 0x00000000, 0x0000fff9, 0x0000fff9 },
{ 0x00000000, 0x000000ff, 0x000000ff },
{ 0x00000000, 0x000000fd, 0x000000fd },
{ 0x00000000, 0x000000fb, 0x000000fb },
{ 0x00000000, 0x000000f9, 0x000000f9 },
{ 0x00000000, 0x0000003f, 0x0000003f },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
};
const Inputs kOutputs_Mvn_RdIsRn_al_r6_r6_LSL_1[] = {
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xfffffffb, 0xfffffffb },
{ 0x00000000, 0xffffffbf, 0xffffffbf },
{ 0x00000000, 0xffffff05, 0xffffff05 },
{ 0x00000000, 0xffffff03, 0xffffff03 },
{ 0x00000000, 0xffffff01, 0xffffff01 },
{ 0x00000000, 0xffff0005, 0xffff0005 },
{ 0x00000000, 0xffff0003, 0xffff0003 },
{ 0x00000000, 0xffff0001, 0xffff0001 },
{ 0x00000000, 0x99999999, 0x99999999 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaab },
{ 0x00000000, 0x66666667, 0x66666667 },
{ 0x00000000, 0x0000ffff, 0x0000ffff },
{ 0x00000000, 0x0000fffd, 0x0000fffd },
{ 0x00000000, 0x0000fffb, 0x0000fffb },
{ 0x00000000, 0x0000fff9, 0x0000fff9 },
{ 0x00000000, 0x000000ff, 0x000000ff },
{ 0x00000000, 0x000000fd, 0x000000fd },
{ 0x00000000, 0x000000fb, 0x000000fb },
{ 0x00000000, 0x000000f9, 0x000000f9 },
{ 0x00000000, 0x0000003f, 0x0000003f },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
};
const Inputs kOutputs_Mvn_RdIsRn_al_r7_r7_LSL_1[] = {
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xfffffffb, 0xfffffffb },
{ 0x00000000, 0xffffffbf, 0xffffffbf },
{ 0x00000000, 0xffffff05, 0xffffff05 },
{ 0x00000000, 0xffffff03, 0xffffff03 },
{ 0x00000000, 0xffffff01, 0xffffff01 },
{ 0x00000000, 0xffff0005, 0xffff0005 },
{ 0x00000000, 0xffff0003, 0xffff0003 },
{ 0x00000000, 0xffff0001, 0xffff0001 },
{ 0x00000000, 0x99999999, 0x99999999 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaab },
{ 0x00000000, 0x66666667, 0x66666667 },
{ 0x00000000, 0x0000ffff, 0x0000ffff },
{ 0x00000000, 0x0000fffd, 0x0000fffd },
{ 0x00000000, 0x0000fffb, 0x0000fffb },
{ 0x00000000, 0x0000fff9, 0x0000fff9 },
{ 0x00000000, 0x000000ff, 0x000000ff },
{ 0x00000000, 0x000000fd, 0x000000fd },
{ 0x00000000, 0x000000fb, 0x000000fb },
{ 0x00000000, 0x000000f9, 0x000000f9 },
{ 0x00000000, 0x0000003f, 0x0000003f },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
};
const Inputs kOutputs_Mvn_RdIsRn_al_r8_r8_LSL_1[] = {
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xfffffffb, 0xfffffffb },
{ 0x00000000, 0xffffffbf, 0xffffffbf },
{ 0x00000000, 0xffffff05, 0xffffff05 },
{ 0x00000000, 0xffffff03, 0xffffff03 },
{ 0x00000000, 0xffffff01, 0xffffff01 },
{ 0x00000000, 0xffff0005, 0xffff0005 },
{ 0x00000000, 0xffff0003, 0xffff0003 },
{ 0x00000000, 0xffff0001, 0xffff0001 },
{ 0x00000000, 0x99999999, 0x99999999 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaab },
{ 0x00000000, 0x66666667, 0x66666667 },
{ 0x00000000, 0x0000ffff, 0x0000ffff },
{ 0x00000000, 0x0000fffd, 0x0000fffd },
{ 0x00000000, 0x0000fffb, 0x0000fffb },
{ 0x00000000, 0x0000fff9, 0x0000fff9 },
{ 0x00000000, 0x000000ff, 0x000000ff },
{ 0x00000000, 0x000000fd, 0x000000fd },
{ 0x00000000, 0x000000fb, 0x000000fb },
{ 0x00000000, 0x000000f9, 0x000000f9 },
{ 0x00000000, 0x0000003f, 0x0000003f },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
};
const Inputs kOutputs_Mvn_RdIsRn_al_r9_r9_LSL_1[] = {
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xfffffffb, 0xfffffffb },
{ 0x00000000, 0xffffffbf, 0xffffffbf },
{ 0x00000000, 0xffffff05, 0xffffff05 },
{ 0x00000000, 0xffffff03, 0xffffff03 },
{ 0x00000000, 0xffffff01, 0xffffff01 },
{ 0x00000000, 0xffff0005, 0xffff0005 },
{ 0x00000000, 0xffff0003, 0xffff0003 },
{ 0x00000000, 0xffff0001, 0xffff0001 },
{ 0x00000000, 0x99999999, 0x99999999 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaab },
{ 0x00000000, 0x66666667, 0x66666667 },
{ 0x00000000, 0x0000ffff, 0x0000ffff },
{ 0x00000000, 0x0000fffd, 0x0000fffd },
{ 0x00000000, 0x0000fffb, 0x0000fffb },
{ 0x00000000, 0x0000fff9, 0x0000fff9 },
{ 0x00000000, 0x000000ff, 0x000000ff },
{ 0x00000000, 0x000000fd, 0x000000fd },
{ 0x00000000, 0x000000fb, 0x000000fb },
{ 0x00000000, 0x000000f9, 0x000000f9 },
{ 0x00000000, 0x0000003f, 0x0000003f },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
};
const Inputs kOutputs_Mvn_RdIsRn_al_r10_r10_LSL_1[] = {
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xfffffffb, 0xfffffffb },
{ 0x00000000, 0xffffffbf, 0xffffffbf },
{ 0x00000000, 0xffffff05, 0xffffff05 },
{ 0x00000000, 0xffffff03, 0xffffff03 },
{ 0x00000000, 0xffffff01, 0xffffff01 },
{ 0x00000000, 0xffff0005, 0xffff0005 },
{ 0x00000000, 0xffff0003, 0xffff0003 },
{ 0x00000000, 0xffff0001, 0xffff0001 },
{ 0x00000000, 0x99999999, 0x99999999 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaab },
{ 0x00000000, 0x66666667, 0x66666667 },
{ 0x00000000, 0x0000ffff, 0x0000ffff },
{ 0x00000000, 0x0000fffd, 0x0000fffd },
{ 0x00000000, 0x0000fffb, 0x0000fffb },
{ 0x00000000, 0x0000fff9, 0x0000fff9 },
{ 0x00000000, 0x000000ff, 0x000000ff },
{ 0x00000000, 0x000000fd, 0x000000fd },
{ 0x00000000, 0x000000fb, 0x000000fb },
{ 0x00000000, 0x000000f9, 0x000000f9 },
{ 0x00000000, 0x0000003f, 0x0000003f },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
};
const Inputs kOutputs_Mvn_RdIsRn_al_r11_r11_LSL_1[] = {
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xfffffffb, 0xfffffffb },
{ 0x00000000, 0xffffffbf, 0xffffffbf },
{ 0x00000000, 0xffffff05, 0xffffff05 },
{ 0x00000000, 0xffffff03, 0xffffff03 },
{ 0x00000000, 0xffffff01, 0xffffff01 },
{ 0x00000000, 0xffff0005, 0xffff0005 },
{ 0x00000000, 0xffff0003, 0xffff0003 },
{ 0x00000000, 0xffff0001, 0xffff0001 },
{ 0x00000000, 0x99999999, 0x99999999 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaab },
{ 0x00000000, 0x66666667, 0x66666667 },
{ 0x00000000, 0x0000ffff, 0x0000ffff },
{ 0x00000000, 0x0000fffd, 0x0000fffd },
{ 0x00000000, 0x0000fffb, 0x0000fffb },
{ 0x00000000, 0x0000fff9, 0x0000fff9 },
{ 0x00000000, 0x000000ff, 0x000000ff },
{ 0x00000000, 0x000000fd, 0x000000fd },
{ 0x00000000, 0x000000fb, 0x000000fb },
{ 0x00000000, 0x000000f9, 0x000000f9 },
{ 0x00000000, 0x0000003f, 0x0000003f },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
};
const Inputs kOutputs_Mvn_RdIsRn_al_r12_r12_LSL_1[] = {
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xfffffffb, 0xfffffffb },
{ 0x00000000, 0xffffffbf, 0xffffffbf },
{ 0x00000000, 0xffffff05, 0xffffff05 },
{ 0x00000000, 0xffffff03, 0xffffff03 },
{ 0x00000000, 0xffffff01, 0xffffff01 },
{ 0x00000000, 0xffff0005, 0xffff0005 },
{ 0x00000000, 0xffff0003, 0xffff0003 },
{ 0x00000000, 0xffff0001, 0xffff0001 },
{ 0x00000000, 0x99999999, 0x99999999 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaab },
{ 0x00000000, 0x66666667, 0x66666667 },
{ 0x00000000, 0x0000ffff, 0x0000ffff },
{ 0x00000000, 0x0000fffd, 0x0000fffd },
{ 0x00000000, 0x0000fffb, 0x0000fffb },
{ 0x00000000, 0x0000fff9, 0x0000fff9 },
{ 0x00000000, 0x000000ff, 0x000000ff },
{ 0x00000000, 0x000000fd, 0x000000fd },
{ 0x00000000, 0x000000fb, 0x000000fb },
{ 0x00000000, 0x000000f9, 0x000000f9 },
{ 0x00000000, 0x0000003f, 0x0000003f },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
};
const Inputs kOutputs_Mvn_RdIsRn_al_r14_r14_LSL_1[] = {
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xfffffffb, 0xfffffffb },
{ 0x00000000, 0xffffffbf, 0xffffffbf },
{ 0x00000000, 0xffffff05, 0xffffff05 },
{ 0x00000000, 0xffffff03, 0xffffff03 },
{ 0x00000000, 0xffffff01, 0xffffff01 },
{ 0x00000000, 0xffff0005, 0xffff0005 },
{ 0x00000000, 0xffff0003, 0xffff0003 },
{ 0x00000000, 0xffff0001, 0xffff0001 },
{ 0x00000000, 0x99999999, 0x99999999 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
{ 0x00000000, 0xffffffff, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0xfffffffd },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaab },
{ 0x00000000, 0x66666667, 0x66666667 },
{ 0x00000000, 0x0000ffff, 0x0000ffff },
{ 0x00000000, 0x0000fffd, 0x0000fffd },
{ 0x00000000, 0x0000fffb, 0x0000fffb },
{ 0x00000000, 0x0000fff9, 0x0000fff9 },
{ 0x00000000, 0x000000ff, 0x000000ff },
{ 0x00000000, 0x000000fd, 0x000000fd },
{ 0x00000000, 0x000000fb, 0x000000fb },
{ 0x00000000, 0x000000f9, 0x000000f9 },
{ 0x00000000, 0x0000003f, 0x0000003f },
{ 0x00000000, 0x00000005, 0x00000005 },
{ 0x00000000, 0x00000003, 0x00000003 },
{ 0x00000000, 0x00000001, 0x00000001 },
};
const Inputs kOutputs_Mvn_RdIsNotRn_al_r1_r8_LSL_1[] = {
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffff05, 0x0000007d },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffffff05, 0x0000007d },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000001, 0xffffffff },
};
const Inputs kOutputs_Mvn_RdIsNotRn_al_r7_r4_LSL_1[] = {
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffff05, 0x0000007d },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffffff05, 0x0000007d },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000001, 0xffffffff },
};
const Inputs kOutputs_Mvn_RdIsNotRn_al_r14_r10_LSL_1[] = {
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffff05, 0x0000007d },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffffff05, 0x0000007d },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000001, 0xffffffff },
};
const Inputs kOutputs_Mvn_RdIsNotRn_al_r10_r6_LSL_1[] = {
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffff05, 0x0000007d },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffffff05, 0x0000007d },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000001, 0xffffffff },
};
const Inputs kOutputs_Mvn_RdIsNotRn_al_r6_r5_LSL_1[] = {
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffff05, 0x0000007d },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffffff05, 0x0000007d },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000001, 0xffffffff },
};
const Inputs kOutputs_Mvn_RdIsNotRn_al_r12_r2_LSL_1[] = {
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffff05, 0x0000007d },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffffff05, 0x0000007d },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000001, 0xffffffff },
};
const Inputs kOutputs_Mvn_RdIsNotRn_al_r0_r11_LSL_1[] = {
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffff05, 0x0000007d },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffffff05, 0x0000007d },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000001, 0xffffffff },
};
const Inputs kOutputs_Mvn_RdIsNotRn_al_r10_r14_LSL_1[] = {
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffff05, 0x0000007d },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffffff05, 0x0000007d },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000001, 0xffffffff },
};
const Inputs kOutputs_Mvn_RdIsNotRn_al_r0_r5_LSL_1[] = {
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffff05, 0x0000007d },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffffff05, 0x0000007d },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000001, 0xffffffff },
};
const Inputs kOutputs_Mvn_RdIsNotRn_al_r0_r3_LSL_1[] = {
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffffff05, 0x0000007d },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffffff05, 0x0000007d },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x00000001, 0xffffffff },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000001, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_1[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xffffff05, 0x0000007d },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffffd, 0x80000001 },
{ 0x00000000, 0xaaaaaaab, 0xaaaaaaaa },
{ 0x00000000, 0x66666667, 0xcccccccc },
{ 0x00000000, 0x0000ffff, 0xffff8000 },
{ 0x00000000, 0x0000fffd, 0xffff8001 },
{ 0x00000000, 0x0000fffb, 0xffff8002 },
{ 0x00000000, 0x0000fff9, 0xffff8003 },
{ 0x00000000, 0x000000ff, 0xffffff80 },
{ 0x00000000, 0x000000fd, 0xffffff81 },
{ 0x00000000, 0x000000fb, 0xffffff82 },
{ 0x00000000, 0x000000f9, 0xffffff83 },
{ 0x00000000, 0x0000003f, 0xffffffe0 },
{ 0x00000000, 0x00000005, 0xfffffffd },
{ 0x00000000, 0x00000003, 0xfffffffe },
{ 0x00000000, 0x00000001, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_2[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffffffb, 0x00000001 },
{ 0x00000000, 0xfffffff7, 0x00000002 },
{ 0x00000000, 0xffffff7f, 0x00000020 },
{ 0x00000000, 0xfffffe0b, 0x0000007d },
{ 0x00000000, 0xfffffe07, 0x0000007e },
{ 0x00000000, 0xfffffe03, 0x0000007f },
{ 0x00000000, 0xfffe000b, 0x00007ffd },
{ 0x00000000, 0xfffe0007, 0x00007ffe },
{ 0x00000000, 0xfffe0003, 0x00007fff },
{ 0x00000000, 0x33333333, 0x33333333 },
{ 0x00000000, 0xaaaaaaab, 0x55555555 },
{ 0x00000000, 0x0000000b, 0x7ffffffd },
{ 0x00000000, 0x00000007, 0x7ffffffe },
{ 0x00000000, 0x00000003, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffffb, 0x80000001 },
{ 0x00000000, 0x55555557, 0xaaaaaaaa },
{ 0x00000000, 0xcccccccf, 0xcccccccc },
{ 0x00000000, 0x0001ffff, 0xffff8000 },
{ 0x00000000, 0x0001fffb, 0xffff8001 },
{ 0x00000000, 0x0001fff7, 0xffff8002 },
{ 0x00000000, 0x0001fff3, 0xffff8003 },
{ 0x00000000, 0x000001ff, 0xffffff80 },
{ 0x00000000, 0x000001fb, 0xffffff81 },
{ 0x00000000, 0x000001f7, 0xffffff82 },
{ 0x00000000, 0x000001f3, 0xffffff83 },
{ 0x00000000, 0x0000007f, 0xffffffe0 },
{ 0x00000000, 0x0000000b, 0xfffffffd },
{ 0x00000000, 0x00000007, 0xfffffffe },
{ 0x00000000, 0x00000003, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_3[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffffff7, 0x00000001 },
{ 0x00000000, 0xffffffef, 0x00000002 },
{ 0x00000000, 0xfffffeff, 0x00000020 },
{ 0x00000000, 0xfffffc17, 0x0000007d },
{ 0x00000000, 0xfffffc0f, 0x0000007e },
{ 0x00000000, 0xfffffc07, 0x0000007f },
{ 0x00000000, 0xfffc0017, 0x00007ffd },
{ 0x00000000, 0xfffc000f, 0x00007ffe },
{ 0x00000000, 0xfffc0007, 0x00007fff },
{ 0x00000000, 0x66666667, 0x33333333 },
{ 0x00000000, 0x55555557, 0x55555555 },
{ 0x00000000, 0x00000017, 0x7ffffffd },
{ 0x00000000, 0x0000000f, 0x7ffffffe },
{ 0x00000000, 0x00000007, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffff7, 0x80000001 },
{ 0x00000000, 0xaaaaaaaf, 0xaaaaaaaa },
{ 0x00000000, 0x9999999f, 0xcccccccc },
{ 0x00000000, 0x0003ffff, 0xffff8000 },
{ 0x00000000, 0x0003fff7, 0xffff8001 },
{ 0x00000000, 0x0003ffef, 0xffff8002 },
{ 0x00000000, 0x0003ffe7, 0xffff8003 },
{ 0x00000000, 0x000003ff, 0xffffff80 },
{ 0x00000000, 0x000003f7, 0xffffff81 },
{ 0x00000000, 0x000003ef, 0xffffff82 },
{ 0x00000000, 0x000003e7, 0xffffff83 },
{ 0x00000000, 0x000000ff, 0xffffffe0 },
{ 0x00000000, 0x00000017, 0xfffffffd },
{ 0x00000000, 0x0000000f, 0xfffffffe },
{ 0x00000000, 0x00000007, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_4[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffffef, 0x00000001 },
{ 0x00000000, 0xffffffdf, 0x00000002 },
{ 0x00000000, 0xfffffdff, 0x00000020 },
{ 0x00000000, 0xfffff82f, 0x0000007d },
{ 0x00000000, 0xfffff81f, 0x0000007e },
{ 0x00000000, 0xfffff80f, 0x0000007f },
{ 0x00000000, 0xfff8002f, 0x00007ffd },
{ 0x00000000, 0xfff8001f, 0x00007ffe },
{ 0x00000000, 0xfff8000f, 0x00007fff },
{ 0x00000000, 0xcccccccf, 0x33333333 },
{ 0x00000000, 0xaaaaaaaf, 0x55555555 },
{ 0x00000000, 0x0000002f, 0x7ffffffd },
{ 0x00000000, 0x0000001f, 0x7ffffffe },
{ 0x00000000, 0x0000000f, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffffffef, 0x80000001 },
{ 0x00000000, 0x5555555f, 0xaaaaaaaa },
{ 0x00000000, 0x3333333f, 0xcccccccc },
{ 0x00000000, 0x0007ffff, 0xffff8000 },
{ 0x00000000, 0x0007ffef, 0xffff8001 },
{ 0x00000000, 0x0007ffdf, 0xffff8002 },
{ 0x00000000, 0x0007ffcf, 0xffff8003 },
{ 0x00000000, 0x000007ff, 0xffffff80 },
{ 0x00000000, 0x000007ef, 0xffffff81 },
{ 0x00000000, 0x000007df, 0xffffff82 },
{ 0x00000000, 0x000007cf, 0xffffff83 },
{ 0x00000000, 0x000001ff, 0xffffffe0 },
{ 0x00000000, 0x0000002f, 0xfffffffd },
{ 0x00000000, 0x0000001f, 0xfffffffe },
{ 0x00000000, 0x0000000f, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_5[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffffdf, 0x00000001 },
{ 0x00000000, 0xffffffbf, 0x00000002 },
{ 0x00000000, 0xfffffbff, 0x00000020 },
{ 0x00000000, 0xfffff05f, 0x0000007d },
{ 0x00000000, 0xfffff03f, 0x0000007e },
{ 0x00000000, 0xfffff01f, 0x0000007f },
{ 0x00000000, 0xfff0005f, 0x00007ffd },
{ 0x00000000, 0xfff0003f, 0x00007ffe },
{ 0x00000000, 0xfff0001f, 0x00007fff },
{ 0x00000000, 0x9999999f, 0x33333333 },
{ 0x00000000, 0x5555555f, 0x55555555 },
{ 0x00000000, 0x0000005f, 0x7ffffffd },
{ 0x00000000, 0x0000003f, 0x7ffffffe },
{ 0x00000000, 0x0000001f, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffffffdf, 0x80000001 },
{ 0x00000000, 0xaaaaaabf, 0xaaaaaaaa },
{ 0x00000000, 0x6666667f, 0xcccccccc },
{ 0x00000000, 0x000fffff, 0xffff8000 },
{ 0x00000000, 0x000fffdf, 0xffff8001 },
{ 0x00000000, 0x000fffbf, 0xffff8002 },
{ 0x00000000, 0x000fff9f, 0xffff8003 },
{ 0x00000000, 0x00000fff, 0xffffff80 },
{ 0x00000000, 0x00000fdf, 0xffffff81 },
{ 0x00000000, 0x00000fbf, 0xffffff82 },
{ 0x00000000, 0x00000f9f, 0xffffff83 },
{ 0x00000000, 0x000003ff, 0xffffffe0 },
{ 0x00000000, 0x0000005f, 0xfffffffd },
{ 0x00000000, 0x0000003f, 0xfffffffe },
{ 0x00000000, 0x0000001f, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_6[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffffbf, 0x00000001 },
{ 0x00000000, 0xffffff7f, 0x00000002 },
{ 0x00000000, 0xfffff7ff, 0x00000020 },
{ 0x00000000, 0xffffe0bf, 0x0000007d },
{ 0x00000000, 0xffffe07f, 0x0000007e },
{ 0x00000000, 0xffffe03f, 0x0000007f },
{ 0x00000000, 0xffe000bf, 0x00007ffd },
{ 0x00000000, 0xffe0007f, 0x00007ffe },
{ 0x00000000, 0xffe0003f, 0x00007fff },
{ 0x00000000, 0x3333333f, 0x33333333 },
{ 0x00000000, 0xaaaaaabf, 0x55555555 },
{ 0x00000000, 0x000000bf, 0x7ffffffd },
{ 0x00000000, 0x0000007f, 0x7ffffffe },
{ 0x00000000, 0x0000003f, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffffffbf, 0x80000001 },
{ 0x00000000, 0x5555557f, 0xaaaaaaaa },
{ 0x00000000, 0xccccccff, 0xcccccccc },
{ 0x00000000, 0x001fffff, 0xffff8000 },
{ 0x00000000, 0x001fffbf, 0xffff8001 },
{ 0x00000000, 0x001fff7f, 0xffff8002 },
{ 0x00000000, 0x001fff3f, 0xffff8003 },
{ 0x00000000, 0x00001fff, 0xffffff80 },
{ 0x00000000, 0x00001fbf, 0xffffff81 },
{ 0x00000000, 0x00001f7f, 0xffffff82 },
{ 0x00000000, 0x00001f3f, 0xffffff83 },
{ 0x00000000, 0x000007ff, 0xffffffe0 },
{ 0x00000000, 0x000000bf, 0xfffffffd },
{ 0x00000000, 0x0000007f, 0xfffffffe },
{ 0x00000000, 0x0000003f, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_7[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffff7f, 0x00000001 },
{ 0x00000000, 0xfffffeff, 0x00000002 },
{ 0x00000000, 0xffffefff, 0x00000020 },
{ 0x00000000, 0xffffc17f, 0x0000007d },
{ 0x00000000, 0xffffc0ff, 0x0000007e },
{ 0x00000000, 0xffffc07f, 0x0000007f },
{ 0x00000000, 0xffc0017f, 0x00007ffd },
{ 0x00000000, 0xffc000ff, 0x00007ffe },
{ 0x00000000, 0xffc0007f, 0x00007fff },
{ 0x00000000, 0x6666667f, 0x33333333 },
{ 0x00000000, 0x5555557f, 0x55555555 },
{ 0x00000000, 0x0000017f, 0x7ffffffd },
{ 0x00000000, 0x000000ff, 0x7ffffffe },
{ 0x00000000, 0x0000007f, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffffff7f, 0x80000001 },
{ 0x00000000, 0xaaaaaaff, 0xaaaaaaaa },
{ 0x00000000, 0x999999ff, 0xcccccccc },
{ 0x00000000, 0x003fffff, 0xffff8000 },
{ 0x00000000, 0x003fff7f, 0xffff8001 },
{ 0x00000000, 0x003ffeff, 0xffff8002 },
{ 0x00000000, 0x003ffe7f, 0xffff8003 },
{ 0x00000000, 0x00003fff, 0xffffff80 },
{ 0x00000000, 0x00003f7f, 0xffffff81 },
{ 0x00000000, 0x00003eff, 0xffffff82 },
{ 0x00000000, 0x00003e7f, 0xffffff83 },
{ 0x00000000, 0x00000fff, 0xffffffe0 },
{ 0x00000000, 0x0000017f, 0xfffffffd },
{ 0x00000000, 0x000000ff, 0xfffffffe },
{ 0x00000000, 0x0000007f, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_8[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffffeff, 0x00000001 },
{ 0x00000000, 0xfffffdff, 0x00000002 },
{ 0x00000000, 0xffffdfff, 0x00000020 },
{ 0x00000000, 0xffff82ff, 0x0000007d },
{ 0x00000000, 0xffff81ff, 0x0000007e },
{ 0x00000000, 0xffff80ff, 0x0000007f },
{ 0x00000000, 0xff8002ff, 0x00007ffd },
{ 0x00000000, 0xff8001ff, 0x00007ffe },
{ 0x00000000, 0xff8000ff, 0x00007fff },
{ 0x00000000, 0xccccccff, 0x33333333 },
{ 0x00000000, 0xaaaaaaff, 0x55555555 },
{ 0x00000000, 0x000002ff, 0x7ffffffd },
{ 0x00000000, 0x000001ff, 0x7ffffffe },
{ 0x00000000, 0x000000ff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffeff, 0x80000001 },
{ 0x00000000, 0x555555ff, 0xaaaaaaaa },
{ 0x00000000, 0x333333ff, 0xcccccccc },
{ 0x00000000, 0x007fffff, 0xffff8000 },
{ 0x00000000, 0x007ffeff, 0xffff8001 },
{ 0x00000000, 0x007ffdff, 0xffff8002 },
{ 0x00000000, 0x007ffcff, 0xffff8003 },
{ 0x00000000, 0x00007fff, 0xffffff80 },
{ 0x00000000, 0x00007eff, 0xffffff81 },
{ 0x00000000, 0x00007dff, 0xffffff82 },
{ 0x00000000, 0x00007cff, 0xffffff83 },
{ 0x00000000, 0x00001fff, 0xffffffe0 },
{ 0x00000000, 0x000002ff, 0xfffffffd },
{ 0x00000000, 0x000001ff, 0xfffffffe },
{ 0x00000000, 0x000000ff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_9[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffffdff, 0x00000001 },
{ 0x00000000, 0xfffffbff, 0x00000002 },
{ 0x00000000, 0xffffbfff, 0x00000020 },
{ 0x00000000, 0xffff05ff, 0x0000007d },
{ 0x00000000, 0xffff03ff, 0x0000007e },
{ 0x00000000, 0xffff01ff, 0x0000007f },
{ 0x00000000, 0xff0005ff, 0x00007ffd },
{ 0x00000000, 0xff0003ff, 0x00007ffe },
{ 0x00000000, 0xff0001ff, 0x00007fff },
{ 0x00000000, 0x999999ff, 0x33333333 },
{ 0x00000000, 0x555555ff, 0x55555555 },
{ 0x00000000, 0x000005ff, 0x7ffffffd },
{ 0x00000000, 0x000003ff, 0x7ffffffe },
{ 0x00000000, 0x000001ff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffdff, 0x80000001 },
{ 0x00000000, 0xaaaaabff, 0xaaaaaaaa },
{ 0x00000000, 0x666667ff, 0xcccccccc },
{ 0x00000000, 0x00ffffff, 0xffff8000 },
{ 0x00000000, 0x00fffdff, 0xffff8001 },
{ 0x00000000, 0x00fffbff, 0xffff8002 },
{ 0x00000000, 0x00fff9ff, 0xffff8003 },
{ 0x00000000, 0x0000ffff, 0xffffff80 },
{ 0x00000000, 0x0000fdff, 0xffffff81 },
{ 0x00000000, 0x0000fbff, 0xffffff82 },
{ 0x00000000, 0x0000f9ff, 0xffffff83 },
{ 0x00000000, 0x00003fff, 0xffffffe0 },
{ 0x00000000, 0x000005ff, 0xfffffffd },
{ 0x00000000, 0x000003ff, 0xfffffffe },
{ 0x00000000, 0x000001ff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_10[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffffbff, 0x00000001 },
{ 0x00000000, 0xfffff7ff, 0x00000002 },
{ 0x00000000, 0xffff7fff, 0x00000020 },
{ 0x00000000, 0xfffe0bff, 0x0000007d },
{ 0x00000000, 0xfffe07ff, 0x0000007e },
{ 0x00000000, 0xfffe03ff, 0x0000007f },
{ 0x00000000, 0xfe000bff, 0x00007ffd },
{ 0x00000000, 0xfe0007ff, 0x00007ffe },
{ 0x00000000, 0xfe0003ff, 0x00007fff },
{ 0x00000000, 0x333333ff, 0x33333333 },
{ 0x00000000, 0xaaaaabff, 0x55555555 },
{ 0x00000000, 0x00000bff, 0x7ffffffd },
{ 0x00000000, 0x000007ff, 0x7ffffffe },
{ 0x00000000, 0x000003ff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffffbff, 0x80000001 },
{ 0x00000000, 0x555557ff, 0xaaaaaaaa },
{ 0x00000000, 0xcccccfff, 0xcccccccc },
{ 0x00000000, 0x01ffffff, 0xffff8000 },
{ 0x00000000, 0x01fffbff, 0xffff8001 },
{ 0x00000000, 0x01fff7ff, 0xffff8002 },
{ 0x00000000, 0x01fff3ff, 0xffff8003 },
{ 0x00000000, 0x0001ffff, 0xffffff80 },
{ 0x00000000, 0x0001fbff, 0xffffff81 },
{ 0x00000000, 0x0001f7ff, 0xffffff82 },
{ 0x00000000, 0x0001f3ff, 0xffffff83 },
{ 0x00000000, 0x00007fff, 0xffffffe0 },
{ 0x00000000, 0x00000bff, 0xfffffffd },
{ 0x00000000, 0x000007ff, 0xfffffffe },
{ 0x00000000, 0x000003ff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_11[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffff7ff, 0x00000001 },
{ 0x00000000, 0xffffefff, 0x00000002 },
{ 0x00000000, 0xfffeffff, 0x00000020 },
{ 0x00000000, 0xfffc17ff, 0x0000007d },
{ 0x00000000, 0xfffc0fff, 0x0000007e },
{ 0x00000000, 0xfffc07ff, 0x0000007f },
{ 0x00000000, 0xfc0017ff, 0x00007ffd },
{ 0x00000000, 0xfc000fff, 0x00007ffe },
{ 0x00000000, 0xfc0007ff, 0x00007fff },
{ 0x00000000, 0x666667ff, 0x33333333 },
{ 0x00000000, 0x555557ff, 0x55555555 },
{ 0x00000000, 0x000017ff, 0x7ffffffd },
{ 0x00000000, 0x00000fff, 0x7ffffffe },
{ 0x00000000, 0x000007ff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffff7ff, 0x80000001 },
{ 0x00000000, 0xaaaaafff, 0xaaaaaaaa },
{ 0x00000000, 0x99999fff, 0xcccccccc },
{ 0x00000000, 0x03ffffff, 0xffff8000 },
{ 0x00000000, 0x03fff7ff, 0xffff8001 },
{ 0x00000000, 0x03ffefff, 0xffff8002 },
{ 0x00000000, 0x03ffe7ff, 0xffff8003 },
{ 0x00000000, 0x0003ffff, 0xffffff80 },
{ 0x00000000, 0x0003f7ff, 0xffffff81 },
{ 0x00000000, 0x0003efff, 0xffffff82 },
{ 0x00000000, 0x0003e7ff, 0xffffff83 },
{ 0x00000000, 0x0000ffff, 0xffffffe0 },
{ 0x00000000, 0x000017ff, 0xfffffffd },
{ 0x00000000, 0x00000fff, 0xfffffffe },
{ 0x00000000, 0x000007ff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_12[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffefff, 0x00000001 },
{ 0x00000000, 0xffffdfff, 0x00000002 },
{ 0x00000000, 0xfffdffff, 0x00000020 },
{ 0x00000000, 0xfff82fff, 0x0000007d },
{ 0x00000000, 0xfff81fff, 0x0000007e },
{ 0x00000000, 0xfff80fff, 0x0000007f },
{ 0x00000000, 0xf8002fff, 0x00007ffd },
{ 0x00000000, 0xf8001fff, 0x00007ffe },
{ 0x00000000, 0xf8000fff, 0x00007fff },
{ 0x00000000, 0xcccccfff, 0x33333333 },
{ 0x00000000, 0xaaaaafff, 0x55555555 },
{ 0x00000000, 0x00002fff, 0x7ffffffd },
{ 0x00000000, 0x00001fff, 0x7ffffffe },
{ 0x00000000, 0x00000fff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffffefff, 0x80000001 },
{ 0x00000000, 0x55555fff, 0xaaaaaaaa },
{ 0x00000000, 0x33333fff, 0xcccccccc },
{ 0x00000000, 0x07ffffff, 0xffff8000 },
{ 0x00000000, 0x07ffefff, 0xffff8001 },
{ 0x00000000, 0x07ffdfff, 0xffff8002 },
{ 0x00000000, 0x07ffcfff, 0xffff8003 },
{ 0x00000000, 0x0007ffff, 0xffffff80 },
{ 0x00000000, 0x0007efff, 0xffffff81 },
{ 0x00000000, 0x0007dfff, 0xffffff82 },
{ 0x00000000, 0x0007cfff, 0xffffff83 },
{ 0x00000000, 0x0001ffff, 0xffffffe0 },
{ 0x00000000, 0x00002fff, 0xfffffffd },
{ 0x00000000, 0x00001fff, 0xfffffffe },
{ 0x00000000, 0x00000fff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_13[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffdfff, 0x00000001 },
{ 0x00000000, 0xffffbfff, 0x00000002 },
{ 0x00000000, 0xfffbffff, 0x00000020 },
{ 0x00000000, 0xfff05fff, 0x0000007d },
{ 0x00000000, 0xfff03fff, 0x0000007e },
{ 0x00000000, 0xfff01fff, 0x0000007f },
{ 0x00000000, 0xf0005fff, 0x00007ffd },
{ 0x00000000, 0xf0003fff, 0x00007ffe },
{ 0x00000000, 0xf0001fff, 0x00007fff },
{ 0x00000000, 0x99999fff, 0x33333333 },
{ 0x00000000, 0x55555fff, 0x55555555 },
{ 0x00000000, 0x00005fff, 0x7ffffffd },
{ 0x00000000, 0x00003fff, 0x7ffffffe },
{ 0x00000000, 0x00001fff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffffdfff, 0x80000001 },
{ 0x00000000, 0xaaaabfff, 0xaaaaaaaa },
{ 0x00000000, 0x66667fff, 0xcccccccc },
{ 0x00000000, 0x0fffffff, 0xffff8000 },
{ 0x00000000, 0x0fffdfff, 0xffff8001 },
{ 0x00000000, 0x0fffbfff, 0xffff8002 },
{ 0x00000000, 0x0fff9fff, 0xffff8003 },
{ 0x00000000, 0x000fffff, 0xffffff80 },
{ 0x00000000, 0x000fdfff, 0xffffff81 },
{ 0x00000000, 0x000fbfff, 0xffffff82 },
{ 0x00000000, 0x000f9fff, 0xffffff83 },
{ 0x00000000, 0x0003ffff, 0xffffffe0 },
{ 0x00000000, 0x00005fff, 0xfffffffd },
{ 0x00000000, 0x00003fff, 0xfffffffe },
{ 0x00000000, 0x00001fff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_14[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffbfff, 0x00000001 },
{ 0x00000000, 0xffff7fff, 0x00000002 },
{ 0x00000000, 0xfff7ffff, 0x00000020 },
{ 0x00000000, 0xffe0bfff, 0x0000007d },
{ 0x00000000, 0xffe07fff, 0x0000007e },
{ 0x00000000, 0xffe03fff, 0x0000007f },
{ 0x00000000, 0xe000bfff, 0x00007ffd },
{ 0x00000000, 0xe0007fff, 0x00007ffe },
{ 0x00000000, 0xe0003fff, 0x00007fff },
{ 0x00000000, 0x33333fff, 0x33333333 },
{ 0x00000000, 0xaaaabfff, 0x55555555 },
{ 0x00000000, 0x0000bfff, 0x7ffffffd },
{ 0x00000000, 0x00007fff, 0x7ffffffe },
{ 0x00000000, 0x00003fff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffffbfff, 0x80000001 },
{ 0x00000000, 0x55557fff, 0xaaaaaaaa },
{ 0x00000000, 0xccccffff, 0xcccccccc },
{ 0x00000000, 0x1fffffff, 0xffff8000 },
{ 0x00000000, 0x1fffbfff, 0xffff8001 },
{ 0x00000000, 0x1fff7fff, 0xffff8002 },
{ 0x00000000, 0x1fff3fff, 0xffff8003 },
{ 0x00000000, 0x001fffff, 0xffffff80 },
{ 0x00000000, 0x001fbfff, 0xffffff81 },
{ 0x00000000, 0x001f7fff, 0xffffff82 },
{ 0x00000000, 0x001f3fff, 0xffffff83 },
{ 0x00000000, 0x0007ffff, 0xffffffe0 },
{ 0x00000000, 0x0000bfff, 0xfffffffd },
{ 0x00000000, 0x00007fff, 0xfffffffe },
{ 0x00000000, 0x00003fff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_15[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffff7fff, 0x00000001 },
{ 0x00000000, 0xfffeffff, 0x00000002 },
{ 0x00000000, 0xffefffff, 0x00000020 },
{ 0x00000000, 0xffc17fff, 0x0000007d },
{ 0x00000000, 0xffc0ffff, 0x0000007e },
{ 0x00000000, 0xffc07fff, 0x0000007f },
{ 0x00000000, 0xc0017fff, 0x00007ffd },
{ 0x00000000, 0xc000ffff, 0x00007ffe },
{ 0x00000000, 0xc0007fff, 0x00007fff },
{ 0x00000000, 0x66667fff, 0x33333333 },
{ 0x00000000, 0x55557fff, 0x55555555 },
{ 0x00000000, 0x00017fff, 0x7ffffffd },
{ 0x00000000, 0x0000ffff, 0x7ffffffe },
{ 0x00000000, 0x00007fff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffff7fff, 0x80000001 },
{ 0x00000000, 0xaaaaffff, 0xaaaaaaaa },
{ 0x00000000, 0x9999ffff, 0xcccccccc },
{ 0x00000000, 0x3fffffff, 0xffff8000 },
{ 0x00000000, 0x3fff7fff, 0xffff8001 },
{ 0x00000000, 0x3ffeffff, 0xffff8002 },
{ 0x00000000, 0x3ffe7fff, 0xffff8003 },
{ 0x00000000, 0x003fffff, 0xffffff80 },
{ 0x00000000, 0x003f7fff, 0xffffff81 },
{ 0x00000000, 0x003effff, 0xffffff82 },
{ 0x00000000, 0x003e7fff, 0xffffff83 },
{ 0x00000000, 0x000fffff, 0xffffffe0 },
{ 0x00000000, 0x00017fff, 0xfffffffd },
{ 0x00000000, 0x0000ffff, 0xfffffffe },
{ 0x00000000, 0x00007fff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_16[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffeffff, 0x00000001 },
{ 0x00000000, 0xfffdffff, 0x00000002 },
{ 0x00000000, 0xffdfffff, 0x00000020 },
{ 0x00000000, 0xff82ffff, 0x0000007d },
{ 0x00000000, 0xff81ffff, 0x0000007e },
{ 0x00000000, 0xff80ffff, 0x0000007f },
{ 0x00000000, 0x8002ffff, 0x00007ffd },
{ 0x00000000, 0x8001ffff, 0x00007ffe },
{ 0x00000000, 0x8000ffff, 0x00007fff },
{ 0x00000000, 0xccccffff, 0x33333333 },
{ 0x00000000, 0xaaaaffff, 0x55555555 },
{ 0x00000000, 0x0002ffff, 0x7ffffffd },
{ 0x00000000, 0x0001ffff, 0x7ffffffe },
{ 0x00000000, 0x0000ffff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffeffff, 0x80000001 },
{ 0x00000000, 0x5555ffff, 0xaaaaaaaa },
{ 0x00000000, 0x3333ffff, 0xcccccccc },
{ 0x00000000, 0x7fffffff, 0xffff8000 },
{ 0x00000000, 0x7ffeffff, 0xffff8001 },
{ 0x00000000, 0x7ffdffff, 0xffff8002 },
{ 0x00000000, 0x7ffcffff, 0xffff8003 },
{ 0x00000000, 0x007fffff, 0xffffff80 },
{ 0x00000000, 0x007effff, 0xffffff81 },
{ 0x00000000, 0x007dffff, 0xffffff82 },
{ 0x00000000, 0x007cffff, 0xffffff83 },
{ 0x00000000, 0x001fffff, 0xffffffe0 },
{ 0x00000000, 0x0002ffff, 0xfffffffd },
{ 0x00000000, 0x0001ffff, 0xfffffffe },
{ 0x00000000, 0x0000ffff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_17[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffdffff, 0x00000001 },
{ 0x00000000, 0xfffbffff, 0x00000002 },
{ 0x00000000, 0xffbfffff, 0x00000020 },
{ 0x00000000, 0xff05ffff, 0x0000007d },
{ 0x00000000, 0xff03ffff, 0x0000007e },
{ 0x00000000, 0xff01ffff, 0x0000007f },
{ 0x00000000, 0x0005ffff, 0x00007ffd },
{ 0x00000000, 0x0003ffff, 0x00007ffe },
{ 0x00000000, 0x0001ffff, 0x00007fff },
{ 0x00000000, 0x9999ffff, 0x33333333 },
{ 0x00000000, 0x5555ffff, 0x55555555 },
{ 0x00000000, 0x0005ffff, 0x7ffffffd },
{ 0x00000000, 0x0003ffff, 0x7ffffffe },
{ 0x00000000, 0x0001ffff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffdffff, 0x80000001 },
{ 0x00000000, 0xaaabffff, 0xaaaaaaaa },
{ 0x00000000, 0x6667ffff, 0xcccccccc },
{ 0x00000000, 0xffffffff, 0xffff8000 },
{ 0x00000000, 0xfffdffff, 0xffff8001 },
{ 0x00000000, 0xfffbffff, 0xffff8002 },
{ 0x00000000, 0xfff9ffff, 0xffff8003 },
{ 0x00000000, 0x00ffffff, 0xffffff80 },
{ 0x00000000, 0x00fdffff, 0xffffff81 },
{ 0x00000000, 0x00fbffff, 0xffffff82 },
{ 0x00000000, 0x00f9ffff, 0xffffff83 },
{ 0x00000000, 0x003fffff, 0xffffffe0 },
{ 0x00000000, 0x0005ffff, 0xfffffffd },
{ 0x00000000, 0x0003ffff, 0xfffffffe },
{ 0x00000000, 0x0001ffff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_18[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffbffff, 0x00000001 },
{ 0x00000000, 0xfff7ffff, 0x00000002 },
{ 0x00000000, 0xff7fffff, 0x00000020 },
{ 0x00000000, 0xfe0bffff, 0x0000007d },
{ 0x00000000, 0xfe07ffff, 0x0000007e },
{ 0x00000000, 0xfe03ffff, 0x0000007f },
{ 0x00000000, 0x000bffff, 0x00007ffd },
{ 0x00000000, 0x0007ffff, 0x00007ffe },
{ 0x00000000, 0x0003ffff, 0x00007fff },
{ 0x00000000, 0x3333ffff, 0x33333333 },
{ 0x00000000, 0xaaabffff, 0x55555555 },
{ 0x00000000, 0x000bffff, 0x7ffffffd },
{ 0x00000000, 0x0007ffff, 0x7ffffffe },
{ 0x00000000, 0x0003ffff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfffbffff, 0x80000001 },
{ 0x00000000, 0x5557ffff, 0xaaaaaaaa },
{ 0x00000000, 0xcccfffff, 0xcccccccc },
{ 0x00000000, 0xffffffff, 0xffff8000 },
{ 0x00000000, 0xfffbffff, 0xffff8001 },
{ 0x00000000, 0xfff7ffff, 0xffff8002 },
{ 0x00000000, 0xfff3ffff, 0xffff8003 },
{ 0x00000000, 0x01ffffff, 0xffffff80 },
{ 0x00000000, 0x01fbffff, 0xffffff81 },
{ 0x00000000, 0x01f7ffff, 0xffffff82 },
{ 0x00000000, 0x01f3ffff, 0xffffff83 },
{ 0x00000000, 0x007fffff, 0xffffffe0 },
{ 0x00000000, 0x000bffff, 0xfffffffd },
{ 0x00000000, 0x0007ffff, 0xfffffffe },
{ 0x00000000, 0x0003ffff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_19[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfff7ffff, 0x00000001 },
{ 0x00000000, 0xffefffff, 0x00000002 },
{ 0x00000000, 0xfeffffff, 0x00000020 },
{ 0x00000000, 0xfc17ffff, 0x0000007d },
{ 0x00000000, 0xfc0fffff, 0x0000007e },
{ 0x00000000, 0xfc07ffff, 0x0000007f },
{ 0x00000000, 0x0017ffff, 0x00007ffd },
{ 0x00000000, 0x000fffff, 0x00007ffe },
{ 0x00000000, 0x0007ffff, 0x00007fff },
{ 0x00000000, 0x6667ffff, 0x33333333 },
{ 0x00000000, 0x5557ffff, 0x55555555 },
{ 0x00000000, 0x0017ffff, 0x7ffffffd },
{ 0x00000000, 0x000fffff, 0x7ffffffe },
{ 0x00000000, 0x0007ffff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfff7ffff, 0x80000001 },
{ 0x00000000, 0xaaafffff, 0xaaaaaaaa },
{ 0x00000000, 0x999fffff, 0xcccccccc },
{ 0x00000000, 0xffffffff, 0xffff8000 },
{ 0x00000000, 0xfff7ffff, 0xffff8001 },
{ 0x00000000, 0xffefffff, 0xffff8002 },
{ 0x00000000, 0xffe7ffff, 0xffff8003 },
{ 0x00000000, 0x03ffffff, 0xffffff80 },
{ 0x00000000, 0x03f7ffff, 0xffffff81 },
{ 0x00000000, 0x03efffff, 0xffffff82 },
{ 0x00000000, 0x03e7ffff, 0xffffff83 },
{ 0x00000000, 0x00ffffff, 0xffffffe0 },
{ 0x00000000, 0x0017ffff, 0xfffffffd },
{ 0x00000000, 0x000fffff, 0xfffffffe },
{ 0x00000000, 0x0007ffff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_20[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffefffff, 0x00000001 },
{ 0x00000000, 0xffdfffff, 0x00000002 },
{ 0x00000000, 0xfdffffff, 0x00000020 },
{ 0x00000000, 0xf82fffff, 0x0000007d },
{ 0x00000000, 0xf81fffff, 0x0000007e },
{ 0x00000000, 0xf80fffff, 0x0000007f },
{ 0x00000000, 0x002fffff, 0x00007ffd },
{ 0x00000000, 0x001fffff, 0x00007ffe },
{ 0x00000000, 0x000fffff, 0x00007fff },
{ 0x00000000, 0xcccfffff, 0x33333333 },
{ 0x00000000, 0xaaafffff, 0x55555555 },
{ 0x00000000, 0x002fffff, 0x7ffffffd },
{ 0x00000000, 0x001fffff, 0x7ffffffe },
{ 0x00000000, 0x000fffff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffefffff, 0x80000001 },
{ 0x00000000, 0x555fffff, 0xaaaaaaaa },
{ 0x00000000, 0x333fffff, 0xcccccccc },
{ 0x00000000, 0xffffffff, 0xffff8000 },
{ 0x00000000, 0xffefffff, 0xffff8001 },
{ 0x00000000, 0xffdfffff, 0xffff8002 },
{ 0x00000000, 0xffcfffff, 0xffff8003 },
{ 0x00000000, 0x07ffffff, 0xffffff80 },
{ 0x00000000, 0x07efffff, 0xffffff81 },
{ 0x00000000, 0x07dfffff, 0xffffff82 },
{ 0x00000000, 0x07cfffff, 0xffffff83 },
{ 0x00000000, 0x01ffffff, 0xffffffe0 },
{ 0x00000000, 0x002fffff, 0xfffffffd },
{ 0x00000000, 0x001fffff, 0xfffffffe },
{ 0x00000000, 0x000fffff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_21[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffdfffff, 0x00000001 },
{ 0x00000000, 0xffbfffff, 0x00000002 },
{ 0x00000000, 0xfbffffff, 0x00000020 },
{ 0x00000000, 0xf05fffff, 0x0000007d },
{ 0x00000000, 0xf03fffff, 0x0000007e },
{ 0x00000000, 0xf01fffff, 0x0000007f },
{ 0x00000000, 0x005fffff, 0x00007ffd },
{ 0x00000000, 0x003fffff, 0x00007ffe },
{ 0x00000000, 0x001fffff, 0x00007fff },
{ 0x00000000, 0x999fffff, 0x33333333 },
{ 0x00000000, 0x555fffff, 0x55555555 },
{ 0x00000000, 0x005fffff, 0x7ffffffd },
{ 0x00000000, 0x003fffff, 0x7ffffffe },
{ 0x00000000, 0x001fffff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffdfffff, 0x80000001 },
{ 0x00000000, 0xaabfffff, 0xaaaaaaaa },
{ 0x00000000, 0x667fffff, 0xcccccccc },
{ 0x00000000, 0xffffffff, 0xffff8000 },
{ 0x00000000, 0xffdfffff, 0xffff8001 },
{ 0x00000000, 0xffbfffff, 0xffff8002 },
{ 0x00000000, 0xff9fffff, 0xffff8003 },
{ 0x00000000, 0x0fffffff, 0xffffff80 },
{ 0x00000000, 0x0fdfffff, 0xffffff81 },
{ 0x00000000, 0x0fbfffff, 0xffffff82 },
{ 0x00000000, 0x0f9fffff, 0xffffff83 },
{ 0x00000000, 0x03ffffff, 0xffffffe0 },
{ 0x00000000, 0x005fffff, 0xfffffffd },
{ 0x00000000, 0x003fffff, 0xfffffffe },
{ 0x00000000, 0x001fffff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_22[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffbfffff, 0x00000001 },
{ 0x00000000, 0xff7fffff, 0x00000002 },
{ 0x00000000, 0xf7ffffff, 0x00000020 },
{ 0x00000000, 0xe0bfffff, 0x0000007d },
{ 0x00000000, 0xe07fffff, 0x0000007e },
{ 0x00000000, 0xe03fffff, 0x0000007f },
{ 0x00000000, 0x00bfffff, 0x00007ffd },
{ 0x00000000, 0x007fffff, 0x00007ffe },
{ 0x00000000, 0x003fffff, 0x00007fff },
{ 0x00000000, 0x333fffff, 0x33333333 },
{ 0x00000000, 0xaabfffff, 0x55555555 },
{ 0x00000000, 0x00bfffff, 0x7ffffffd },
{ 0x00000000, 0x007fffff, 0x7ffffffe },
{ 0x00000000, 0x003fffff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xffbfffff, 0x80000001 },
{ 0x00000000, 0x557fffff, 0xaaaaaaaa },
{ 0x00000000, 0xccffffff, 0xcccccccc },
{ 0x00000000, 0xffffffff, 0xffff8000 },
{ 0x00000000, 0xffbfffff, 0xffff8001 },
{ 0x00000000, 0xff7fffff, 0xffff8002 },
{ 0x00000000, 0xff3fffff, 0xffff8003 },
{ 0x00000000, 0x1fffffff, 0xffffff80 },
{ 0x00000000, 0x1fbfffff, 0xffffff81 },
{ 0x00000000, 0x1f7fffff, 0xffffff82 },
{ 0x00000000, 0x1f3fffff, 0xffffff83 },
{ 0x00000000, 0x07ffffff, 0xffffffe0 },
{ 0x00000000, 0x00bfffff, 0xfffffffd },
{ 0x00000000, 0x007fffff, 0xfffffffe },
{ 0x00000000, 0x003fffff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_23[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xff7fffff, 0x00000001 },
{ 0x00000000, 0xfeffffff, 0x00000002 },
{ 0x00000000, 0xefffffff, 0x00000020 },
{ 0x00000000, 0xc17fffff, 0x0000007d },
{ 0x00000000, 0xc0ffffff, 0x0000007e },
{ 0x00000000, 0xc07fffff, 0x0000007f },
{ 0x00000000, 0x017fffff, 0x00007ffd },
{ 0x00000000, 0x00ffffff, 0x00007ffe },
{ 0x00000000, 0x007fffff, 0x00007fff },
{ 0x00000000, 0x667fffff, 0x33333333 },
{ 0x00000000, 0x557fffff, 0x55555555 },
{ 0x00000000, 0x017fffff, 0x7ffffffd },
{ 0x00000000, 0x00ffffff, 0x7ffffffe },
{ 0x00000000, 0x007fffff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xff7fffff, 0x80000001 },
{ 0x00000000, 0xaaffffff, 0xaaaaaaaa },
{ 0x00000000, 0x99ffffff, 0xcccccccc },
{ 0x00000000, 0xffffffff, 0xffff8000 },
{ 0x00000000, 0xff7fffff, 0xffff8001 },
{ 0x00000000, 0xfeffffff, 0xffff8002 },
{ 0x00000000, 0xfe7fffff, 0xffff8003 },
{ 0x00000000, 0x3fffffff, 0xffffff80 },
{ 0x00000000, 0x3f7fffff, 0xffffff81 },
{ 0x00000000, 0x3effffff, 0xffffff82 },
{ 0x00000000, 0x3e7fffff, 0xffffff83 },
{ 0x00000000, 0x0fffffff, 0xffffffe0 },
{ 0x00000000, 0x017fffff, 0xfffffffd },
{ 0x00000000, 0x00ffffff, 0xfffffffe },
{ 0x00000000, 0x007fffff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_24[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfeffffff, 0x00000001 },
{ 0x00000000, 0xfdffffff, 0x00000002 },
{ 0x00000000, 0xdfffffff, 0x00000020 },
{ 0x00000000, 0x82ffffff, 0x0000007d },
{ 0x00000000, 0x81ffffff, 0x0000007e },
{ 0x00000000, 0x80ffffff, 0x0000007f },
{ 0x00000000, 0x02ffffff, 0x00007ffd },
{ 0x00000000, 0x01ffffff, 0x00007ffe },
{ 0x00000000, 0x00ffffff, 0x00007fff },
{ 0x00000000, 0xccffffff, 0x33333333 },
{ 0x00000000, 0xaaffffff, 0x55555555 },
{ 0x00000000, 0x02ffffff, 0x7ffffffd },
{ 0x00000000, 0x01ffffff, 0x7ffffffe },
{ 0x00000000, 0x00ffffff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfeffffff, 0x80000001 },
{ 0x00000000, 0x55ffffff, 0xaaaaaaaa },
{ 0x00000000, 0x33ffffff, 0xcccccccc },
{ 0x00000000, 0xffffffff, 0xffff8000 },
{ 0x00000000, 0xfeffffff, 0xffff8001 },
{ 0x00000000, 0xfdffffff, 0xffff8002 },
{ 0x00000000, 0xfcffffff, 0xffff8003 },
{ 0x00000000, 0x7fffffff, 0xffffff80 },
{ 0x00000000, 0x7effffff, 0xffffff81 },
{ 0x00000000, 0x7dffffff, 0xffffff82 },
{ 0x00000000, 0x7cffffff, 0xffffff83 },
{ 0x00000000, 0x1fffffff, 0xffffffe0 },
{ 0x00000000, 0x02ffffff, 0xfffffffd },
{ 0x00000000, 0x01ffffff, 0xfffffffe },
{ 0x00000000, 0x00ffffff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_25[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfdffffff, 0x00000001 },
{ 0x00000000, 0xfbffffff, 0x00000002 },
{ 0x00000000, 0xbfffffff, 0x00000020 },
{ 0x00000000, 0x05ffffff, 0x0000007d },
{ 0x00000000, 0x03ffffff, 0x0000007e },
{ 0x00000000, 0x01ffffff, 0x0000007f },
{ 0x00000000, 0x05ffffff, 0x00007ffd },
{ 0x00000000, 0x03ffffff, 0x00007ffe },
{ 0x00000000, 0x01ffffff, 0x00007fff },
{ 0x00000000, 0x99ffffff, 0x33333333 },
{ 0x00000000, 0x55ffffff, 0x55555555 },
{ 0x00000000, 0x05ffffff, 0x7ffffffd },
{ 0x00000000, 0x03ffffff, 0x7ffffffe },
{ 0x00000000, 0x01ffffff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfdffffff, 0x80000001 },
{ 0x00000000, 0xabffffff, 0xaaaaaaaa },
{ 0x00000000, 0x67ffffff, 0xcccccccc },
{ 0x00000000, 0xffffffff, 0xffff8000 },
{ 0x00000000, 0xfdffffff, 0xffff8001 },
{ 0x00000000, 0xfbffffff, 0xffff8002 },
{ 0x00000000, 0xf9ffffff, 0xffff8003 },
{ 0x00000000, 0xffffffff, 0xffffff80 },
{ 0x00000000, 0xfdffffff, 0xffffff81 },
{ 0x00000000, 0xfbffffff, 0xffffff82 },
{ 0x00000000, 0xf9ffffff, 0xffffff83 },
{ 0x00000000, 0x3fffffff, 0xffffffe0 },
{ 0x00000000, 0x05ffffff, 0xfffffffd },
{ 0x00000000, 0x03ffffff, 0xfffffffe },
{ 0x00000000, 0x01ffffff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_26[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfbffffff, 0x00000001 },
{ 0x00000000, 0xf7ffffff, 0x00000002 },
{ 0x00000000, 0x7fffffff, 0x00000020 },
{ 0x00000000, 0x0bffffff, 0x0000007d },
{ 0x00000000, 0x07ffffff, 0x0000007e },
{ 0x00000000, 0x03ffffff, 0x0000007f },
{ 0x00000000, 0x0bffffff, 0x00007ffd },
{ 0x00000000, 0x07ffffff, 0x00007ffe },
{ 0x00000000, 0x03ffffff, 0x00007fff },
{ 0x00000000, 0x33ffffff, 0x33333333 },
{ 0x00000000, 0xabffffff, 0x55555555 },
{ 0x00000000, 0x0bffffff, 0x7ffffffd },
{ 0x00000000, 0x07ffffff, 0x7ffffffe },
{ 0x00000000, 0x03ffffff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xfbffffff, 0x80000001 },
{ 0x00000000, 0x57ffffff, 0xaaaaaaaa },
{ 0x00000000, 0xcfffffff, 0xcccccccc },
{ 0x00000000, 0xffffffff, 0xffff8000 },
{ 0x00000000, 0xfbffffff, 0xffff8001 },
{ 0x00000000, 0xf7ffffff, 0xffff8002 },
{ 0x00000000, 0xf3ffffff, 0xffff8003 },
{ 0x00000000, 0xffffffff, 0xffffff80 },
{ 0x00000000, 0xfbffffff, 0xffffff81 },
{ 0x00000000, 0xf7ffffff, 0xffffff82 },
{ 0x00000000, 0xf3ffffff, 0xffffff83 },
{ 0x00000000, 0x7fffffff, 0xffffffe0 },
{ 0x00000000, 0x0bffffff, 0xfffffffd },
{ 0x00000000, 0x07ffffff, 0xfffffffe },
{ 0x00000000, 0x03ffffff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_27[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xf7ffffff, 0x00000001 },
{ 0x00000000, 0xefffffff, 0x00000002 },
{ 0x00000000, 0xffffffff, 0x00000020 },
{ 0x00000000, 0x17ffffff, 0x0000007d },
{ 0x00000000, 0x0fffffff, 0x0000007e },
{ 0x00000000, 0x07ffffff, 0x0000007f },
{ 0x00000000, 0x17ffffff, 0x00007ffd },
{ 0x00000000, 0x0fffffff, 0x00007ffe },
{ 0x00000000, 0x07ffffff, 0x00007fff },
{ 0x00000000, 0x67ffffff, 0x33333333 },
{ 0x00000000, 0x57ffffff, 0x55555555 },
{ 0x00000000, 0x17ffffff, 0x7ffffffd },
{ 0x00000000, 0x0fffffff, 0x7ffffffe },
{ 0x00000000, 0x07ffffff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xf7ffffff, 0x80000001 },
{ 0x00000000, 0xafffffff, 0xaaaaaaaa },
{ 0x00000000, 0x9fffffff, 0xcccccccc },
{ 0x00000000, 0xffffffff, 0xffff8000 },
{ 0x00000000, 0xf7ffffff, 0xffff8001 },
{ 0x00000000, 0xefffffff, 0xffff8002 },
{ 0x00000000, 0xe7ffffff, 0xffff8003 },
{ 0x00000000, 0xffffffff, 0xffffff80 },
{ 0x00000000, 0xf7ffffff, 0xffffff81 },
{ 0x00000000, 0xefffffff, 0xffffff82 },
{ 0x00000000, 0xe7ffffff, 0xffffff83 },
{ 0x00000000, 0xffffffff, 0xffffffe0 },
{ 0x00000000, 0x17ffffff, 0xfffffffd },
{ 0x00000000, 0x0fffffff, 0xfffffffe },
{ 0x00000000, 0x07ffffff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_28[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xefffffff, 0x00000001 },
{ 0x00000000, 0xdfffffff, 0x00000002 },
{ 0x00000000, 0xffffffff, 0x00000020 },
{ 0x00000000, 0x2fffffff, 0x0000007d },
{ 0x00000000, 0x1fffffff, 0x0000007e },
{ 0x00000000, 0x0fffffff, 0x0000007f },
{ 0x00000000, 0x2fffffff, 0x00007ffd },
{ 0x00000000, 0x1fffffff, 0x00007ffe },
{ 0x00000000, 0x0fffffff, 0x00007fff },
{ 0x00000000, 0xcfffffff, 0x33333333 },
{ 0x00000000, 0xafffffff, 0x55555555 },
{ 0x00000000, 0x2fffffff, 0x7ffffffd },
{ 0x00000000, 0x1fffffff, 0x7ffffffe },
{ 0x00000000, 0x0fffffff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xefffffff, 0x80000001 },
{ 0x00000000, 0x5fffffff, 0xaaaaaaaa },
{ 0x00000000, 0x3fffffff, 0xcccccccc },
{ 0x00000000, 0xffffffff, 0xffff8000 },
{ 0x00000000, 0xefffffff, 0xffff8001 },
{ 0x00000000, 0xdfffffff, 0xffff8002 },
{ 0x00000000, 0xcfffffff, 0xffff8003 },
{ 0x00000000, 0xffffffff, 0xffffff80 },
{ 0x00000000, 0xefffffff, 0xffffff81 },
{ 0x00000000, 0xdfffffff, 0xffffff82 },
{ 0x00000000, 0xcfffffff, 0xffffff83 },
{ 0x00000000, 0xffffffff, 0xffffffe0 },
{ 0x00000000, 0x2fffffff, 0xfffffffd },
{ 0x00000000, 0x1fffffff, 0xfffffffe },
{ 0x00000000, 0x0fffffff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_29[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xdfffffff, 0x00000001 },
{ 0x00000000, 0xbfffffff, 0x00000002 },
{ 0x00000000, 0xffffffff, 0x00000020 },
{ 0x00000000, 0x5fffffff, 0x0000007d },
{ 0x00000000, 0x3fffffff, 0x0000007e },
{ 0x00000000, 0x1fffffff, 0x0000007f },
{ 0x00000000, 0x5fffffff, 0x00007ffd },
{ 0x00000000, 0x3fffffff, 0x00007ffe },
{ 0x00000000, 0x1fffffff, 0x00007fff },
{ 0x00000000, 0x9fffffff, 0x33333333 },
{ 0x00000000, 0x5fffffff, 0x55555555 },
{ 0x00000000, 0x5fffffff, 0x7ffffffd },
{ 0x00000000, 0x3fffffff, 0x7ffffffe },
{ 0x00000000, 0x1fffffff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xdfffffff, 0x80000001 },
{ 0x00000000, 0xbfffffff, 0xaaaaaaaa },
{ 0x00000000, 0x7fffffff, 0xcccccccc },
{ 0x00000000, 0xffffffff, 0xffff8000 },
{ 0x00000000, 0xdfffffff, 0xffff8001 },
{ 0x00000000, 0xbfffffff, 0xffff8002 },
{ 0x00000000, 0x9fffffff, 0xffff8003 },
{ 0x00000000, 0xffffffff, 0xffffff80 },
{ 0x00000000, 0xdfffffff, 0xffffff81 },
{ 0x00000000, 0xbfffffff, 0xffffff82 },
{ 0x00000000, 0x9fffffff, 0xffffff83 },
{ 0x00000000, 0xffffffff, 0xffffffe0 },
{ 0x00000000, 0x5fffffff, 0xfffffffd },
{ 0x00000000, 0x3fffffff, 0xfffffffe },
{ 0x00000000, 0x1fffffff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_30[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xbfffffff, 0x00000001 },
{ 0x00000000, 0x7fffffff, 0x00000002 },
{ 0x00000000, 0xffffffff, 0x00000020 },
{ 0x00000000, 0xbfffffff, 0x0000007d },
{ 0x00000000, 0x7fffffff, 0x0000007e },
{ 0x00000000, 0x3fffffff, 0x0000007f },
{ 0x00000000, 0xbfffffff, 0x00007ffd },
{ 0x00000000, 0x7fffffff, 0x00007ffe },
{ 0x00000000, 0x3fffffff, 0x00007fff },
{ 0x00000000, 0x3fffffff, 0x33333333 },
{ 0x00000000, 0xbfffffff, 0x55555555 },
{ 0x00000000, 0xbfffffff, 0x7ffffffd },
{ 0x00000000, 0x7fffffff, 0x7ffffffe },
{ 0x00000000, 0x3fffffff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0xbfffffff, 0x80000001 },
{ 0x00000000, 0x7fffffff, 0xaaaaaaaa },
{ 0x00000000, 0xffffffff, 0xcccccccc },
{ 0x00000000, 0xffffffff, 0xffff8000 },
{ 0x00000000, 0xbfffffff, 0xffff8001 },
{ 0x00000000, 0x7fffffff, 0xffff8002 },
{ 0x00000000, 0x3fffffff, 0xffff8003 },
{ 0x00000000, 0xffffffff, 0xffffff80 },
{ 0x00000000, 0xbfffffff, 0xffffff81 },
{ 0x00000000, 0x7fffffff, 0xffffff82 },
{ 0x00000000, 0x3fffffff, 0xffffff83 },
{ 0x00000000, 0xffffffff, 0xffffffe0 },
{ 0x00000000, 0xbfffffff, 0xfffffffd },
{ 0x00000000, 0x7fffffff, 0xfffffffe },
{ 0x00000000, 0x3fffffff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_31[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x7fffffff, 0x00000001 },
{ 0x00000000, 0xffffffff, 0x00000002 },
{ 0x00000000, 0xffffffff, 0x00000020 },
{ 0x00000000, 0x7fffffff, 0x0000007d },
{ 0x00000000, 0xffffffff, 0x0000007e },
{ 0x00000000, 0x7fffffff, 0x0000007f },
{ 0x00000000, 0x7fffffff, 0x00007ffd },
{ 0x00000000, 0xffffffff, 0x00007ffe },
{ 0x00000000, 0x7fffffff, 0x00007fff },
{ 0x00000000, 0x7fffffff, 0x33333333 },
{ 0x00000000, 0x7fffffff, 0x55555555 },
{ 0x00000000, 0x7fffffff, 0x7ffffffd },
{ 0x00000000, 0xffffffff, 0x7ffffffe },
{ 0x00000000, 0x7fffffff, 0x7fffffff },
{ 0x00000000, 0xffffffff, 0x80000000 },
{ 0x00000000, 0x7fffffff, 0x80000001 },
{ 0x00000000, 0xffffffff, 0xaaaaaaaa },
{ 0x00000000, 0xffffffff, 0xcccccccc },
{ 0x00000000, 0xffffffff, 0xffff8000 },
{ 0x00000000, 0x7fffffff, 0xffff8001 },
{ 0x00000000, 0xffffffff, 0xffff8002 },
{ 0x00000000, 0x7fffffff, 0xffff8003 },
{ 0x00000000, 0xffffffff, 0xffffff80 },
{ 0x00000000, 0x7fffffff, 0xffffff81 },
{ 0x00000000, 0xffffffff, 0xffffff82 },
{ 0x00000000, 0x7fffffff, 0xffffff83 },
{ 0x00000000, 0xffffffff, 0xffffffe0 },
{ 0x00000000, 0x7fffffff, 0xfffffffd },
{ 0x00000000, 0xffffffff, 0xfffffffe },
{ 0x00000000, 0x7fffffff, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_1[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0x7fffffff, 0x00000001 },
{ 0x00000000, 0xfffffffe, 0x00000002 },
{ 0x00000000, 0xffffffef, 0x00000020 },
{ 0x00000000, 0x7fffffc1, 0x0000007d },
{ 0x00000000, 0xffffffc0, 0x0000007e },
{ 0x00000000, 0x7fffffc0, 0x0000007f },
{ 0x00000000, 0x7fffc001, 0x00007ffd },
{ 0x00000000, 0xffffc000, 0x00007ffe },
{ 0x00000000, 0x7fffc000, 0x00007fff },
{ 0x00000000, 0x66666666, 0x33333333 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x40000001, 0x7ffffffd },
{ 0x00000000, 0xc0000000, 0x7ffffffe },
{ 0x00000000, 0x40000000, 0x7fffffff },
{ 0x00000000, 0xbfffffff, 0x80000000 },
{ 0x00000000, 0x3fffffff, 0x80000001 },
{ 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa },
{ 0x00000000, 0x99999999, 0xcccccccc },
{ 0x00000000, 0x80003fff, 0xffff8000 },
{ 0x00000000, 0x00003fff, 0xffff8001 },
{ 0x00000000, 0x80003ffe, 0xffff8002 },
{ 0x00000000, 0x00003ffe, 0xffff8003 },
{ 0x00000000, 0x8000003f, 0xffffff80 },
{ 0x00000000, 0x0000003f, 0xffffff81 },
{ 0x00000000, 0x8000003e, 0xffffff82 },
{ 0x00000000, 0x0000003e, 0xffffff83 },
{ 0x00000000, 0x8000000f, 0xffffffe0 },
{ 0x00000000, 0x00000001, 0xfffffffd },
{ 0x00000000, 0x80000000, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_2[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xbfffffff, 0x00000001 },
{ 0x00000000, 0x7fffffff, 0x00000002 },
{ 0x00000000, 0xfffffff7, 0x00000020 },
{ 0x00000000, 0xbfffffe0, 0x0000007d },
{ 0x00000000, 0x7fffffe0, 0x0000007e },
{ 0x00000000, 0x3fffffe0, 0x0000007f },
{ 0x00000000, 0xbfffe000, 0x00007ffd },
{ 0x00000000, 0x7fffe000, 0x00007ffe },
{ 0x00000000, 0x3fffe000, 0x00007fff },
{ 0x00000000, 0x33333333, 0x33333333 },
{ 0x00000000, 0xaaaaaaaa, 0x55555555 },
{ 0x00000000, 0xa0000000, 0x7ffffffd },
{ 0x00000000, 0x60000000, 0x7ffffffe },
{ 0x00000000, 0x20000000, 0x7fffffff },
{ 0x00000000, 0xdfffffff, 0x80000000 },
{ 0x00000000, 0x9fffffff, 0x80000001 },
{ 0x00000000, 0x55555555, 0xaaaaaaaa },
{ 0x00000000, 0xcccccccc, 0xcccccccc },
{ 0x00000000, 0xc0001fff, 0xffff8000 },
{ 0x00000000, 0x80001fff, 0xffff8001 },
{ 0x00000000, 0x40001fff, 0xffff8002 },
{ 0x00000000, 0x00001fff, 0xffff8003 },
{ 0x00000000, 0xc000001f, 0xffffff80 },
{ 0x00000000, 0x8000001f, 0xffffff81 },
{ 0x00000000, 0x4000001f, 0xffffff82 },
{ 0x00000000, 0x0000001f, 0xffffff83 },
{ 0x00000000, 0xc0000007, 0xffffffe0 },
{ 0x00000000, 0x80000000, 0xfffffffd },
{ 0x00000000, 0x40000000, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_3[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xdfffffff, 0x00000001 },
{ 0x00000000, 0xbfffffff, 0x00000002 },
{ 0x00000000, 0xfffffffb, 0x00000020 },
{ 0x00000000, 0x5ffffff0, 0x0000007d },
{ 0x00000000, 0x3ffffff0, 0x0000007e },
{ 0x00000000, 0x1ffffff0, 0x0000007f },
{ 0x00000000, 0x5ffff000, 0x00007ffd },
{ 0x00000000, 0x3ffff000, 0x00007ffe },
{ 0x00000000, 0x1ffff000, 0x00007fff },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x50000000, 0x7ffffffd },
{ 0x00000000, 0x30000000, 0x7ffffffe },
{ 0x00000000, 0x10000000, 0x7fffffff },
{ 0x00000000, 0xefffffff, 0x80000000 },
{ 0x00000000, 0xcfffffff, 0x80000001 },
{ 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa },
{ 0x00000000, 0x66666666, 0xcccccccc },
{ 0x00000000, 0xe0000fff, 0xffff8000 },
{ 0x00000000, 0xc0000fff, 0xffff8001 },
{ 0x00000000, 0xa0000fff, 0xffff8002 },
{ 0x00000000, 0x80000fff, 0xffff8003 },
{ 0x00000000, 0xe000000f, 0xffffff80 },
{ 0x00000000, 0xc000000f, 0xffffff81 },
{ 0x00000000, 0xa000000f, 0xffffff82 },
{ 0x00000000, 0x8000000f, 0xffffff83 },
{ 0x00000000, 0xe0000003, 0xffffffe0 },
{ 0x00000000, 0x40000000, 0xfffffffd },
{ 0x00000000, 0x20000000, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_4[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xefffffff, 0x00000001 },
{ 0x00000000, 0xdfffffff, 0x00000002 },
{ 0x00000000, 0xfffffffd, 0x00000020 },
{ 0x00000000, 0x2ffffff8, 0x0000007d },
{ 0x00000000, 0x1ffffff8, 0x0000007e },
{ 0x00000000, 0x0ffffff8, 0x0000007f },
{ 0x00000000, 0x2ffff800, 0x00007ffd },
{ 0x00000000, 0x1ffff800, 0x00007ffe },
{ 0x00000000, 0x0ffff800, 0x00007fff },
{ 0x00000000, 0xcccccccc, 0x33333333 },
{ 0x00000000, 0xaaaaaaaa, 0x55555555 },
{ 0x00000000, 0x28000000, 0x7ffffffd },
{ 0x00000000, 0x18000000, 0x7ffffffe },
{ 0x00000000, 0x08000000, 0x7fffffff },
{ 0x00000000, 0xf7ffffff, 0x80000000 },
{ 0x00000000, 0xe7ffffff, 0x80000001 },
{ 0x00000000, 0x55555555, 0xaaaaaaaa },
{ 0x00000000, 0x33333333, 0xcccccccc },
{ 0x00000000, 0xf00007ff, 0xffff8000 },
{ 0x00000000, 0xe00007ff, 0xffff8001 },
{ 0x00000000, 0xd00007ff, 0xffff8002 },
{ 0x00000000, 0xc00007ff, 0xffff8003 },
{ 0x00000000, 0xf0000007, 0xffffff80 },
{ 0x00000000, 0xe0000007, 0xffffff81 },
{ 0x00000000, 0xd0000007, 0xffffff82 },
{ 0x00000000, 0xc0000007, 0xffffff83 },
{ 0x00000000, 0xf0000001, 0xffffffe0 },
{ 0x00000000, 0x20000000, 0xfffffffd },
{ 0x00000000, 0x10000000, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_5[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xf7ffffff, 0x00000001 },
{ 0x00000000, 0xefffffff, 0x00000002 },
{ 0x00000000, 0xfffffffe, 0x00000020 },
{ 0x00000000, 0x17fffffc, 0x0000007d },
{ 0x00000000, 0x0ffffffc, 0x0000007e },
{ 0x00000000, 0x07fffffc, 0x0000007f },
{ 0x00000000, 0x17fffc00, 0x00007ffd },
{ 0x00000000, 0x0ffffc00, 0x00007ffe },
{ 0x00000000, 0x07fffc00, 0x00007fff },
{ 0x00000000, 0x66666666, 0x33333333 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x14000000, 0x7ffffffd },
{ 0x00000000, 0x0c000000, 0x7ffffffe },
{ 0x00000000, 0x04000000, 0x7fffffff },
{ 0x00000000, 0xfbffffff, 0x80000000 },
{ 0x00000000, 0xf3ffffff, 0x80000001 },
{ 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa },
{ 0x00000000, 0x99999999, 0xcccccccc },
{ 0x00000000, 0xf80003ff, 0xffff8000 },
{ 0x00000000, 0xf00003ff, 0xffff8001 },
{ 0x00000000, 0xe80003ff, 0xffff8002 },
{ 0x00000000, 0xe00003ff, 0xffff8003 },
{ 0x00000000, 0xf8000003, 0xffffff80 },
{ 0x00000000, 0xf0000003, 0xffffff81 },
{ 0x00000000, 0xe8000003, 0xffffff82 },
{ 0x00000000, 0xe0000003, 0xffffff83 },
{ 0x00000000, 0xf8000000, 0xffffffe0 },
{ 0x00000000, 0x10000000, 0xfffffffd },
{ 0x00000000, 0x08000000, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_6[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfbffffff, 0x00000001 },
{ 0x00000000, 0xf7ffffff, 0x00000002 },
{ 0x00000000, 0x7fffffff, 0x00000020 },
{ 0x00000000, 0x0bfffffe, 0x0000007d },
{ 0x00000000, 0x07fffffe, 0x0000007e },
{ 0x00000000, 0x03fffffe, 0x0000007f },
{ 0x00000000, 0x0bfffe00, 0x00007ffd },
{ 0x00000000, 0x07fffe00, 0x00007ffe },
{ 0x00000000, 0x03fffe00, 0x00007fff },
{ 0x00000000, 0x33333333, 0x33333333 },
{ 0x00000000, 0xaaaaaaaa, 0x55555555 },
{ 0x00000000, 0x0a000000, 0x7ffffffd },
{ 0x00000000, 0x06000000, 0x7ffffffe },
{ 0x00000000, 0x02000000, 0x7fffffff },
{ 0x00000000, 0xfdffffff, 0x80000000 },
{ 0x00000000, 0xf9ffffff, 0x80000001 },
{ 0x00000000, 0x55555555, 0xaaaaaaaa },
{ 0x00000000, 0xcccccccc, 0xcccccccc },
{ 0x00000000, 0xfc0001ff, 0xffff8000 },
{ 0x00000000, 0xf80001ff, 0xffff8001 },
{ 0x00000000, 0xf40001ff, 0xffff8002 },
{ 0x00000000, 0xf00001ff, 0xffff8003 },
{ 0x00000000, 0xfc000001, 0xffffff80 },
{ 0x00000000, 0xf8000001, 0xffffff81 },
{ 0x00000000, 0xf4000001, 0xffffff82 },
{ 0x00000000, 0xf0000001, 0xffffff83 },
{ 0x00000000, 0x7c000000, 0xffffffe0 },
{ 0x00000000, 0x08000000, 0xfffffffd },
{ 0x00000000, 0x04000000, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_7[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfdffffff, 0x00000001 },
{ 0x00000000, 0xfbffffff, 0x00000002 },
{ 0x00000000, 0xbfffffff, 0x00000020 },
{ 0x00000000, 0x05ffffff, 0x0000007d },
{ 0x00000000, 0x03ffffff, 0x0000007e },
{ 0x00000000, 0x01ffffff, 0x0000007f },
{ 0x00000000, 0x05ffff00, 0x00007ffd },
{ 0x00000000, 0x03ffff00, 0x00007ffe },
{ 0x00000000, 0x01ffff00, 0x00007fff },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x05000000, 0x7ffffffd },
{ 0x00000000, 0x03000000, 0x7ffffffe },
{ 0x00000000, 0x01000000, 0x7fffffff },
{ 0x00000000, 0xfeffffff, 0x80000000 },
{ 0x00000000, 0xfcffffff, 0x80000001 },
{ 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa },
{ 0x00000000, 0x66666666, 0xcccccccc },
{ 0x00000000, 0xfe0000ff, 0xffff8000 },
{ 0x00000000, 0xfc0000ff, 0xffff8001 },
{ 0x00000000, 0xfa0000ff, 0xffff8002 },
{ 0x00000000, 0xf80000ff, 0xffff8003 },
{ 0x00000000, 0xfe000000, 0xffffff80 },
{ 0x00000000, 0xfc000000, 0xffffff81 },
{ 0x00000000, 0xfa000000, 0xffffff82 },
{ 0x00000000, 0xf8000000, 0xffffff83 },
{ 0x00000000, 0x3e000000, 0xffffffe0 },
{ 0x00000000, 0x04000000, 0xfffffffd },
{ 0x00000000, 0x02000000, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_8[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfeffffff, 0x00000001 },
{ 0x00000000, 0xfdffffff, 0x00000002 },
{ 0x00000000, 0xdfffffff, 0x00000020 },
{ 0x00000000, 0x82ffffff, 0x0000007d },
{ 0x00000000, 0x81ffffff, 0x0000007e },
{ 0x00000000, 0x80ffffff, 0x0000007f },
{ 0x00000000, 0x02ffff80, 0x00007ffd },
{ 0x00000000, 0x01ffff80, 0x00007ffe },
{ 0x00000000, 0x00ffff80, 0x00007fff },
{ 0x00000000, 0xcccccccc, 0x33333333 },
{ 0x00000000, 0xaaaaaaaa, 0x55555555 },
{ 0x00000000, 0x02800000, 0x7ffffffd },
{ 0x00000000, 0x01800000, 0x7ffffffe },
{ 0x00000000, 0x00800000, 0x7fffffff },
{ 0x00000000, 0xff7fffff, 0x80000000 },
{ 0x00000000, 0xfe7fffff, 0x80000001 },
{ 0x00000000, 0x55555555, 0xaaaaaaaa },
{ 0x00000000, 0x33333333, 0xcccccccc },
{ 0x00000000, 0xff00007f, 0xffff8000 },
{ 0x00000000, 0xfe00007f, 0xffff8001 },
{ 0x00000000, 0xfd00007f, 0xffff8002 },
{ 0x00000000, 0xfc00007f, 0xffff8003 },
{ 0x00000000, 0x7f000000, 0xffffff80 },
{ 0x00000000, 0x7e000000, 0xffffff81 },
{ 0x00000000, 0x7d000000, 0xffffff82 },
{ 0x00000000, 0x7c000000, 0xffffff83 },
{ 0x00000000, 0x1f000000, 0xffffffe0 },
{ 0x00000000, 0x02000000, 0xfffffffd },
{ 0x00000000, 0x01000000, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_9[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xff7fffff, 0x00000001 },
{ 0x00000000, 0xfeffffff, 0x00000002 },
{ 0x00000000, 0xefffffff, 0x00000020 },
{ 0x00000000, 0xc17fffff, 0x0000007d },
{ 0x00000000, 0xc0ffffff, 0x0000007e },
{ 0x00000000, 0xc07fffff, 0x0000007f },
{ 0x00000000, 0x017fffc0, 0x00007ffd },
{ 0x00000000, 0x00ffffc0, 0x00007ffe },
{ 0x00000000, 0x007fffc0, 0x00007fff },
{ 0x00000000, 0x66666666, 0x33333333 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x01400000, 0x7ffffffd },
{ 0x00000000, 0x00c00000, 0x7ffffffe },
{ 0x00000000, 0x00400000, 0x7fffffff },
{ 0x00000000, 0xffbfffff, 0x80000000 },
{ 0x00000000, 0xff3fffff, 0x80000001 },
{ 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa },
{ 0x00000000, 0x99999999, 0xcccccccc },
{ 0x00000000, 0xff80003f, 0xffff8000 },
{ 0x00000000, 0xff00003f, 0xffff8001 },
{ 0x00000000, 0xfe80003f, 0xffff8002 },
{ 0x00000000, 0xfe00003f, 0xffff8003 },
{ 0x00000000, 0x3f800000, 0xffffff80 },
{ 0x00000000, 0x3f000000, 0xffffff81 },
{ 0x00000000, 0x3e800000, 0xffffff82 },
{ 0x00000000, 0x3e000000, 0xffffff83 },
{ 0x00000000, 0x0f800000, 0xffffffe0 },
{ 0x00000000, 0x01000000, 0xfffffffd },
{ 0x00000000, 0x00800000, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_10[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffbfffff, 0x00000001 },
{ 0x00000000, 0xff7fffff, 0x00000002 },
{ 0x00000000, 0xf7ffffff, 0x00000020 },
{ 0x00000000, 0xe0bfffff, 0x0000007d },
{ 0x00000000, 0xe07fffff, 0x0000007e },
{ 0x00000000, 0xe03fffff, 0x0000007f },
{ 0x00000000, 0x00bfffe0, 0x00007ffd },
{ 0x00000000, 0x007fffe0, 0x00007ffe },
{ 0x00000000, 0x003fffe0, 0x00007fff },
{ 0x00000000, 0x33333333, 0x33333333 },
{ 0x00000000, 0xaaaaaaaa, 0x55555555 },
{ 0x00000000, 0x00a00000, 0x7ffffffd },
{ 0x00000000, 0x00600000, 0x7ffffffe },
{ 0x00000000, 0x00200000, 0x7fffffff },
{ 0x00000000, 0xffdfffff, 0x80000000 },
{ 0x00000000, 0xff9fffff, 0x80000001 },
{ 0x00000000, 0x55555555, 0xaaaaaaaa },
{ 0x00000000, 0xcccccccc, 0xcccccccc },
{ 0x00000000, 0xffc0001f, 0xffff8000 },
{ 0x00000000, 0xff80001f, 0xffff8001 },
{ 0x00000000, 0xff40001f, 0xffff8002 },
{ 0x00000000, 0xff00001f, 0xffff8003 },
{ 0x00000000, 0x1fc00000, 0xffffff80 },
{ 0x00000000, 0x1f800000, 0xffffff81 },
{ 0x00000000, 0x1f400000, 0xffffff82 },
{ 0x00000000, 0x1f000000, 0xffffff83 },
{ 0x00000000, 0x07c00000, 0xffffffe0 },
{ 0x00000000, 0x00800000, 0xfffffffd },
{ 0x00000000, 0x00400000, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_11[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffdfffff, 0x00000001 },
{ 0x00000000, 0xffbfffff, 0x00000002 },
{ 0x00000000, 0xfbffffff, 0x00000020 },
{ 0x00000000, 0xf05fffff, 0x0000007d },
{ 0x00000000, 0xf03fffff, 0x0000007e },
{ 0x00000000, 0xf01fffff, 0x0000007f },
{ 0x00000000, 0x005ffff0, 0x00007ffd },
{ 0x00000000, 0x003ffff0, 0x00007ffe },
{ 0x00000000, 0x001ffff0, 0x00007fff },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00500000, 0x7ffffffd },
{ 0x00000000, 0x00300000, 0x7ffffffe },
{ 0x00000000, 0x00100000, 0x7fffffff },
{ 0x00000000, 0xffefffff, 0x80000000 },
{ 0x00000000, 0xffcfffff, 0x80000001 },
{ 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa },
{ 0x00000000, 0x66666666, 0xcccccccc },
{ 0x00000000, 0xffe0000f, 0xffff8000 },
{ 0x00000000, 0xffc0000f, 0xffff8001 },
{ 0x00000000, 0xffa0000f, 0xffff8002 },
{ 0x00000000, 0xff80000f, 0xffff8003 },
{ 0x00000000, 0x0fe00000, 0xffffff80 },
{ 0x00000000, 0x0fc00000, 0xffffff81 },
{ 0x00000000, 0x0fa00000, 0xffffff82 },
{ 0x00000000, 0x0f800000, 0xffffff83 },
{ 0x00000000, 0x03e00000, 0xffffffe0 },
{ 0x00000000, 0x00400000, 0xfffffffd },
{ 0x00000000, 0x00200000, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_12[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffefffff, 0x00000001 },
{ 0x00000000, 0xffdfffff, 0x00000002 },
{ 0x00000000, 0xfdffffff, 0x00000020 },
{ 0x00000000, 0xf82fffff, 0x0000007d },
{ 0x00000000, 0xf81fffff, 0x0000007e },
{ 0x00000000, 0xf80fffff, 0x0000007f },
{ 0x00000000, 0x002ffff8, 0x00007ffd },
{ 0x00000000, 0x001ffff8, 0x00007ffe },
{ 0x00000000, 0x000ffff8, 0x00007fff },
{ 0x00000000, 0xcccccccc, 0x33333333 },
{ 0x00000000, 0xaaaaaaaa, 0x55555555 },
{ 0x00000000, 0x00280000, 0x7ffffffd },
{ 0x00000000, 0x00180000, 0x7ffffffe },
{ 0x00000000, 0x00080000, 0x7fffffff },
{ 0x00000000, 0xfff7ffff, 0x80000000 },
{ 0x00000000, 0xffe7ffff, 0x80000001 },
{ 0x00000000, 0x55555555, 0xaaaaaaaa },
{ 0x00000000, 0x33333333, 0xcccccccc },
{ 0x00000000, 0xfff00007, 0xffff8000 },
{ 0x00000000, 0xffe00007, 0xffff8001 },
{ 0x00000000, 0xffd00007, 0xffff8002 },
{ 0x00000000, 0xffc00007, 0xffff8003 },
{ 0x00000000, 0x07f00000, 0xffffff80 },
{ 0x00000000, 0x07e00000, 0xffffff81 },
{ 0x00000000, 0x07d00000, 0xffffff82 },
{ 0x00000000, 0x07c00000, 0xffffff83 },
{ 0x00000000, 0x01f00000, 0xffffffe0 },
{ 0x00000000, 0x00200000, 0xfffffffd },
{ 0x00000000, 0x00100000, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_13[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfff7ffff, 0x00000001 },
{ 0x00000000, 0xffefffff, 0x00000002 },
{ 0x00000000, 0xfeffffff, 0x00000020 },
{ 0x00000000, 0xfc17ffff, 0x0000007d },
{ 0x00000000, 0xfc0fffff, 0x0000007e },
{ 0x00000000, 0xfc07ffff, 0x0000007f },
{ 0x00000000, 0x0017fffc, 0x00007ffd },
{ 0x00000000, 0x000ffffc, 0x00007ffe },
{ 0x00000000, 0x0007fffc, 0x00007fff },
{ 0x00000000, 0x66666666, 0x33333333 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00140000, 0x7ffffffd },
{ 0x00000000, 0x000c0000, 0x7ffffffe },
{ 0x00000000, 0x00040000, 0x7fffffff },
{ 0x00000000, 0xfffbffff, 0x80000000 },
{ 0x00000000, 0xfff3ffff, 0x80000001 },
{ 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa },
{ 0x00000000, 0x99999999, 0xcccccccc },
{ 0x00000000, 0xfff80003, 0xffff8000 },
{ 0x00000000, 0xfff00003, 0xffff8001 },
{ 0x00000000, 0xffe80003, 0xffff8002 },
{ 0x00000000, 0xffe00003, 0xffff8003 },
{ 0x00000000, 0x03f80000, 0xffffff80 },
{ 0x00000000, 0x03f00000, 0xffffff81 },
{ 0x00000000, 0x03e80000, 0xffffff82 },
{ 0x00000000, 0x03e00000, 0xffffff83 },
{ 0x00000000, 0x00f80000, 0xffffffe0 },
{ 0x00000000, 0x00100000, 0xfffffffd },
{ 0x00000000, 0x00080000, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_14[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffbffff, 0x00000001 },
{ 0x00000000, 0xfff7ffff, 0x00000002 },
{ 0x00000000, 0xff7fffff, 0x00000020 },
{ 0x00000000, 0xfe0bffff, 0x0000007d },
{ 0x00000000, 0xfe07ffff, 0x0000007e },
{ 0x00000000, 0xfe03ffff, 0x0000007f },
{ 0x00000000, 0x000bfffe, 0x00007ffd },
{ 0x00000000, 0x0007fffe, 0x00007ffe },
{ 0x00000000, 0x0003fffe, 0x00007fff },
{ 0x00000000, 0x33333333, 0x33333333 },
{ 0x00000000, 0xaaaaaaaa, 0x55555555 },
{ 0x00000000, 0x000a0000, 0x7ffffffd },
{ 0x00000000, 0x00060000, 0x7ffffffe },
{ 0x00000000, 0x00020000, 0x7fffffff },
{ 0x00000000, 0xfffdffff, 0x80000000 },
{ 0x00000000, 0xfff9ffff, 0x80000001 },
{ 0x00000000, 0x55555555, 0xaaaaaaaa },
{ 0x00000000, 0xcccccccc, 0xcccccccc },
{ 0x00000000, 0xfffc0001, 0xffff8000 },
{ 0x00000000, 0xfff80001, 0xffff8001 },
{ 0x00000000, 0xfff40001, 0xffff8002 },
{ 0x00000000, 0xfff00001, 0xffff8003 },
{ 0x00000000, 0x01fc0000, 0xffffff80 },
{ 0x00000000, 0x01f80000, 0xffffff81 },
{ 0x00000000, 0x01f40000, 0xffffff82 },
{ 0x00000000, 0x01f00000, 0xffffff83 },
{ 0x00000000, 0x007c0000, 0xffffffe0 },
{ 0x00000000, 0x00080000, 0xfffffffd },
{ 0x00000000, 0x00040000, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_15[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffdffff, 0x00000001 },
{ 0x00000000, 0xfffbffff, 0x00000002 },
{ 0x00000000, 0xffbfffff, 0x00000020 },
{ 0x00000000, 0xff05ffff, 0x0000007d },
{ 0x00000000, 0xff03ffff, 0x0000007e },
{ 0x00000000, 0xff01ffff, 0x0000007f },
{ 0x00000000, 0x0005ffff, 0x00007ffd },
{ 0x00000000, 0x0003ffff, 0x00007ffe },
{ 0x00000000, 0x0001ffff, 0x00007fff },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00050000, 0x7ffffffd },
{ 0x00000000, 0x00030000, 0x7ffffffe },
{ 0x00000000, 0x00010000, 0x7fffffff },
{ 0x00000000, 0xfffeffff, 0x80000000 },
{ 0x00000000, 0xfffcffff, 0x80000001 },
{ 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa },
{ 0x00000000, 0x66666666, 0xcccccccc },
{ 0x00000000, 0xfffe0000, 0xffff8000 },
{ 0x00000000, 0xfffc0000, 0xffff8001 },
{ 0x00000000, 0xfffa0000, 0xffff8002 },
{ 0x00000000, 0xfff80000, 0xffff8003 },
{ 0x00000000, 0x00fe0000, 0xffffff80 },
{ 0x00000000, 0x00fc0000, 0xffffff81 },
{ 0x00000000, 0x00fa0000, 0xffffff82 },
{ 0x00000000, 0x00f80000, 0xffffff83 },
{ 0x00000000, 0x003e0000, 0xffffffe0 },
{ 0x00000000, 0x00040000, 0xfffffffd },
{ 0x00000000, 0x00020000, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_16[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffeffff, 0x00000001 },
{ 0x00000000, 0xfffdffff, 0x00000002 },
{ 0x00000000, 0xffdfffff, 0x00000020 },
{ 0x00000000, 0xff82ffff, 0x0000007d },
{ 0x00000000, 0xff81ffff, 0x0000007e },
{ 0x00000000, 0xff80ffff, 0x0000007f },
{ 0x00000000, 0x8002ffff, 0x00007ffd },
{ 0x00000000, 0x8001ffff, 0x00007ffe },
{ 0x00000000, 0x8000ffff, 0x00007fff },
{ 0x00000000, 0xcccccccc, 0x33333333 },
{ 0x00000000, 0xaaaaaaaa, 0x55555555 },
{ 0x00000000, 0x00028000, 0x7ffffffd },
{ 0x00000000, 0x00018000, 0x7ffffffe },
{ 0x00000000, 0x00008000, 0x7fffffff },
{ 0x00000000, 0xffff7fff, 0x80000000 },
{ 0x00000000, 0xfffe7fff, 0x80000001 },
{ 0x00000000, 0x55555555, 0xaaaaaaaa },
{ 0x00000000, 0x33333333, 0xcccccccc },
{ 0x00000000, 0x7fff0000, 0xffff8000 },
{ 0x00000000, 0x7ffe0000, 0xffff8001 },
{ 0x00000000, 0x7ffd0000, 0xffff8002 },
{ 0x00000000, 0x7ffc0000, 0xffff8003 },
{ 0x00000000, 0x007f0000, 0xffffff80 },
{ 0x00000000, 0x007e0000, 0xffffff81 },
{ 0x00000000, 0x007d0000, 0xffffff82 },
{ 0x00000000, 0x007c0000, 0xffffff83 },
{ 0x00000000, 0x001f0000, 0xffffffe0 },
{ 0x00000000, 0x00020000, 0xfffffffd },
{ 0x00000000, 0x00010000, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_17[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffff7fff, 0x00000001 },
{ 0x00000000, 0xfffeffff, 0x00000002 },
{ 0x00000000, 0xffefffff, 0x00000020 },
{ 0x00000000, 0xffc17fff, 0x0000007d },
{ 0x00000000, 0xffc0ffff, 0x0000007e },
{ 0x00000000, 0xffc07fff, 0x0000007f },
{ 0x00000000, 0xc0017fff, 0x00007ffd },
{ 0x00000000, 0xc000ffff, 0x00007ffe },
{ 0x00000000, 0xc0007fff, 0x00007fff },
{ 0x00000000, 0x66666666, 0x33333333 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00014000, 0x7ffffffd },
{ 0x00000000, 0x0000c000, 0x7ffffffe },
{ 0x00000000, 0x00004000, 0x7fffffff },
{ 0x00000000, 0xffffbfff, 0x80000000 },
{ 0x00000000, 0xffff3fff, 0x80000001 },
{ 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa },
{ 0x00000000, 0x99999999, 0xcccccccc },
{ 0x00000000, 0x3fff8000, 0xffff8000 },
{ 0x00000000, 0x3fff0000, 0xffff8001 },
{ 0x00000000, 0x3ffe8000, 0xffff8002 },
{ 0x00000000, 0x3ffe0000, 0xffff8003 },
{ 0x00000000, 0x003f8000, 0xffffff80 },
{ 0x00000000, 0x003f0000, 0xffffff81 },
{ 0x00000000, 0x003e8000, 0xffffff82 },
{ 0x00000000, 0x003e0000, 0xffffff83 },
{ 0x00000000, 0x000f8000, 0xffffffe0 },
{ 0x00000000, 0x00010000, 0xfffffffd },
{ 0x00000000, 0x00008000, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_18[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffbfff, 0x00000001 },
{ 0x00000000, 0xffff7fff, 0x00000002 },
{ 0x00000000, 0xfff7ffff, 0x00000020 },
{ 0x00000000, 0xffe0bfff, 0x0000007d },
{ 0x00000000, 0xffe07fff, 0x0000007e },
{ 0x00000000, 0xffe03fff, 0x0000007f },
{ 0x00000000, 0xe000bfff, 0x00007ffd },
{ 0x00000000, 0xe0007fff, 0x00007ffe },
{ 0x00000000, 0xe0003fff, 0x00007fff },
{ 0x00000000, 0x33333333, 0x33333333 },
{ 0x00000000, 0xaaaaaaaa, 0x55555555 },
{ 0x00000000, 0x0000a000, 0x7ffffffd },
{ 0x00000000, 0x00006000, 0x7ffffffe },
{ 0x00000000, 0x00002000, 0x7fffffff },
{ 0x00000000, 0xffffdfff, 0x80000000 },
{ 0x00000000, 0xffff9fff, 0x80000001 },
{ 0x00000000, 0x55555555, 0xaaaaaaaa },
{ 0x00000000, 0xcccccccc, 0xcccccccc },
{ 0x00000000, 0x1fffc000, 0xffff8000 },
{ 0x00000000, 0x1fff8000, 0xffff8001 },
{ 0x00000000, 0x1fff4000, 0xffff8002 },
{ 0x00000000, 0x1fff0000, 0xffff8003 },
{ 0x00000000, 0x001fc000, 0xffffff80 },
{ 0x00000000, 0x001f8000, 0xffffff81 },
{ 0x00000000, 0x001f4000, 0xffffff82 },
{ 0x00000000, 0x001f0000, 0xffffff83 },
{ 0x00000000, 0x0007c000, 0xffffffe0 },
{ 0x00000000, 0x00008000, 0xfffffffd },
{ 0x00000000, 0x00004000, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_19[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffdfff, 0x00000001 },
{ 0x00000000, 0xffffbfff, 0x00000002 },
{ 0x00000000, 0xfffbffff, 0x00000020 },
{ 0x00000000, 0xfff05fff, 0x0000007d },
{ 0x00000000, 0xfff03fff, 0x0000007e },
{ 0x00000000, 0xfff01fff, 0x0000007f },
{ 0x00000000, 0xf0005fff, 0x00007ffd },
{ 0x00000000, 0xf0003fff, 0x00007ffe },
{ 0x00000000, 0xf0001fff, 0x00007fff },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00005000, 0x7ffffffd },
{ 0x00000000, 0x00003000, 0x7ffffffe },
{ 0x00000000, 0x00001000, 0x7fffffff },
{ 0x00000000, 0xffffefff, 0x80000000 },
{ 0x00000000, 0xffffcfff, 0x80000001 },
{ 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa },
{ 0x00000000, 0x66666666, 0xcccccccc },
{ 0x00000000, 0x0fffe000, 0xffff8000 },
{ 0x00000000, 0x0fffc000, 0xffff8001 },
{ 0x00000000, 0x0fffa000, 0xffff8002 },
{ 0x00000000, 0x0fff8000, 0xffff8003 },
{ 0x00000000, 0x000fe000, 0xffffff80 },
{ 0x00000000, 0x000fc000, 0xffffff81 },
{ 0x00000000, 0x000fa000, 0xffffff82 },
{ 0x00000000, 0x000f8000, 0xffffff83 },
{ 0x00000000, 0x0003e000, 0xffffffe0 },
{ 0x00000000, 0x00004000, 0xfffffffd },
{ 0x00000000, 0x00002000, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_20[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffefff, 0x00000001 },
{ 0x00000000, 0xffffdfff, 0x00000002 },
{ 0x00000000, 0xfffdffff, 0x00000020 },
{ 0x00000000, 0xfff82fff, 0x0000007d },
{ 0x00000000, 0xfff81fff, 0x0000007e },
{ 0x00000000, 0xfff80fff, 0x0000007f },
{ 0x00000000, 0xf8002fff, 0x00007ffd },
{ 0x00000000, 0xf8001fff, 0x00007ffe },
{ 0x00000000, 0xf8000fff, 0x00007fff },
{ 0x00000000, 0xcccccccc, 0x33333333 },
{ 0x00000000, 0xaaaaaaaa, 0x55555555 },
{ 0x00000000, 0x00002800, 0x7ffffffd },
{ 0x00000000, 0x00001800, 0x7ffffffe },
{ 0x00000000, 0x00000800, 0x7fffffff },
{ 0x00000000, 0xfffff7ff, 0x80000000 },
{ 0x00000000, 0xffffe7ff, 0x80000001 },
{ 0x00000000, 0x55555555, 0xaaaaaaaa },
{ 0x00000000, 0x33333333, 0xcccccccc },
{ 0x00000000, 0x07fff000, 0xffff8000 },
{ 0x00000000, 0x07ffe000, 0xffff8001 },
{ 0x00000000, 0x07ffd000, 0xffff8002 },
{ 0x00000000, 0x07ffc000, 0xffff8003 },
{ 0x00000000, 0x0007f000, 0xffffff80 },
{ 0x00000000, 0x0007e000, 0xffffff81 },
{ 0x00000000, 0x0007d000, 0xffffff82 },
{ 0x00000000, 0x0007c000, 0xffffff83 },
{ 0x00000000, 0x0001f000, 0xffffffe0 },
{ 0x00000000, 0x00002000, 0xfffffffd },
{ 0x00000000, 0x00001000, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_21[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffff7ff, 0x00000001 },
{ 0x00000000, 0xffffefff, 0x00000002 },
{ 0x00000000, 0xfffeffff, 0x00000020 },
{ 0x00000000, 0xfffc17ff, 0x0000007d },
{ 0x00000000, 0xfffc0fff, 0x0000007e },
{ 0x00000000, 0xfffc07ff, 0x0000007f },
{ 0x00000000, 0xfc0017ff, 0x00007ffd },
{ 0x00000000, 0xfc000fff, 0x00007ffe },
{ 0x00000000, 0xfc0007ff, 0x00007fff },
{ 0x00000000, 0x66666666, 0x33333333 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00001400, 0x7ffffffd },
{ 0x00000000, 0x00000c00, 0x7ffffffe },
{ 0x00000000, 0x00000400, 0x7fffffff },
{ 0x00000000, 0xfffffbff, 0x80000000 },
{ 0x00000000, 0xfffff3ff, 0x80000001 },
{ 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa },
{ 0x00000000, 0x99999999, 0xcccccccc },
{ 0x00000000, 0x03fff800, 0xffff8000 },
{ 0x00000000, 0x03fff000, 0xffff8001 },
{ 0x00000000, 0x03ffe800, 0xffff8002 },
{ 0x00000000, 0x03ffe000, 0xffff8003 },
{ 0x00000000, 0x0003f800, 0xffffff80 },
{ 0x00000000, 0x0003f000, 0xffffff81 },
{ 0x00000000, 0x0003e800, 0xffffff82 },
{ 0x00000000, 0x0003e000, 0xffffff83 },
{ 0x00000000, 0x0000f800, 0xffffffe0 },
{ 0x00000000, 0x00001000, 0xfffffffd },
{ 0x00000000, 0x00000800, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_22[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffffbff, 0x00000001 },
{ 0x00000000, 0xfffff7ff, 0x00000002 },
{ 0x00000000, 0xffff7fff, 0x00000020 },
{ 0x00000000, 0xfffe0bff, 0x0000007d },
{ 0x00000000, 0xfffe07ff, 0x0000007e },
{ 0x00000000, 0xfffe03ff, 0x0000007f },
{ 0x00000000, 0xfe000bff, 0x00007ffd },
{ 0x00000000, 0xfe0007ff, 0x00007ffe },
{ 0x00000000, 0xfe0003ff, 0x00007fff },
{ 0x00000000, 0x33333333, 0x33333333 },
{ 0x00000000, 0xaaaaaaaa, 0x55555555 },
{ 0x00000000, 0x00000a00, 0x7ffffffd },
{ 0x00000000, 0x00000600, 0x7ffffffe },
{ 0x00000000, 0x00000200, 0x7fffffff },
{ 0x00000000, 0xfffffdff, 0x80000000 },
{ 0x00000000, 0xfffff9ff, 0x80000001 },
{ 0x00000000, 0x55555555, 0xaaaaaaaa },
{ 0x00000000, 0xcccccccc, 0xcccccccc },
{ 0x00000000, 0x01fffc00, 0xffff8000 },
{ 0x00000000, 0x01fff800, 0xffff8001 },
{ 0x00000000, 0x01fff400, 0xffff8002 },
{ 0x00000000, 0x01fff000, 0xffff8003 },
{ 0x00000000, 0x0001fc00, 0xffffff80 },
{ 0x00000000, 0x0001f800, 0xffffff81 },
{ 0x00000000, 0x0001f400, 0xffffff82 },
{ 0x00000000, 0x0001f000, 0xffffff83 },
{ 0x00000000, 0x00007c00, 0xffffffe0 },
{ 0x00000000, 0x00000800, 0xfffffffd },
{ 0x00000000, 0x00000400, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_23[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffffdff, 0x00000001 },
{ 0x00000000, 0xfffffbff, 0x00000002 },
{ 0x00000000, 0xffffbfff, 0x00000020 },
{ 0x00000000, 0xffff05ff, 0x0000007d },
{ 0x00000000, 0xffff03ff, 0x0000007e },
{ 0x00000000, 0xffff01ff, 0x0000007f },
{ 0x00000000, 0xff0005ff, 0x00007ffd },
{ 0x00000000, 0xff0003ff, 0x00007ffe },
{ 0x00000000, 0xff0001ff, 0x00007fff },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000500, 0x7ffffffd },
{ 0x00000000, 0x00000300, 0x7ffffffe },
{ 0x00000000, 0x00000100, 0x7fffffff },
{ 0x00000000, 0xfffffeff, 0x80000000 },
{ 0x00000000, 0xfffffcff, 0x80000001 },
{ 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa },
{ 0x00000000, 0x66666666, 0xcccccccc },
{ 0x00000000, 0x00fffe00, 0xffff8000 },
{ 0x00000000, 0x00fffc00, 0xffff8001 },
{ 0x00000000, 0x00fffa00, 0xffff8002 },
{ 0x00000000, 0x00fff800, 0xffff8003 },
{ 0x00000000, 0x0000fe00, 0xffffff80 },
{ 0x00000000, 0x0000fc00, 0xffffff81 },
{ 0x00000000, 0x0000fa00, 0xffffff82 },
{ 0x00000000, 0x0000f800, 0xffffff83 },
{ 0x00000000, 0x00003e00, 0xffffffe0 },
{ 0x00000000, 0x00000400, 0xfffffffd },
{ 0x00000000, 0x00000200, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_24[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffffeff, 0x00000001 },
{ 0x00000000, 0xfffffdff, 0x00000002 },
{ 0x00000000, 0xffffdfff, 0x00000020 },
{ 0x00000000, 0xffff82ff, 0x0000007d },
{ 0x00000000, 0xffff81ff, 0x0000007e },
{ 0x00000000, 0xffff80ff, 0x0000007f },
{ 0x00000000, 0xff8002ff, 0x00007ffd },
{ 0x00000000, 0xff8001ff, 0x00007ffe },
{ 0x00000000, 0xff8000ff, 0x00007fff },
{ 0x00000000, 0xcccccccc, 0x33333333 },
{ 0x00000000, 0xaaaaaaaa, 0x55555555 },
{ 0x00000000, 0x00000280, 0x7ffffffd },
{ 0x00000000, 0x00000180, 0x7ffffffe },
{ 0x00000000, 0x00000080, 0x7fffffff },
{ 0x00000000, 0xffffff7f, 0x80000000 },
{ 0x00000000, 0xfffffe7f, 0x80000001 },
{ 0x00000000, 0x55555555, 0xaaaaaaaa },
{ 0x00000000, 0x33333333, 0xcccccccc },
{ 0x00000000, 0x007fff00, 0xffff8000 },
{ 0x00000000, 0x007ffe00, 0xffff8001 },
{ 0x00000000, 0x007ffd00, 0xffff8002 },
{ 0x00000000, 0x007ffc00, 0xffff8003 },
{ 0x00000000, 0x00007f00, 0xffffff80 },
{ 0x00000000, 0x00007e00, 0xffffff81 },
{ 0x00000000, 0x00007d00, 0xffffff82 },
{ 0x00000000, 0x00007c00, 0xffffff83 },
{ 0x00000000, 0x00001f00, 0xffffffe0 },
{ 0x00000000, 0x00000200, 0xfffffffd },
{ 0x00000000, 0x00000100, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_25[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffff7f, 0x00000001 },
{ 0x00000000, 0xfffffeff, 0x00000002 },
{ 0x00000000, 0xffffefff, 0x00000020 },
{ 0x00000000, 0xffffc17f, 0x0000007d },
{ 0x00000000, 0xffffc0ff, 0x0000007e },
{ 0x00000000, 0xffffc07f, 0x0000007f },
{ 0x00000000, 0xffc0017f, 0x00007ffd },
{ 0x00000000, 0xffc000ff, 0x00007ffe },
{ 0x00000000, 0xffc0007f, 0x00007fff },
{ 0x00000000, 0x66666666, 0x33333333 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000140, 0x7ffffffd },
{ 0x00000000, 0x000000c0, 0x7ffffffe },
{ 0x00000000, 0x00000040, 0x7fffffff },
{ 0x00000000, 0xffffffbf, 0x80000000 },
{ 0x00000000, 0xffffff3f, 0x80000001 },
{ 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa },
{ 0x00000000, 0x99999999, 0xcccccccc },
{ 0x00000000, 0x003fff80, 0xffff8000 },
{ 0x00000000, 0x003fff00, 0xffff8001 },
{ 0x00000000, 0x003ffe80, 0xffff8002 },
{ 0x00000000, 0x003ffe00, 0xffff8003 },
{ 0x00000000, 0x00003f80, 0xffffff80 },
{ 0x00000000, 0x00003f00, 0xffffff81 },
{ 0x00000000, 0x00003e80, 0xffffff82 },
{ 0x00000000, 0x00003e00, 0xffffff83 },
{ 0x00000000, 0x00000f80, 0xffffffe0 },
{ 0x00000000, 0x00000100, 0xfffffffd },
{ 0x00000000, 0x00000080, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_26[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffffbf, 0x00000001 },
{ 0x00000000, 0xffffff7f, 0x00000002 },
{ 0x00000000, 0xfffff7ff, 0x00000020 },
{ 0x00000000, 0xffffe0bf, 0x0000007d },
{ 0x00000000, 0xffffe07f, 0x0000007e },
{ 0x00000000, 0xffffe03f, 0x0000007f },
{ 0x00000000, 0xffe000bf, 0x00007ffd },
{ 0x00000000, 0xffe0007f, 0x00007ffe },
{ 0x00000000, 0xffe0003f, 0x00007fff },
{ 0x00000000, 0x33333333, 0x33333333 },
{ 0x00000000, 0xaaaaaaaa, 0x55555555 },
{ 0x00000000, 0x000000a0, 0x7ffffffd },
{ 0x00000000, 0x00000060, 0x7ffffffe },
{ 0x00000000, 0x00000020, 0x7fffffff },
{ 0x00000000, 0xffffffdf, 0x80000000 },
{ 0x00000000, 0xffffff9f, 0x80000001 },
{ 0x00000000, 0x55555555, 0xaaaaaaaa },
{ 0x00000000, 0xcccccccc, 0xcccccccc },
{ 0x00000000, 0x001fffc0, 0xffff8000 },
{ 0x00000000, 0x001fff80, 0xffff8001 },
{ 0x00000000, 0x001fff40, 0xffff8002 },
{ 0x00000000, 0x001fff00, 0xffff8003 },
{ 0x00000000, 0x00001fc0, 0xffffff80 },
{ 0x00000000, 0x00001f80, 0xffffff81 },
{ 0x00000000, 0x00001f40, 0xffffff82 },
{ 0x00000000, 0x00001f00, 0xffffff83 },
{ 0x00000000, 0x000007c0, 0xffffffe0 },
{ 0x00000000, 0x00000080, 0xfffffffd },
{ 0x00000000, 0x00000040, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_27[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffffdf, 0x00000001 },
{ 0x00000000, 0xffffffbf, 0x00000002 },
{ 0x00000000, 0xfffffbff, 0x00000020 },
{ 0x00000000, 0xfffff05f, 0x0000007d },
{ 0x00000000, 0xfffff03f, 0x0000007e },
{ 0x00000000, 0xfffff01f, 0x0000007f },
{ 0x00000000, 0xfff0005f, 0x00007ffd },
{ 0x00000000, 0xfff0003f, 0x00007ffe },
{ 0x00000000, 0xfff0001f, 0x00007fff },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000050, 0x7ffffffd },
{ 0x00000000, 0x00000030, 0x7ffffffe },
{ 0x00000000, 0x00000010, 0x7fffffff },
{ 0x00000000, 0xffffffef, 0x80000000 },
{ 0x00000000, 0xffffffcf, 0x80000001 },
{ 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa },
{ 0x00000000, 0x66666666, 0xcccccccc },
{ 0x00000000, 0x000fffe0, 0xffff8000 },
{ 0x00000000, 0x000fffc0, 0xffff8001 },
{ 0x00000000, 0x000fffa0, 0xffff8002 },
{ 0x00000000, 0x000fff80, 0xffff8003 },
{ 0x00000000, 0x00000fe0, 0xffffff80 },
{ 0x00000000, 0x00000fc0, 0xffffff81 },
{ 0x00000000, 0x00000fa0, 0xffffff82 },
{ 0x00000000, 0x00000f80, 0xffffff83 },
{ 0x00000000, 0x000003e0, 0xffffffe0 },
{ 0x00000000, 0x00000040, 0xfffffffd },
{ 0x00000000, 0x00000020, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_28[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xffffffef, 0x00000001 },
{ 0x00000000, 0xffffffdf, 0x00000002 },
{ 0x00000000, 0xfffffdff, 0x00000020 },
{ 0x00000000, 0xfffff82f, 0x0000007d },
{ 0x00000000, 0xfffff81f, 0x0000007e },
{ 0x00000000, 0xfffff80f, 0x0000007f },
{ 0x00000000, 0xfff8002f, 0x00007ffd },
{ 0x00000000, 0xfff8001f, 0x00007ffe },
{ 0x00000000, 0xfff8000f, 0x00007fff },
{ 0x00000000, 0xcccccccc, 0x33333333 },
{ 0x00000000, 0xaaaaaaaa, 0x55555555 },
{ 0x00000000, 0x00000028, 0x7ffffffd },
{ 0x00000000, 0x00000018, 0x7ffffffe },
{ 0x00000000, 0x00000008, 0x7fffffff },
{ 0x00000000, 0xfffffff7, 0x80000000 },
{ 0x00000000, 0xffffffe7, 0x80000001 },
{ 0x00000000, 0x55555555, 0xaaaaaaaa },
{ 0x00000000, 0x33333333, 0xcccccccc },
{ 0x00000000, 0x0007fff0, 0xffff8000 },
{ 0x00000000, 0x0007ffe0, 0xffff8001 },
{ 0x00000000, 0x0007ffd0, 0xffff8002 },
{ 0x00000000, 0x0007ffc0, 0xffff8003 },
{ 0x00000000, 0x000007f0, 0xffffff80 },
{ 0x00000000, 0x000007e0, 0xffffff81 },
{ 0x00000000, 0x000007d0, 0xffffff82 },
{ 0x00000000, 0x000007c0, 0xffffff83 },
{ 0x00000000, 0x000001f0, 0xffffffe0 },
{ 0x00000000, 0x00000020, 0xfffffffd },
{ 0x00000000, 0x00000010, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_29[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffffff7, 0x00000001 },
{ 0x00000000, 0xffffffef, 0x00000002 },
{ 0x00000000, 0xfffffeff, 0x00000020 },
{ 0x00000000, 0xfffffc17, 0x0000007d },
{ 0x00000000, 0xfffffc0f, 0x0000007e },
{ 0x00000000, 0xfffffc07, 0x0000007f },
{ 0x00000000, 0xfffc0017, 0x00007ffd },
{ 0x00000000, 0xfffc000f, 0x00007ffe },
{ 0x00000000, 0xfffc0007, 0x00007fff },
{ 0x00000000, 0x66666666, 0x33333333 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000014, 0x7ffffffd },
{ 0x00000000, 0x0000000c, 0x7ffffffe },
{ 0x00000000, 0x00000004, 0x7fffffff },
{ 0x00000000, 0xfffffffb, 0x80000000 },
{ 0x00000000, 0xfffffff3, 0x80000001 },
{ 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa },
{ 0x00000000, 0x99999999, 0xcccccccc },
{ 0x00000000, 0x0003fff8, 0xffff8000 },
{ 0x00000000, 0x0003fff0, 0xffff8001 },
{ 0x00000000, 0x0003ffe8, 0xffff8002 },
{ 0x00000000, 0x0003ffe0, 0xffff8003 },
{ 0x00000000, 0x000003f8, 0xffffff80 },
{ 0x00000000, 0x000003f0, 0xffffff81 },
{ 0x00000000, 0x000003e8, 0xffffff82 },
{ 0x00000000, 0x000003e0, 0xffffff83 },
{ 0x00000000, 0x000000f8, 0xffffffe0 },
{ 0x00000000, 0x00000010, 0xfffffffd },
{ 0x00000000, 0x00000008, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_30[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffffffb, 0x00000001 },
{ 0x00000000, 0xfffffff7, 0x00000002 },
{ 0x00000000, 0xffffff7f, 0x00000020 },
{ 0x00000000, 0xfffffe0b, 0x0000007d },
{ 0x00000000, 0xfffffe07, 0x0000007e },
{ 0x00000000, 0xfffffe03, 0x0000007f },
{ 0x00000000, 0xfffe000b, 0x00007ffd },
{ 0x00000000, 0xfffe0007, 0x00007ffe },
{ 0x00000000, 0xfffe0003, 0x00007fff },
{ 0x00000000, 0x33333333, 0x33333333 },
{ 0x00000000, 0xaaaaaaaa, 0x55555555 },
{ 0x00000000, 0x0000000a, 0x7ffffffd },
{ 0x00000000, 0x00000006, 0x7ffffffe },
{ 0x00000000, 0x00000002, 0x7fffffff },
{ 0x00000000, 0xfffffffd, 0x80000000 },
{ 0x00000000, 0xfffffff9, 0x80000001 },
{ 0x00000000, 0x55555555, 0xaaaaaaaa },
{ 0x00000000, 0xcccccccc, 0xcccccccc },
{ 0x00000000, 0x0001fffc, 0xffff8000 },
{ 0x00000000, 0x0001fff8, 0xffff8001 },
{ 0x00000000, 0x0001fff4, 0xffff8002 },
{ 0x00000000, 0x0001fff0, 0xffff8003 },
{ 0x00000000, 0x000001fc, 0xffffff80 },
{ 0x00000000, 0x000001f8, 0xffffff81 },
{ 0x00000000, 0x000001f4, 0xffffff82 },
{ 0x00000000, 0x000001f0, 0xffffff83 },
{ 0x00000000, 0x0000007c, 0xffffffe0 },
{ 0x00000000, 0x00000008, 0xfffffffd },
{ 0x00000000, 0x00000004, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const Inputs kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_31[] = {
{ 0x00000000, 0xffffffff, 0x00000000 },
{ 0x00000000, 0xfffffffd, 0x00000001 },
{ 0x00000000, 0xfffffffb, 0x00000002 },
{ 0x00000000, 0xffffffbf, 0x00000020 },
{ 0x00000000, 0xffffff05, 0x0000007d },
{ 0x00000000, 0xffffff03, 0x0000007e },
{ 0x00000000, 0xffffff01, 0x0000007f },
{ 0x00000000, 0xffff0005, 0x00007ffd },
{ 0x00000000, 0xffff0003, 0x00007ffe },
{ 0x00000000, 0xffff0001, 0x00007fff },
{ 0x00000000, 0x99999999, 0x33333333 },
{ 0x00000000, 0x55555555, 0x55555555 },
{ 0x00000000, 0x00000005, 0x7ffffffd },
{ 0x00000000, 0x00000003, 0x7ffffffe },
{ 0x00000000, 0x00000001, 0x7fffffff },
{ 0x00000000, 0xfffffffe, 0x80000000 },
{ 0x00000000, 0xfffffffc, 0x80000001 },
{ 0x00000000, 0xaaaaaaaa, 0xaaaaaaaa },
{ 0x00000000, 0x66666666, 0xcccccccc },
{ 0x00000000, 0x0000fffe, 0xffff8000 },
{ 0x00000000, 0x0000fffc, 0xffff8001 },
{ 0x00000000, 0x0000fffa, 0xffff8002 },
{ 0x00000000, 0x0000fff8, 0xffff8003 },
{ 0x00000000, 0x000000fe, 0xffffff80 },
{ 0x00000000, 0x000000fc, 0xffffff81 },
{ 0x00000000, 0x000000fa, 0xffffff82 },
{ 0x00000000, 0x000000f8, 0xffffff83 },
{ 0x00000000, 0x0000003e, 0xffffffe0 },
{ 0x00000000, 0x00000004, 0xfffffffd },
{ 0x00000000, 0x00000002, 0xfffffffe },
{ 0x00000000, 0x00000000, 0xffffffff },
};
const TestResult kReferenceMvn[] = {
{
ARRAY_SIZE(kOutputs_Mvn_Condition_eq_r0_r0_LSL_1),
kOutputs_Mvn_Condition_eq_r0_r0_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_Condition_ne_r0_r0_LSL_1),
kOutputs_Mvn_Condition_ne_r0_r0_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_Condition_cs_r0_r0_LSL_1),
kOutputs_Mvn_Condition_cs_r0_r0_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_Condition_cc_r0_r0_LSL_1),
kOutputs_Mvn_Condition_cc_r0_r0_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_Condition_mi_r0_r0_LSL_1),
kOutputs_Mvn_Condition_mi_r0_r0_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_Condition_pl_r0_r0_LSL_1),
kOutputs_Mvn_Condition_pl_r0_r0_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_Condition_vs_r0_r0_LSL_1),
kOutputs_Mvn_Condition_vs_r0_r0_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_Condition_vc_r0_r0_LSL_1),
kOutputs_Mvn_Condition_vc_r0_r0_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_Condition_hi_r0_r0_LSL_1),
kOutputs_Mvn_Condition_hi_r0_r0_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_Condition_ls_r0_r0_LSL_1),
kOutputs_Mvn_Condition_ls_r0_r0_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_Condition_ge_r0_r0_LSL_1),
kOutputs_Mvn_Condition_ge_r0_r0_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_Condition_lt_r0_r0_LSL_1),
kOutputs_Mvn_Condition_lt_r0_r0_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_Condition_gt_r0_r0_LSL_1),
kOutputs_Mvn_Condition_gt_r0_r0_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_Condition_le_r0_r0_LSL_1),
kOutputs_Mvn_Condition_le_r0_r0_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_Condition_al_r0_r0_LSL_1),
kOutputs_Mvn_Condition_al_r0_r0_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsRn_al_r0_r0_LSL_1),
kOutputs_Mvn_RdIsRn_al_r0_r0_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsRn_al_r1_r1_LSL_1),
kOutputs_Mvn_RdIsRn_al_r1_r1_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsRn_al_r2_r2_LSL_1),
kOutputs_Mvn_RdIsRn_al_r2_r2_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsRn_al_r3_r3_LSL_1),
kOutputs_Mvn_RdIsRn_al_r3_r3_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsRn_al_r4_r4_LSL_1),
kOutputs_Mvn_RdIsRn_al_r4_r4_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsRn_al_r5_r5_LSL_1),
kOutputs_Mvn_RdIsRn_al_r5_r5_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsRn_al_r6_r6_LSL_1),
kOutputs_Mvn_RdIsRn_al_r6_r6_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsRn_al_r7_r7_LSL_1),
kOutputs_Mvn_RdIsRn_al_r7_r7_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsRn_al_r8_r8_LSL_1),
kOutputs_Mvn_RdIsRn_al_r8_r8_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsRn_al_r9_r9_LSL_1),
kOutputs_Mvn_RdIsRn_al_r9_r9_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsRn_al_r10_r10_LSL_1),
kOutputs_Mvn_RdIsRn_al_r10_r10_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsRn_al_r11_r11_LSL_1),
kOutputs_Mvn_RdIsRn_al_r11_r11_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsRn_al_r12_r12_LSL_1),
kOutputs_Mvn_RdIsRn_al_r12_r12_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsRn_al_r14_r14_LSL_1),
kOutputs_Mvn_RdIsRn_al_r14_r14_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsNotRn_al_r1_r8_LSL_1),
kOutputs_Mvn_RdIsNotRn_al_r1_r8_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsNotRn_al_r7_r4_LSL_1),
kOutputs_Mvn_RdIsNotRn_al_r7_r4_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsNotRn_al_r14_r10_LSL_1),
kOutputs_Mvn_RdIsNotRn_al_r14_r10_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsNotRn_al_r10_r6_LSL_1),
kOutputs_Mvn_RdIsNotRn_al_r10_r6_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsNotRn_al_r6_r5_LSL_1),
kOutputs_Mvn_RdIsNotRn_al_r6_r5_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsNotRn_al_r12_r2_LSL_1),
kOutputs_Mvn_RdIsNotRn_al_r12_r2_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsNotRn_al_r0_r11_LSL_1),
kOutputs_Mvn_RdIsNotRn_al_r0_r11_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsNotRn_al_r10_r14_LSL_1),
kOutputs_Mvn_RdIsNotRn_al_r10_r14_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsNotRn_al_r0_r5_LSL_1),
kOutputs_Mvn_RdIsNotRn_al_r0_r5_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_RdIsNotRn_al_r0_r3_LSL_1),
kOutputs_Mvn_RdIsNotRn_al_r0_r3_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_1),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_2),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_2,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_3),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_3,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_4),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_4,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_5),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_5,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_6),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_6,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_7),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_7,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_8),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_8,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_9),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_9,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_10),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_10,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_11),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_11,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_12),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_12,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_13),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_13,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_14),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_14,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_15),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_15,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_16),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_16,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_17),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_17,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_18),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_18,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_19),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_19,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_20),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_20,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_21),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_21,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_22),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_22,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_23),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_23,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_24),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_24,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_25),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_25,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_26),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_26,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_27),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_27,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_28),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_28,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_29),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_29,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_30),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_30,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_31),
kOutputs_Mvn_ShiftTypes_al_r0_r1_LSL_31,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_1),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_1,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_2),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_2,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_3),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_3,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_4),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_4,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_5),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_5,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_6),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_6,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_7),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_7,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_8),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_8,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_9),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_9,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_10),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_10,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_11),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_11,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_12),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_12,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_13),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_13,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_14),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_14,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_15),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_15,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_16),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_16,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_17),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_17,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_18),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_18,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_19),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_19,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_20),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_20,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_21),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_21,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_22),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_22,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_23),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_23,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_24),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_24,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_25),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_25,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_26),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_26,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_27),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_27,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_28),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_28,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_29),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_29,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_30),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_30,
},
{
ARRAY_SIZE(kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_31),
kOutputs_Mvn_ShiftTypes_al_r0_r1_ROR_31,
},
};
#endif // VIXL_SIMULATOR_COND_RD_OPERAND_RN_SHIFT_AMOUNT_1TO31_MVN_T32_H_
| 96,374 |
1,966 | <filename>tests/code_quality/if.c
void if_1()
{
int a = 5;
int b = 2;
int c = 4;
if ( a > b )
{
return;
}
else if ( c <= a)
{
a = 0;
}
(void)(a);
(void)(b);
(void)(c);
}
| 107 |
413 | <filename>reproc++/examples/run.cpp
#include <iostream>
#include <reproc++/run.hpp>
// Equivalent to reproc's run example but implemented using reproc++.
int main(int argc, const char **argv)
{
(void) argc;
int status = -1;
std::error_code ec;
reproc::options options;
options.redirect.parent = true;
options.deadline = reproc::milliseconds(5000);
std::tie(status, ec) = reproc::run(argv + 1, options);
if (ec) {
std::cerr << ec.message() << std::endl;
}
return ec ? ec.value() : status;
}
| 196 |
826 | <reponame>CYXiang/TenMinDemo<gh_stars>100-1000
//
// CYXNewfeatureCell.h
// CYCollectionViewTest
//
// Created by apple开发 on 16/3/4.
// Copyright © 2016年 cyx. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface CYXNewfeatureCell : UICollectionViewCell
@property (strong, nonatomic) UIImage *image;
- (void)setIndexPath:(NSIndexPath *)indexPath count:(NSInteger)count;
@end
| 149 |
2,331 | <filename>tests/__init__.py
def setup_module(module):
print('setup_module')
def teardown_module(module):
print('teardown_module')
| 52 |
746 | /*
* Copyright 2017 JBoss Inc
*
* 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.
*/
package io.apicurio.hub.api.rest.impl;
import org.junit.After;
import org.junit.Assert;
import org.junit.Before;
import org.junit.Test;
import io.apicurio.hub.api.rest.ICurrentUserResource;
import io.apicurio.studio.shared.beans.User;
import io.apicurio.test.core.TestUtil;
import test.io.apicurio.hub.api.MockSecurityContext;
/**
* @author <EMAIL>
*/
public class CurrentUserResourceTest {
private ICurrentUserResource resource;
@Before
public void setUp() {
resource = new CurrentUserResource();
TestUtil.setPrivateField(resource, "security", new MockSecurityContext());
}
@After
public void tearDown() throws Exception {
}
@Test
public void testGetCurrentUser() {
User user = resource.getCurrentUser();
Assert.assertNotNull(user);
Assert.assertEquals("avatar.jpg", user.getAvatar());
Assert.assertEquals("<EMAIL>", user.getEmail());
Assert.assertEquals(1, user.getId());
Assert.assertEquals("user", user.getLogin());
Assert.assertEquals("User", user.getName());
}
}
| 595 |
458 | <reponame>swimos/swim
// Copyright 2015-2021 Swim Inc.
//
// 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.
package swim.protobuf.reflection;
import swim.collections.BTree;
import swim.protobuf.schema.ProtobufVarintType;
final class EnumReflection<T extends Enum<T>> extends ProtobufVarintType<T> {
final BTree<Integer, T> constants;
EnumReflection(BTree<Integer, T> constants) {
this.constants = constants;
}
public int constantCount() {
return this.constants.size();
}
public String getConstant(int ordinal) {
return this.constants.get(ordinal).name();
}
@Override
public T cast(long ordinal) {
return this.constants.get((int) ordinal);
}
static <T extends Enum<T>> EnumReflection<T> fromType(Class<T> type) {
BTree<Integer, T> constants = BTree.empty();
final T[] values = type.getEnumConstants();
for (int i = 0, n = values.length; i < n; i += 1) {
final T value = values[i];
constants = constants.updated(value.ordinal(), value);
}
return new EnumReflection<T>(constants);
}
}
| 515 |
798 | // decoder/decodable-matrix.h
// Copyright 2009-2011 Microsoft Corporation
// 2013 Johns Hopkins University (author: <NAME>)
// Copyright 2015 <NAME>
// See ../../COPYING for clarification regarding multiple authors
//
// 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
//
// THIS CODE IS PROVIDED *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
// KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
// WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
// MERCHANTABLITY OR NON-INFRINGEMENT.
// See the Apache 2 License for the specific language governing permissions and
// limitations under the License.
#ifndef KALDI_DECODER_DECODABLE_MATRIX_H_
#define KALDI_DECODER_DECODABLE_MATRIX_H_
#include <vector>
#include "base/kaldi-common.h"
#include "decoder/decodable-itf.h"
namespace eesen {
// Yajie deleted the DecodableMatrixScaledMapped class simply because we don't need it
// for CTC decoding.
class DecodableMatrixScaled: public DecodableInterface {
public:
DecodableMatrixScaled(const Matrix<BaseFloat> &likes,
BaseFloat scale): likes_(likes),
scale_(scale) { }
virtual int32 NumFramesReady() const { return likes_.NumRows(); }
virtual bool IsLastFrame(int32 frame) const {
KALDI_ASSERT(frame < NumFramesReady());
return (frame == NumFramesReady() - 1);
}
// Note, frames are numbered from zero. Here "tid" means token id, the indexes of the
// CTC label tokens. When we compile the search graph, the tokens are indexed from 1
// because 0 is always occupied by <eps>. However, in the softmax layer of the RNN
// model, CTC tokens are indexed from 0. Thus, we simply shift "tid" by 1, to solve
// the mismatch.
virtual BaseFloat LogLikelihood(int32 frame, int32 tid) {
return scale_ * likes_(frame, tid-1);
}
// Indices are one-based! This is for compatibility with OpenFst.
virtual int32 NumIndices() const { return likes_.NumCols(); }
private:
const Matrix<BaseFloat> &likes_;
BaseFloat scale_;
KALDI_DISALLOW_COPY_AND_ASSIGN(DecodableMatrixScaled);
};
} // namespace eesen
#endif // KALDI_DECODER_DECODABLE_MATRIX_H_
| 833 |
732 | <gh_stars>100-1000
package io.eventuate.tram.common.spring.inmemory;
import io.eventuate.tram.inmemory.EventuateTransactionSynchronizationManager;
import org.springframework.transaction.support.TransactionSynchronizationAdapter;
import org.springframework.transaction.support.TransactionSynchronizationManager;
public class EventuateSpringTransactionSynchronizationManager
implements EventuateTransactionSynchronizationManager {
@Override
public boolean isTransactionActive() {
return TransactionSynchronizationManager.isActualTransactionActive();
}
@Override
public void executeAfterTransaction(Runnable callback) {
TransactionSynchronizationManager.registerSynchronization(new TransactionSynchronizationAdapter() {
@Override
public void afterCommit() {
callback.run();
}
});
}
}
| 237 |
643 | <reponame>abhijitsri007/LoginRegister
package com.hellokoding.validation;
import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;
public class ProductCodeExistingValidator implements ConstraintValidator<ProductCodeExisting, String> {
@Override
public boolean isValid(String productCode, ConstraintValidatorContext context) {
return productCode.equals("P1") || productCode.equals("P2");
}
}
| 146 |
892 | {
"schema_version": "1.2.0",
"id": "GHSA-7rpj-hpvp-vvv6",
"modified": "2022-05-13T01:06:02Z",
"published": "2022-05-13T01:06:02Z",
"aliases": [
"CVE-2017-9521"
],
"details": "The Comcast firmware on Cisco DPC3939 (firmware version dpc3939-P20-18-v303r20421733-160420a-CMCST); Cisco DPC3939 (firmware version dpc3939-P20-18-v303r20421746-170221a-CMCST); Cisco DPC3939B (firmware version dpc3939b-v303r204217-150321a-CMCST); Cisco DPC3941T (firmware version DPC3941_2.5s3_PROD_sey); and Arris TG1682G (eMTA&DOCSIS version 10.0.132.SIP.PC20.CT, software version TG1682_2.2p7s2_PROD_sey) devices allows remote attackers to execute arbitrary code via a specific (but unstated) exposed service. NOTE: the scope of this CVE does NOT include the concept of \"Unnecessary Services\" in general; the scope is only a single service that is unnecessarily exposed, leading to remote code execution. The details of that service might be disclosed at a later date.",
"severity": [
{
"type": "CVSS_V3",
"score": "CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H"
}
],
"affected": [
],
"references": [
{
"type": "ADVISORY",
"url": "https://nvd.nist.gov/vuln/detail/CVE-2017-9521"
},
{
"type": "WEB",
"url": "https://github.com/BastilleResearch/CableTap/blob/master/doc/advisories/bastille-32.unnecessary-services.txt"
}
],
"database_specific": {
"cwe_ids": [
],
"severity": "CRITICAL",
"github_reviewed": false
}
} | 646 |
704 | package com.java2nb.novel.common.base;
import com.java2nb.novel.common.bean.UserDetails;
import com.java2nb.novel.common.utils.CookieUtil;
import com.java2nb.novel.common.utils.JwtTokenUtil;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import javax.servlet.http.HttpServletRequest;
/**
* 基础Controller
* @author xiongxiaoyang
* @version 1.0
* @since 2020/5/27
*/
public class BaseController {
protected JwtTokenUtil jwtTokenUtil;
/**
* 获取登陆token
* */
protected String getToken(HttpServletRequest request){
String token = CookieUtil.getCookie(request,"Authorization");
if(token != null){
return token;
}
return request.getHeader("Authorization");
}
/**
* 获取登陆用户信息
* */
protected UserDetails getUserDetails(HttpServletRequest request) {
String token = getToken(request);
if(StringUtils.isBlank(token)){
return null;
}else{
return jwtTokenUtil.getUserDetailsFromToken(token);
}
}
@Autowired
public void setJwtTokenUtil(JwtTokenUtil jwtTokenUtil) {
this.jwtTokenUtil = jwtTokenUtil;
}
}
| 541 |
322 | <reponame>qtwre/Open-Vehicle-Monitoring-System-3
/* dcp_port.h
*
* Copyright (C) 2006-2020 wolfSSL Inc.
*
* This file is part of wolfSSL.
*
* wolfSSL is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* wolfSSL is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1335, USA
*/
#ifndef _DCP_PORT_H_
#define _DCP_PORT_H_
#include <wolfssl/wolfcrypt/settings.h>
#ifdef USE_FAST_MATH
#include <wolfssl/wolfcrypt/tfm.h>
#elif defined WOLFSSL_SP_MATH
#include <wolfssl/wolfcrypt/sp_int.h>
#else
#include <wolfssl/wolfcrypt/integer.h>
#endif
#include <wolfssl/wolfcrypt/aes.h>
#include <wolfssl/wolfcrypt/error-crypt.h>
#include "fsl_device_registers.h"
#include "fsl_debug_console.h"
#include "fsl_dcp.h"
int wc_dcp_init(void);
#ifndef NO_AES
int DCPAesInit(Aes* aes);
void DCPAesFree(Aes *aes);
int DCPAesSetKey(Aes* aes, const byte* key, word32 len, const byte* iv,
int dir);
int DCPAesCbcEncrypt(Aes* aes, byte* out, const byte* in, word32 sz);
int DCPAesCbcDecrypt(Aes* aes, byte* out, const byte* in, word32 sz);
#endif
#ifdef HAVE_AES_ECB
int DCPAesEcbEncrypt(Aes* aes, byte* out, const byte* in, word32 sz);
int DCPAesEcbDecrypt(Aes* aes, byte* out, const byte* in, word32 sz);
#endif
#ifndef NO_SHA256
typedef struct wc_Sha256_DCP {
dcp_handle_t handle;
dcp_hash_ctx_t ctx;
} wc_Sha256;
#define WC_SHA256_TYPE_DEFINED
void DCPSha256Free(wc_Sha256 *sha256);
#endif
#ifndef NO_SHA
typedef struct wc_Sha_DCP {
dcp_handle_t handle;
dcp_hash_ctx_t ctx;
} wc_Sha;
#define WC_SHA_TYPE_DEFINED
void DCPShaFree(wc_Sha *sha);
#endif
#endif
| 873 |
1,319 | # Copyright (c) 2020 PaddlePaddle Authors. All Rights Reserve.
#
#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.
import os
import wget
import tarfile
__all__ = ['decompress', 'download', 'AttrDict']
def decompress(path):
t = tarfile.open(path)
t.extractall(path=os.path.split(path)[0])
t.close()
os.remove(path)
def download(url, path):
weight_dir = os.path.split(path)[0]
if not os.path.exists(weight_dir):
os.makedirs(weight_dir)
path = path + ".tar.gz"
wget.download(url, path)
decompress(path)
class AttrDict(dict):
def __getattr__(self, key):
return self[key]
def __setattr__(self, key, value):
if key in self.__dict__:
self.__dict__[key] = value
else:
self[key] = value
| 474 |
413 | <reponame>DaanDeMeyer/cpp-process-library
#include <reproc/run.h>
#include "assert.h"
int main(void)
{
const char *argv[] = { RESOURCE_DIRECTORY "/argv", "\"argument 1\"",
"\"argument 2\"", NULL };
char *output = NULL;
reproc_sink sink = reproc_sink_string(&output);
int r = -1;
r = reproc_run_ex(argv, (reproc_options){ 0 }, sink, sink);
ASSERT_OK(r);
ASSERT(output != NULL);
const char *current = output;
for (size_t i = 0; i < 3; i++) {
size_t size = strlen(argv[i]);
ASSERT_GE_SIZE(strlen(current), size);
ASSERT_EQ_MEM(current, argv[i], size);
current += size;
current += *current == '\r';
current += *current == '\n';
}
ASSERT_EQ_SIZE(strlen(current), (size_t) 0);
reproc_free(output);
}
| 339 |
3,055 | /*
Fontname: -Adobe-New Century Schoolbook-Medium-R-Normal--34-240-100-100-P-181-ISO10646-1
Copyright: Copyright (c) 1984, 1987 Adobe Systems Incorporated. All Rights Reserved. Copyright (c) 1988, 1991 Digital Equipment Corporation. All Rights Reserved.
Glyphs: 18/756
BBX Build Mode: 0
*/
const uint8_t u8g2_font_ncenR24_tn[537] U8G2_FONT_SECTION("u8g2_font_ncenR24_tn") =
"\22\0\4\4\5\5\3\5\6\23\37\377\372\31\371\31\374\0\0\0\0\1\374 \6\0\64\246\0*\33\314"
"y\307%T*\61B\214\10\31\241\310X\251$C\204\224\21\62J\250T\0+\20\60\372\321'\134\276"
"{\360@\234p\371\35\0,\17EY\245\61B\5\31I$\31\22\10\0-\10h\364\256\360 \1."
"\12\204\30\246!\2\205\10\0/\32*\17\246(;\201\322\11\224N\240t\2\245\23(\235@\351\4J"
"'\20\0\60%\20\33\312F\24\335\240aR\15\33C\214\310\300\21\4\361\37\222\30\70\204\30\231a\243"
"\204\11\33\64\16)\61\0\61\16\15\37\312&t\24\322\371\377_\26j\62)\17\27\312eN\321\260!"
"\2I\14\34An\4\271\21\344\206\210#;x\354X\262\363,\320\270\60\343\204\14\24\361\340\201\3\63"
"'\17\27\312eN\321\250\61\343\206\20\33Bl\214\270\301c'%\210\266\60\341\301$D\36\274\356\340"
"\20Be\324\231\2\64+\20\27\312*\134\364`\262\225\212\30)d\244\220\201b\306\11\32'h\230\250"
"Q\302F\11\33$n\320\203\7\42G\317\270d\12\0\65'\16\33\312\62.\314\32E\251\4\13\16,"
"\15)\21h\312\20\31\66D\34\331Y\10<w\331\271!\243\210\254\62\5\0\66/\17\27\312fN\321"
"\240\42\303\210\14#\42P\310\340i\311\20\42\201\344\14\11S#\212!\274p\304\300\21\3G\214#\62"
"l\314(B\11K\1\67\35\15\37\312\360\301\312\20\2E\204\14\22PH\300\260\222\212\225T\254\244\263"
"\244Sa\0\70/\17\27\312eN\21\241\311\206\214\33\62P\310@!\304\4\21\32db\30\312\203\250"
"F\234\31Td\34\211q'\255\34\61n\10)\62\313\16\1\71/\17\27\312dN\21\65\303\206\20#"
"\61p\304\300\21\3\17\242CV\202\220\11BFP\220\61B\226\354\340!\342\206\20\33Bj\14U\351"
"\314\1:\17\4\36\246!\2\205x\210D\240\20\1\0\0\0\0\4\377\377\0";
| 1,095 |
560 | #include <string>
namespace chapter_01 {
bool palindromePermutation(const std::string& input);
}
| 33 |
478 | <reponame>shubho/gtn
/*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*/
#define CATCH_CONFIG_MAIN
#include <functional>
#include "catch.hpp"
#include "gtn/autograd.h"
#include "gtn/creations.h"
#include "gtn/functions.h"
#include "gtn/graph.h"
#include "gtn/rand.h"
#include "gtn/utils.h"
using namespace gtn;
bool isclose(float a, float b, float relTol = 1e-5, float absTol = 1e-3) {
return std::abs(a - b) <=
std::max(relTol * std::max(std::abs(a), std::abs(b)), absTol);
}
using ForwardFunction = std::function<Graph(Graph)>;
// Currently assumes that func returns a scalar graph.
bool numericalGradCheck(
const ForwardFunction& func,
Graph& input,
float epsilon,
float relTol) {
// Numerical gradient check.
bool gradPass = true;
for (auto a = 0; a < input.numArcs(); ++a) {
auto weight = input.weight(a);
input.setWeight(a, weight + epsilon);
auto high = func(input).item();
input.setWeight(a, weight - epsilon);
auto low = func(input).item();
auto numgrad = (high - low) / (2 * epsilon);
gradPass &= isclose(input.grad().weight(a), numgrad, relTol);
input.setWeight(a, weight);
}
return gradPass;
}
TEST_CASE("Test Autograd", "[autograd]") {
// The graph is not retained by default
auto g1 = scalarGraph(3.0);
auto g2 = scalarGraph(3.0);
auto result = add(g1, g2);
backward(result);
CHECK(result.inputs().empty());
// Cannot backward twice when graph is cleared.
CHECK_THROWS(backward(result));
// Check the graph is retained
g1.zeroGrad();
g2.zeroGrad();
result = add(g1, g2);
backward(result, true);
CHECK(result.inputs().size() == 2);
result.zeroGrad();
g1.zeroGrad();
g2.zeroGrad();
backward(result, true);
CHECK(g1.grad().item() == 1.0);
CHECK(g2.grad().item() == 1.0);
// Check that provided input gradients are used.
g1.zeroGrad();
g2.zeroGrad();
result = add(g1, g2);
Graph deltas;
deltas.addNode(true);
deltas.addNode(false, true);
deltas.addArc(0, 1, 0, 0, 7.0);
backward(result, deltas);
CHECK(g1.grad().item() == 7.0);
CHECK(g2.grad().item() == 7.0);
}
TEST_CASE("Test Scalar Ops Grad", "[functions.scalar (grad)]") {
auto g1 = scalarGraph(3.0);
auto result = negate(g1);
backward(result);
CHECK(g1.grad().item() == -1.0f);
g1.zeroGrad();
auto g2 = scalarGraph(4.0);
result = add(g1, g2);
backward(result);
CHECK(g1.grad().item() == 1.0f);
CHECK(g2.grad().item() == 1.0f);
g1.zeroGrad();
g2.zeroGrad();
result = subtract(g1, g2);
backward(result);
CHECK(g1.grad().item() == 1.0f);
CHECK(g2.grad().item() == -1.0f);
g1.zeroGrad();
g2.zeroGrad();
result = add(add(g1, g2), g1);
backward(result);
CHECK(g1.grad().item() == 2.0f);
CHECK(g2.grad().item() == 1.0f);
g1.zeroGrad();
auto g2nograd = scalarGraph(4.0, /* calcGrad = */ false);
result = add(g1, g2nograd);
backward(result);
CHECK(g1.grad().item() == 1.0f);
CHECK_THROWS(g2nograd.grad());
}
TEST_CASE("Test Clone/Project Grad", "[functions.clone (grad)]") {
auto g1 = scalarGraph(3.0);
auto g2 = scalarGraph(4.0);
auto cloned = clone(g1);
auto result = add(g1, g2);
backward(result);
// Cloned wasn't used in the computation
CHECK_THROWS(cloned.grad());
// Cloned was used in the computation
g1.zeroGrad();
g2.zeroGrad();
result = add(cloned, g2);
backward(result);
CHECK(equal(cloned.grad(), g1.grad()));
}
TEST_CASE("Test Compose Grad", "[functions.compose (grad)]") {
Graph first;
first.addNode(true);
first.addNode();
first.addNode();
first.addNode();
first.addNode(false, true);
first.addArc(0, 1, 0, 0, 0);
first.addArc(0, 1, 1, 1, 1);
first.addArc(0, 1, 2, 2, 2);
first.addArc(1, 2, 0, 0, 0);
first.addArc(1, 2, 1, 1, 1);
first.addArc(1, 2, 2, 2, 2);
first.addArc(2, 3, 0, 0, 0);
first.addArc(2, 3, 1, 1, 1);
first.addArc(2, 3, 2, 2, 2);
first.addArc(3, 4, 0, 0, 0);
first.addArc(3, 4, 1, 1, 1);
first.addArc(3, 4, 2, 2, 2);
Graph second;
second.addNode(true);
second.addNode();
second.addNode(false, true);
second.addArc(0, 1, 0, 0, 3.5);
second.addArc(1, 1, 0, 0, 2.5);
second.addArc(1, 2, 1, 1, 1.5);
second.addArc(2, 2, 1, 1, 4.5);
Graph composed = compose(first, second);
backward(composed);
std::vector<float> gradsFirst = {1, 0, 0, 1, 1, 0, 1, 2, 0, 0, 2, 0};
std::vector<float> gradsSecond = {1, 2, 3, 2};
for (int i = 0; i < gradsFirst.size(); i++) {
CHECK(gradsFirst[i] == first.grad().weight(i));
}
for (int i = 0; i < gradsSecond.size(); i++) {
CHECK(gradsSecond[i] == second.grad().weight(i));
}
}
TEST_CASE("Test Compose Epsilon Grad", "[functions.compose_epsilon (grad)]") {
Graph first;
first.addNode(true);
first.addNode(false, true);
first.addArc(0, 0, 0, 3, 0);
first.addArc(0, 1, 1, 4, 0);
first.addArc(1, 1, 2, 5, 0);
first.addArc(0, 1, 2, gtn::epsilon, 0);
Graph second;
second.addNode(true);
second.addNode();
second.addNode();
second.addNode(false, true);
second.addArc(0, 1, 3, 0, 0);
second.addArc(0, 1, 3, 1, 0);
second.addArc(0, 1, 4, 2, 0);
second.addArc(0, 1, gtn::epsilon, 2, 0.0); // idx 3
second.addArc(1, 2, 3, 0, 0);
second.addArc(1, 2, 4, 1, 0);
second.addArc(1, 2, 5, 2, 0);
second.addArc(1, 2, gtn::epsilon, 2, 0.0); // idx 7
second.addArc(2, 3, 4, 0, 0);
second.addArc(2, 3, 5, 1, 0);
second.addArc(2, 3, 5, 2, 0);
second.addArc(2, 3, gtn::epsilon, 2, 0.0); // idx 11
Graph expected =
loadTxt(std::stringstream("0\n"
"6\n"
"0 1 0 0 0\n"
"0 1 0 1 0\n"
"0 3 2 -1 0\n"
"0 4 1 2 0\n"
"1 2 0 0 0\n"
"1 4 2 -1 0\n"
"1 5 1 1 0\n"
"2 5 2 -1 0\n"
"2 6 1 0 0\n"
"3 4 -1 2 0\n"
"4 5 2 2 0\n"
"4 5 -1 2 0\n"
"5 6 2 1 0\n"
"5 6 2 2 0\n"
"5 6 -1 2 0\n"));
Graph composed = compose(first, second);
CHECK(randEquivalent(composed, expected));
backward(composed);
auto& grad1 = first.grad();
auto& grad2 = second.grad();
std::vector<float> expectedFirstGrad = {3, 3, 3, 3};
std::vector<float> expectedSecondGrad = {1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1};
for (size_t i = 0; i < grad1.numArcs(); ++i) {
CHECK(grad1.weights()[i] == expectedFirstGrad[i]);
}
for (size_t i = 0; i < grad2.numArcs(); ++i) {
CHECK(grad2.weights()[i] == expectedSecondGrad[i]);
}
}
TEST_CASE("Test Grad Available", "[functions.isGradAvailable (grad)]") {
{
Graph g;
g.addNode(true);
g.addNode();
g.addNode(false, true);
g.addArc(0, 1, 0, 0, 1);
g.addArc(0, 1, 1, 1, 2);
g.addArc(0, 1, 2, 2, 3);
g.addArc(1, 2, 0, 0, 1);
g.addArc(1, 2, 1, 1, 2);
g.addArc(1, 2, 2, 2, 3);
CHECK(!g.isGradAvailable());
backward(forwardScore(g));
CHECK(g.isGradAvailable());
}
}
TEST_CASE("Test forwardScore Grad", "[functions.forwardScore (grad)]") {
{
Graph g;
g.addNode(true);
g.addNode();
g.addNode(false, true);
g.addArc(0, 1, 0, 0, 1);
g.addArc(0, 1, 1, 1, 2);
g.addArc(0, 1, 2, 2, 3);
g.addArc(1, 2, 0, 0, 1);
g.addArc(1, 2, 1, 1, 2);
g.addArc(1, 2, 2, 2, 3);
backward(forwardScore(g));
CHECK(numericalGradCheck(forwardScore, g, 1e-3, 1e-3));
}
{
// Handle two start nodes
Graph g;
g.addNode(true);
g.addNode(true);
g.addNode(false, true);
g.addArc(0, 1, 0, 0, -5);
g.addArc(0, 2, 0, 0, 1);
g.addArc(1, 2, 0, 0, 2);
backward(forwardScore(g));
CHECK(numericalGradCheck(forwardScore, g, 1e-3, 1e-3));
double denom = 1 / (std::exp(-3) + std::exp(1) + std::exp(2));
auto grad = g.grad();
CHECK(grad.weight(0) == Approx(denom * std::exp(-3)));
CHECK(grad.weight(1) == Approx(denom * std::exp(1)));
CHECK(grad.weight(2) == Approx(denom * (std::exp(-3) + std::exp(2))));
}
{
// Handle two accept nodes
Graph g;
g.addNode(true);
g.addNode(false, true);
g.addNode(false, true);
g.addArc(0, 1, 0, 0, 2);
g.addArc(0, 2, 0, 0, 2);
g.addArc(1, 2, 0, 0, 2);
backward(forwardScore(g));
CHECK(numericalGradCheck(forwardScore, g, 1e-3, 1e-3));
double denom = 1 / (2 * std::exp(2) + std::exp(4));
auto& grad = g.grad();
CHECK(grad.weight(0) == Approx(denom * (std::exp(2) + std::exp(4))));
CHECK(grad.weight(1) == Approx(denom * std::exp(2)));
CHECK(grad.weight(2) == Approx(denom * std::exp(4)));
}
{
// Handle case where some arcs don't lead to accepting states
Graph g;
g.addNode(true);
g.addNode(false, false);
g.addNode(false, true);
g.addArc(0, 1, 0, 0, 2);
g.addArc(0, 2, 0, 0, 2);
backward(forwardScore(g));
CHECK(numericalGradCheck(forwardScore, g, 1e-3, 1e-3));
auto& grad = g.grad();
CHECK(grad.weight(0) == Approx(0.0));
CHECK(grad.weight(1) == Approx(1.0));
}
const float inf = std::numeric_limits<float>::infinity();
{
// Handles negative infinity
Graph g;
g.addNode(true);
g.addNode(false, true);
g.addArc(0, 1, 0, 0, -inf);
g.addArc(0, 1, 1, 1, -inf);
backward(forwardScore(g));
auto& grad = g.grad();
CHECK(std::isnan(grad.weight(0)));
CHECK(std::isnan(grad.weight(1)));
Graph g2;
g2.addNode(true);
g2.addNode(false, true);
g2.addArc(0, 1, 0, 0, -inf);
g2.addArc(0, 1, 1, 1, 1.0);
backward(forwardScore(g2));
auto& grad2 = g2.grad();
CHECK(grad2.weight(0) == Approx(0.0));
CHECK(grad2.weight(1) == Approx(1.0));
}
{
// Handles infinity
Graph g;
g.addNode(true);
g.addNode(false, true);
g.addArc(0, 1, 0, 0, inf);
g.addArc(0, 1, 1, 1, inf);
backward(forwardScore(g));
auto& grad = g.grad();
CHECK(std::isnan(grad.weight(0)));
CHECK(std::isnan(grad.weight(1)));
Graph g2;
g2.addNode(true);
g2.addNode(false, true);
g2.addArc(0, 1, 0, 0, inf);
g2.addArc(0, 1, 1, 1, 1.0);
backward(forwardScore(g2));
auto& grad2 = g2.grad();
CHECK(std::isnan(grad2.weight(0)));
CHECK(std::isnan(grad2.weight(1)));
}
{
// A more complex test case
std::stringstream in(
"0 1\n"
"3 4\n"
"0 1 0 0 2\n"
"0 2 1 1 1\n"
"1 2 0 0 2\n"
"2 3 0 0 1\n"
"2 3 1 1 1\n"
"1 4 0 0 2\n"
"2 4 1 1 3\n"
"3 4 0 0 2\n");
Graph g = loadTxt(in);
backward(forwardScore(g));
CHECK(numericalGradCheck(forwardScore, g, 1e-3, 1e-3));
}
}
TEST_CASE("Test viterbiScore Grad", "[functions.viterbiScore (grad)]") {
auto gradsToVec = [](Graph g) {
std::vector<float> grads;
for (auto a = 0; a < g.numArcs(); ++a) {
grads.push_back(g.grad().weight(a));
}
return grads;
};
{
Graph g;
g.addNode(true);
g.addNode();
g.addNode(false, true);
g.addArc(0, 1, 0, 0, 1);
g.addArc(0, 1, 1, 1, 2);
g.addArc(0, 1, 2, 2, 3);
g.addArc(1, 2, 0, 0, 1);
g.addArc(1, 2, 1, 1, 2);
g.addArc(1, 2, 2, 2, 3);
backward(viterbiScore(g));
std::vector<float> expected = {0.0, 0.0, 1.0, 0.0, 0.0, 1.0};
CHECK(gradsToVec(g) == expected);
}
{
// Handle two start nodes
Graph g;
g.addNode(true);
g.addNode(true);
g.addNode(false, true);
g.addArc(0, 1, 0, 0, -5);
g.addArc(0, 2, 0, 0, 1);
g.addArc(1, 2, 0, 0, 2);
backward(viterbiScore(g));
std::vector<float> expected = {0.0, 0.0, 1.0};
CHECK(gradsToVec(g) == expected);
}
{
// Handle two accept nodes
Graph g;
g.addNode(true);
g.addNode(false, true);
g.addNode(false, true);
g.addArc(0, 1, 0, 0, 2);
g.addArc(0, 2, 0, 0, 2);
g.addArc(1, 2, 0, 0, 2);
backward(viterbiScore(g));
std::vector<float> expected = {1.0, 0.0, 1.0};
CHECK(gradsToVec(g) == expected);
}
{
// A more complex test case
std::stringstream in(
"0 1\n"
"3 4\n"
"0 1 0 0 2\n"
"0 2 1 1 1\n"
"1 2 0 0 2\n"
"2 3 0 0 1\n"
"2 3 1 1 1\n"
"1 4 0 0 2\n"
"2 4 1 1 3\n"
"3 4 0 0 2\n");
Graph g = loadTxt(in);
backward(viterbiScore(g));
// two possible paths with same viterbi score
std::vector<float> expected1 = {1.0, 0.0, 1.0, 0.0, 0.0, 0.0, 1.0, 0.0};
std::vector<float> expected2 = {1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 1.0};
CHECK(((gradsToVec(g) == expected1) || (gradsToVec(g) == expected2)));
}
}
TEST_CASE("Test viterbiPath Grad", "[functions.viterbiPath (grad)]") {
auto gradsToVec = [](Graph g) {
std::vector<float> grads;
for (auto a = 0; a < g.numArcs(); ++a) {
grads.push_back(g.grad().weight(a));
}
return grads;
};
{
std::stringstream in(
"0 1\n"
"3 4\n"
"0 1 0 0 2\n"
"0 2 1 1 1\n"
"1 2 0 0 2\n"
"2 3 0 0 1\n"
"2 3 1 1 3\n"
"1 4 0 0 2\n"
"2 4 1 1 3\n"
"3 4 0 0 2\n");
Graph g = loadTxt(in);
backward(viterbiPath(g));
std::vector<float> expected = {1.0, 0.0, 1.0, 0.0, 1.0, 0.0, 0.0, 1.0};
CHECK(gradsToVec(g) == expected);
g.zeroGrad();
auto forwardFn = [](Graph g) {
auto paths = {viterbiPath(g), viterbiPath(g), viterbiPath(g)};
return forwardScore(union_(paths));
};
backward(forwardFn(g));
CHECK(numericalGradCheck(forwardFn, g, 1e-2, 1e-5));
}
}
TEST_CASE("Test Sample Grad", "[rand.sample (grad)]") {
Graph g;
g.addNode(true);
g.addNode();
g.addNode(false, true);
g.addArc(0, 0, 0);
g.addArc(0, 1, 1);
g.addArc(1, 0, 2);
g.addArc(1, 2, 3);
for (int i = 0; i < 5; i++) {
g.zeroGrad();
auto path = sample(g);
// One for each arc in the original graph
std::vector<float> grads = {0.0, 0.0, 0.0, 0.0};
for (auto a = 0; a < path.numArcs(); ++a) {
grads[path.label(a)]++;
}
backward(path);
for (int i = 0; i < grads.size(); i++) {
CHECK(grads[i] == g.grad().weight(i));
}
}
}
TEST_CASE("Test Sum Grad", "[functions.union_ (grad)]") {
Graph g1;
g1.addNode(true);
g1.addNode();
g1.addNode(false, true);
g1.addArc(0, 1, 0);
g1.addArc(1, 2, 1);
// Works with a no gradient graph
Graph g2(false);
g2.addNode(true);
g2.addNode();
g2.addNode(false, true);
g2.addArc(0, 1, 0);
g2.addArc(1, 2, 1);
Graph g3;
g3.addNode(true);
g3.addNode();
g3.addNode(false, true);
g3.addArc(0, 1, 0);
g3.addArc(1, 2, 1);
backward(forwardScore(union_({g1, g2, g3})));
auto forwardFn1 = [g2, g3](Graph g) {
return forwardScore(union_({g, g2, g3}));
};
CHECK(numericalGradCheck(forwardFn1, g1, 1e-4, 1e-3));
auto forwardFn2 = [g1, g2](Graph g) {
return forwardScore(union_({g1, g2, g}));
};
CHECK(numericalGradCheck(forwardFn2, g3, 1e-4, 1e-3));
CHECK_THROWS(g2.grad());
}
TEST_CASE("Test Concat Grad", "[functions.concat (grad)]") {
Graph g1;
g1.addNode(true);
g1.addNode();
g1.addNode(false, true);
g1.addArc(0, 1, 0);
g1.addArc(1, 2, 1);
// Works with a no gradient graph
Graph g2(false);
g2.addNode(true);
g2.addNode();
g2.addNode(false, true);
g2.addArc(0, 1, 0);
g2.addArc(1, 2, 1);
Graph g3;
g3.addNode(true);
g3.addNode();
g3.addNode(false, true);
g3.addArc(0, 1, 0);
g3.addArc(1, 2, 1);
backward(forwardScore(concat({g1, g2, g3})));
auto forwardFn1 = [g2, g3](Graph g) {
return forwardScore(concat({g, g2, g3}));
};
CHECK(numericalGradCheck(forwardFn1, g1, 1e-4, 1e-3));
auto forwardFn2 = [g1, g2](Graph g) {
return forwardScore(concat({g1, g2, g}));
};
CHECK(numericalGradCheck(forwardFn2, g3, 1e-4, 1e-3));
CHECK_THROWS(g2.grad());
}
TEST_CASE("Test Closure Grad", "[functions.closure (grad)]") {
Graph g1;
g1.addNode(true);
g1.addNode(false, true);
g1.addArc(0, 1, 0, 0, 1.3);
g1.addArc(1, 1, 1, 1, 2.1);
Graph g2;
g2.addNode(true);
g2.addNode();
g2.addNode();
g2.addNode();
g2.addNode(false, true);
g2.addArc(0, 1, 0);
g2.addArc(0, 1, 1);
g2.addArc(1, 2, 0);
g2.addArc(1, 2, 1);
g2.addArc(2, 3, 0);
g2.addArc(2, 3, 1);
g2.addArc(3, 4, 0);
g2.addArc(3, 4, 1);
backward(forwardScore(compose(closure(g1), g2)));
auto forwardFn = [g2](Graph g) {
return forwardScore(compose(closure(g), g2));
};
CHECK(numericalGradCheck(forwardFn, g1, 1e-3, 1e-3));
}
| 8,330 |
819 | <reponame>Asteur/vrhelper
/*
Copyright 2017 Google Inc. All Rights Reserved.
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.
*/
#include "seurat/compressor/rgba/rgba_rate_resizer.h"
#include <algorithm>
#include <functional>
#include <vector>
#include "ion/math/vector.h"
#include "seurat/base/parallel.h"
#include "seurat/base/util.h"
#include "seurat/compressor/image_metrics/image_metrics.h"
#include "seurat/compressor/resampler/resampler.h"
#include "seurat/image/image_util.h"
namespace seurat {
namespace compressor {
using image::Image4f;
using ion::math::Vector2i;
namespace {
// Returns a downsampled version of |image| of size |target_size| computed with
// the given |downsampler|. The bitrate |rate| and the image |distortion| are
// also returned.
Image4f ComputeResizedImage(const Image4f& image, const Resampler& upsampler,
const Resampler& downsampler,
const Vector2i& target_size, float* rate,
float* distortion) {
Vector2i initial_size = image.GetSize();
const ion::gfx::Image::Format kUncompressed =
ion::gfx::Image::Format::kRgba8888;
if (target_size == initial_size) {
*rate = EvalBitrate(initial_size, kUncompressed);
*distortion = 0.0f;
return image;
}
Image4f resized_image = downsampler.Resample(image, target_size);
Image4f distorted_image = upsampler.Resample(resized_image, initial_size);
*rate = EvalBitrate(target_size, kUncompressed);
*distortion = EvalSSD(image, distorted_image);
return resized_image;
}
// Returns an array containing all resizings of |texture| allowed by the initial
// size of the texture and by the block size.
std::vector<EncodedTexture> ComputeAllResizings(const Image4f& texture,
const Resampler& upsampler,
const Resampler& downsampler,
const Vector2i& block_size) {
const Vector2i& initial_size = texture.GetSize();
// The number of blocks that fit in each direction.
Vector2i n_resizings((initial_size[0] + block_size[0] - 1) / block_size[0],
(initial_size[1] + block_size[1] - 1) / block_size[1]);
// Minimum size of a downsampled texture. This constraint follows from the
// half-texel border.
constexpr int kMinimumTargetSize = 2;
std::vector<EncodedTexture> all_resizings;
for (int i = 0; i < n_resizings[0]; ++i) {
for (int j = 0; j < n_resizings[1]; ++j) {
Vector2i target_size((i + 1) * block_size[0], (j + 1) * block_size[1]);
if (target_size[0] < kMinimumTargetSize ||
target_size[1] < kMinimumTargetSize) {
continue;
}
CHECK_LE(target_size[0], initial_size[0]);
CHECK_LE(target_size[1], initial_size[1]);
float rate;
float distortion;
Image4f resized_image = ComputeResizedImage(
texture, upsampler, downsampler, target_size, &rate, &distortion);
all_resizings.push_back({std::move(resized_image),
ion::gfx::Image::Format::kRgba8888, rate,
distortion});
}
}
return all_resizings;
}
// Discards resized versions of a texture that do not reduce the distortion
// when increasing the bitrate.
std::vector<EncodedTexture> FilterResizings(
std::vector<EncodedTexture>* raw_resizings) {
// Order from low to high bitrates.
std::sort(raw_resizings->begin(), raw_resizings->end(),
[](const EncodedTexture& a, const EncodedTexture& b) {
return a.rate < b.rate;
});
// Final list of resizing options.
std::vector<EncodedTexture> resizings;
// Minimum attained distortion
float min_distortion = std::numeric_limits<float>::infinity();
for (auto& resizing : *raw_resizings) {
// Discard a resizing with a distortion not smaller than min_distortion.
if (min_distortion <= resizing.distortion) {
continue;
}
min_distortion = resizing.distortion;
// Discard the last resizing in the array if the current resizing has the
// same rate at a lower distortion.
if (!resizings.empty() && resizing.rate == resizings.back().rate) {
resizings.pop_back();
}
// Add the current resizing to the final list.
resizings.push_back(std::move(resizing));
}
return resizings;
}
std::vector<EncodedTexture> ComputeSingleTextureResizingOptions(
const Image4f& texture, const Resampler& upsampler,
const Resampler& downsampler, const Vector2i& block_size) {
std::vector<EncodedTexture> all_resizings =
ComputeAllResizings(texture, upsampler, downsampler, block_size);
return FilterResizings(&all_resizings);
}
} // namespace
RgbaRateResizer::RgbaRateResizer(int thread_count,
std::unique_ptr<Resampler> upsampler,
std::unique_ptr<Resampler> downsampler,
const Vector2i& block_size)
: thread_count_(thread_count),
upsampler_(std::move(upsampler)),
downsampler_(std::move(downsampler)),
block_size_(block_size) {
CHECK_LT(0, block_size_[0]);
CHECK_LT(0, block_size_[1]);
}
void RgbaRateResizer::Encode(
absl::Span<const Image4f> textures,
absl::Span<std::vector<EncodedTexture>> resizing_options) const {
CHECK_EQ(textures.size(), resizing_options.size());
int n_textures = textures.size();
base::ParallelFor(thread_count_, n_textures, [&](int texture_index) {
resizing_options[texture_index] = ComputeSingleTextureResizingOptions(
textures[texture_index], *upsampler_, *downsampler_, block_size_);
});
}
} // namespace compressor
} // namespace seurat
| 2,486 |
326 | from typing import TYPE_CHECKING
import numba
import numpy as np
import pandas as pd
from etna.clustering.distances.base import Distance
if TYPE_CHECKING:
from etna.datasets import TSDataset
@numba.cfunc(numba.float64(numba.float64[:], numba.float64[:]))
def euclidean_distance(x1: np.ndarray, x2: np.ndarray) -> float:
"""Get euclidean distance between two arrays.
Parameters
----------
x1:
first array
x2:
second array
Returns
-------
float:
distance between x1 and x2
"""
return np.linalg.norm(x1 - x2)
class EuclideanDistance(Distance):
"""Euclidean distance handler."""
def __init__(self, trim_series: bool = True):
"""Init EuclideanDistance.
Parameters
----------
trim_series:
if True, compare parts of series with common timestamp
"""
super().__init__(trim_series=trim_series)
def _compute_distance(self, x1: np.ndarray, x2: np.ndarray) -> float:
"""Compute distance between x1 and x2."""
return euclidean_distance(x1=x1, x2=x2)
def _get_average(self, ts: "TSDataset") -> pd.DataFrame:
"""Get series that minimizes squared distance to given ones according to the euclidean distance.
Parameters
----------
ts:
TSDataset with series to be averaged
Returns
-------
pd.DataFrame:
dataframe with columns "timestamp" and "target" that contains the series
"""
centroid = pd.DataFrame({"timestamp": ts.index.values, "target": ts.df.mean(axis=1).values})
return centroid
__all__ = ["EuclideanDistance", "euclidean_distance"]
| 716 |
368 | <reponame>cuiguanghui/Team-Talk
//
// DDUserModule.h
// IOSDuoduo
//
// Created by 独嘉 on 14-5-26.
// Copyright (c) 2014年 dujia. All rights reserved.
//
#import <Foundation/Foundation.h>
#import "MTTUserEntity.h"
typedef void(^DDLoadRecentUsersCompletion)();
@interface DDUserModule : NSObject
@property (nonatomic,strong)NSString* currentUserID;
@property (nonatomic,strong)NSMutableDictionary* recentUsers;
+ (instancetype)shareInstance;
- (void)addMaintanceUser:(MTTUserEntity*)user;
- (void )getUserForUserID:(NSString*)userID Block:(void(^)(MTTUserEntity *user))block;
- (void)addRecentUser:(MTTUserEntity*)user;
- (void)loadAllRecentUsers:(DDLoadRecentUsersCompletion)completion;
-(void)clearRecentUser;
-(NSArray *)getAllMaintanceUser;
-(NSArray *)getAllUsersNick;
-(MTTUserEntity *)getUserByNick:(NSString*)nickName;
@end
| 305 |
1,091 | <filename>utils/misc/src/main/java/org/onlab/metrics/MetricsComponent.java
/*
* Copyright 2014-present Open Networking Foundation
*
* 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.
*/
package org.onlab.metrics;
import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentMap;
/**
* Components to register for metrics.
*/
public class MetricsComponent implements MetricsComponentRegistry {
private final String name;
/**
* Registry to hold the Features defined in this Component.
*/
private final ConcurrentMap<String, MetricsFeature> featuresRegistry =
new ConcurrentHashMap<>();
/**
* Constructs a component from a name.
*
* @param newName name of the component
*/
public MetricsComponent(final String newName) {
name = newName;
}
@Override
public String getName() {
return name;
}
@Override
public MetricsFeature registerFeature(final String featureName) {
MetricsFeature feature = featuresRegistry.get(featureName);
if (feature == null) {
final MetricsFeature createdFeature =
new MetricsFeature(featureName);
feature = featuresRegistry.putIfAbsent(featureName, createdFeature);
if (feature == null) {
feature = createdFeature;
}
}
return feature;
}
}
| 645 |
9,782 | /*
* 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.
*/
package com.facebook.presto.spi;
import com.facebook.presto.common.Subfield;
import com.facebook.presto.spi.api.Experimental;
import java.util.List;
public interface ColumnHandle
{
/**
* Applies to columns of complex types: arrays, maps and structs. When a query
* uses only some of the subfields, the engine provides the complete list of
* required subfields and the connector is free to prune the rest.
* <p>
* Examples:
* - SELECT a[1], b['x'], x.y.z FROM t
* - SELECT a FROM t WHERE b['y'] > 10
* <p>
* Pruning must preserve the type of the values and support unmodified access.
* <p>
* - Pruning a struct means populating some of the members with null values.
* - Pruning a map means dropping keys not listed in the required subfields.
* - Pruning arrays means dropping values with indices larger than maximum
* required index and filling in remaining non-required indices with nulls.
*/
@Experimental
default ColumnHandle withRequiredSubfields(List<Subfield> subfields)
{
return this;
}
}
| 516 |
340 | <reponame>cloudnoize/concord-bft<gh_stars>100-1000
// Concord
//
// Copyright (c) 2021 VMware, Inc. All Rights Reserved.
//
// This product is licensed to you under the Apache 2.0 license (the
// "License"). You may not use this product except in compliance with the
// Apache 2.0 License.
//
// This product may include a number of subcomponents with separate copyright
// notices and license terms. Your use of these subcomponents is subject to the
// terms and conditions of the subcomponent's license, as noted in the LICENSE
// file.
#include "gtest/gtest.h"
#include "ccron_msgs.cmf.hpp"
#include "ccron/ticks_generator.hpp"
#include "Replica.hpp"
#include "ticks_generator_mocks.hpp"
#include <iterator>
#include <memory>
#include <utility>
#include <variant>
namespace {
using namespace concord::cron;
using namespace std::chrono_literals;
using bftEngine::impl::TickInternalMsg;
using bftEngine::TICK_FLAG;
class ccron_ticks_generator_test : public ::testing::Test {
protected:
const std::uint32_t kComponentId1 = 1;
const std::uint32_t kComponentId2 = 2;
std::shared_ptr<test::InternalBFTClientMock> bft_client_ = std::make_shared<test::InternalBFTClientMock>();
test::PendingRequestMock pending_req_;
std::shared_ptr<test::IncomingMsgsStorageMock> msgs_ = std::make_shared<test::IncomingMsgsStorageMock>();
std::shared_ptr<test::TicksGeneratorForTest> gen_ =
test::TicksGeneratorForTest::create(bft_client_, pending_req_, msgs_);
static std::chrono::steady_clock::time_point now() { return std::chrono::steady_clock::now(); }
};
TEST_F(ccron_ticks_generator_test, no_ticks_if_not_started) {
gen_->evaluateTimers(now() + 10s);
gen_->evaluateTimers(now() + 11s);
ASSERT_TRUE(msgs_->internal_msgs_.empty());
}
TEST_F(ccron_ticks_generator_test, internal_tick_msg_is_generated) {
gen_->start(kComponentId1, 1s);
gen_->start(kComponentId2, 2s);
gen_->evaluateTimers(now() + 1s);
gen_->evaluateTimers(now() + 2s);
// Expect the following order: Tick{kComponentId1}, Tick{kComponentId1}, Tick{kComponentId2}
ASSERT_EQ(3, msgs_->internal_msgs_.size());
ASSERT_TRUE(std::holds_alternative<TickInternalMsg>(msgs_->internal_msgs_[0]));
ASSERT_EQ(kComponentId1, std::get<TickInternalMsg>(msgs_->internal_msgs_[0]).component_id);
ASSERT_TRUE(std::holds_alternative<TickInternalMsg>(msgs_->internal_msgs_[1]));
ASSERT_EQ(kComponentId1, std::get<TickInternalMsg>(msgs_->internal_msgs_[1]).component_id);
ASSERT_TRUE(std::holds_alternative<TickInternalMsg>(msgs_->internal_msgs_[2]));
ASSERT_EQ(kComponentId2, std::get<TickInternalMsg>(msgs_->internal_msgs_[2]).component_id);
}
TEST_F(ccron_ticks_generator_test, start_updates_if_called_again) {
gen_->start(kComponentId1, 1s);
// Should generate a tick.
gen_->evaluateTimers(now() + 1s);
ASSERT_EQ(1, msgs_->internal_msgs_.size());
// Update the period to 4s.
gen_->start(kComponentId1, 4s);
// Should not generate a tick as we have updated the period.
gen_->evaluateTimers(now() + 2s);
gen_->evaluateTimers(now() + 3s);
ASSERT_EQ(1, msgs_->internal_msgs_.size());
// Should generate a tick with the new period.
gen_->evaluateTimers(now() + 4s);
ASSERT_EQ(2, msgs_->internal_msgs_.size());
// Should not generate a tick.
gen_->evaluateTimers(now() + 7s);
ASSERT_EQ(2, msgs_->internal_msgs_.size());
// Should generate a tick.
gen_->evaluateTimers(now() + 8s);
ASSERT_EQ(3, msgs_->internal_msgs_.size());
}
TEST_F(ccron_ticks_generator_test, stop_tick) {
gen_->start(kComponentId1, 1s);
gen_->start(kComponentId2, 2s);
// Evaluate twice and fire kComponentId1 twice and kComponentId2 once.
gen_->evaluateTimers(now() + 1s);
gen_->evaluateTimers(now() + 2s);
ASSERT_EQ(3, msgs_->internal_msgs_.size());
// Stop kComponentId1 and evaluate at 2s in the future, expecting that kComponentId2 will fire once more.
gen_->stop(kComponentId1);
gen_->evaluateTimers(now() + 4s);
ASSERT_EQ(4, msgs_->internal_msgs_.size());
// Stop kComponentId2 and expect that no timer will fire further.
gen_->stop(kComponentId2);
gen_->evaluateTimers(now() + 6s);
gen_->evaluateTimers(now() + 8s);
ASSERT_EQ(4, msgs_->internal_msgs_.size());
}
TEST_F(ccron_ticks_generator_test, is_generating) {
ASSERT_FALSE(gen_->isGenerating(kComponentId1));
gen_->start(kComponentId1, 1s);
ASSERT_TRUE(gen_->isGenerating(kComponentId1));
gen_->stop(kComponentId1);
ASSERT_FALSE(gen_->isGenerating(kComponentId1));
}
TEST_F(ccron_ticks_generator_test, is_start_0_stopping) {
ASSERT_FALSE(gen_->isGenerating(kComponentId1));
gen_->start(kComponentId1, 1s);
ASSERT_TRUE(gen_->isGenerating(kComponentId1));
gen_->start(kComponentId1, 0s);
ASSERT_FALSE(gen_->isGenerating(kComponentId1));
}
TEST_F(ccron_ticks_generator_test, client_request_msg_is_generated) {
// Generate an internal tick.
gen_->onInternalTick({kComponentId1});
// Make sure we have converted the internal tick into a ClientRequestMsg tick.
ASSERT_EQ(1, bft_client_->requests_.size());
const auto seq_num1 = bft_client_->requests_.begin()->first;
const auto request1 = bft_client_->requests_.begin()->second;
ASSERT_EQ(TICK_FLAG, request1.flags);
ASSERT_EQ(TicksGenerator::kTickCid, request1.cid);
auto payload1 = ClientReqMsgTickPayload{};
deserialize(request1.contents, payload1);
ASSERT_EQ(kComponentId1, payload1.component_id);
// Make sure that we don't generate more ClientRequestMsg ticks until the one for component ID 1 is in the external
// message queue.
gen_->onInternalTick({kComponentId1});
ASSERT_EQ(1, bft_client_->requests_.size());
ASSERT_EQ(request1, bft_client_->requests_[0]);
// Simulate the replica consuming the tick in the external message queue by:
// - "removing" the tick from the external message queue and verifying no tick is added
// - calling the onMessage<ClientRequestMsg>() method and marking the request pending in ReplicaImp
// At the end, verify no ClientRequestMsg ticks are generated.
gen_->onTickPoppedFromExtQueue(kComponentId1);
pending_req_.addPending(bft_client_->getClientId(), seq_num1);
ASSERT_TRUE(pending_req_.isPending(bft_client_->getClientId(), seq_num1));
ASSERT_EQ(1, bft_client_->requests_.size());
ASSERT_EQ(request1, bft_client_->requests_[0]);
// ClientRequestMsg ticks for another component are generated.
gen_->onInternalTick({kComponentId2});
ASSERT_EQ(2, bft_client_->requests_.size());
const auto seq_num2 = std::prev(bft_client_->requests_.cend())->first;
const auto request2 = std::prev(bft_client_->requests_.cend())->second;
ASSERT_EQ(TICK_FLAG, request2.flags);
ASSERT_EQ(TicksGenerator::kTickCid, request2.cid);
ASSERT_EQ(seq_num2, seq_num1 + 1);
auto payload2 = ClientReqMsgTickPayload{};
deserialize(request2.contents, payload2);
ASSERT_EQ(kComponentId2, payload2.component_id);
// Again, make sure that we don't generate more ClientRequestMsg ticks until the one for component ID 1 is pending,
// even after ticks for another component ID have been generated.
gen_->onInternalTick({kComponentId1});
ASSERT_EQ(2, bft_client_->requests_.size());
// Simulate that a successful ClientRequestMsg tick has been committed.
pending_req_.removePending(bft_client_->getClientId(), seq_num1);
ASSERT_FALSE(pending_req_.isPending(bft_client_->getClientId(), seq_num1));
// Generate a second internal tick for component ID 1.
gen_->onInternalTick({kComponentId1});
ASSERT_EQ(3, bft_client_->requests_.size());
const auto seq_num3 = std::prev(bft_client_->requests_.cend())->first;
const auto request3 = std::prev(bft_client_->requests_.cend())->second;
ASSERT_EQ(TICK_FLAG, request3.flags);
ASSERT_EQ(TicksGenerator::kTickCid, request3.cid);
ASSERT_EQ(seq_num3, seq_num2 + 1);
auto payload3 = ClientReqMsgTickPayload{};
deserialize(request3.contents, payload3);
ASSERT_EQ(kComponentId1, payload3.component_id);
}
} // namespace
int main(int argc, char** argv) {
::testing::InitGoogleTest(&argc, argv);
return RUN_ALL_TESTS();
}
| 2,952 |
777 | // Copyright (c) 2011 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include <math.h>
#include <stddef.h>
#include <stdint.h>
#include "base/macros.h"
#include "testing/gtest/include/gtest/gtest.h"
#include "ui/gfx/codec/jpeg_codec.h"
namespace {
// A JPEG image used by TopSitesMigrationTest, whose size is 1x1.
// This image causes an invalid-read error to libjpeg-turbo 1.0.1.
const uint8_t kTopSitesMigrationTestImage[] =
"\xff\xd8\xff\xe0\x00\x10\x4a\x46\x49\x46\x00\x01\x01\x00\x00\x01"
"\x00\x01\x00\x00\xff\xdb\x00\x43\x00\x03\x02\x02\x03\x02\x02\x03"
"\x03\x03\x03\x04\x03\x03\x04\x05\x08\x05\x05\x04\x04\x05\x0a\x07"
"\x07\x06\x08\x0c\x0a\x0c\x0c\x0b\x0a\x0b\x0b\x0d\x0e\x12\x10\x0d"
"\x0e\x11\x0e\x0b\x0b\x10\x16\x10\x11\x13\x14\x15\x15\x15\x0c\x0f"
"\x17\x18\x16\x14\x18\x12\x14\x15\x14\xff\xdb\x00\x43\x01\x03\x04"
"\x04\x05\x04\x05\x09\x05\x05\x09\x14\x0d\x0b\x0d\x14\x14\x14\x14"
"\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14"
"\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14"
"\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\x14\xff\xc0"
"\x00\x11\x08\x00\x01\x00\x01\x03\x01\x22\x00\x02\x11\x01\x03\x11"
"\x01\xff\xc4\x00\x1f\x00\x00\x01\x05\x01\x01\x01\x01\x01\x01\x00"
"\x00\x00\x00\x00\x00\x00\x00\x01\x02\x03\x04\x05\x06\x07\x08\x09"
"\x0a\x0b\xff\xc4\x00\xb5\x10\x00\x02\x01\x03\x03\x02\x04\x03\x05"
"\x05\x04\x04\x00\x00\x01\x7d\x01\x02\x03\x00\x04\x11\x05\x12\x21"
"\x31\x41\x06\x13\x51\x61\x07\x22\x71\x14\x32\x81\x91\xa1\x08\x23"
"\x42\xb1\xc1\x15\x52\xd1\xf0\x24\x33\x62\x72\x82\x09\x0a\x16\x17"
"\x18\x19\x1a\x25\x26\x27\x28\x29\x2a\x34\x35\x36\x37\x38\x39\x3a"
"\x43\x44\x45\x46\x47\x48\x49\x4a\x53\x54\x55\x56\x57\x58\x59\x5a"
"\x63\x64\x65\x66\x67\x68\x69\x6a\x73\x74\x75\x76\x77\x78\x79\x7a"
"\x83\x84\x85\x86\x87\x88\x89\x8a\x92\x93\x94\x95\x96\x97\x98\x99"
"\x9a\xa2\xa3\xa4\xa5\xa6\xa7\xa8\xa9\xaa\xb2\xb3\xb4\xb5\xb6\xb7"
"\xb8\xb9\xba\xc2\xc3\xc4\xc5\xc6\xc7\xc8\xc9\xca\xd2\xd3\xd4\xd5"
"\xd6\xd7\xd8\xd9\xda\xe1\xe2\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xf1"
"\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9\xfa\xff\xc4\x00\x1f\x01\x00\x03"
"\x01\x01\x01\x01\x01\x01\x01\x01\x01\x00\x00\x00\x00\x00\x00\x01"
"\x02\x03\x04\x05\x06\x07\x08\x09\x0a\x0b\xff\xc4\x00\xb5\x11\x00"
"\x02\x01\x02\x04\x04\x03\x04\x07\x05\x04\x04\x00\x01\x02\x77\x00"
"\x01\x02\x03\x11\x04\x05\x21\x31\x06\x12\x41\x51\x07\x61\x71\x13"
"\x22\x32\x81\x08\x14\x42\x91\xa1\xb1\xc1\x09\x23\x33\x52\xf0\x15"
"\x62\x72\xd1\x0a\x16\x24\x34\xe1\x25\xf1\x17\x18\x19\x1a\x26\x27"
"\x28\x29\x2a\x35\x36\x37\x38\x39\x3a\x43\x44\x45\x46\x47\x48\x49"
"\x4a\x53\x54\x55\x56\x57\x58\x59\x5a\x63\x64\x65\x66\x67\x68\x69"
"\x6a\x73\x74\x75\x76\x77\x78\x79\x7a\x82\x83\x84\x85\x86\x87\x88"
"\x89\x8a\x92\x93\x94\x95\x96\x97\x98\x99\x9a\xa2\xa3\xa4\xa5\xa6"
"\xa7\xa8\xa9\xaa\xb2\xb3\xb4\xb5\xb6\xb7\xb8\xb9\xba\xc2\xc3\xc4"
"\xc5\xc6\xc7\xc8\xc9\xca\xd2\xd3\xd4\xd5\xd6\xd7\xd8\xd9\xda\xe2"
"\xe3\xe4\xe5\xe6\xe7\xe8\xe9\xea\xf2\xf3\xf4\xf5\xf6\xf7\xf8\xf9"
"\xfa\xff\xda\x00\x0c\x03\x01\x00\x02\x11\x03\x11\x00\x3f\x00\xf9"
"\xd2\x8a\x28\xaf\xc3\x0f\xf5\x4c\xff\xd9";
} // namespace
namespace gfx {
// out of 100, this indicates how compressed it will be, this should be changed
// with jpeg equality threshold
// static int jpeg_quality = 75; // FIXME(brettw)
static int jpeg_quality = 100;
// The threshold of average color differences where we consider two images
// equal. This number was picked to be a little above the observed difference
// using the above quality.
static double jpeg_equality_threshold = 1.0;
// Computes the average difference between each value in a and b. A and b
// should be the same size. Used to see if two images are approximately equal
// in the presence of compression.
static double AveragePixelDelta(const std::vector<unsigned char>& a,
const std::vector<unsigned char>& b) {
// if the sizes are different, say the average difference is the maximum
if (a.size() != b.size())
return 255.0;
if (a.empty())
return 0; // prevent divide by 0 below
double acc = 0.0;
for (size_t i = 0; i < a.size(); i++)
acc += fabs(static_cast<double>(a[i]) - static_cast<double>(b[i]));
return acc / static_cast<double>(a.size());
}
static void MakeRGBImage(int w, int h, std::vector<unsigned char>* dat) {
dat->resize(w * h * 3);
for (int y = 0; y < h; y++) {
for (int x = 0; x < w; x++) {
unsigned char* org_px = &(*dat)[(y * w + x) * 3];
org_px[0] = x * 3; // r
org_px[1] = x * 3 + 1; // g
org_px[2] = x * 3 + 2; // b
}
}
}
TEST(JPEGCodec, EncodeDecodeRGB) {
int w = 20, h = 20;
// create an image with known values
std::vector<unsigned char> original;
MakeRGBImage(w, h, &original);
// encode, making sure it was compressed some
std::vector<unsigned char> encoded;
EXPECT_TRUE(JPEGCodec::Encode(&original[0], JPEGCodec::FORMAT_RGB, w, h,
w * 3, jpeg_quality, &encoded));
EXPECT_GT(original.size(), encoded.size());
// decode, it should have the same size as the original
std::vector<unsigned char> decoded;
int outw, outh;
EXPECT_TRUE(JPEGCodec::Decode(&encoded[0], encoded.size(),
JPEGCodec::FORMAT_RGB, &decoded,
&outw, &outh));
ASSERT_EQ(w, outw);
ASSERT_EQ(h, outh);
ASSERT_EQ(original.size(), decoded.size());
// Images must be approximately equal (compression will have introduced some
// minor artifacts).
ASSERT_GE(jpeg_equality_threshold, AveragePixelDelta(original, decoded));
}
TEST(JPEGCodec, EncodeDecodeRGBA) {
int w = 20, h = 20;
// create an image with known values, a must be opaque because it will be
// lost during compression
std::vector<unsigned char> original;
original.resize(w * h * 4);
for (int y = 0; y < h; y++) {
for (int x = 0; x < w; x++) {
unsigned char* org_px = &original[(y * w + x) * 4];
org_px[0] = x * 3; // r
org_px[1] = x * 3 + 1; // g
org_px[2] = x * 3 + 2; // b
org_px[3] = 0xFF; // a (opaque)
}
}
// encode, making sure it was compressed some
std::vector<unsigned char> encoded;
EXPECT_TRUE(JPEGCodec::Encode(&original[0], JPEGCodec::FORMAT_RGBA, w, h,
w * 4, jpeg_quality, &encoded));
EXPECT_GT(original.size(), encoded.size());
// decode, it should have the same size as the original
std::vector<unsigned char> decoded;
int outw, outh;
EXPECT_TRUE(JPEGCodec::Decode(&encoded[0], encoded.size(),
JPEGCodec::FORMAT_RGBA, &decoded,
&outw, &outh));
ASSERT_EQ(w, outw);
ASSERT_EQ(h, outh);
ASSERT_EQ(original.size(), decoded.size());
// Images must be approximately equal (compression will have introduced some
// minor artifacts).
ASSERT_GE(jpeg_equality_threshold, AveragePixelDelta(original, decoded));
}
// Test that corrupted data decompression causes failures.
TEST(JPEGCodec, DecodeCorrupted) {
int w = 20, h = 20;
// some random data (an uncompressed image)
std::vector<unsigned char> original;
MakeRGBImage(w, h, &original);
// it should fail when given non-JPEG compressed data
std::vector<unsigned char> output;
int outw, outh;
ASSERT_FALSE(JPEGCodec::Decode(&original[0], original.size(),
JPEGCodec::FORMAT_RGB, &output,
&outw, &outh));
// make some compressed data
std::vector<unsigned char> compressed;
ASSERT_TRUE(JPEGCodec::Encode(&original[0], JPEGCodec::FORMAT_RGB, w, h,
w * 3, jpeg_quality, &compressed));
// try decompressing a truncated version
ASSERT_FALSE(JPEGCodec::Decode(&compressed[0], compressed.size() / 2,
JPEGCodec::FORMAT_RGB, &output,
&outw, &outh));
// corrupt it and try decompressing that
for (int i = 10; i < 30; i++)
compressed[i] = i;
ASSERT_FALSE(JPEGCodec::Decode(&compressed[0], compressed.size(),
JPEGCodec::FORMAT_RGB, &output,
&outw, &outh));
}
// Test that we can decode JPEG images without invalid-read errors on valgrind.
// This test decodes a 1x1 JPEG image and writes the decoded RGB (or RGBA) pixel
// to the output buffer without OOB reads.
TEST(JPEGCodec, InvalidRead) {
std::vector<unsigned char> output;
int outw, outh;
JPEGCodec::Decode(kTopSitesMigrationTestImage,
arraysize(kTopSitesMigrationTestImage),
JPEGCodec::FORMAT_RGB, &output,
&outw, &outh);
JPEGCodec::Decode(kTopSitesMigrationTestImage,
arraysize(kTopSitesMigrationTestImage),
JPEGCodec::FORMAT_RGBA, &output,
&outw, &outh);
}
} // namespace gfx
| 4,781 |
344 | <gh_stars>100-1000
/*
* Copyright 2020 The WebRTC project authors. All Rights Reserved.
*
* Use of this source code is governed by a BSD-style license
* that can be found in the LICENSE file in the root of the source
* tree. An additional intellectual property rights grant can be found
* in the file PATENTS. All contributing project authors may
* be found in the AUTHORS file in the root of the source tree.
*/
// This file contains an interface for the (obsolete) StatsCollector class that
// is used by compilation units that do not wish to depend on the StatsCollector
// implementation.
#ifndef PC_STATS_COLLECTOR_INTERFACE_H_
#define PC_STATS_COLLECTOR_INTERFACE_H_
#include <stdint.h>
#include "api/media_stream_interface.h"
#include "api/stats_types.h"
namespace webrtc {
class StatsCollectorInterface {
public:
virtual ~StatsCollectorInterface() {}
// Adds a local audio track that is used for getting some voice statistics.
virtual void AddLocalAudioTrack(AudioTrackInterface* audio_track,
uint32_t ssrc) = 0;
// Removes a local audio tracks that is used for getting some voice
// statistics.
virtual void RemoveLocalAudioTrack(AudioTrackInterface* audio_track,
uint32_t ssrc) = 0;
virtual void GetStats(MediaStreamTrackInterface* track,
StatsReports* reports) = 0;
};
} // namespace webrtc
#endif // PC_STATS_COLLECTOR_INTERFACE_H_
| 497 |
381 | package org.apache.helix.controller.changedetector.trimmer;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
import java.util.HashMap;
import java.util.Map;
import java.util.Set;
import com.google.common.collect.ImmutableMap;
import com.google.common.collect.ImmutableSet;
import org.apache.helix.model.IdealState;
import static org.apache.helix.model.IdealState.IdealStateProperty;
/**
* A singleton HelixProperty Trimmer for IdealState to remove the non-cluster-topology-related
* fields.
*/
public class IdealStateTrimmer extends HelixPropertyTrimmer<IdealState> {
private static final IdealStateTrimmer IDEAL_STATE_TRIMMER = new IdealStateTrimmer();
/**
* The following fields are considered as non-topology related.
* REBALANCE_DELAY,
* DELAY_REBALANCE_DISABLED,
* REBALANCE_TIMER_PERIOD,
* GROUP_ROUTING_ENABLED,
* EXTERNAL_VIEW_DISABLED,
* HELIX_ENABLED,
* ResourceConfigProperty.DELAY_REBALANCE_ENABLED
*/
private static final Map<FieldType, Set<String>> STATIC_TOPOLOGY_RELATED_FIELD_MAP = ImmutableMap
.of(FieldType.SIMPLE_FIELD, ImmutableSet.of(
IdealStateProperty.NUM_PARTITIONS.name(),
IdealStateProperty.STATE_MODEL_DEF_REF.name(),
IdealStateProperty.STATE_MODEL_FACTORY_NAME.name(),
IdealStateProperty.REPLICAS.name(),
IdealStateProperty.MIN_ACTIVE_REPLICAS.name(),
IdealStateProperty.IDEAL_STATE_MODE.name(),
IdealStateProperty.REBALANCE_MODE.name(),
IdealStateProperty.REBALANCER_CLASS_NAME.name(),
IdealStateProperty.REBALANCE_STRATEGY.name(),
IdealStateProperty.MAX_PARTITIONS_PER_INSTANCE.name(),
IdealStateProperty.INSTANCE_GROUP_TAG.name(),
IdealStateProperty.RESOURCE_GROUP_NAME.name(),
IdealStateProperty.RESOURCE_TYPE.name()));
private IdealStateTrimmer() {
}
@Override
protected Map<FieldType, Set<String>> getNonTrimmableFields(IdealState idealState) {
Map<FieldType, Set<String>> nonTrimmableFields =
new HashMap<>(STATIC_TOPOLOGY_RELATED_FIELD_MAP);
// Also don't trim the application defined assignment in the list and map fields.
// They are fixed and considered as part of the cluster topology.
switch (idealState.getRebalanceMode()) {
case CUSTOMIZED:
// For CUSTOMZIED resources, map fields are user configured partition state assignment. So
// they are not trimmable.
nonTrimmableFields.put(FieldType.MAP_FIELD, idealState.getRecord().getMapFields().keySet());
break;
case SEMI_AUTO:
// For SEMI_AUTO resources, list fields are user configured partition placement. So it is not
// trimmable.
nonTrimmableFields.put(FieldType.LIST_FIELD, idealState.getRecord().getListFields().keySet());
break;
case FULL_AUTO:
// For FULL_AUTO resources, both map fields and list fields are trimmable since they are
// re-computed and updated in every controller rebalance pipelines.
default:
break;
}
return nonTrimmableFields;
}
@Override
public IdealState trimProperty(IdealState property) {
return new IdealState(doTrim(property));
}
public static IdealStateTrimmer getInstance() {
return IDEAL_STATE_TRIMMER;
}
}
| 1,366 |
1,655 | // ======================================================================== //
// Copyright 2009-2016 Intel Corporation //
// //
// 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. //
// ======================================================================== //
#pragma once
#include "../math/math.h"
/* include SSE wrapper classes */
#if defined(__SSE__)
# include "sse.h"
#endif
/* include AVX wrapper classes */
#if defined(__AVX__)
# include "avx.h"
#endif
/* include AVX512 wrapper classes */
#if defined (__AVX512F__)
# include "avx512.h"
#endif
#if defined(__AVX512F__)
# define AVX_ZERO_UPPER()
#elif defined (__AVX__)
# define AVX_ZERO_UPPER() _mm256_zeroupper()
#else
# define AVX_ZERO_UPPER()
#endif
namespace embree
{
/* foreach unique */
template<typename vbool, typename vint, typename Closure>
__forceinline void foreach_unique(const vbool& valid0, const vint& vi, const Closure& closure)
{
vbool valid1 = valid0;
while (any(valid1)) {
const int j = int(__bsf(movemask(valid1)));
const int i = vi[j];
const vbool valid2 = valid1 & (i == vi);
valid1 = valid1 & !valid2;
closure(valid2,i);
}
}
/* foreach unique */
template<typename vbool, typename vint, typename Closure>
__forceinline void foreach_unique_index(const vbool& valid0, const vint& vi, const Closure& closure)
{
vbool valid1 = valid0;
while (any(valid1)) {
const int j = (int) __bsf(movemask(valid1));
const int i = vi[j];
const vbool valid2 = valid1 & (i == vi);
valid1 = valid1 & !valid2;
closure(valid2,i,j);
}
}
template<typename Closure>
__forceinline void foreach2(int x0, int x1, int y0, int y1, const Closure& closure)
{
__aligned(64) int U[128];
__aligned(64) int V[128];
int index = 0;
for (int y=y0; y<y1; y++) {
const bool lasty = y+1>=y1;
const vintx vy = y;
for (int x=x0; x<x1; ) { //x+=VSIZEX) {
const bool lastx = x+VSIZEX >= x1;
vintx vx = x+vintx(step);
vintx::storeu(&U[index],vx);
vintx::storeu(&V[index],vy);
const int dx = min(x1-x,VSIZEX);
index += dx;
x += dx;
if (index >= VSIZEX || (lastx && lasty)) {
const vboolx valid = vintx(step) < vintx(index);
closure(valid,vintx::load(U),vintx::load(V));
x-= max(0,index-VSIZEX);
index = 0;
}
}
}
}
}
| 1,585 |
815 | [
{"type":"directory","name":"Testing/Temporary/WaveletTimeTrigger/","contents":[
{"type":"directory","name":"BatchExtracts","contents":[
{"type":"file","name":"RenderView1_000000.png", "compare":true},
{"type":"file","name":"RenderView1_000005.png"}
]},
{"type":"directory","name":"ImmediateExtracts","contents":[
{"type":"file","name":"RenderView1_000000.png", "compare":true},
{"type":"file","name":"RenderView1_000005.png"}
]},
{"type":"directory","name":"CoprocessingExtracts","contents":[
{"type":"file","name":"RenderView1_000000.png", "compare":true},
{"type":"file","name":"RenderView1_000010.png"}
]},
{"type":"file","name":"WaveletTimeTrigger.pvsm"},
{"type":"file","name":"WaveletTimeTrigger.py"}
]}
]
| 296 |
12,718 | unsigned short __cdecl _byteswap_ushort(unsigned short _Short);
unsigned short __cdecl _byteswap_ushort(unsigned short _Short)
{
#if defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__)
unsigned short retval;
__asm__ __volatile__ ("rorw $8, %w[retval]" : [retval] "=rm" (retval) : "[retval]" (_Short));
return retval;
#else
unsigned char *b = (void*)&_Short;
unsigned char tmp;
tmp = b[0];
b[0] = b[1];
b[1] = tmp;
return _Short;
#endif /* defined(_AMD64_) || defined(__x86_64__) || defined(_X86_) || defined(__i386__) */
}
| 225 |
1,511 | <filename>tests/cluecode/data/ics/bison-src/muscle_tab.c
/* Muscle table manager for Bison.
Copyright (C) 2001, 2002, 2003, 2004, 2005 Free Software
Foundation, Inc.
| 59 |
1,105 | <filename>testsuite/wavelength_color-reg/run.py
#!/usr/bin/env python
# Copyright Contributors to the Open Shading Language project.
# SPDX-License-Identifier: BSD-3-Clause
# https://github.com/AcademySoftwareFoundation/OpenShadingLanguage
command += testshade("-g 200 200 wavelength_v_lambda -od uint8 -o Cout v_lambda.tif")
outputs.append ("v_lambda.tif")
command += testshade("-g 200 200 wavelength_u_lambda -od uint8 -o Cout u_lambda.tif")
outputs.append ("u_lambda.tif")
command += testshade("-g 200 200 wavelength_u_lambda_masked -od uint8 -o Cout u_lambda_masked.tif")
outputs.append ("u_lambda_masked.tif")
command += testshade("-g 200 200 wavelength_v_lambda_masked -od uint8 -o Cout v_lambda_masked.tif")
outputs.append ("v_lambda_masked.tif")
# expect a few LSB failures
failthresh = 0.008
failpercent = 3
| 285 |
470 | <reponame>wangdongyang/QMXMFunModule<filename>Example/Pods/LFMediaEditingController/LFMediaEditingController/LFMediaEditingController/class/common/category/UIView+LFMEFrame.h<gh_stars>100-1000
//
// UIView+LFFrame.h
// LFImagePickerController
//
// Created by LamTsanFeng on 2017/2/13.
// Copyright © 2017年 LamTsanFeng. All rights reserved.
//
#import <UIKit/UIKit.h>
@interface UIView (LFMEFrame)
@property (nonatomic, assign) CGFloat lfme_x;
@property (nonatomic, assign) CGFloat lfme_y;
@property (nonatomic, assign) CGFloat lfme_centerX;
@property (nonatomic, assign) CGFloat lfme_centerY;
@property (nonatomic, assign) CGFloat lfme_width;
@property (nonatomic, assign) CGFloat lfme_height;
@property (nonatomic, assign) CGSize lfme_size;
@property (nonatomic, assign) CGPoint lfme_origin;
@end
| 310 |
1,350 | <reponame>Shashi-rk/azure-sdk-for-java
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.mediaservices.models;
import com.azure.core.annotation.Immutable;
import com.azure.core.annotation.JsonFlatten;
import com.azure.core.util.logging.ClientLogger;
import com.fasterxml.jackson.annotation.JsonIgnore;
import com.fasterxml.jackson.annotation.JsonSubTypes;
import com.fasterxml.jackson.annotation.JsonTypeInfo;
import com.fasterxml.jackson.annotation.JsonTypeName;
/**
* Base type for all Presets, which define the recipe or instructions on how the input media files should be processed.
*/
@JsonTypeInfo(
use = JsonTypeInfo.Id.NAME,
include = JsonTypeInfo.As.PROPERTY,
property = "@odata\\.type",
defaultImpl = Preset.class)
@JsonTypeName("Preset")
@JsonSubTypes({
@JsonSubTypes.Type(name = "#Microsoft.Media.FaceDetectorPreset", value = FaceDetectorPreset.class),
@JsonSubTypes.Type(name = "#Microsoft.Media.AudioAnalyzerPreset", value = AudioAnalyzerPreset.class),
@JsonSubTypes.Type(
name = "#Microsoft.Media.BuiltInStandardEncoderPreset",
value = BuiltInStandardEncoderPreset.class),
@JsonSubTypes.Type(name = "#Microsoft.Media.StandardEncoderPreset", value = StandardEncoderPreset.class)
})
@JsonFlatten
@Immutable
public class Preset {
@JsonIgnore private final ClientLogger logger = new ClientLogger(Preset.class);
/**
* Validates the instance.
*
* @throws IllegalArgumentException thrown if the instance is not valid.
*/
public void validate() {
}
}
| 581 |
716 | <gh_stars>100-1000
# Typical header of a Python script using Pinocchio
from pinocchio.utils import *
from pinocchio.explog import exp,log
from numpy.linalg import pinv,norm
import pinocchio as pin
import gepetto.corbaserver
# Example of a class Display that connect to Gepetto-viewer and implement a
# 'place' method to set the position/rotation of a 3D visual object in a scene.
class Display():
'''
Class Display: Example of a class implementing a client for the Gepetto-viewer server. The main
method of the class is 'place', that sets the position/rotation of a 3D visual object in a scene.
'''
def __init__(self,windowName = "pinocchio" ):
'''
This function connect with the Gepetto-viewer server and open a window with the given name.
If the window already exists, it is kept in the current state. Otherwise, the newly-created
window is set up with a scene named 'world'.
'''
# Create the client and connect it with the display server.
try:
self.viewer=gepetto.corbaserver.Client()
except:
print "Error while starting the viewer client. "
print "Check whether Gepetto-viewer is properly started"
# Open a window for displaying your model.
try:
# If the window already exists, do not do anything.
windowID = self.viewer.gui.getWindowID (windowName)
print "Warning: window '"+windowName+"' already created."
print "The previously created objects will not be destroyed and do not have to be created again."
except:
# Otherwise, create the empty window.
windowID = self.viewer.gui.createWindow (windowName)
# Start a new "scene" in this window, named "world", with just a floor.
self.viewer.gui.createScene("world")
self.viewer.gui.addSceneToWindow("world",windowID)
# Finally, refresh the layout to obtain your first rendering.
self.viewer.gui.refresh()
def place(self,objName,M,refresh=True):
'''
This function places (ie changes both translation and rotation) of the object
names "objName" in place given by the SE3 object "M". By default, immediately refresh
the layout. If multiple objects have to be placed at the same time, do the refresh
only at the end of the list.
'''
self.viewer.gui.applyConfiguration(objName,
pin.se3ToXYZQUATtuple(M))
if refresh: self.viewer.gui.refresh()
| 973 |
10,320 | {"IsEncrypted":false,"Values":{"AzureWebJobsStorage":"UseDevelopmentStorage=true","FUNCTIONS_WORKER_RUNTIME":"node"}} | 36 |
1,523 | <filename>library/src/main/java/com/mypopsy/widget/internal/SuggestionItemDecorator.java
package com.mypopsy.widget.internal;
import android.graphics.Canvas;
import android.graphics.Rect;
import android.support.annotation.ColorInt;
import android.support.v4.view.ViewCompat;
import android.support.v7.widget.RecyclerView;
import android.view.View;
import static com.mypopsy.widget.internal.RoundRectDrawableWithShadow.BOTTOM;
import static com.mypopsy.widget.internal.RoundRectDrawableWithShadow.LEFT;
import static com.mypopsy.widget.internal.RoundRectDrawableWithShadow.RIGHT;
public class SuggestionItemDecorator extends RecyclerView.ItemDecoration {
private final RoundRectDrawableWithShadow drawable;
public SuggestionItemDecorator(RoundRectDrawableWithShadow drawable) {
this.drawable = drawable;
}
@Override
public void getItemOffsets(Rect rect, View view, RecyclerView parent, RecyclerView.State state) {
int position = parent.getChildAdapterPosition(view);
int count = state.getItemCount();
int shadows = LEFT|RIGHT;
if(position == count - 1) shadows|=BOTTOM;
drawable.setShadow(shadows);
drawable.getPadding(rect);
}
@Override
public void onDraw(Canvas canvas, RecyclerView parent, RecyclerView.State state) {
int visibleCount = parent.getChildCount();
int count = state.getItemCount();
RecyclerView.Adapter adapter = parent.getAdapter();
int adapterCount = adapter != null ? adapter.getItemCount() : 0;
for (int i = 0; i < visibleCount; i++) {
View view = parent.getChildAt(i);
int position = parent.getChildAdapterPosition(view);
float translationX = ViewCompat.getTranslationX(view);
float translationY = ViewCompat.getTranslationY(view);
float alpha = ViewCompat.getAlpha(view);
RecyclerView.LayoutParams params = (RecyclerView.LayoutParams) view.getLayoutParams();
int shadows = LEFT|RIGHT;
if(position == count - 1 && adapterCount != 0) shadows|=BOTTOM;
drawable.setAlpha((int) (255*alpha));
drawable.setShadow(shadows);
drawable.setBounds(0, 0, parent.getWidth(), view.getHeight());
int saved = canvas.save();
canvas.translate(parent.getPaddingLeft() + translationX,
view.getTop() + params.topMargin + translationY);
drawable.draw(canvas);
canvas.restoreToCount(saved);
}
}
public void setBackgroundColor(@ColorInt int color) {
drawable.setColor(color);
}
public void setCornerRadius(float radius) {
drawable.setCornerRadius(radius);
}
}
| 1,082 |
22,481 | """Constants for the devolo_home_control integration."""
import re
from homeassistant.const import Platform
DOMAIN = "devolo_home_control"
DEFAULT_MYDEVOLO = "https://www.mydevolo.com"
PLATFORMS = [
Platform.BINARY_SENSOR,
Platform.CLIMATE,
Platform.COVER,
Platform.LIGHT,
Platform.SENSOR,
Platform.SWITCH,
]
CONF_MYDEVOLO = "mydevolo_url"
GATEWAY_SERIAL_PATTERN = re.compile(r"\d{16}")
SUPPORTED_MODEL_TYPES = ["2600", "2601"]
| 192 |
30,023 | <reponame>tbarbette/core
"""Tests for the Litter-Robot Component."""
| 26 |
878 | <gh_stars>100-1000
// Copyright <NAME> 2017
#include "../include/Radon.hpp"
namespace radon
{
Key::Key()
: Named()
{
}
Key::Key(const std::string & name, const std::string & value)
: Named(name), value(value)
{
}
Key::Key(const std::string & name, const float & value)
: Named(name), value(std::to_string(value))
{
}
std::string Key::getStringValue()
{
return value;
}
float Key::getFloatValue()
{
return (float)(atof(value.data()));
}
void Key::setValue(float & value)
{
this->value = std::to_string(value);
}
void Key::setValue(std::string & value)
{
this->value = value;
}
}
| 259 |
372 | /* Editor Settings: expandtabs and use 4 spaces for indentation
* ex: set softtabstop=4 tabstop=8 expandtab shiftwidth=4: *
* -*- mode: c, c-basic-offset: 4 -*- */
/*
* Copyright © BeyondTrust Software 2004 - 2019
* All rights reserved.
*
* 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.
*
* BEYONDTRUST MAKES THIS SOFTWARE AVAILABLE UNDER OTHER LICENSING TERMS AS
* WELL. IF YOU HAVE ENTERED INTO A SEPARATE LICENSE AGREEMENT WITH
* BEYONDTRUST, THEN YOU MAY ELECT TO USE THE SOFTWARE UNDER THE TERMS OF THAT
* SOFTWARE LICENSE AGREEMENT INSTEAD OF THE TERMS OF THE APACHE LICENSE,
* NOTWITHSTANDING THE ABOVE NOTICE. IF YOU HAVE QUESTIONS, OR WISH TO REQUEST
* A COPY OF THE ALTERNATE LICENSING TERMS OFFERED BY BEYONDTRUST, PLEASE CONTACT
* BEYONDTRUST AT beyondtrust.com/contact
*/
/*
* Copyright (C) BeyondTrust Software. All rights reserved.
*
* Module Name:
*
* batch_gather.c
*
* Abstract:
*
* BeyondTrust Security and Authentication Subsystem (LSASS)
*
* Active Directory Authentication Provider
*
* Authors: <NAME> (<EMAIL>)
* <NAME> (<EMAIL>)
* <NAME> (<EMAIL>)
*
*/
#include "adprovider.h"
#include "batch_gather.h"
static
DWORD
LsaAdBatchGatherObjectType(
IN OUT PLSA_AD_BATCH_ITEM pItem,
IN LSA_AD_BATCH_OBJECT_TYPE ObjectType
)
{
DWORD dwError = 0;
// Check that the object type is not changing under us.
if ((ObjectType != LSA_AD_BATCH_OBJECT_TYPE_USER) &&
(ObjectType != LSA_AD_BATCH_OBJECT_TYPE_GROUP))
{
dwError = LW_ERROR_DATA_ERROR;
BAIL_ON_LSA_ERROR(dwError);
}
else if (!pItem->ObjectType)
{
pItem->ObjectType = ObjectType;
}
else if (pItem->ObjectType != ObjectType)
{
dwError = LW_ERROR_DATA_ERROR;
BAIL_ON_LSA_ERROR(dwError);
}
cleanup:
return dwError;
error:
goto cleanup;
}
DWORD
LsaAdBatchGatherRpcObject(
IN OUT PLSA_AD_BATCH_ITEM pItem,
IN LSA_AD_BATCH_OBJECT_TYPE ObjectType,
IN OUT PSTR* ppszSid,
IN OUT PSTR* ppszSamAccountName
)
{
DWORD dwError = 0;
SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_HAVE_REAL);
dwError = LsaAdBatchGatherObjectType(pItem, ObjectType);
BAIL_ON_LSA_ERROR(dwError);
LSA_XFER_STRING(*ppszSid, pItem->pszSid);
LSA_XFER_STRING(*ppszSamAccountName, pItem->pszSamAccountName);
if (LSA_AD_BATCH_OBJECT_TYPE_USER == ObjectType)
{
pItem->UserInfo.dwPrimaryGroupRid = WELLKNOWN_SID_DOMAIN_USER_GROUP_RID;
XXX; // verify that we do not need an LsaBatchGatherRpcUser()...
}
cleanup:
return dwError;
error:
SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_ERROR);
goto cleanup;
}
static
DWORD
LsaAdBatchGatherSchemaModeUser(
IN OUT PLSA_AD_BATCH_ITEM pItem,
IN HANDLE hDirectory,
IN LDAPMessage* pMessage
)
{
DWORD dwError = 0;
DWORD dwValue = 0;
dwError = LwLdapGetUInt32(
hDirectory,
pMessage,
AD_LDAP_UID_TAG,
&dwValue);
if (LW_ERROR_INVALID_LDAP_ATTR_VALUE == dwError)
{
SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_DISABLED);
dwError = LW_ERROR_SUCCESS;
}
BAIL_ON_LSA_ERROR(dwError);
if (IsSetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_DISABLED))
{
goto cleanup;
}
if (!dwValue)
{
LSA_LOG_DEBUG("uid must be non-zero for SID '%s'", pItem->pszSid);
// SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_SKIP);
dwError = LW_ERROR_DATA_ERROR;
BAIL_ON_LSA_ERROR(dwError);
}
pItem->UserInfo.uid = (uid_t)dwValue;
dwError = LwLdapGetUInt32(
hDirectory,
pMessage,
AD_LDAP_GID_TAG,
&dwValue);
if (LW_ERROR_INVALID_LDAP_ATTR_VALUE == dwError)
{
SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_DISABLED);
dwError = LW_ERROR_SUCCESS;
}
BAIL_ON_LSA_ERROR(dwError);
if (IsSetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_DISABLED))
{
goto cleanup;
}
if (!dwValue)
{
LSA_LOG_DEBUG("gid must be non-zero for SID '%s'", pItem->pszSid);
// SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_SKIP);
dwError = LW_ERROR_DATA_ERROR;
BAIL_ON_LSA_ERROR(dwError);
}
pItem->UserInfo.gid = (gid_t)dwValue;
dwError = LwLdapGetString(
hDirectory,
pMessage,
AD_LDAP_ALIAS_TAG,
&pItem->UserInfo.pszAlias);
BAIL_ON_LSA_ERROR(dwError);
dwError = LwLdapGetString(
hDirectory,
pMessage,
AD_LDAP_PASSWD_TAG,
&pItem->UserInfo.pszPasswd);
BAIL_ON_LSA_ERROR(dwError);
dwError = LwLdapGetString(
hDirectory,
pMessage,
AD_LDAP_GECOS_TAG,
&pItem->UserInfo.pszGecos);
BAIL_ON_LSA_ERROR(dwError);
dwError = LwLdapGetString(
hDirectory,
pMessage,
AD_LDAP_HOMEDIR_TAG,
&pItem->UserInfo.pszHomeDirectory);
BAIL_ON_LSA_ERROR(dwError);
dwError = LwLdapGetString(
hDirectory,
pMessage,
AD_LDAP_SHELL_TAG,
&pItem->UserInfo.pszShell);
BAIL_ON_LSA_ERROR(dwError);
#if 0
dwError = LwLdapGetString(
hDirectory,
pMessage,
AD_LDAP_LOCALWINDOWSHOMEFOLDER_TAG,
&pItem->UserInfo.pszLocalWindowsHomeFolder);
BAIL_ON_LSA_ERROR(dwError);
#endif
cleanup:
return dwError;
error:
goto cleanup;
}
static
DWORD
LsaAdBatchGatherSchemaModeGroup(
IN OUT PLSA_AD_BATCH_ITEM pItem,
IN HANDLE hDirectory,
IN LDAPMessage* pMessage
)
{
DWORD dwError = 0;
DWORD dwValue = 0;
dwError = LwLdapGetUInt32(
hDirectory,
pMessage,
AD_LDAP_GID_TAG,
&dwValue);
if (LW_ERROR_INVALID_LDAP_ATTR_VALUE == dwError)
{
SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_DISABLED);
dwError = LW_ERROR_SUCCESS;
}
BAIL_ON_LSA_ERROR(dwError);
if (IsSetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_DISABLED))
{
goto cleanup;
}
if (!dwValue)
{
LSA_LOG_DEBUG("gid must be non-zero for SID '%s'", pItem->pszSid);
// SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_SKIP);
dwError = LW_ERROR_DATA_ERROR;
BAIL_ON_LSA_ERROR(dwError);
}
pItem->GroupInfo.gid = (gid_t)dwValue;
dwError = LwLdapGetString(
hDirectory,
pMessage,
AD_LDAP_DISPLAY_NAME_TAG,
&pItem->GroupInfo.pszAlias);
BAIL_ON_LSA_ERROR(dwError);
dwError = LwLdapGetString(
hDirectory,
pMessage,
AD_LDAP_PASSWD_TAG,
&pItem->GroupInfo.pszPasswd);
BAIL_ON_LSA_ERROR(dwError);
cleanup:
return dwError;
error:
goto cleanup;
}
static
DWORD
LsaAdBatchGatherSchemaMode(
IN OUT PLSA_AD_BATCH_ITEM pItem,
IN HANDLE hDirectory,
IN LDAPMessage* pMessage
)
{
DWORD dwError = 0;
switch (pItem->ObjectType)
{
case LSA_AD_BATCH_OBJECT_TYPE_USER:
dwError = LsaAdBatchGatherSchemaModeUser(
pItem,
hDirectory,
pMessage);
BAIL_ON_LSA_ERROR(dwError);
break;
case LSA_AD_BATCH_OBJECT_TYPE_GROUP:
dwError = LsaAdBatchGatherSchemaModeGroup(
pItem,
hDirectory,
pMessage);
BAIL_ON_LSA_ERROR(dwError);
break;
default:
LSA_ASSERT(FALSE);
dwError = LW_ERROR_INTERNAL;
BAIL_ON_LSA_ERROR(dwError);
}
cleanup:
return dwError;
error:
goto cleanup;
}
static
DWORD
LsaAdBatchGatherNonSchemaModeUser(
IN OUT PLSA_AD_BATCH_ITEM pItem,
IN DWORD dwKeywordValuesCount,
IN PSTR* ppszKeywordValues
)
{
DWORD dwError = 0;
DWORD dwValue = 0;
dwError = ADNonSchemaKeywordGetUInt32(
ppszKeywordValues,
dwKeywordValuesCount,
AD_LDAP_UID_TAG,
&dwValue);
if (LW_ERROR_INVALID_LDAP_ATTR_VALUE == dwError)
{
SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_DISABLED);
dwError = LW_ERROR_SUCCESS;
}
BAIL_ON_LSA_ERROR(dwError);
if (IsSetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_DISABLED))
{
goto cleanup;
}
if (!dwValue)
{
LSA_LOG_DEBUG("uid must be non-zero for SID '%s'", pItem->pszSid);
// SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_SKIP);
dwError = LW_ERROR_DATA_ERROR;
BAIL_ON_LSA_ERROR(dwError);
}
pItem->UserInfo.uid = (uid_t)dwValue;
dwError = ADNonSchemaKeywordGetUInt32(
ppszKeywordValues,
dwKeywordValuesCount,
AD_LDAP_GID_TAG,
&dwValue);
BAIL_ON_LSA_ERROR(dwError);
if (!dwValue)
{
LSA_LOG_DEBUG("gid must be non-zero for SID '%s'", pItem->pszSid);
// SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_SKIP);
dwError = LW_ERROR_DATA_ERROR;
BAIL_ON_LSA_ERROR(dwError);
}
pItem->UserInfo.gid = (gid_t)dwValue;
dwError = ADNonSchemaKeywordGetString(
ppszKeywordValues,
dwKeywordValuesCount,
AD_LDAP_ALIAS_TAG,
&pItem->UserInfo.pszAlias);
BAIL_ON_LSA_ERROR(dwError);
dwError = ADNonSchemaKeywordGetString(
ppszKeywordValues,
dwKeywordValuesCount,
AD_LDAP_PASSWD_TAG,
&pItem->UserInfo.pszPasswd);
BAIL_ON_LSA_ERROR(dwError);
dwError = ADNonSchemaKeywordGetString(
ppszKeywordValues,
dwKeywordValuesCount,
AD_LDAP_GECOS_TAG,
&pItem->UserInfo.pszGecos);
BAIL_ON_LSA_ERROR(dwError);
dwError = ADNonSchemaKeywordGetString(
ppszKeywordValues,
dwKeywordValuesCount,
AD_LDAP_HOMEDIR_TAG,
&pItem->UserInfo.pszHomeDirectory);
BAIL_ON_LSA_ERROR(dwError);
dwError = ADNonSchemaKeywordGetString(
ppszKeywordValues,
dwKeywordValuesCount,
AD_LDAP_SHELL_TAG,
&pItem->UserInfo.pszShell);
BAIL_ON_LSA_ERROR(dwError);
dwError = ADNonSchemaKeywordGetString(
ppszKeywordValues,
dwKeywordValuesCount,
AD_LDAP_LOCALWINDOWSHOMEFOLDER_TAG,
&pItem->UserInfo.pszLocalWindowsHomeFolder);
BAIL_ON_LSA_ERROR(dwError);
cleanup:
return dwError;
error:
goto cleanup;
}
static
DWORD
LsaAdBatchGatherNonSchemaModeGroup(
IN OUT PLSA_AD_BATCH_ITEM pItem,
IN DWORD dwKeywordValuesCount,
IN PSTR* ppszKeywordValues
)
{
DWORD dwError = 0;
DWORD dwValue = 0;
dwError = ADNonSchemaKeywordGetUInt32(
ppszKeywordValues,
dwKeywordValuesCount,
AD_LDAP_GID_TAG,
&dwValue);
if (LW_ERROR_INVALID_LDAP_ATTR_VALUE == dwError)
{
SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_DISABLED);
dwError = LW_ERROR_SUCCESS;
}
BAIL_ON_LSA_ERROR(dwError);
if (IsSetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_DISABLED))
{
goto cleanup;
}
if (!dwValue)
{
LSA_LOG_DEBUG("gid must be non-zero for SID '%s'", pItem->pszSid);
// SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_SKIP);
dwError = LW_ERROR_DATA_ERROR;
BAIL_ON_LSA_ERROR(dwError);
}
pItem->GroupInfo.gid = (gid_t)dwValue;
dwError = ADNonSchemaKeywordGetString(
ppszKeywordValues,
dwKeywordValuesCount,
AD_LDAP_DISPLAY_NAME_TAG,
&pItem->GroupInfo.pszAlias);
BAIL_ON_LSA_ERROR(dwError);
dwError = ADNonSchemaKeywordGetString(
ppszKeywordValues,
dwKeywordValuesCount,
AD_LDAP_PASSWD_TAG,
&pItem->GroupInfo.pszPasswd);
BAIL_ON_LSA_ERROR(dwError);
cleanup:
return dwError;
error:
goto cleanup;
}
static
DWORD
LsaAdBatchGatherNonSchemaMode(
IN OUT PLSA_AD_BATCH_ITEM pItem,
IN DWORD dwKeywordValuesCount,
IN PSTR* ppszKeywordValues
)
{
DWORD dwError = 0;
switch (pItem->ObjectType)
{
case LSA_AD_BATCH_OBJECT_TYPE_USER:
dwError = LsaAdBatchGatherNonSchemaModeUser(
pItem,
dwKeywordValuesCount,
ppszKeywordValues);
BAIL_ON_LSA_ERROR(dwError);
break;
case LSA_AD_BATCH_OBJECT_TYPE_GROUP:
dwError = LsaAdBatchGatherNonSchemaModeGroup(
pItem,
dwKeywordValuesCount,
ppszKeywordValues);
BAIL_ON_LSA_ERROR(dwError);
break;
default:
LSA_ASSERT(FALSE);
dwError = LW_ERROR_INTERNAL;
BAIL_ON_LSA_ERROR(dwError);
}
cleanup:
return dwError;
error:
goto cleanup;
}
static
DWORD
LsaAdBatchGatherUnprovisionedModeUser(
IN OUT PLSA_AD_BATCH_ITEM pItem,
IN HANDLE hDirectory,
IN LDAPMessage* pMessage
)
{
DWORD dwError = 0;
// Check for a machine account. Last character in name will be "$"
// In the future, it would be safer to either add a new
// LSA_AD_BATCH_OBJECT_TYPE_COMPUTER value or an additional
// flag to distinguish a user from a computer. For current
// AD releases however, this is a sufficient check
if (pItem->pszSamAccountName[strlen(pItem->pszSamAccountName)-1] == '$')
{
SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_DISABLED);
}
#if 0
if (dwError != 0)
{
LSA_LOG_ERROR("Failed to get primary group ID for SID '%s'",
pItem->pszSid);
pItem->UserInfo.dwPrimaryGroupRid = WELLKNOWN_SID_DOMAIN_USER_GROUP_RID;
dwError = 0;
}
#endif
// Use display name for user gecos.
dwError = LwLdapGetString(
hDirectory,
pMessage,
AD_LDAP_DISPLAY_NAME_TAG,
&pItem->UserInfo.pszGecos);
BAIL_ON_LSA_ERROR(dwError);
cleanup:
return dwError;
error:
goto cleanup;
}
static
DWORD
LsaAdBatchGatherUnprovisionedMode(
IN OUT PLSA_AD_BATCH_ITEM pItem,
IN HANDLE hDirectory,
IN LDAPMessage* pMessage
)
{
DWORD dwError = 0;
switch (pItem->ObjectType)
{
case LSA_AD_BATCH_OBJECT_TYPE_USER:
dwError = LsaAdBatchGatherUnprovisionedModeUser(
pItem,
hDirectory,
pMessage);
BAIL_ON_LSA_ERROR(dwError);
break;
case LSA_AD_BATCH_OBJECT_TYPE_GROUP:
// Nothing special for groups.
break;
default:
LSA_ASSERT(FALSE);
dwError = LW_ERROR_INTERNAL;
BAIL_ON_LSA_ERROR(dwError);
}
cleanup:
return dwError;
error:
goto cleanup;
}
static
DWORD
LsaAdBatchGatherRealUser(
IN OUT PLSA_AD_BATCH_ITEM pItem,
IN HANDLE hDirectory,
IN LDAPMessage* pMessage
)
{
DWORD dwError = 0;
dwError = LwLdapGetUInt32(
hDirectory,
pMessage,
AD_LDAP_PRIMEGID_TAG,
&pItem->UserInfo.dwPrimaryGroupRid);
BAIL_ON_LSA_ERROR(dwError);
LSA_ASSERT(!pItem->UserInfo.pszUserPrincipalName);
dwError = LwLdapGetString(
hDirectory,
pMessage,
AD_LDAP_UPN_TAG,
&pItem->UserInfo.pszUserPrincipalName);
BAIL_ON_LSA_ERROR(dwError);
if (pItem->UserInfo.pszUserPrincipalName)
{
// Do not touch the non-realm part, just the realm part
// to make sure the realm conforms to spec.
LsaPrincipalRealmToUpper(pItem->UserInfo.pszUserPrincipalName);
}
dwError = LwLdapGetUInt32(
hDirectory,
pMessage,
AD_LDAP_USER_CTRL_TAG,
&pItem->UserInfo.UserAccountControl);
if (dwError == LW_ERROR_INVALID_LDAP_ATTR_VALUE)
{
LSA_LOG_VERBOSE(
"User %s has an invalid value for the userAccountControl"
" attribute. Please check that it is set and that the "
"machine account has permission to read it. Assuming 0x%x",
pItem->pszSid, LSA_AD_UF_DEFAULT);
pItem->UserInfo.UserAccountControl = LSA_AD_UF_DEFAULT;
dwError = 0;
}
BAIL_ON_LSA_ERROR(dwError);
dwError = LwLdapGetUInt64(
hDirectory,
pMessage,
AD_LDAP_ACCOUT_EXP_TAG,
&pItem->UserInfo.AccountExpires);
if (dwError == LW_ERROR_INVALID_LDAP_ATTR_VALUE)
{
LSA_LOG_VERBOSE(
"User %s has an invalid value for the accountExpires"
" attribute. Please check that it is set and that the "
"machine account has permission to read it.",
pItem->pszSid);
pItem->UserInfo.AccountExpires = 0;
dwError = 0;
}
BAIL_ON_LSA_ERROR(dwError);
dwError = LwLdapGetUInt64(
hDirectory,
pMessage,
AD_LDAP_PWD_LASTSET_TAG,
&pItem->UserInfo.PasswordLastSet);
if (dwError == LW_ERROR_INVALID_LDAP_ATTR_VALUE)
{
LSA_LOG_VERBOSE(
"User %s has an invalid value for the passwordLastSet"
" attribute. Please check that it is set and that the "
"machine account has permission to read it.",
pItem->pszSid);
dwError = ADGetCurrentNtTime(&pItem->UserInfo.PasswordLastSet);
}
BAIL_ON_LSA_ERROR(dwError);
LSA_ASSERT(!pItem->UserInfo.pszDisplayName);
dwError = LwLdapGetString(
hDirectory,
pMessage,
AD_LDAP_DISPLAY_NAME_TAG,
&pItem->UserInfo.pszDisplayName);
BAIL_ON_LSA_ERROR(dwError);
dwError = LwLdapGetString(
hDirectory,
pMessage,
AD_LDAP_WINDOWSHOMEFOLDER_TAG,
&pItem->UserInfo.pszWindowsHomeFolder);
BAIL_ON_LSA_ERROR(dwError);
SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_ACCOUNT_INFO_KNOWN);
cleanup:
return dwError;
error:
goto cleanup;
}
DWORD
LsaAdBatchGatherRealObject(
IN PAD_PROVIDER_DATA pProviderData,
IN OUT PLSA_AD_BATCH_ITEM pItem,
IN LSA_AD_BATCH_OBJECT_TYPE ObjectType,
IN OUT OPTIONAL PSTR* ppszSid,
IN HANDLE hDirectory,
IN LDAPMessage* pMessage
)
{
return LsaAdBatchGatherRealObjectInternal(
pProviderData,
pItem,
NULL,
NULL,
ObjectType,
ppszSid,
hDirectory,
pMessage);
}
DWORD
LsaAdBatchGatherRealObjectInternal(
IN PAD_PROVIDER_DATA pProviderData,
IN OUT PLSA_AD_BATCH_ITEM pItem,
IN OPTIONAL PDWORD pdwDirectoryMode,
IN OPTIONAL ADConfigurationMode* pAdMode,
IN LSA_AD_BATCH_OBJECT_TYPE ObjectType,
IN OUT OPTIONAL PSTR* ppszSid,
IN HANDLE hDirectory,
IN LDAPMessage* pMessage
)
{
DWORD dwError = 0;
DWORD dwDirectoryMode = pdwDirectoryMode == NULL ? pProviderData->dwDirectoryMode : *pdwDirectoryMode;
ADConfigurationMode adMode = pAdMode == NULL ? pProviderData->adConfigurationMode : *pAdMode;
SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_HAVE_REAL);
dwError = LsaAdBatchGatherObjectType(pItem, ObjectType);
BAIL_ON_LSA_ERROR(dwError);
if (!pItem->pszSid)
{
if (ppszSid)
{
LSA_XFER_STRING(*ppszSid, pItem->pszSid);
}
else
{
dwError = ADLdap_GetObjectSid(hDirectory, pMessage, &pItem->pszSid);
BAIL_ON_LSA_ERROR(dwError);
}
}
if (LW_IS_NULL_OR_EMPTY_STR(pItem->pszSid))
{
dwError = LW_ERROR_DATA_ERROR;
BAIL_ON_LSA_ERROR(dwError);
}
LSA_ASSERT(!pItem->pszSamAccountName);
dwError = LwLdapGetString(
hDirectory,
pMessage,
AD_LDAP_SAM_NAME_TAG,
&pItem->pszSamAccountName);
BAIL_ON_LSA_ERROR(dwError);
if (LW_IS_NULL_OR_EMPTY_STR(pItem->pszSamAccountName))
{
dwError = LW_ERROR_DATA_ERROR;
BAIL_ON_LSA_ERROR(dwError);
}
LSA_ASSERT(!pItem->pszDn);
dwError = LwLdapGetString(
hDirectory,
pMessage,
AD_LDAP_DN_TAG,
&pItem->pszDn);
BAIL_ON_LSA_ERROR(dwError);
if (LW_IS_NULL_OR_EMPTY_STR(pItem->pszDn))
{
dwError = LW_ERROR_DATA_ERROR;
BAIL_ON_LSA_ERROR(dwError);
}
// Handle cases where real contains pseudo.
if (DEFAULT_MODE == dwDirectoryMode && SchemaMode == adMode)
{
// But only if we are not being called by a pseudo
// lookup for default schema mode.
if (!IsSetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_HAVE_PSEUDO))
{
SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_HAVE_PSEUDO);
dwError = LsaAdBatchGatherSchemaMode(
pItem,
hDirectory,
pMessage);
BAIL_ON_LSA_ERROR(dwError);
}
}
else if (UNPROVISIONED_MODE == dwDirectoryMode)
{
dwError = LsaAdBatchGatherUnprovisionedMode(
pItem,
hDirectory,
pMessage);
BAIL_ON_LSA_ERROR(dwError);
}
// User object has some AD-specific fields.
if (LSA_AD_BATCH_OBJECT_TYPE_USER == pItem->ObjectType)
{
dwError = LsaAdBatchGatherRealUser(
pItem,
hDirectory,
pMessage);
BAIL_ON_LSA_ERROR(dwError);
}
cleanup:
return dwError;
error:
SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_ERROR);
goto cleanup;
}
DWORD
LsaAdBatchGatherPseudoObjectDefaultSchema(
IN OUT PLSA_AD_BATCH_ITEM pItem,
IN LSA_AD_BATCH_OBJECT_TYPE ObjectType,
IN OUT OPTIONAL PSTR* ppszSid,
IN HANDLE hDirectory,
IN LDAPMessage* pMessage
)
{
DWORD dwError = 0;
dwError = LsaAdBatchGatherObjectType(pItem, ObjectType);
BAIL_ON_LSA_ERROR(dwError);
if (!pItem->pszSid)
{
if (ppszSid)
{
LSA_XFER_STRING(*ppszSid, pItem->pszSid);
}
else
{
dwError = ADLdap_GetObjectSid(hDirectory, pMessage, &pItem->pszSid);
BAIL_ON_LSA_ERROR(dwError);
}
}
if (LW_IS_NULL_OR_EMPTY_STR(pItem->pszSid))
{
dwError = LW_ERROR_DATA_ERROR;
BAIL_ON_LSA_ERROR(dwError);
}
if (!IsSetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_HAVE_PSEUDO))
{
SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_HAVE_PSEUDO);
dwError = LsaAdBatchGatherSchemaMode(
pItem,
hDirectory,
pMessage);
BAIL_ON_LSA_ERROR(dwError);
}
cleanup:
return dwError;
error:
SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_ERROR);
goto cleanup;
}
static
DWORD
LsaAdBatchGatherPseudoSid(
OUT PSTR* ppszSid,
IN PAD_PROVIDER_DATA pProviderData,
IN OPTIONAL DWORD dwKeywordValuesCount,
IN OPTIONAL PSTR* ppszKeywordValues,
IN HANDLE hDirectory,
IN LDAPMessage* pMessage
)
{
DWORD dwError = 0;
PSTR pszSid = NULL;
if (LsaAdBatchIsDefaultSchemaMode(pProviderData))
{
dwError = ADLdap_GetObjectSid(hDirectory, pMessage, &pszSid);
BAIL_ON_LSA_ERROR(dwError);
}
else
{
PCSTR pszSidFromKeywords = NULL;
LSA_ASSERT(ppszKeywordValues);
pszSidFromKeywords = LsaAdBatchFindKeywordAttributeStatic(
dwKeywordValuesCount,
ppszKeywordValues,
AD_LDAP_BACKLINK_PSEUDO_TAG);
if (LW_IS_NULL_OR_EMPTY_STR(pszSidFromKeywords))
{
dwError = LW_ERROR_INVALID_SID;
BAIL_ON_LSA_ERROR(dwError);
}
dwError = LwAllocateString(pszSidFromKeywords, &pszSid);
BAIL_ON_LSA_ERROR(dwError);
}
cleanup:
*ppszSid = pszSid;
return dwError;
error:
LW_SAFE_FREE_STRING(pszSid);
goto cleanup;
}
DWORD
LsaAdBatchGatherPseudoObject(
IN PAD_PROVIDER_DATA pProviderData,
IN OUT PLSA_AD_BATCH_ITEM pItem,
IN LSA_AD_BATCH_OBJECT_TYPE ObjectType,
IN BOOLEAN bIsSchemaMode,
IN OPTIONAL DWORD dwKeywordValuesCount,
IN OPTIONAL PSTR* ppszKeywordValues,
IN HANDLE hDirectory,
IN LDAPMessage* pMessage
)
{
DWORD dwError = 0;
PSTR pszComparePseudoDn = NULL;
LSA_ASSERT(LSA_IS_XOR(LsaAdBatchIsDefaultSchemaMode(pProviderData), ppszKeywordValues));
SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_HAVE_PSEUDO);
dwError = LsaAdBatchGatherObjectType(pItem, ObjectType);
BAIL_ON_LSA_ERROR(dwError);
if (!pItem->pszSid)
{
dwError = LsaAdBatchGatherPseudoSid(
&pItem->pszSid,
pProviderData,
dwKeywordValuesCount,
ppszKeywordValues,
hDirectory,
pMessage);
BAIL_ON_LSA_ERROR(dwError);
}
if (!pItem->pszPseudoDn)
{
dwError = LwLdapGetString(
hDirectory,
pMessage,
AD_LDAP_DN_TAG,
&pItem->pszPseudoDn);
BAIL_ON_LSA_ERROR(dwError);
if (LW_IS_NULL_OR_EMPTY_STR(pItem->pszPseudoDn))
{
dwError = LW_ERROR_DATA_ERROR;
BAIL_ON_LSA_ERROR(dwError);
}
}
pItem->FoundPseudoCount++;
if (pItem->FoundPseudoCount > 1)
{
dwError = LwLdapGetString(
hDirectory,
pMessage,
AD_LDAP_DN_TAG,
&pszComparePseudoDn);
BAIL_ON_LSA_ERROR(dwError);
LSA_LOG_WARNING("Found pseudo object %s that conflicts with pseudo object %s for SID %s",
LSA_SAFE_LOG_STRING(pItem->pszPseudoDn),
LSA_SAFE_LOG_STRING(pszComparePseudoDn),
LSA_SAFE_LOG_STRING(pItem->pszSid));
dwError = LW_ERROR_DUPLICATE_USER_OR_GROUP;
BAIL_ON_LSA_ERROR(dwError);
}
if (bIsSchemaMode)
{
dwError = LsaAdBatchGatherSchemaMode(
pItem,
hDirectory,
pMessage);
BAIL_ON_LSA_ERROR(dwError);
// In default Schema mode, originally the following portion of code tries to gather real use information
// using 'pMessage' obtained during pseudo objects lookup
// However, a GC search is used on pseudo objects lookup,
// Some of the attributes, such as user-specific attributes, i.e. 'accountExpires' etc.
// are not available in GC. We still need to look up real objects in that particular domain for those missing attributes
// Hence, we do not gather real object information until we actually do a real object lookup later on.
#if 0
if (LsaAdBatchIsDefaultSchemaMode() &&
!IsSetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_HAVE_REAL))
{
dwError = LsaAdBatchGatherRealObject(
pItem,
ObjectType,
NULL,
hDirectory,
pMessage);
BAIL_ON_LSA_ERROR(dwError);
}
#endif
}
else
{
dwError = LsaAdBatchGatherNonSchemaMode(
pItem,
dwKeywordValuesCount,
ppszKeywordValues);
BAIL_ON_LSA_ERROR(dwError);
}
cleanup:
LW_SAFE_FREE_STRING(pszComparePseudoDn);
return dwError;
error:
SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_ERROR);
goto cleanup;
}
DWORD
LsaAdBatchGatherPseudoObjectSidFromGc(
IN PAD_PROVIDER_DATA pProviderData,
IN OUT PLSA_AD_BATCH_ITEM pItem,
IN LSA_AD_BATCH_OBJECT_TYPE ObjectType,
IN OPTIONAL DWORD dwKeywordValuesCount,
IN OPTIONAL PSTR* ppszKeywordValues,
IN HANDLE hDirectory,
IN LDAPMessage* pMessage
)
{
DWORD dwError = 0;
LSA_ASSERT(LSA_IS_XOR(LsaAdBatchIsDefaultSchemaMode(pProviderData), ppszKeywordValues));
LSA_ASSERT(!IsSetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_HAVE_PSEUDO));
dwError = LsaAdBatchGatherObjectType(pItem, ObjectType);
BAIL_ON_LSA_ERROR(dwError);
if (!pItem->pszSid)
{
dwError = LsaAdBatchGatherPseudoSid(
&pItem->pszSid,
pProviderData,
dwKeywordValuesCount,
ppszKeywordValues,
hDirectory,
pMessage);
BAIL_ON_LSA_ERROR(dwError);
}
cleanup:
return dwError;
error:
SetFlag(pItem->Flags, LSA_AD_BATCH_ITEM_FLAG_ERROR);
goto cleanup;
}
| 16,596 |
6,224 | <reponame>maxvankessel/zephyr
/*
* Copyright (c) 2019 <NAME> <<EMAIL>>
*
* SPDX-License-Identifier: Apache-2.0
*/
#ifndef ZEPHYR_TEST_LIB_GUI_LVGL_IMG_H_
#define ZEPHYR_TEST_LIB_GUI_LVGL_IMG_H_
#include <lvgl.h>
const lv_img_dsc_t *get_lvgl_img(void);
#endif /* ZEPHYR_TEST_LIB_GUI_LVGL_IMG_H_ */
| 156 |
1,473 | /*
* Autopsy Forensic Browser
*
* Copyright 2020 Basis Technology Corp.
* Contact: carrier <at> sleuthkit <dot> org
*
* 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.
*/
package org.sleuthkit.autopsy.integrationtesting;
import java.io.File;
import org.sleuthkit.autopsy.integrationtesting.config.TestSuiteConfig;
import org.sleuthkit.autopsy.integrationtesting.config.IntegrationTestConfig;
import org.sleuthkit.autopsy.integrationtesting.config.IntegrationCaseType;
import java.io.IOException;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.List;
import java.util.Map;
import java.util.logging.Level;
import java.util.stream.Collectors;
import java.util.stream.Stream;
import org.apache.commons.io.FileUtils;
import org.apache.commons.lang.StringUtils;
import org.apache.commons.collections.CollectionUtils;
import org.openide.util.Exceptions;
import org.openide.util.Lookup;
import org.openide.util.Pair;
import org.sleuthkit.autopsy.casemodule.Case;
import org.sleuthkit.autopsy.casemodule.Case.CaseType;
import org.sleuthkit.autopsy.casemodule.CaseActionException;
import org.sleuthkit.autopsy.casemodule.CaseDetails;
import org.sleuthkit.autopsy.casemodule.NoCurrentCaseException;
import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbChoice;
import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoDbManager;
import org.sleuthkit.autopsy.centralrepository.datamodel.CentralRepoException;
import org.sleuthkit.autopsy.centralrepository.datamodel.PostgresCentralRepoSettings;
import org.sleuthkit.autopsy.centralrepository.datamodel.PostgresConnectionSettings;
import org.sleuthkit.autopsy.core.UserPreferences;
import org.sleuthkit.autopsy.core.UserPreferencesException;
import org.sleuthkit.autopsy.coreutils.Logger;
import org.sleuthkit.autopsy.coreutils.TimeStampUtils;
import org.sleuthkit.autopsy.datasourceprocessors.AutoIngestDataSourceProcessor;
import org.sleuthkit.autopsy.datasourceprocessors.AutoIngestDataSourceProcessor.AutoIngestDataSourceProcessorException;
import org.sleuthkit.autopsy.datasourceprocessors.DataSourceProcessorUtility;
import org.sleuthkit.autopsy.events.MessageServiceConnectionInfo;
import org.sleuthkit.autopsy.ingest.IngestJobSettings;
import org.sleuthkit.autopsy.integrationtesting.DiffService.DiffServiceException;
import org.sleuthkit.autopsy.integrationtesting.config.ConfigDeserializer;
import org.sleuthkit.autopsy.integrationtesting.config.ConnectionConfig;
import org.sleuthkit.autopsy.integrationtesting.config.EnvConfig;
import org.sleuthkit.autopsy.integrationtesting.config.TestingConfig;
import org.sleuthkit.autopsy.testutils.IngestUtils;
import org.sleuthkit.autopsy.testutils.TestUtilsException;
import org.sleuthkit.datamodel.CaseDbConnectionInfo;
import org.sleuthkit.datamodel.TskCoreException;
import org.sleuthkit.datamodel.TskData.DbType;
/**
* Main entry point for running integration tests. Handles processing
* parameters, ingesting data sources for cases, and running items implementing
* IntegrationTests.
*/
public class IntegrationTestService {
/**
* An exception thrown when there is a diff.
*/
public static class IntegrationTestDiffException extends Exception {
private static final long serialVersionUID = 1L;
/**
* Main constructor.
*
* @param message The message for the exception.
*/
public IntegrationTestDiffException(String message) {
super(message);
}
}
/**
* An error that prevented the normal operation of the integration test
* service.
*/
public static class IntegrationTestServiceException extends Exception {
private static final long serialVersionUID = 1L;
/**
* Main constructor.
*
* @param message The message.
*/
public IntegrationTestServiceException(String message) {
super(message);
}
/**
* Main constructor accepting message and exception.
*
* @param message The message for the exception.
* @param exception The inner exception.
*/
public IntegrationTestServiceException(String message, Throwable exception) {
super(message, exception);
}
}
private static final int DEFAULT_POSTGRES_PORT = 5432;
private static final int DEFAULT_ACTIVEMQ_PORT = 61616;
private static final int DEFAULT_SOLR_PORT = 8983;
// default port for zookeeper cloud
private static final int DEFAULT_ZOOKEEPER_PORT = 9983;
private static final Logger logger = Logger.getLogger(IntegrationTestService.class.getName());
private static final ConfigDeserializer configDeserializer = new ConfigDeserializer();
private static final DiffService diffService = new DiffService();
private static final ConfigurationModuleManager configurationModuleManager = new ConfigurationModuleManager();
/**
* Main entry point for running all integration tests.
*/
public void runIntegrationTests() throws IntegrationTestDiffException, IntegrationTestServiceException {
IntegrationTestConfig config;
try {
config = configDeserializer.getIntegrationTestConfig();
} catch (IOException ex) {
throw new IntegrationTestServiceException("There was an error processing integration test config", ex);
}
EnvConfig envConfig = config.getEnvConfig();
// setup external connections preserving old settings for reverting later.
AllConnectionInfo oldSettings = null;
boolean hasCrSettings = false;
CentralRepoDbChoice oldCrChoice = null;
try {
oldSettings = pushNewMultiUserSettings(new AllConnectionInfo(envConfig.getDbConnection(),
envConfig.getMqConnection(), envConfig.getSolrConnection(),
envConfig.getZkConnection(), envConfig.getCrConnection()));
hasCrSettings = oldSettings.getCrConnection() != null;
oldCrChoice = hasCrSettings ? getCurrentChoice() : null;
} catch (UserPreferencesException | CentralRepoException ex) {
logger.log(Level.SEVERE, "There was an error while trying to set up multi user connection information.", ex);
}
try {
// iterate through test suites if any exist
if (CollectionUtils.isEmpty(config.getTestSuites())) {
logger.log(Level.WARNING, "No test suites discovered. No tests will be run.");
} else {
for (TestSuiteConfig testSuiteConfig : config.getTestSuites()) {
for (CaseType caseType : IntegrationCaseType.getCaseTypes(testSuiteConfig.getCaseTypes())) {
if (hasCrSettings) {
try {
setCurrentChoice(caseType);
} catch (CentralRepoException ex) {
logger.log(Level.SEVERE, String.format("Unable to set cr settings to %s for test suite %s.", caseType.name(), testSuiteConfig.getName()));
}
}
try {
runIntegrationTestSuite(envConfig, caseType, testSuiteConfig);
} catch (CaseActionException | IllegalStateException | NoCurrentCaseException | IllegalArgumentException ex) {
logger.log(Level.SEVERE, "There was an error working with current case: " + testSuiteConfig.getName(), ex);
}
}
}
String goldPath = PathUtil.getAbsolutePath(envConfig.getWorkingDirectory(), envConfig.getRootGoldPath());
String outputPath = PathUtil.getAbsolutePath(envConfig.getWorkingDirectory(), envConfig.getRootTestOutputPath());
String diffPath = PathUtil.getAbsolutePath(envConfig.getWorkingDirectory(), envConfig.getDiffOutputPath());
try {
// write diff to file if requested
if (writeDiff(outputPath, goldPath, diffPath)) {
// if there is a diff, throw an exception accordingly
throw new IntegrationTestDiffException(String.format("There was a diff between the integration test gold data: %s "
+ "and the current iteration output data: %s. Diff file created at %s.",
goldPath, outputPath, diffPath));
}
} catch (DiffServiceException ex) {
throw new IntegrationTestServiceException("There was an error while trying to diff output with gold data.", ex);
}
}
} finally {
if (oldSettings != null) {
try {
// revert postgres, solr, activemq settings
pushNewMultiUserSettings(oldSettings);
} catch (Exception ex) {
logger.log(Level.WARNING, "There was an error reverting database settings", ex);
}
}
if (oldCrChoice != null) {
try {
pushCurrentCrChoice(oldCrChoice);
} catch (CentralRepoException ex) {
logger.log(Level.WARNING, "There was an error reverting cr settings", ex);
}
}
}
}
/**
* Represents all connection information.
*/
private static class AllConnectionInfo {
private final ConnectionConfig dbConnection;
private final ConnectionConfig mqConnection;
private final ConnectionConfig solrConnection;
private final ConnectionConfig zkConnection;
private final ConnectionConfig crConnection;
/**
* Main constructor.
*
* @param dbConnection A postgres database connection configuration.
* @param mqConnection An active mq connection configuration.
* @param solrConnection A solr connection configuration.
* @param zkConnection The zookeeper connection information.
* @param crConnection The central repo connection information.
*/
AllConnectionInfo(ConnectionConfig dbConnection,
ConnectionConfig mqConnection, ConnectionConfig solrConnection,
ConnectionConfig zkConnection, ConnectionConfig crConnection) {
this.dbConnection = dbConnection;
this.mqConnection = mqConnection;
this.solrConnection = solrConnection;
this.zkConnection = zkConnection;
this.crConnection = crConnection;
}
/**
* @return The postgres database connection configuration.
*/
ConnectionConfig getDbConnection() {
return dbConnection;
}
/**
* @return The active mq database connection configuration.
*/
ConnectionConfig getMqConnection() {
return mqConnection;
}
/**
* @return The solr connection configuration.
*/
ConnectionConfig getSolrConnection() {
return solrConnection;
}
/**
* @return The zookeeper connection configuration.
*/
ConnectionConfig getZkConnection() {
return zkConnection;
}
/**
* @return The central repo connection configuration.
*/
ConnectionConfig getCrConnection() {
return crConnection;
}
}
/**
* @return The currently selected CentralRepoDbChoice (i.e. Postgres, sqlite, etc.).
*/
private CentralRepoDbChoice getCurrentChoice() {
CentralRepoDbManager manager = new CentralRepoDbManager();
return manager.getSelectedDbChoice();
}
/**
* Sets the current CentralRepoDbChoice and returns the old value.
* @param curChoice The current choice to be selected.
* @return The old value for the central repo db choice.
* @throws CentralRepoException
*/
private CentralRepoDbChoice pushCurrentCrChoice(CentralRepoDbChoice curChoice) throws CentralRepoException {
CentralRepoDbManager manager = new CentralRepoDbManager();
CentralRepoDbChoice oldChoice = manager.getSelectedDbChoice();
manager.setSelctedDbChoice(curChoice);
manager.saveNewCentralRepo();
return oldChoice;
}
private void setCurrentChoice(CaseType caseType) throws CentralRepoException {
switch (caseType) {
case MULTI_USER_CASE:
pushCurrentCrChoice(CentralRepoDbChoice.POSTGRESQL_CUSTOM);
break;
case SINGLE_USER_CASE:
pushCurrentCrChoice(CentralRepoDbChoice.SQLITE);
break;
default: throw new IllegalArgumentException("No known case type: " + caseType);
}
}
/**
* Updates all multi user settings to those provided in connectionInfo. If
* connectionInfo or child items (i.e. postgres/mq/solr) are null, they are
* ignored and null is returned.
*
* @param connectionInfo The connection info or null if no setup to be done.
* @return The old settings (used for reverting).
* @throws UserPreferencesException
*/
private AllConnectionInfo pushNewMultiUserSettings(AllConnectionInfo connectionInfo) throws UserPreferencesException, CentralRepoException {
// take no action if no settings
if (connectionInfo == null) {
return null;
}
// setup connections and capture old settings.
ConnectionConfig oldPostgresSettings = pushPostgresSettings(connectionInfo.getDbConnection());
ConnectionConfig oldActiveMqSettings = pushActiveMqSettings(connectionInfo.getMqConnection());
ConnectionConfig oldSolrSettings = pushSolrSettings(connectionInfo.getSolrConnection());
ConnectionConfig oldZkSettings = pushZookeeperSettings(connectionInfo.getZkConnection());
ConnectionConfig oldCrSettings = pushCentralRepoSettings(connectionInfo.getCrConnection());
// return old settings
return new AllConnectionInfo(oldPostgresSettings, oldActiveMqSettings, oldSolrSettings, oldZkSettings, oldCrSettings);
}
/**
* Updates postgres connection settings returning the previous settings. If
* connectionInfo is null or missing necessary data, no update occurs and
* null is returned.
*
* @param connectionInfo The connection configuration or null.
* @return The previous settings.
* @throws UserPreferencesException
*/
private ConnectionConfig pushPostgresSettings(ConnectionConfig connectionInfo) throws UserPreferencesException {
// take no action if no database settings.
if (connectionInfo == null) {
return null;
}
// retrieve values
String username = connectionInfo.getUserName();
String host = connectionInfo.getHostName();
String password = <PASSWORD>();
int port = connectionInfo.getPort() == null ? PostgresConnectionSettings.DEFAULT_PORT : connectionInfo.getPort();
// ensure all necessary values are present.
if (StringUtils.isBlank(username) || StringUtils.isBlank(password) || StringUtils.isBlank(host)) {
logger.log(Level.WARNING, "Username, password, or host are not present. Not setting multi user connection info.");
return null;
}
// capture old information.
CaseDbConnectionInfo oldInfo = UserPreferences.getDatabaseConnectionInfo();
ConnectionConfig oldConnectionInfo = new ConnectionConfig(
oldInfo.getHost(),
parseIntOrDefault(oldInfo.getPort(), DEFAULT_POSTGRES_PORT),
oldInfo.getUserName(),
oldInfo.getPassword());
UserPreferences.setDatabaseConnectionInfo(new CaseDbConnectionInfo(host, Integer.toString(port), username, password, DbType.POSTGRESQL));
return oldConnectionInfo;
}
/**
* Updates active mq connection settings returning the previous settings. If
* connectionInfo is null or missing necessary data, no update occurs and
* null is returned.
*
* @param connectionInfo The connection configuration or null.
* @return The previous settings.
* @throws UserPreferencesException
*/
private ConnectionConfig pushActiveMqSettings(ConnectionConfig connectionInfo) throws UserPreferencesException {
// take no action if no database settings.
if (connectionInfo == null) {
return null;
}
// retrieve values
String host = connectionInfo.getHostName();
String username = connectionInfo.getUserName() == null ? "" : connectionInfo.getUserName();
String password = connectionInfo.getPassword() == null ? "" : connectionInfo.getPassword();
int port = connectionInfo.getPort() == null ? DEFAULT_ACTIVEMQ_PORT : connectionInfo.getPort();
// ensure all necessary values are present.
if (StringUtils.isBlank(host)) {
logger.log(Level.WARNING, "Host is not present. Not setting active mq connection info.");
return null;
}
// capture old information.
MessageServiceConnectionInfo oldInfo = UserPreferences.getMessageServiceConnectionInfo();
ConnectionConfig oldConnectionInfo = new ConnectionConfig(oldInfo.getHost(), oldInfo.getPort(), oldInfo.getUserName(), oldInfo.getPassword());
UserPreferences.setMessageServiceConnectionInfo(new MessageServiceConnectionInfo(host, port, username, password));
return oldConnectionInfo;
}
/**
* Updates solr connection settings returning the previous settings. If
* connectionInfo is null or missing necessary data, no update occurs and
* null is returned. Username and password are currently ignored.
*
* @param connectionInfo The connection configuration or null.
* @return The previous settings.
*/
private ConnectionConfig pushSolrSettings(ConnectionConfig connectionInfo) {
// take no action if no database settings.
if (connectionInfo == null) {
return null;
}
// retrieve values
String host = connectionInfo.getHostName();
int port = connectionInfo.getPort() == null ? DEFAULT_SOLR_PORT : connectionInfo.getPort();
// ensure all necessary values are present.
if (StringUtils.isBlank(host)) {
logger.log(Level.WARNING, "Host is not present. Not setting solr info.");
return null;
}
// capture old information.
String oldHost = UserPreferences.getIndexingServerHost();
String oldPortStr = UserPreferences.getIndexingServerPort();
UserPreferences.setIndexingServerHost(host);
UserPreferences.setIndexingServerPort(port);
return new ConnectionConfig(oldHost, parseIntOrDefault(oldPortStr, DEFAULT_SOLR_PORT), null, null);
}
/**
* Sets up the zookeeper connection information.
*
* @param connectionInfo The connection information for zookeeper.
* @return The previous settings.
*/
private ConnectionConfig pushZookeeperSettings(ConnectionConfig connectionInfo) {
if (connectionInfo == null) {
return null;
}
String host = connectionInfo.getHostName();
if (StringUtils.isBlank(host)) {
return null;
}
int port = connectionInfo.getPort() == null ? DEFAULT_ZOOKEEPER_PORT : connectionInfo.getPort();
ConnectionConfig oldInfo = new ConnectionConfig(
UserPreferences.getZkServerHost(),
parseIntOrDefault(UserPreferences.getZkServerPort(), DEFAULT_ZOOKEEPER_PORT),
null,
null);
UserPreferences.setZkServerHost(host);
UserPreferences.setZkServerPort(Integer.toString(port));
return oldInfo;
}
/**
* Sets up the central repo connection information.
*
* @param connectionInfo The connection information for central repository.
* @return The previous settings or null if not set.
*/
private ConnectionConfig pushCentralRepoSettings(ConnectionConfig connectionInfo) throws CentralRepoException {
// take no action if no database settings.
if (connectionInfo == null) {
return null;
}
// retrieve values
String username = connectionInfo.getUserName();
String host = connectionInfo.getHostName();
String password = connectionInfo.getPassword();
int port = connectionInfo.getPort() == null ? PostgresConnectionSettings.DEFAULT_PORT : connectionInfo.getPort();
// ensure all necessary values are present.
if (StringUtils.isBlank(username) || StringUtils.isBlank(password) || StringUtils.isBlank(host)) {
logger.log(Level.WARNING, "Username, password, or host are not present. Not setting central repo connection info.");
return null;
}
// capture old information.
CentralRepoDbManager manager = new CentralRepoDbManager();
PostgresCentralRepoSettings pgCr = manager.getDbSettingsPostgres();
ConnectionConfig oldConnectionInfo = new ConnectionConfig(
pgCr.getHost(),
pgCr.getPort(),
pgCr.getUserName(),
pgCr.getPassword());
pgCr.setHost(host);
pgCr.setUserName(username);
pgCr.setPort(port);
pgCr.setPassword(password);
pgCr.saveSettings();
return oldConnectionInfo;
}
/**
* Parses a string to an integer or uses the default value.
*
* @param toBeParsed The string to be parsed to an integer.
* @param defaultVal The default value to be used if no integer can be
* parsed.
* @return The determined value.
*/
private int parseIntOrDefault(String toBeParsed, int defaultVal) {
if (toBeParsed == null) {
return defaultVal;
}
try {
return Integer.parseInt(toBeParsed);
} catch (NumberFormatException ex) {
return defaultVal;
}
}
/**
* Runs a single test suite.
*
* @param envConfig The integrationt test environment config.
* @param caseType The type of case (single user, multi user).
* @param testSuiteConfig The configuration for the case.
*/
private void runIntegrationTestSuite(EnvConfig envConfig, CaseType caseType, TestSuiteConfig testSuiteConfig) throws CaseActionException, NoCurrentCaseException, IllegalStateException, IllegalArgumentException {
String caseName = testSuiteConfig.getName();
// create an autopsy case for each case in the config and for each case type for the specified case.
// then run ingest for the case.
Case autopsyCase = createCaseWithDataSources(
envConfig.getWorkingDirectory(),
envConfig.getRootCaseOutputPath(),
caseName,
caseType,
testSuiteConfig.getDataSources());
if (autopsyCase == null || autopsyCase != Case.getCurrentCase()) {
throw new IllegalStateException(
String.format("Case was not properly ingested or setup correctly for environment. Returned case is %s and current case is %s.",
autopsyCase, Case.getCurrentCase()));
}
// run configuration modules and get result
Pair<IngestJobSettings, List<ConfigurationModule<?>>> configurationResult
= configurationModuleManager.runConfigurationModules(caseName, testSuiteConfig.getConfigurationModules());
IngestJobSettings ingestSettings = configurationResult.first();
List<ConfigurationModule<?>> configModules = configurationResult.second();
// run ingest with ingest settings derived from configuration modules.
runIngest(autopsyCase, ingestSettings, caseName);
// once ingested, run integration tests to produce output.
OutputResults results = runIntegrationTests(testSuiteConfig.getIntegrationTests());
// revert any autopsy environment changes made by configuration modules.
configurationModuleManager.revertConfigurationModules(configModules);
String outputFolder = PathUtil.getAbsolutePath(envConfig.getWorkingDirectory(), envConfig.getRootTestOutputPath());
// write the results for the case to a file
results.serializeToFile(
envConfig.getUseRelativeOutput() == true
? Paths.get(outputFolder, testSuiteConfig.getRelativeOutputPath()).toString()
: outputFolder,
testSuiteConfig.getName(),
caseType
);
Case.closeCurrentCase();
}
/**
* Creates a case with the given data sources.
*
* @param workingDirectory The base working directory (if caseOutputPath or
* dataSourcePaths are relative, this is the working directory).
* @param caseOutputPath The case output path.
* @param caseName The name of the case (unique case name appends time
* stamp).
* @param caseType The type of case (single user / multi user).
* @param dataSourcePaths The path to the data sources.
* @return The generated case that is now the current case.
*/
private Case createCaseWithDataSources(String workingDirectory, String caseOutputPath, String caseName, CaseType caseType, List<String> dataSourcePaths)
throws CaseActionException, NoCurrentCaseException, IllegalStateException, IllegalArgumentException {
Case openCase = null;
String uniqueCaseName = String.format("%s_%s", caseName, TimeStampUtils.createTimeStamp());
String outputFolder = PathUtil.getAbsolutePath(workingDirectory, caseOutputPath);
String caseOutputFolder = Paths.get(outputFolder, uniqueCaseName).toString();
File caseOutputFolderFile = new File(caseOutputFolder);
if (!caseOutputFolderFile.exists()) {
caseOutputFolderFile.mkdirs();
}
Case.createAsCurrentCase(
caseType,
caseOutputFolder,
new CaseDetails(uniqueCaseName));
openCase = Case.getCurrentCaseThrows();
addDataSourcesToCase(PathUtil.getAbsolutePaths(workingDirectory, dataSourcePaths), caseName);
return openCase;
}
/**
* Adds the data sources to the current case.
*
* @param pathStrings The list of paths for the data sources.
* @param caseName The name of the case (used for error messages).
*/
private void addDataSourcesToCase(List<String> pathStrings, String caseName) {
for (String strPath : pathStrings) {
Path path = Paths.get(strPath);
List<AutoIngestDataSourceProcessor> processors = null;
try {
processors = DataSourceProcessorUtility.getOrderedListOfDataSourceProcessors(path);
} catch (AutoIngestDataSourceProcessorException ex) {
logger.log(Level.WARNING, String.format("There was an error while adding data source: %s to case %s", strPath, caseName));
}
if (CollectionUtils.isEmpty(processors)) {
continue;
}
try {
IngestUtils.addDataSource(processors.get(0), path);
} catch (TestUtilsException ex) {
logger.log(Level.WARNING, String.format("There was an error adding datasource at path: " + strPath), ex);
}
}
}
/**
* Runs ingest on the current case.
*
* @param openCase The currently open case.
* @param ingestJobSettings The ingest job settings to be used.
* @param caseName The name of the case to be used for error messages.
*/
private void runIngest(Case openCase, IngestJobSettings ingestJobSettings, String caseName) {
try {
if (CollectionUtils.isEmpty(openCase.getDataSources())) {
logger.log(Level.WARNING, String.format("No datasources provided in %s. Not running ingest.", caseName));
} else {
IngestUtils.runIngestJob(openCase.getDataSources(), ingestJobSettings);
}
} catch (TskCoreException | TestUtilsException ex) {
logger.log(Level.WARNING, String.format("There was an error while ingesting datasources for case %s", caseName), ex);
}
}
/**
* Runs the integration tests and serializes results to disk.
*
* @param testSuiteConfig The configuration for a particular case.
*/
private OutputResults runIntegrationTests(TestingConfig testSuiteConfig) {
// this will capture output results
OutputResults results = new OutputResults();
// run through each IntegrationTestGroup
for (IntegrationTestGroup testGroup : Lookup.getDefault().lookupAll(IntegrationTestGroup.class)) {
// if test should not be included in results, skip it.
if (!testSuiteConfig.hasIncludedTest(testGroup.getClass().getCanonicalName())) {
continue;
}
List<Method> testMethods = Stream.of(testGroup.getClass().getMethods())
.filter((method) -> method.getAnnotation(IntegrationTest.class) != null)
.collect(Collectors.toList());
if (CollectionUtils.isEmpty(testMethods)) {
continue;
}
testGroup.setupClass();
Map<String, Object> parametersMap = testSuiteConfig.getParameters(testGroup.getClass().getCanonicalName());
for (Method testMethod : testMethods) {
Object[] parameters = new Object[0];
// no more than 1 parameter in a test method.
if (testMethod.getParameters().length > 1) {
logger.log(Level.WARNING, String.format("Could not call method %s in class %s. Multiple parameters cannot be handled.",
testMethod.getName(), testGroup.getClass().getCanonicalName()));
continue;
// if there is a parameter, deserialize parameters to the specified type.
} else if (testMethod.getParameters().length > 0) {
parameters = new Object[]{configDeserializer.convertToObj(parametersMap, testMethod.getParameterTypes()[0])};
}
Object serializableResult = runIntegrationTestMethod(testGroup, testMethod, parameters);
// add the results and capture the package, class,
// and method of the test for easy location of failed tests
results.addResult(
testGroup.getClass().getPackage().getName(),
testGroup.getClass().getSimpleName(),
testMethod.getName(),
serializableResult);
}
testGroup.tearDownClass();
}
return results;
}
/**
* Runs a test method in a test suite on the current case.
*
* @param testGroup The test suite to which the method belongs.
* @param testMethod The java reflection method to run.
* @param parameters The parameters to use with this method or none/empty
* array.
* @return The results of running the method.
*/
private Object runIntegrationTestMethod(IntegrationTestGroup testGroup, Method testMethod, Object[] parameters) {
testGroup.setup();
// run the test method and get the results
Object serializableResult = null;
try {
serializableResult = testMethod.invoke(testGroup, parameters == null ? new Object[0] : parameters);
} catch (InvocationTargetException ex) {
// if the underlying method caused an exception, serialize that exception.
serializableResult = ex.getCause();
} catch (Exception ex) {
// any other exception should also be caught as a firewall exception handler.
logger.log(Level.WARNING,
String.format("test method %s in %s could not be properly invoked",
testMethod.getName(), testGroup.getClass().getCanonicalName()),
ex);
serializableResult = ex;
}
testGroup.tearDown();
return serializableResult;
}
/**
* Writes any differences found between gold and output to a diff file. Only
* works if a gold and diff location are specified in the EnvConfig. If
* there is a diff, throw an exception.
*
* @param outputPath Path to yaml output directory.
* @param goldPath Path to yaml gold directory.
* @param diffPath Path to where diff should be written if there is a diff.
* @return True if a diff was created.
*/
private boolean writeDiff(String outputPath, String goldPath, String diffPath) throws DiffServiceException {
if (StringUtils.isBlank(goldPath) || StringUtils.isBlank(diffPath)) {
logger.log(Level.INFO, "gold path or diff output path not specified. Not creating diff.");
}
File goldDir = new File(goldPath);
if (!goldDir.exists()) {
logger.log(Level.WARNING, String.format("Gold does not exist at location: %s. Not creating diff.", goldDir.toString()));
}
File outputDir = new File(outputPath);
if (!outputDir.exists()) {
logger.log(Level.WARNING, String.format("Output path does not exist at location: %s. Not creating diff.", outputDir.toString()));
}
String diff = diffService.diffFilesOrDirs(goldDir, outputDir);
if (StringUtils.isNotBlank(diff)) {
try {
FileUtils.writeStringToFile(new File(diffPath), diff, "UTF-8");
} catch (IOException ex) {
logger.log(Level.SEVERE, "Unable to write diff file to {0}", diffPath);
}
return true;
}
return false;
}
}
| 13,334 |
2,085 | <gh_stars>1000+
import spacy
# Carga el modelo es_core_news_sm
nlp = spacy.load("es_core_news_sm")
# Imprime en pantalla los nombres de los componentes del pipeline
print(nlp.pipe_names)
# Imprime en pantalla el pipeline entero de tuples (name, component)
print(nlp.pipeline)
| 103 |
2,073 | /**
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You 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.
*/
package org.apache.activemq.broker.scheduler.memory;
import java.io.File;
import java.util.HashMap;
import java.util.Map;
import java.util.concurrent.locks.ReentrantLock;
import org.apache.activemq.broker.scheduler.JobScheduler;
import org.apache.activemq.broker.scheduler.JobSchedulerStore;
import org.apache.activemq.util.ServiceStopper;
import org.apache.activemq.util.ServiceSupport;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
/**
* An in-memory JobSchedulerStore implementation used for Brokers that have persistence
* disabled or when the JobSchedulerStore usage doesn't require a file or DB based store
* implementation allowing for better performance.
*/
public class InMemoryJobSchedulerStore extends ServiceSupport implements JobSchedulerStore {
private static final Logger LOG = LoggerFactory.getLogger(InMemoryJobSchedulerStore.class);
private final ReentrantLock lock = new ReentrantLock();
private final Map<String, InMemoryJobScheduler> schedulers = new HashMap<String, InMemoryJobScheduler>();
@Override
protected void doStop(ServiceStopper stopper) throws Exception {
for (InMemoryJobScheduler scheduler : schedulers.values()) {
try {
scheduler.stop();
} catch (Exception e) {
LOG.error("Failed to stop scheduler: {}", scheduler.getName(), e);
}
}
}
@Override
protected void doStart() throws Exception {
for (InMemoryJobScheduler scheduler : schedulers.values()) {
try {
scheduler.start();
} catch (Exception e) {
LOG.error("Failed to start scheduler: {}", scheduler.getName(), e);
}
}
}
@Override
public JobScheduler getJobScheduler(String name) throws Exception {
this.lock.lock();
try {
InMemoryJobScheduler result = this.schedulers.get(name);
if (result == null) {
LOG.debug("Creating new in-memory scheduler: {}", name);
result = new InMemoryJobScheduler(name);
this.schedulers.put(name, result);
if (isStarted()) {
result.start();
}
}
return result;
} finally {
this.lock.unlock();
}
}
@Override
public boolean removeJobScheduler(String name) throws Exception {
boolean result = false;
this.lock.lock();
try {
InMemoryJobScheduler scheduler = this.schedulers.remove(name);
result = scheduler != null;
if (result) {
LOG.debug("Removing in-memory Job Scheduler: {}", name);
scheduler.stop();
this.schedulers.remove(name);
}
} finally {
this.lock.unlock();
}
return result;
}
//---------- Methods that don't really apply to this implementation ------//
@Override
public long size() {
return 0;
}
@Override
public File getDirectory() {
return null;
}
@Override
public void setDirectory(File directory) {
}
}
| 1,554 |
3,640 | <filename>filesystem/src/test/java/com/nytimes/android/external/fs3/impl/SimpleTest.java
package com.nytimes.android.external.fs3.impl;
import com.nytimes.android.external.fs3.filesystem.FileSystem;
import com.nytimes.android.external.fs3.filesystem.FileSystemFactory;
import com.nytimes.android.external.store3.base.RecordState;
import org.junit.Before;
import org.junit.Test;
import java.io.ByteArrayInputStream;
import java.io.File;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.util.concurrent.TimeUnit;
import okio.BufferedSource;
import okio.Okio;
import static com.google.common.base.Charsets.UTF_8;
import static com.google.common.io.Files.createTempDir;
import static org.assertj.core.api.Assertions.assertThat;
public class SimpleTest {
private static final String testString1 = "aszfbW#$%#$^&*5 r7ytjdfbv!@#R$\n@!#$%2354 wtyebfsdv\n";
private static final String testString2 = "#%^sdfvb#W%EtsdfbSER@#$%dsfb\nASRG \n #dsfvb \n";
private static FileSystem fileSystem;
@Before
public void start() throws IOException {
File baseDir = createTempDir();
fileSystem = FileSystemFactory.create(baseDir);
}
@Test(expected = FileNotFoundException.class)
public void loadFileNotFound() throws IOException {
fileSystem.read("/loadFileNotFound.txt").readUtf8();
}
@Test
public void saveNload() throws IOException {
diffMe("/flibber.txt", "/flibber.txt");
diffMe("/blarg/flibber.txt", "/blarg/flibber.txt");
diffMe("/blubber.txt", "blubber.txt");
diffMe("/blarg/blubber.txt", "blarg/blubber.txt");
}
@Test
public void delete() throws IOException {
fileSystem.write("/boo", source(testString1));
assertThat(fileSystem.read("/boo").readUtf8()).isEqualTo(testString1);
fileSystem.delete("/boo");
assertThat(fileSystem.exists("/boo")).isFalse();
}
@Test
public void testIsRecordStale() throws IOException {
fileSystem.write("/boo", source(testString1));
assertThat(fileSystem.read("/boo").readUtf8()).isEqualTo(testString1);
assertThat(fileSystem.getRecordState(TimeUnit.MINUTES, 1, "/boo")).isEqualTo(RecordState.FRESH);
assertThat(fileSystem.getRecordState(TimeUnit.MICROSECONDS, 1, "/boo")).isEqualTo(RecordState.STALE);
assertThat(fileSystem.getRecordState(TimeUnit.DAYS, 1, "/notfound")).isEqualTo(RecordState.MISSING);
}
@Test
public void testDeleteWhileReading() throws IOException {
fileSystem.write("/boo", source(testString1));
BufferedSource source = fileSystem.read("/boo");
fileSystem.delete("/boo");
assertThat(fileSystem.exists("/boo")).isFalse();
assertThat(source.readUtf8()).isEqualTo(testString1);
assertThat(fileSystem.exists("/boo")).isFalse();
}
@Test
public void deleteWhileReadingThenWrite() throws IOException {
fileSystem.write("/boo", source(testString1));
BufferedSource source1 = fileSystem.read("/boo"); // open a source and hang onto it
fileSystem.delete("/boo"); // now delete the file
assertThat(fileSystem.exists("/boo")).isFalse(); // exists() should say it's gone even though
// we still have a source to it
fileSystem.write("/boo", source(testString2)); // and now un-delete it by writing a new version
assertThat(fileSystem.exists("/boo")).isTrue(); // exists() should say it's back
BufferedSource source2 = fileSystem.read("/boo"); // open another source and hang onto it
fileSystem.delete("/boo"); // now delete the file *again*
// the sources should have the correct data even though the file was deleted/re-written/deleted
assertThat(source1.readUtf8()).isEqualTo(testString1);
assertThat(source2.readUtf8()).isEqualTo(testString2);
// now that the 2 sources have been fully read, you shouldn't be able to read it
assertThat(fileSystem.exists("/boo")).isFalse();
}
private void diffMe(String first, String second) {
try {
fileSystem.write(first, source(testString1));
} catch (IOException error) {
throw new RuntimeException("unable to write to " + first, error);
}
try {
assertThat(fileSystem.read(second).readUtf8()).isEqualTo(testString1);
} catch (IOException error) {
throw new RuntimeException("unable to read from " + second, error);
}
try {
fileSystem.write(second, source(testString2));
} catch (IOException error) {
throw new RuntimeException("unable to write to " + second, error);
}
try {
assertThat(fileSystem.read(first).readUtf8()).isEqualTo(testString2);
} catch (IOException error) {
throw new RuntimeException("unable to read from " + first, error);
}
}
private static BufferedSource source(String data) {
return Okio.buffer(Okio.source(new ByteArrayInputStream(data.getBytes(UTF_8))));
}
}
| 2,005 |
418 | <filename>src/tests/schedule/test_schedule_forms.py<gh_stars>100-1000
import datetime as dt
import json
import pytest
import pytz
from django.forms import ModelForm, ValidationError
from django.utils import timezone
from django_scopes import scope
from pretalx.person.models import SpeakerProfile
from pretalx.schedule.forms import AvailabilitiesFormMixin
from pretalx.schedule.models import Availability, Room
timezone.activate(pytz.utc)
class AvailabilitiesForm(AvailabilitiesFormMixin, ModelForm):
class Meta:
model = Room
fields = []
@pytest.fixture
def availabilitiesform(event):
event.date_from = dt.date(2017, 1, 1)
event.date_to = dt.date(2017, 1, 2)
return AvailabilitiesForm(
event=event,
instance=None,
)
@pytest.mark.django_db
@pytest.mark.parametrize(
"json,error",
(
("{{{", "not valid json"), # invalid json
("[]", "format"), # not a dict
("42", "format"), # not a dict
("{}", "format"), # no "availabilities"
('{"availabilities": {}}', "format"), # availabilities not a list
),
)
def test_parse_availabilities_json_fail(availabilitiesform, json, error):
with pytest.raises(ValidationError) as excinfo:
availabilitiesform._parse_availabilities_json(json)
assert error in str(excinfo.value)
@pytest.mark.django_db
@pytest.mark.parametrize(
"json",
(
('{"availabilities": []}'),
('{"availabilities": [1]}'),
),
)
def test_parse_availabilities_json_success(availabilitiesform, json):
availabilitiesform._parse_availabilities_json(json)
@pytest.mark.django_db
@pytest.mark.parametrize(
"avail",
(
([]), # not a dict
(42), # not a dict
({}), # missing attributes
({"start": True}), # missing attributes
({"end": True}), # missing attributes
({"start": True, "end": True, "foo": True}), # extra attributes
),
)
def test_validate_availability_fail_format(availabilitiesform, avail):
with pytest.raises(ValidationError) as excinfo:
availabilitiesform._validate_availability(avail)
assert "format" in str(excinfo.value)
@pytest.mark.django_db
@pytest.mark.parametrize(
"avail",
(
({"start": True, "end": True}), # wrong type
({"start": "", "end": ""}), # empty
({"start": "2017", "end": "2017"}), # missing month
({"start": "2017-01-01", "end": "2017-01-02"}), # missing time
),
)
def test_validate_availability_fail_date(availabilitiesform, avail):
with pytest.raises(ValidationError) as excinfo:
availabilitiesform._validate_availability(avail)
assert "invalid date" in str(excinfo.value)
@pytest.mark.django_db
@pytest.mark.parametrize(
"avail",
(
({"start": "2017-01-01 10:00:00", "end": "2017-01-01 12:00:00"}), # same day
({"start": "2017-01-01 10:00:00", "end": "2017-01-02 12:00:00"}), # next day
(
{"start": "2017-01-01 00:00:00", "end": "2017-01-02 00:00:00"}
), # all day start
({"start": "2017-01-02 00:00:00", "end": "2017-01-03 00:00:00"}), # all day end
),
)
def test_validate_availability_success(availabilitiesform, avail):
availabilitiesform._validate_availability(avail)
@pytest.mark.django_db
@pytest.mark.parametrize(
"avail",
(
(
{"start": "2017-01-01 00:00:00", "end": "2017-01-01 08:00:00"}
), # local time, start
(
{"start": "2017-01-02 05:00:00", "end": "2017-01-03 00:00:00"}
), # local time, end
(
{"start": "2017-01-01 00:00:00-05:00", "end": "2017-01-01 00:00:00-05:00"}
), # explicit timezone, start
(
{"start": "2017-01-02 05:00:00-05:00", "end": "2017-01-03 00:00:00-05:00"}
), # explicit timezone, end
(
{"start": "2017-01-01 05:00:00+00:00", "end": "2017-01-01 00:00:00-05:00"}
), # UTC, start
(
{"start": "2017-01-02 05:00:00-00:00", "end": "2017-01-03 05:00:00-00:00"}
), # UTC, end
),
)
def test_validate_availability_tz_success(availabilitiesform, avail):
availabilitiesform.event.timezone = "America/New_York"
availabilitiesform.event.save()
availabilitiesform._validate_availability(avail)
@pytest.mark.django_db
def test_validate_availability_daylightsaving(availabilitiesform):
# https://github.com/pretalx/pretalx/issues/460
availabilitiesform.event.timezone = "Europe/Berlin"
availabilitiesform.event.date_from = dt.date(2018, 10, 22)
availabilitiesform.event.date_to = dt.date(2018, 10, 28)
availabilitiesform.event.save()
availabilitiesform._validate_availability(
({"start": "2018-10-22 00:00:00", "end": "2018-10-29 00:00:00"})
)
@pytest.mark.django_db
@pytest.mark.parametrize(
"strdate,expected",
(
("2017-01-01 10:00:00", dt.datetime(2017, 1, 1, 10)),
("2017-01-01 10:00:00-05:00", dt.datetime(2017, 1, 1, 10)),
("2017-01-01 10:00:00-04:00", dt.datetime(2017, 1, 1, 9)),
),
)
def test_parse_datetime(availabilitiesform, strdate, expected):
availabilitiesform.event.timezone = "America/New_York"
availabilitiesform.event.save()
expected = pytz.timezone("America/New_York").localize(expected)
actual = availabilitiesform._parse_datetime(strdate)
assert actual == expected
@pytest.mark.django_db
@pytest.mark.parametrize(
"json,error",
(
("{{", "not valid json"),
('{"availabilities": [1]}', "format"),
),
)
def test_clean_availabilities_fail(availabilitiesform, json, error):
with pytest.raises(ValidationError) as excinfo:
availabilitiesform.cleaned_data = {"availabilities": json}
availabilitiesform.clean_availabilities()
assert error in str(excinfo.value)
@pytest.mark.django_db
@pytest.mark.parametrize(
"json,expected",
(
('{"availabilities": []}', []),
(
'{"availabilities": [{"start": "2017-01-01 10:00:00", "end": "2017-01-01 12:00:00"},'
'{"start": "2017-01-02 11:00:00", "end": "2017-01-02 13:00:00"}]}',
[
Availability(
start=dt.datetime(2017, 1, 1, 10), end=dt.datetime(2017, 1, 1, 12)
),
Availability(
start=dt.datetime(2017, 1, 2, 11), end=dt.datetime(2017, 1, 2, 13)
),
],
),
),
)
def test_clean_availabilities_success(availabilitiesform, json, expected):
availabilitiesform.cleaned_data = {"availabilities": json}
actual = availabilitiesform.clean_availabilities()
assert len(actual) == len(expected)
for act, exp in zip(actual, expected):
assert act.start.replace(tzinfo=None) == exp.start
assert act.end.replace(tzinfo=None) == exp.end
assert act.event_id == availabilitiesform.event.id
assert act.id is None
@pytest.mark.django_db
@pytest.mark.parametrize(
"instancegen,fk_name",
(
(lambda event_id: Room.objects.create(event_id=event_id), "room_id"),
(
lambda event_id: SpeakerProfile.objects.create(event_id=event_id),
"person_id",
),
),
)
def test_set_foreignkeys(availabilitiesform, instancegen, fk_name):
availabilities = [
Availability(
start=dt.datetime(2017, 1, 1, 10), end=dt.datetime(2017, 1, 1, 12)
),
Availability(
start=dt.datetime(2017, 1, 2, 10), end=dt.datetime(2017, 1, 2, 15)
),
]
instance = instancegen(availabilitiesform.event.id)
availabilitiesform._set_foreignkeys(instance, availabilities)
for avail in availabilities:
assert getattr(avail, fk_name) == instance.id
@pytest.mark.django_db
def test_replace_availabilities(availabilitiesform):
with scope(event=availabilitiesform.event):
instance = Room.objects.create(event_id=availabilitiesform.event.id)
Availability.objects.bulk_create(
[
Availability(
room_id=instance.id,
event_id=availabilitiesform.event.id,
start=dt.datetime(2017, 1, 1, 10, tzinfo=pytz.utc),
end=dt.datetime(2017, 1, 1, 12, tzinfo=pytz.utc),
),
Availability(
room_id=instance.id,
event_id=availabilitiesform.event.id,
start=dt.datetime(2017, 1, 2, 10, tzinfo=pytz.utc),
end=dt.datetime(2017, 1, 2, 15, tzinfo=pytz.utc),
),
]
)
expected = [
Availability(
room_id=instance.id,
event_id=availabilitiesform.event.id,
start=dt.datetime(2017, 1, 1, 12, tzinfo=pytz.utc),
end=dt.datetime(2017, 1, 1, 12, tzinfo=pytz.utc),
),
Availability(
room_id=instance.id,
event_id=availabilitiesform.event.id,
start=dt.datetime(2017, 1, 2, 12, tzinfo=pytz.utc),
end=dt.datetime(2017, 1, 2, 15, tzinfo=pytz.utc),
),
]
availabilitiesform._replace_availabilities(instance, expected)
actual = instance.availabilities.all()
for act, exp in zip(actual, expected):
assert act.start == exp.start
@pytest.mark.django_db
@pytest.mark.parametrize(
"avail,expected",
(
(
Availability(
start=dt.datetime(2017, 1, 1, 10, tzinfo=pytz.utc),
end=dt.datetime(2017, 1, 1, 12, tzinfo=pytz.utc),
),
{
"start": "2017-01-01T10:00:00Z",
"end": "2017-01-01T12:00:00Z",
"allDay": False,
},
),
(
Availability(
start=dt.datetime(2017, 1, 1, 10, tzinfo=pytz.utc),
end=dt.datetime(2017, 1, 2, tzinfo=pytz.utc),
),
{
"start": "2017-01-01T10:00:00Z",
"end": "2017-01-02T00:00:00Z",
"allDay": False,
},
),
(
Availability(
start=dt.datetime(2017, 1, 1, tzinfo=pytz.utc),
end=dt.datetime(2017, 1, 1, 10, tzinfo=pytz.utc),
),
{
"start": "2017-01-01T00:00:00Z",
"end": "2017-01-01T10:00:00Z",
"allDay": False,
},
),
(
Availability(
start=dt.datetime(2017, 1, 1, 10, tzinfo=pytz.utc),
end=dt.datetime(2017, 1, 2, tzinfo=pytz.utc),
),
{
"start": "2017-01-01T10:00:00Z",
"end": "2017-01-02T00:00:00Z",
"allDay": False,
},
),
(
Availability(
start=dt.datetime(2017, 1, 1, tzinfo=pytz.utc),
end=dt.datetime(2017, 1, 2, tzinfo=pytz.utc),
),
{
"start": "2017-01-01T00:00:00Z",
"end": "2017-01-02T00:00:00Z",
"allDay": True,
},
),
),
)
def test_serialize_availability(availabilitiesform, avail, expected):
with timezone.override(pytz.utc):
actual = avail.serialize()
del actual["id"]
assert actual == expected
@pytest.mark.django_db
@pytest.mark.parametrize(
"avails,expected,tzname",
(
(
[
Availability(
start=dt.datetime(2017, 1, 1, 10, tzinfo=pytz.utc),
end=dt.datetime(2017, 1, 1, 12, tzinfo=pytz.utc),
)
],
'{"availabilities": [{"id": 1, "start": "2017-01-01T10:00:00Z", "end": "2017-01-01T12:00:00Z", "allDay": false}], "event": {"timezone": "UTC", "date_from": "2017-01-01", "date_to": "2017-01-02"}}',
"UTC",
),
(
[],
'{"availabilities": [], "event": {"timezone": "UTC", "date_from": "2017-01-01", "date_to": "2017-01-02"}}',
"UTC",
),
(
None,
'{"availabilities": [], "event": {"timezone": "UTC", "date_from": "2017-01-01", "date_to": "2017-01-02"}}',
"UTC",
),
(
None,
'{"availabilities": [], "event": {"timezone": "America/New_York", "date_from": "2017-01-01", "date_to": "2017-01-02"}}',
"America/New_York",
),
),
)
def test_serialize(availabilitiesform, avails, expected, tzname):
with scope(event=availabilitiesform.event), timezone.override(pytz.utc):
availabilitiesform.event.timezone = tzname
availabilitiesform.event.save()
if avails is not None:
instance = Room.objects.create(event_id=availabilitiesform.event.id)
for avail in avails:
avail.event_id = availabilitiesform.event.id
avail.room_id = instance.id
avail.save()
else:
instance = None
if avails:
expected = json.loads(expected)
for a, j in zip(avails, expected["availabilities"]):
j["id"] = a.pk
expected = json.dumps(expected)
actual = availabilitiesform._serialize(availabilitiesform.event, instance)
assert actual == expected
@pytest.mark.django_db
def test_chained(availabilitiesform, room):
"""make sure the Mixin can actually deserialize the data it serialized."""
with scope(event=room.event):
room.event.timezone = "America/New_York"
tz = pytz.timezone(room.event.timezone)
room.event.save()
room.save()
# normal
Availability.objects.create(
event=availabilitiesform.event,
room=room,
start=tz.localize(dt.datetime(2017, 1, 1, 10)),
end=tz.localize(dt.datetime(2017, 1, 1, 12)),
)
# all day
Availability.objects.create(
event=availabilitiesform.event,
room=room,
start=tz.localize(dt.datetime(2017, 1, 1)),
end=tz.localize(dt.datetime(2017, 1, 3)),
)
form = AvailabilitiesForm(
event=availabilitiesform.event,
instance=room,
)
form.cleaned_data = form.initial
form.cleaned_data["availabilities"] = form.clean_availabilities()
form.save()
avails = Room.objects.first().availabilities.order_by("-start")
assert len(avails) == 2
assert avails[0].start == dt.datetime(2017, 1, 1, 15, tzinfo=pytz.utc)
assert avails[0].end == dt.datetime(2017, 1, 1, 17, tzinfo=pytz.utc)
assert avails[1].start == dt.datetime(2017, 1, 1, 5, tzinfo=pytz.utc)
assert avails[1].end == dt.datetime(2017, 1, 3, 5, tzinfo=pytz.utc)
| 7,442 |
313 | <reponame>leibale/RedisGraph
//------------------------------------------------------------------------------
// GB_convert_sparse_to_bitmap_template: convert A from sparse to bitmap
//------------------------------------------------------------------------------
// SuiteSparse:GraphBLAS, <NAME>, (c) 2017-2022, All Rights Reserved.
// SPDX-License-Identifier: Apache-2.0
//------------------------------------------------------------------------------
{
#if defined ( GB_ATYPE )
const GB_ATYPE *restrict Axold = (GB_ATYPE *) A->x ;
GB_ATYPE *restrict Axnew = (GB_ATYPE *) Ax_new ;
#endif
int tid ;
#pragma omp parallel for num_threads(A_nthreads) schedule(dynamic,1)
for (tid = 0 ; tid < A_ntasks ; tid++)
{
int64_t kfirst = kfirst_Aslice [tid] ;
int64_t klast = klast_Aslice [tid] ;
for (int64_t k = kfirst ; k <= klast ; k++)
{
//------------------------------------------------------------------
// find the part of A(:,j) to be operated on by this task
//------------------------------------------------------------------
int64_t j = GBH (Ah, k) ;
int64_t pA_start, pA_end ;
GB_get_pA (&pA_start, &pA_end, tid, k,
kfirst, klast, pstart_Aslice, Ap, avlen) ;
// the start of A(:,j) in the new bitmap
int64_t pA_new = j * avlen ;
//------------------------------------------------------------------
// convert A(:,j) from sparse to bitmap
//------------------------------------------------------------------
if (nzombies == 0)
{
for (int64_t p = pA_start ; p < pA_end ; p++)
{
// A(i,j) has index i, value Axold [p]
int64_t i = Ai [p] ;
int64_t pnew = i + pA_new ;
// move A(i,j) to its new place in the bitmap
// Axnew [pnew] = Axold [p]
GB_COPY (Axnew, pnew, Axold, p) ;
Ab [pnew] = 1 ;
}
}
else
{
for (int64_t p = pA_start ; p < pA_end ; p++)
{
// A(i,j) has index i, value Axold [p]
int64_t i = Ai [p] ;
if (!GB_IS_ZOMBIE (i))
{
int64_t pnew = i + pA_new ;
// move A(i,j) to its new place in the bitmap
// Axnew [pnew] = Axold [p]
GB_COPY (Axnew, pnew, Axold, p) ;
Ab [pnew] = 1 ;
}
}
}
}
}
done = true ;
}
#undef GB_ATYPE
| 1,443 |
903 | package org.develnext.jphp.ext.mongo.classes;
import com.mongodb.MongoClient;
import com.mongodb.MongoClientURI;
import com.mongodb.client.MongoDatabase;
import com.mongodb.client.MongoIterable;
import org.develnext.jphp.ext.mongo.MongoExtension;
import php.runtime.annotation.Reflection.Name;
import php.runtime.annotation.Reflection.Namespace;
import php.runtime.annotation.Reflection.Signature;
import php.runtime.env.Environment;
import php.runtime.lang.BaseWrapper;
import php.runtime.reflection.ClassEntity;
import java.util.List;
@Name("MongoClient")
@Namespace(MongoExtension.NS)
public class WrapMongoClient extends BaseWrapper<MongoClient> {
public WrapMongoClient(Environment env, MongoClient wrappedObject) {
super(env, wrappedObject);
}
public WrapMongoClient(Environment env, ClassEntity clazz) {
super(env, clazz);
}
@Signature
public void __construct() {
__construct("127.0.0.1");
}
@Signature
public void __construct(String host) {
__construct(host, 27017);
}
@Signature
public void __construct(String host, int port) {
__wrappedObject = new MongoClient(host, port);
}
@Signature
static public WrapMongoClient createFromURI(Environment env, String uri) {
return new WrapMongoClient(env, new MongoClient(new MongoClientURI(uri)));
}
@Signature
public MongoDatabase database(String database) {
return getWrappedObject().getDatabase(database);
}
@Signature
public WrapMongoIterable databases(Environment env) {
return new WrapMongoIterable(env, getWrappedObject().listDatabases());
}
@Signature
public void close() {
getWrappedObject().close();
}
}
| 628 |
426 |
package com.superrecycleview.library.adapter.sidebar;
import android.content.Context;
import com.superrecycleview.library.R;
import com.superrecycleview.library.bean.sidebar.WeChatBean;
import com.superrecycleview.superlibrary.adapter.SuperBaseAdapter;
import java.util.List;
/**
* Created by super南仔 on 2017-05-04. 类备注: 需要传入的参数:
*/
public class WeChatAdapter extends SuperBaseAdapter<WeChatBean> {
public WeChatAdapter(Context context, List<WeChatBean> data) {
super(context, data);
}
@Override
protected void convert(com.superrecycleview.superlibrary.adapter.BaseViewHolder holder,
WeChatBean item, int position) {
holder.setText(R.id.super_tv_name, item.getName());
}
@Override
protected int getItemViewLayoutId(int position, WeChatBean item) {
return R.layout.adapter_wechat_layout;
}
}
| 338 |
414 | <gh_stars>100-1000
{
"name": "example",
"version": "1.0.0",
"scripts": {
"start": "node scripts.build",
"build": "node scripts.build --mode=production"
}
}
| 72 |
2,858 | /*
* Copyright (c) Facebook, Inc. and its affiliates.
*
* This source code is licensed under the MIT-style license found in the
* LICENSE file in the root directory of this source tree.
*/
#include <stdexcept>
#include <tuple>
#include <unordered_map>
#include <vector>
#include <dnnl.hpp>
#include "flashlight/fl/autograd/Functions.h"
#include "flashlight/fl/autograd/Variable.h"
#include "flashlight/fl/autograd/backend/cpu/DnnlUtils.h"
namespace fl {
namespace {
struct ParsedWeightsAndBias {
// First layer - will be empty if inSize == hiddenSize
af::array weightsInput1L;
af::array weightsHidden1L;
af::array bias1L;
// All other layers
af::array weightsInput;
af::array weightsHidden;
af::array bias;
};
// Each gate's weights have dimensions d1 x d2
af::array reorderLbrGruWeights(int d1, int d2, const af::array weights) {
// LBR GRU requires switch the given the r, u, o gate order from cuDNN to u,
// r, o as required by oneDNN (this from empirical verification)
int weightsSize = d1 * d2;
if (weights.elements() != weightsSize * 3) {
throw std::invalid_argument(
"RNN reorderLbrGruWeights given invalid weights tensor or dims");
}
auto weightsFlat = af::flat(weights);
return af::join(
0,
weightsFlat(af::seq(weightsSize, 2 * weightsSize - 1)),
weightsFlat(af::seq(weightsSize)),
weightsFlat(af::seq(2 * weightsSize, af::end)));
}
/**
* Converts flat cuDNN weights into the corresponding oneDNN DNNL RNN weights.
*/
ParsedWeightsAndBias parseWeights(
const af::array& weights,
RnnMode mode,
int numLayers,
int directionMult,
int inSize,
int numGates,
int hiddenSize) {
ParsedWeightsAndBias out;
// Per-layer sizes for weightsInput and weightsHidden.
// If inSize == hiddenSize, then weightsInputSize == weightsHiddenSize for all
// layers, else all but the first layer
size_t weightsInputSize1L = directionMult * inSize * numGates * hiddenSize;
size_t weightsHiddenSize = directionMult * hiddenSize * numGates * hiddenSize;
size_t weightsInputSize = weightsHiddenSize;
int lbrGruBias = mode == RnnMode::GRU ? 1 : 0;
size_t biasSize =
numLayers * directionMult * (numGates + lbrGruBias) * hiddenSize;
bool firstLayerDifferent = inSize != hiddenSize;
// Adjusted if skipping first layer parsing
int numWeightsLayers = firstLayerDifferent ? numLayers - 1 : numLayers;
int weightsOffset =
firstLayerDifferent ? weightsInputSize1L + weightsHiddenSize : 0;
// If skipping the first layer, parse then skip over the first layer
// weights and parse the remaining layers. Parsing all bias layers is still
// fine since biases for each layer have the same size
if (firstLayerDifferent) {
out.weightsInput1L = weights(af::seq(weightsInputSize1L));
out.weightsHidden1L = weights(af::seq(
weightsInputSize1L, weightsInputSize1L + weightsHiddenSize - 1));
if (mode == RnnMode::GRU) {
out.weightsInput1L =
reorderLbrGruWeights(inSize, hiddenSize, out.weightsInput1L);
out.weightsHidden1L =
reorderLbrGruWeights(hiddenSize, hiddenSize, out.weightsHidden1L);
}
}
auto weightsFlat = af::flat(weights).as(weights.type());
// cuDNN RNN weights, for each layer, are arranged with a chunk of
// input-hidden weights for each layer followed by a chunk of hidden-hidden
// weights for each layer:
// {[layers x [hiddenSize, inputSize]], [layers x [hiddenSize, hiddenSize]]}
// Rearrange this to what oneDNN expects (or will reorder if not optimal),
// which is numLayers chunks of two chunks containing input-hidden and
// hidden-hidden:
// {[layers x [[hiddenSize x inSize], [hiddenSize x hiddenSize]]]}
// Note that the loop is over the total number of layers in case we're doing a
// single-layer operation where input size and hidden size are different but
// we'll call another primitive with the output of that first layer as the
// input to the next layers
auto weightsInput = af::array(0, weights.type());
auto weightsHidden = af::array(0, weights.type());
af::array weightsFlatOffset = weightsFlat(af::seq(weightsOffset, af::end));
// Specifically ignore the first layer's weights, so inSize == hiddenSize
for (size_t i = 0; i < numWeightsLayers; ++i) {
// number of input/hidden weights
// TODO: Will change for bidirectional
int chunkSize = hiddenSize * hiddenSize * numGates;
// weights per layer
int layerChunkSize = chunkSize + chunkSize;
// Grab input-hidden weights and chunk them together
auto inputWeightsChunk = weightsFlatOffset(
af::seq(layerChunkSize * i, layerChunkSize * i + chunkSize - 1));
// Grab hidden-hidden weights and chunk them together
auto inputHiddenChunk = weightsFlatOffset(af::seq(
layerChunkSize * i + chunkSize,
layerChunkSize * i + chunkSize + chunkSize - 1));
if (mode == RnnMode::GRU) {
inputWeightsChunk =
reorderLbrGruWeights(hiddenSize, hiddenSize, inputWeightsChunk);
inputHiddenChunk =
reorderLbrGruWeights(hiddenSize, hiddenSize, inputHiddenChunk);
}
weightsInput = af::join(2, weightsInput, inputWeightsChunk);
weightsHidden = af::join(2, weightsHidden, inputHiddenChunk);
}
out.weightsInput = weightsInput;
out.weightsHidden = weightsHidden;
// Reduce the weights to form biases. cuDNN uses two separate bias terms:
// https://docs.nvidia.com/deeplearning/cudnn/api/index.html#cudnnRNNMode_t -
// oneDNN expects only one bias term. Sum together the coefficients for both
// bias terms to get a single bias term for oneDNN. The gradients for each
// term can be computed as one since the gradients with respect to the bias
// subarrays will simply be half of the computed gradient with oneDNN
af::array bias(0, weights.type());
size_t biasStartOffset = numLayers * weightsHiddenSize +
(numLayers - 1) * weightsInputSize + weightsInputSize1L;
// In vanilla RNN modes, the biases can be simply added:
// two biases for each bias in fl cuDNN with CUDNN_RNN_DOUBLE_BIAS (default)
int numBiases = 2;
// First, grab a subarray which contains only both bias terms; then add them
af::array biasFlat = weightsFlat(af::seq(biasStartOffset, af::end));
// Layout is:
// {numLayers x [numBiases x [bias shape]]}
for (size_t i = 0; i < numLayers; ++i) {
if (mode == RnnMode::GRU) {
int lbrGruChunkSize = hiddenSize * 6;
// In the case of the LBR GRU, there's an extra bias term which shouldn't
// be combined with the first two pairs of biases. Six chunks total.
// cuDNN --> oneDNN transformation for ordering:
// r1, u1, o, r2, u2, u' --> u1 + u2, r1 + r2, o, u'
int base = i * lbrGruChunkSize;
// The sum of the following tensors yields the correct bias
// u1, r1, o, u'
auto biases1 = af::join(
0,
// u1 -- [1, 2]
biasFlat(af::seq(base + hiddenSize * 1, base + hiddenSize * 2 - 1)),
// r1 -- [0, 1]
biasFlat(af::seq(base + hiddenSize * 0, base + hiddenSize * 1 - 1)),
// o -- [2, 3]
biasFlat(af::seq(base + hiddenSize * 2, base + hiddenSize * 3 - 1)),
// 'u -- [5, 6]
biasFlat(af::seq(base + hiddenSize * 5, base + hiddenSize * 6 - 1)));
// u2, r2, 0, 0
auto biases2 = af::join(
0,
// u2 -- [4, 5]
biasFlat(af::seq(base + hiddenSize * 4, base + hiddenSize * 5 - 1)),
// r2 -- [3, 4]
biasFlat(af::seq(base + hiddenSize * 3, base + hiddenSize * 4 - 1)),
// zeroes to add to o and u'
af::constant(0.0, hiddenSize * 2, biasFlat.type()));
auto layerBiasCombined = biases1 + biases2;
bias = af::join(0, bias, layerBiasCombined);
} else {
// The number of bias terms in the tensor per-layer
int layerStride = biasSize / numLayers * numBiases;
auto biases1 = biasFlat(af::seq(
layerStride * i, layerStride * i + layerStride / numBiases - 1));
auto biases2 = biasFlat(af::seq(
layerStride * i + layerStride / numBiases,
layerStride * (i + 1) - 1));
auto layerBiasCombined = biases1 + biases2;
bias = af::join(0, bias, layerBiasCombined);
}
}
if (firstLayerDifferent) {
out.bias1L = bias(af::seq(biasSize / numLayers));
if (numLayers > 1) {
// bias for the second --> last layer
bias = bias(af::seq(biasSize / numLayers, af::end));
}
}
out.bias = bias;
// Case for a single layer of different in/hidden size
if (firstLayerDifferent && numLayers == 1) {
out.weightsInput = out.weightsInput1L;
out.weightsHidden = out.weightsHidden1L;
out.bias = out.bias1L;
}
return out;
}
struct RnnResult {
dnnl::memory workspace;
af::array y; // output
af::array hy; // hidden output
af::array cy; // cell output
};
/*
* Does forward for a single dnnl RNN primitive
*/
RnnResult rnnImpl(
const af::array& input,
const af::array& hiddenState,
const af::array& cellState,
const af::array& weightsInput,
const af::array& weightsHidden,
const af::array& bias,
int hiddenSize,
int numLayers,
RnnMode mode,
dnnl::algorithm activation,
int numGates,
dnnl::rnn_direction direction,
int directionMult,
dnnl::prop_kind kind,
float dropout) {
RnnResult result;
auto dnnlEngine = detail::DnnlEngine::getInstance().getEngine();
// Dimensions
int inSize = input.dims(0);
int batchSize = input.dims(1);
int seqLength = input.dims(2);
dnnl::memory::dims inputDims = {seqLength, batchSize, inSize};
dnnl::memory::dims outputDims = {
seqLength, batchSize, hiddenSize * directionMult};
auto dType = detail::dnnlMapToType(input.type());
int totalLayers = numLayers;
int outSize = hiddenSize;
dnnl::memory::dims hDims = {
totalLayers, directionMult, batchSize, hiddenSize};
dnnl::memory::dims cDims = {
totalLayers, directionMult, batchSize, hiddenSize};
int extraBias = mode == RnnMode::GRU ? 1 : 0; // for LBR GRU
dnnl::memory::dims biasDims = {
numLayers, directionMult, numGates + extraBias, hiddenSize};
// ldigo
dnnl::memory::dims weightsInputDims = {
numLayers, directionMult, inSize, numGates, hiddenSize};
dnnl::memory::dims weightsHiddenDims = {
numLayers, directionMult, hiddenSize, numGates, hiddenSize};
// Out tensors: output (y), hidden state output (hy), cell state output (cy)
auto y = af::array(outSize, batchSize, seqLength, input.type());
auto hy = af::array(hiddenSize, batchSize, totalLayers, input.type());
af::array cy;
if (mode == RnnMode::LSTM) {
cy = af::array(hy.dims(), input.type());
}
// Memory for forward
auto tnc = dnnl::memory::format_tag::tnc;
auto ldnc = dnnl::memory::format_tag::ldnc;
auto ldgoi = dnnl::memory::format_tag::ldgoi;
auto ldgo = dnnl::memory::format_tag::ldgo;
const detail::DnnlMemoryWrapper inputMemInit(input, {inputDims}, tnc);
const detail::DnnlMemoryWrapper outputMemInit(y, {outputDims}, tnc);
detail::DnnlMemoryWrapper hiddenInMemInit;
if (!hiddenState.isempty()) {
hiddenInMemInit = detail::DnnlMemoryWrapper(hiddenState, {hDims}, ldnc);
}
const detail::DnnlMemoryWrapper hiddenOutMemInit(hy, {hDims}, ldnc);
const detail::DnnlMemoryWrapper weightsInputMemRawInit(
weightsInput, {weightsInputDims}, ldgoi);
const detail::DnnlMemoryWrapper weightsHiddenMemRawInit(
weightsHidden, {weightsHiddenDims}, ldgoi);
const detail::DnnlMemoryWrapper biasMemInit(bias, {biasDims}, ldgo);
// TODO(jacobkahn): don't force a format tag - use any and do a reorder based
// on the format of the primitive - what it says - like you're supposed to
// Primitive for reordering input weights: ldgoi --> ldigo
auto weightsInputMemDesc = dnnl::memory::desc(
weightsInputDims, dType, dnnl::memory::format_tag::ldigo);
auto weightsInputMemInit = dnnl::memory(weightsInputMemDesc, dnnlEngine);
// Primitive for reordering iter/hidden weights: ldgoi --> ldigo
auto weightsHiddenMemDesc = dnnl::memory::desc(
weightsHiddenDims, dType, dnnl::memory::format_tag::ldigo);
auto weightsHiddenMemInit = dnnl::memory(weightsHiddenMemDesc, dnnlEngine);
// Add arguments
std::unordered_map<int, dnnl::memory> rnnFwdArgs = {
{DNNL_ARG_SRC_LAYER, inputMemInit.getMemory()},
{DNNL_ARG_SRC_ITER, hiddenInMemInit.getMemory()},
{DNNL_ARG_WEIGHTS_LAYER, weightsInputMemInit},
{DNNL_ARG_WEIGHTS_ITER, weightsHiddenMemInit},
{DNNL_ARG_BIAS, biasMemInit.getMemory()},
{DNNL_ARG_DST_LAYER, outputMemInit.getMemory()},
{DNNL_ARG_DST_ITER, hiddenOutMemInit.getMemory()}};
// Workspace memory, if needed
dnnl::memory workspace;
std::vector<dnnl::primitive> network;
std::vector<std::unordered_map<int, dnnl::memory>> fwdArgs;
// reorder input weights
network.push_back(
dnnl::reorder(weightsInputMemRawInit.getMemory(), weightsInputMemInit));
fwdArgs.push_back(
{{DNNL_ARG_FROM, weightsInputMemRawInit.getMemory()},
{DNNL_ARG_TO, weightsInputMemInit}});
// reorder iter weights
network.push_back(
dnnl::reorder(weightsHiddenMemRawInit.getMemory(), weightsHiddenMemInit));
fwdArgs.push_back(
{{DNNL_ARG_FROM, weightsHiddenMemRawInit.getMemory()},
{DNNL_ARG_TO, weightsHiddenMemInit}});
// Initialize descriptors
if (mode == RnnMode::RELU || mode == RnnMode::TANH) {
auto vanilla = dnnl::vanilla_rnn_forward::desc(
kind,
activation,
direction,
inputMemInit.getDescriptor(),
hiddenInMemInit.getDescriptor(),
weightsInputMemDesc, // weights "layer"
weightsHiddenMemDesc, // weights "iter"
biasMemInit.getDescriptor(),
outputMemInit.getDescriptor(),
hiddenOutMemInit.getDescriptor());
auto vanillaPd =
dnnl::vanilla_rnn_forward::primitive_desc(vanilla, dnnlEngine);
network.push_back(dnnl::vanilla_rnn_forward(vanillaPd));
workspace = dnnl::memory(vanillaPd.workspace_desc(), dnnlEngine);
} else if (mode == RnnMode::LSTM) {
// LSTM-only
// input cell state
// TODO(jacobkahn): function that takes the array and
// returns the desciptor and memory -- takes an argument for
// which determines whether or not it's ok to return empty
// descriptors if the array is empty
detail::DnnlMemoryWrapper cellInMemInit;
if (!cellState.isempty()) {
cellInMemInit = detail::DnnlMemoryWrapper(cellState, {cDims}, ldnc);
}
// output cell state
detail::DnnlMemoryWrapper cellOutMemInit(cy, cDims, ldnc);
auto lstm = dnnl::lstm_forward::desc(
kind,
direction,
inputMemInit.getDescriptor(),
hiddenInMemInit.getDescriptor(),
cellInMemInit.getDescriptor(),
weightsInputMemDesc, // weights "layer"
weightsHiddenMemDesc, // weights "iter"
biasMemInit.getDescriptor(),
outputMemInit.getDescriptor(),
hiddenOutMemInit.getDescriptor(),
cellOutMemInit.getDescriptor());
auto lstmPd = dnnl::lstm_forward::primitive_desc(lstm, dnnlEngine);
network.push_back(dnnl::lstm_forward(lstmPd));
workspace = dnnl::memory(lstmPd.workspace_desc(), dnnlEngine);
rnnFwdArgs.insert({DNNL_ARG_SRC_ITER_C, cellInMemInit.getMemory()});
rnnFwdArgs.insert({DNNL_ARG_DST_ITER_C, cellOutMemInit.getMemory()});
} else if (mode == RnnMode::GRU) {
// Use a linear-before-reset GRU so we can have parity with cuDNN
auto gru = dnnl::lbr_gru_forward::desc(
kind,
direction,
inputMemInit.getDescriptor(),
hiddenInMemInit.getDescriptor(),
weightsInputMemDesc,
weightsHiddenMemDesc,
biasMemInit.getDescriptor(),
outputMemInit.getDescriptor(),
hiddenOutMemInit.getDescriptor());
auto gruPd = dnnl::lbr_gru_forward::primitive_desc(gru, dnnlEngine);
network.push_back(dnnl::lbr_gru_forward(gruPd));
workspace = dnnl::memory(gruPd.workspace_desc(), dnnlEngine);
}
rnnFwdArgs.insert({DNNL_ARG_WORKSPACE, workspace});
fwdArgs.push_back(rnnFwdArgs);
detail::executeNetwork(network, fwdArgs);
result.y = y;
result.hy = hy;
result.cy = cy;
result.workspace = workspace;
return result;
}
} // namespace
std::tuple<Variable, Variable, Variable> rnn(
const Variable& inputV,
const Variable& hiddenStateV,
const Variable& cellStateV,
const Variable& weightsV,
int hiddenSize,
int numLayers,
RnnMode mode,
bool bidirectional,
float dropout) {
if (dropout > 0.0) {
throw std::invalid_argument("dnnl rnn: dropout > 0.0 unsupported");
}
if (bidirectional) {
throw std::invalid_argument("dnnl rnn: bidirectional not yet supported");
}
// Constants
auto direction = bidirectional
? dnnl::rnn_direction::bidirectional_concat
: dnnl::rnn_direction::unidirectional_left2right;
int directionMult = bidirectional ? 2 : 1;
auto kind = (inputV.isCalcGrad() || weightsV.isCalcGrad())
? dnnl::prop_kind::forward_training
: dnnl::prop_kind::forward_inference;
int numGates = 1;
auto activation = dnnl::algorithm::undef;
switch (mode) {
case RnnMode::LSTM:
numGates = 4;
break;
case RnnMode::GRU:
numGates = 3;
break;
case RnnMode::RELU:
activation = dnnl::algorithm::eltwise_relu;
break;
case RnnMode::TANH:
activation = dnnl::algorithm::eltwise_tanh;
default:
break;
}
auto& input = inputV.array();
auto& hiddenState = hiddenStateV.array();
auto& cellState = cellStateV.array();
auto& weights = weightsV.array();
int inSize = input.dims(0);
// In flashlight, all RNN weights are stored as one contiguous tensor, so we
// have to parse out the input weights, input biases, hidden weights, and
// hidden biases from one tensor. Order doesn't matter since the arrangement
// is a black box
auto parsedWeights = parseWeights(
weights, mode, numLayers, directionMult, inSize, numGates, hiddenSize);
RnnResult result;
// The oneDNN RNN primitive has an API limitation where input size and
// hidden size can only differ if the primitive has exactly one layer.
// Therefore, for computations for more than one layer, first do the
// operation for one layer, which gives an output vector of size [hidden
// size, batch size, sequence length * number of directions], then use
// that output as the input for layers [2, L]. Since the input size dim 0
// is now the hidden size, the primitive can fuse computation for
// arbitrarily-many layers.
if (inputV.dims(0) == hiddenSize || numLayers == 1) {
// Input and hidden size are the same, or we only have one layer, which
// means we can call the impl as is and parse weights "normally"
result = rnnImpl(
input,
hiddenState,
cellState,
parsedWeights.weightsInput,
parsedWeights.weightsHidden,
parsedWeights.bias,
hiddenSize,
numLayers,
mode,
activation,
numGates,
direction,
directionMult,
kind,
dropout);
} else {
// We require more than one layer with different input and hidden states -
// see the above.
// Seek to the first layer's hidden/cell state, weights, and bias
RnnResult resultL1 = rnnImpl(
input,
hiddenState(af::span, af::span, 0),
cellState(af::span, af::span, 0),
parsedWeights.weightsInput1L,
parsedWeights.weightsHidden1L,
parsedWeights.bias1L,
hiddenSize,
1,
mode,
activation,
numGates,
direction,
directionMult,
kind,
dropout);
/* Layers [2..N] */
// Seek past the first layer's hidden/cell state, weights, and bias
RnnResult resultL2N = rnnImpl(
resultL1.y, // fixme
hiddenState(af::span, af::span, af::seq(1, af::end)),
cellState(af::span, af::span, af::seq(1, af::end)),
parsedWeights.weightsInput,
parsedWeights.weightsHidden,
parsedWeights.bias,
hiddenSize,
numLayers - 1, // layers [2..N]
mode,
activation,
numGates,
direction,
directionMult,
kind,
dropout);
result.y = resultL2N.y;
result.hy = af::join(2, resultL1.hy, resultL2N.hy);
result.cy = af::join(2, resultL1.cy, resultL2N.cy);
}
auto gradFuncUnsupported = [](std::vector<Variable>&, const Variable&) {
throw std::runtime_error(
"dnnl rnn: Gradient computation not yet supported");
};
return std::make_tuple(
Variable(result.y, {}, gradFuncUnsupported),
Variable(result.hy, {}, gradFuncUnsupported),
Variable(result.cy, {}, gradFuncUnsupported));
}
} // namespace fl
| 7,979 |
364 | <reponame>xiaobing007/dagli
package com.linkedin.dagli.embedding.classification;
import com.linkedin.dagli.math.vector.DenseFloatArrayVector;
import it.unimi.dsi.fastutil.longs.Long2ObjectOpenHashMap;
import it.unimi.dsi.fastutil.longs.LongArrayList;
import java.io.Serializable;
import java.util.Arrays;
import java.util.List;
import java.util.Objects;
import java.util.function.Function;
import java.util.regex.Pattern;
/**
* Static container for internal-use FastText classes.
* Dagli clients should not use this class (or its contents) directly.
*/
public abstract class FastTextInternal {
private FastTextInternal() { }
/**
* Common methods shared between inference and training. This code is intended for shared use by the training
* and inference modules and should not be relied upon by other parties; method semantics may change at any time.
*
* Note to implementors: changes to the methods of this class will likely break any existing serialized models.
*/
public static class Util {
private Util() { }
private final static int LOWER_8_MASK = (1 << 8) - 1;
private final static long LOWER_63_MASK = Long.MAX_VALUE;
public final static long EOS_HASH = 1337;
public static final String LABEL_PREFIX = "__label__";
public static final String END_OF_LINE_TOKEN = "</s>"; // used internally by FastText, not us
private static final Pattern WHITESPACE_PATTERN = Pattern.compile("[\\s\\x00]");
/**
* Quickly (re-)hashes a pair of long hashes "somehow".
*
* @param hash1 the first long hash
* @param hash2 the second long hash
* @return a new hash of the ordered pair of inputted hashes
*/
public static long hash(long hash1, long hash2) {
return 0x2D108DAE83E550E6L + (hash1 << 9) + (hash1 >>> 3) + hash2;
}
/**
* Calculates a modified form of the 64-bit FNV1-a hash.
* Note that this variant uses chars rather than bytes for efficiency when dealing with Java 8 and earlier strings.
* If subsequent versions offer direct access to string bytes that should be preferred instead.
*
* @param str a character sequence with the string to hash
* @return a non-cryptographic, non-negative hash value for the string
*/
public static long hash(CharSequence str) {
long hash = 0xcbf29ce484222325L;
for (int i = 0; i < str.length(); i++) {
hash = (hash ^ (LOWER_8_MASK & str.charAt(i))) * 0x100000001b3L;
hash = (hash ^ (str.charAt(i) >> 8)) * 0x100000001b3L;
}
return hash & LOWER_63_MASK;
}
private static String removeWhitespace(CharSequence token) {
return WHITESPACE_PATTERN.matcher(token).replaceAll("_");
}
public static String formatIntegerLabel(int label) {
return LABEL_PREFIX + Integer.toString(label);
}
public static int integerFromLabelString(String label) {
return Integer.parseInt(label.substring(LABEL_PREFIX.length()));
}
public static String formatToken(CharSequence token) {
if (token.toString().startsWith(LABEL_PREFIX) || token.equals(END_OF_LINE_TOKEN)) {
token = "_" + token;
}
return removeWhitespace(token);
}
}
/**
* Represents a FastText model.
*
* @param <L> the type of label used by the model
*/
public static class Model<L extends Serializable> extends AbstractEmbeddingClassifier<L, CharSequence> {
private static final long serialVersionUID = 1;
private final Long2ObjectOpenHashMap<DenseFloatArrayVector> _wordEmbeddings;
private final DenseFloatArrayVector[] _ngramBucketEmbeddings;
private final boolean _multilabel;
private final DenseFloatArrayVector _eosEmbedding;
private final int _maxNgramSize;
@Override
public boolean equals(Object o) {
if (this == o) {
return true;
}
if (!(o instanceof Model)) {
return false;
}
if (!super.equals(o)) {
return false;
}
Model<?> model = (Model<?>) o;
return _multilabel == model._multilabel && _maxNgramSize == model._maxNgramSize && Objects.equals(_wordEmbeddings,
model._wordEmbeddings) && Arrays.equals(_ngramBucketEmbeddings, model._ngramBucketEmbeddings)
&& Objects.equals(_eosEmbedding, model._eosEmbedding);
}
@Override
public int hashCode() {
int result = Objects.hash(super.hashCode(), _wordEmbeddings, _multilabel, _eosEmbedding, _maxNgramSize);
result = 31 * result + Arrays.hashCode(_ngramBucketEmbeddings);
return result;
}
public Model(L[] labels, DenseFloatArrayVector[] labelEmbeddings, Long2ObjectOpenHashMap<DenseFloatArrayVector> wordEmbeddings,
DenseFloatArrayVector[] ngramBucketEmbeddings, boolean multilabel, int maxNgramSize) {
super(labels, labelEmbeddings);
_wordEmbeddings = wordEmbeddings;
_ngramBucketEmbeddings = ngramBucketEmbeddings;
_multilabel = multilabel;
_maxNgramSize = maxNgramSize;
_eosEmbedding = _wordEmbeddings.get(Util.EOS_HASH);
}
public <M extends Serializable> Model<M> remapLabels(Function<L, M> remapper) {
return new Model<>((M[]) Arrays.stream(getLabels()).map(remapper).toArray(Serializable[]::new),
getLabelEmbeddings(), _wordEmbeddings, _ngramBucketEmbeddings, _multilabel, _maxNgramSize);
}
/**
* Add (bucketed) ngram embeddings to the target vector. Only bigrams and larger are considered;
* if maxNgramSize <= 1 this call is a no-op.
* @param target the vector to which the embeddings will be added
* @param tokenHashes the hashes of the original tokens; ngrams will be formed over these
* @param maxNgramSize ngrams of size 2...maxNgramSize will be included
*
* @return the number of embeddings that were added to the target
*/
int addBucketedNgrams(DenseFloatArrayVector target, LongArrayList tokenHashes, int maxNgramSize) {
if (maxNgramSize <= 1) {
return 0; // no-op; we only care about bigrams and larger
}
int count = 0;
for (int i = 0; i < tokenHashes.size(); i++) {
long ngramHash = tokenHashes.getLong(i);
for (int j = i + 1; j < tokenHashes.size() && j < i + maxNgramSize; j++) {
ngramHash = Util.hash(ngramHash, tokenHashes.getLong(j));
target.addInPlace(_ngramBucketEmbeddings[(int) (Math.abs(ngramHash) % _ngramBucketEmbeddings.length)]);
count++;
}
}
return count;
}
@Override
protected FeaturesEmbeddingResult embedFeatures(Iterable<? extends CharSequence> features) {
DenseFloatArrayVector res = DenseFloatArrayVector.wrap(new float[getLabelEmbeddingDimensions()]);
LongArrayList tokenHashes;
if (features instanceof List) {
tokenHashes = new LongArrayList(((List) features).size() + 1);
} else {
tokenHashes = new LongArrayList(16);
}
for (CharSequence rawToken : features) {
String token = FastTextInternal.Util.formatToken(rawToken);
long wordHash = Util.hash(token);
DenseFloatArrayVector tokenEmbedding = _wordEmbeddings.get(wordHash);
if (tokenEmbedding != null) {
// note: this results in [word1] [unk word] [word 2] essentially becoming [word1] [word2];
// discarding unknown words and finding ngrams over what remains is intentional, if questionable
res.addInPlace(tokenEmbedding);
tokenHashes.add(wordHash);
}
}
int featuresInVocabulary = tokenHashes.size(); // keep track of how many words were in vocabulary
if (_eosEmbedding != null) { // there are perverse corner cases where no EOS embedding exists
res.addInPlace(_eosEmbedding);
tokenHashes.add(Util.EOS_HASH);
}
int summedEmbeddingCount = tokenHashes.size();
summedEmbeddingCount += addBucketedNgrams(res, tokenHashes, _maxNgramSize);
res.multiplyInPlace(1.0 / summedEmbeddingCount);
return new FeaturesEmbeddingResult(res, featuresInVocabulary);
}
private static double sigmoid(double x) {
return 1.0 / (1.0 + Math.exp(-x));
}
@Override
protected void distributionalize(float[] labelProbabilities) {
if (_multilabel) {
for (int i = 0; i < labelProbabilities.length; i++) {
labelProbabilities[i] = (float) sigmoid(labelProbabilities[i]);
}
} else {
// note: finding the max and subtracting it away is a mathematical noop, but it helps avoid numeric precision/
// overflow issues:
float max = labelProbabilities[0];
for (int i = 1; i < labelProbabilities.length; i++) {
max = Math.max(max, labelProbabilities[i]);
}
// softmax:
float sum = 0;
for (int i = 0; i < labelProbabilities.length; i++) {
float exp = (float) Math.exp(labelProbabilities[i] - max);
labelProbabilities[i] = exp;
sum += exp;
}
for (int i = 0; i < labelProbabilities.length; i++) {
labelProbabilities[i] /= sum;
}
}
}
}
}
| 3,484 |
12,302 | <reponame>codetriage-readme-bot/pop
/**
Copyright (c) 2014-present, Facebook, Inc.
All rights reserved.
This source code is licensed under the BSD-style license found in the
LICENSE file in the root directory of this source tree. An additional grant
of patent rights can be found in the PATENTS file in the same directory.
*/
#import <Foundation/Foundation.h>
#import <CoreGraphics/CoreGraphics.h>
#import "POPDefines.h"
NS_INLINE CGFloat sqrtr(CGFloat f)
{
#if CGFLOAT_IS_DOUBLE
return sqrt(f);
#else
return sqrtf(f);
#endif
}
// round to nearest sub; pass 2.0 to round to every 0.5 (eg: retina pixels)
NS_INLINE CGFloat POPSubRound(CGFloat f, CGFloat sub)
{
return round(f * sub) / sub;
}
#define MIX(a, b, f) ((a) + (f) * ((b) - (a)))
// the longer the duration, the higher the necessary precision
#define SOLVE_EPS(dur) (1. / (1000. * (dur)))
#define _EQLF_(x, y, epsilon) (fabsf ((x) - (y)) < epsilon)
extern void POPInterpolateVector(NSUInteger count, CGFloat *dst, const CGFloat *from, const CGFloat *to, CGFloat f);
extern double POPTimingFunctionSolve(const double vec[4], double t, double eps);
// quadratic mapping of t [0, 1] to [start, end]
extern double POPQuadraticOutInterpolation(double t, double start, double end);
// normalize value to [0, 1] based on its range [startValue, endValue]
extern double POPNormalize(double value, double startValue, double endValue);
// project a normalized value [0, 1] to a given range [start, end]
extern double POPProjectNormal(double n, double start, double end);
// solve a quadratic equation of the form a * x^2 + b * x + c = 0
extern void POPQuadraticSolve(CGFloat a, CGFloat b, CGFloat c, CGFloat &x1, CGFloat &x2);
// for a given tension return the bouncy 3 friction that produces no bounce
extern double POPBouncy3NoBounce(double tension);
| 645 |
1,056 | <gh_stars>1000+
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.netbeans.modules.languages.yaml;
import java.util.ArrayList;
import java.util.Collections;
import java.util.List;
import javax.swing.text.BadLocationException;
import javax.swing.text.Caret;
import javax.swing.text.Document;
import javax.swing.text.JTextComponent;
import org.netbeans.api.lexer.Token;
import org.netbeans.api.lexer.TokenHierarchy;
import org.netbeans.api.lexer.TokenSequence;
import org.netbeans.editor.BaseDocument;
import org.netbeans.editor.Utilities;
import org.netbeans.lib.editor.util.CharSequenceUtilities;
import org.netbeans.lib.editor.util.swing.DocumentUtilities;
import org.netbeans.modules.csl.api.KeystrokeHandler;
import org.netbeans.modules.csl.api.OffsetRange;
import org.netbeans.modules.csl.api.StructureItem;
import org.netbeans.modules.csl.spi.ParserResult;
import org.openide.util.Exceptions;
/**
* Keystroke handler for YAML; handle newline indentation, auto matching of <%
* %> etc.
*
* @author <NAME>
*/
public class YamlKeystrokeHandler implements KeystrokeHandler {
@Override
public boolean beforeCharInserted(Document document, int caretOffset, JTextComponent target, char c) throws BadLocationException {
Caret caret = target.getCaret();
BaseDocument doc = (BaseDocument) document;
int dotPos = caret.getDot();
// Bracket matching on <% %>
if (c == ' ' && dotPos >= 2) {
try {
String s = doc.getText(dotPos - 2, 2);
if ("%=".equals(s) && dotPos >= 3) { // NOI18N
s = doc.getText(dotPos - 3, 3);
}
if ("<%".equals(s) || "<%=".equals(s)) { // NOI18N
doc.insertString(dotPos, " ", null);
caret.setDot(dotPos + 1);
return true;
}
} catch (BadLocationException ble) {
Exceptions.printStackTrace(ble);
}
return false;
}
if ((dotPos > 0) && (c == '%' || c == '>')) {
TokenHierarchy<Document> th = TokenHierarchy.get((Document) doc);
TokenSequence<?> ts = th.tokenSequence();
ts.move(dotPos);
try {
if (ts.moveNext() || ts.movePrevious()) {
Token<?> token = ts.token();
if (token.id() == YamlTokenId.TEXT && doc.getText(dotPos - 1, 1).charAt(0) == '<') {
// See if there's anything ahead
int first = Utilities.getFirstNonWhiteFwd(doc, dotPos, Utilities.getRowEnd(doc, dotPos));
if (first == -1) {
doc.insertString(dotPos, "%%>", null); // NOI18N
caret.setDot(dotPos + 1);
return true;
}
} else if (token.id() == YamlTokenId.DELIMITER) {
String tokenText = token.text().toString();
if (tokenText.endsWith("%>")) { // NOI18N
// TODO - check that this offset is right
int tokenPos = (c == '%') ? dotPos : dotPos - 1;
CharSequence suffix = DocumentUtilities.getText(doc, tokenPos, 2);
if (CharSequenceUtilities.textEquals(suffix, "%>")) { // NOI18N
caret.setDot(dotPos + 1);
return true;
}
} else if (tokenText.endsWith("<")) {
// See if there's anything ahead
int first = Utilities.getFirstNonWhiteFwd(doc, dotPos, Utilities.getRowEnd(doc, dotPos));
if (first == -1) {
doc.insertString(dotPos, "%%>", null); // NOI18N
caret.setDot(dotPos + 1);
return true;
}
}
} else if ((token.id() == YamlTokenId.RUBY || token.id() == YamlTokenId.RUBY_EXPR) && dotPos >= 1 && dotPos <= doc.getLength() - 3) {
// If you type ">" one space away from %> it's likely that you typed
// "<% foo %>" without looking at the screen; I had auto inserted %> at the end
// and because I also auto insert a space without typing through it, you've now
// ended up with "<% foo %> %>". Let's prevent this by interpreting typing a ""
// right before %> as a duplicate for %>. I can't just do this on % since it's
// quite plausible you'd have
// <% x = %q(foo) %> -- if I simply moved the caret to %> when you typed the
// % in %q we'd be in trouble.
String s = doc.getText(dotPos - 1, 4);
if ("% %>".equals(s)) { // NOI18N
doc.remove(dotPos - 1, 2);
caret.setDot(dotPos + 1);
return true;
}
}
}
} catch (BadLocationException ble) {
Exceptions.printStackTrace(ble);
}
}
return false;
}
@Override
public boolean afterCharInserted(Document doc, int caretOffset, JTextComponent target, char ch) throws BadLocationException {
return false;
}
@Override
public boolean charBackspaced(Document doc, int dotPos, JTextComponent target, char ch) throws BadLocationException {
if (ch == '%' && dotPos > 0 && dotPos <= doc.getLength() - 2) {
String s = doc.getText(dotPos - 1, 3);
if ("<%>".equals(s)) { // NOI18N
doc.remove(dotPos, 2);
return true;
}
}
return false;
}
@Override
public int beforeBreak(Document document, int offset, JTextComponent target) throws BadLocationException {
Caret caret = target.getCaret();
BaseDocument doc = (BaseDocument) document;
// Very simple algorithm for now..
// Basically, use the same indent as the current line, unless the caret is immediately preceeded by a ":" (possibly with whitespace
// in between)
int lineBegin = Utilities.getRowStart(doc, offset);
int lineEnd = Utilities.getRowEnd(doc, offset);
if (lineBegin == offset && lineEnd == offset) {
// Pressed return on a blank newline - do nothing
return -1;
}
int indent = getLineIndent(doc, offset);
String linePrefix = doc.getText(lineBegin, offset - lineBegin);
String lineSuffix = doc.getText(offset, lineEnd + 1 - offset);
if (linePrefix.trim().endsWith(":") && lineSuffix.trim().length() == 0) {
// Yes, new key: increase indent
indent += IndentUtils.getIndentSize(doc);
} else {
// No, just use same indent as parent
}
// Also remove the whitespace from the caret up to the first nonspace character on the current line
int remove = 0;
String line = doc.getText(lineBegin, lineEnd + 1 - lineBegin);
for (int n = line.length(), i = offset - lineBegin; i < n; i++) {
char c = line.charAt(i);
if (c == ' ' || c == '\t') {
remove++;
} else {
break;
}
}
if (remove > 0) {
doc.remove(offset, remove);
}
String str = IndentUtils.getIndentString(indent);
int newPos = offset + str.length();
doc.insertString(offset, str, null);
caret.setDot(offset);
return newPos + 1;
}
@Override
public OffsetRange findMatching(Document doc, int caretOffset) {
return OffsetRange.NONE;
}
@Override
public List<OffsetRange> findLogicalRanges(ParserResult info, int caretOffset) {
YamlParserResult result = (YamlParserResult) info;
if (result == null) {
return Collections.emptyList();
}
List<? extends StructureItem> items = result.getItems();
if (items.isEmpty()) {
return Collections.emptyList();
}
List<OffsetRange> ranges = new ArrayList<OffsetRange>();
for (StructureItem item : items) {
addRanges(ranges, caretOffset, item);
}
Collections.reverse(ranges);
Document doc = info.getSnapshot().getSource().getDocument(false);
if (doc != null) {
ranges.add(new OffsetRange(0, doc.getLength()));
}
return ranges;
}
private void addRanges(List<OffsetRange> ranges, int caretOffset, StructureItem item) {
int start = (int) item.getPosition();
int end = (int) item.getEndPosition();
if (caretOffset >= start && caretOffset <= end) {
ranges.add(new OffsetRange(start, end));
for (StructureItem child : item.getNestedItems()) {
addRanges(ranges, caretOffset, child);
}
}
}
@Override
public int getNextWordOffset(Document doc, int caretOffset, boolean reverse) {
return -1;
}
public static int getLineIndent(BaseDocument doc, int offset) {
try {
int start = Utilities.getRowStart(doc, offset);
int end;
if (Utilities.isRowWhite(doc, start)) {
end = Utilities.getRowEnd(doc, offset);
} else {
end = Utilities.getRowFirstNonWhite(doc, start);
}
int indent = Utilities.getVisualColumn(doc, end);
return indent;
} catch (BadLocationException ble) {
Exceptions.printStackTrace(ble);
return 0;
}
}
}
| 5,040 |
350 | <gh_stars>100-1000
#include <fstream>
#include <iostream>
#include <unordered_map>
// #include <boost/bimap.hpp>
#include <boost/graph/adjacency_list.hpp>
#include <boost/functional/hash.hpp>
#include <boost/program_options.hpp>
#include <yaml-cpp/yaml.h>
#include <libMultiRobotPlanning/cbs.hpp>
#include "timer.hpp"
using libMultiRobotPlanning::CBS;
using libMultiRobotPlanning::Neighbor;
using libMultiRobotPlanning::PlanResult;
// roadmap data structures
typedef boost::adjacency_list_traits<boost::vecS, boost::vecS,
boost::directedS>
roadmapTraits_t;
typedef roadmapTraits_t::vertex_descriptor vertex_t;
typedef roadmapTraits_t::edge_descriptor edge_t;
namespace std {
template <>
struct hash<edge_t> {
size_t operator()(const edge_t& e) const {
size_t seed = 0;
boost::hash_combine(seed, e.m_source);
boost::hash_combine(seed, e.m_target);
return seed;
}
};
} // namespace std
struct Vertex {
std::string name;
};
struct Edge {
std::unordered_set<edge_t> conflictingEdges;
};
typedef boost::adjacency_list<boost::vecS, boost::vecS, boost::directedS,
Vertex, Edge>
roadmap_t;
struct State {
State(int time, vertex_t vertex) : time(time), vertex(vertex) {}
bool operator==(const State& s) const {
return time == s.time && vertex == s.vertex;
}
bool equalExceptTime(const State& s) const { return vertex == s.vertex; }
friend std::ostream& operator<<(std::ostream& os, const State& s) {
return os << s.time << ": (" << s.vertex << ")";
// return os << "(" << s.x << "," << s.y << ")";
}
int time;
vertex_t vertex;
};
namespace std {
template <>
struct hash<State> {
size_t operator()(const State& s) const {
size_t seed = 0;
boost::hash_combine(seed, s.time);
boost::hash_combine(seed, s.vertex);
return seed;
}
};
} // namespace std
///
typedef edge_t Action; // index to the specified edge
struct Conflict {
enum Type {
Vertex,
Edge,
};
int time;
size_t agent1;
size_t agent2;
Type type;
vertex_t vertex; // for Type == Vertex
edge_t edge1;
edge_t edge2;
friend std::ostream& operator<<(std::ostream& os, const Conflict& c) {
switch (c.type) {
case Vertex:
return os << c.time << ": Vertex(" << c.vertex << ")";
case Edge:
return os << c.time << ": Edge(" << c.edge1 << "," << c.edge2 << ")";
}
return os;
}
};
struct VertexConstraint {
VertexConstraint(int time, vertex_t vertex) : time(time), vertex(vertex) {}
int time;
vertex_t vertex;
bool operator<(const VertexConstraint& other) const {
return std::tie(time, vertex) < std::tie(other.time, other.vertex);
}
bool operator==(const VertexConstraint& other) const {
return std::tie(time, vertex) == std::tie(other.time, other.vertex);
}
friend std::ostream& operator<<(std::ostream& os, const VertexConstraint& c) {
return os << "VC(" << c.time << "," << c.vertex << ")";
}
};
namespace std {
template <>
struct hash<VertexConstraint> {
size_t operator()(const VertexConstraint& s) const {
size_t seed = 0;
boost::hash_combine(seed, s.time);
boost::hash_combine(seed, s.vertex);
return seed;
}
};
} // namespace std
struct EdgeConstraint {
EdgeConstraint(int time, edge_t edge)
: time(time), edge(edge) {}
int time;
edge_t edge;
bool operator<(const EdgeConstraint& other) const {
return std::tie(time, edge) <
std::tie(other.time, other.edge);
}
bool operator==(const EdgeConstraint& other) const {
return std::tie(time, edge) ==
std::tie(other.time, other.edge);
}
friend std::ostream& operator<<(std::ostream& os, const EdgeConstraint& c) {
return os << "EC(" << c.time << "," << c.edge << ")";
}
};
namespace std {
template <>
struct hash<EdgeConstraint> {
size_t operator()(const EdgeConstraint& s) const {
size_t seed = 0;
boost::hash_combine(seed, s.time);
boost::hash_combine(seed, s.edge);
return seed;
}
};
} // namespace std
struct Constraints {
std::unordered_set<VertexConstraint> vertexConstraints;
std::unordered_set<EdgeConstraint> edgeConstraints;
void add(const Constraints& other) {
vertexConstraints.insert(other.vertexConstraints.begin(),
other.vertexConstraints.end());
edgeConstraints.insert(other.edgeConstraints.begin(),
other.edgeConstraints.end());
}
bool overlap(const Constraints& other) const {
for (const auto& vc : vertexConstraints) {
if (other.vertexConstraints.count(vc) > 0) {
return true;
}
}
for (const auto& ec : edgeConstraints) {
if (other.edgeConstraints.count(ec) > 0) {
return true;
}
}
return false;
}
friend std::ostream& operator<<(std::ostream& os, const Constraints& c) {
for (const auto& vc : c.vertexConstraints) {
os << vc << std::endl;
}
for (const auto& ec : c.edgeConstraints) {
os << ec << std::endl;
}
return os;
}
};
///
class Environment {
public:
Environment(const roadmap_t& roadmap,
const std::vector<vertex_t>& goals, bool disappearAtGoal = false)
: m_roadmap(roadmap),
m_goals(std::move(goals)),
m_agentIdx(0),
m_constraints(nullptr),
m_lastGoalConstraint(-1),
m_highLevelExpanded(0),
m_lowLevelExpanded(0),
m_disappearAtGoal(disappearAtGoal)
{
}
Environment(const Environment&) = delete;
Environment& operator=(const Environment&) = delete;
void setLowLevelContext(size_t agentIdx, const Constraints* constraints) {
assert(constraints); // NOLINT
m_agentIdx = agentIdx;
m_constraints = constraints;
m_lastGoalConstraint = -1;
for (const auto& vc : constraints->vertexConstraints) {
if (vc.vertex == m_goals[m_agentIdx]) {
m_lastGoalConstraint = std::max(m_lastGoalConstraint, vc.time);
}
}
}
int admissibleHeuristic(const State& s) {
// TODO: we should actually compute this using A*
return 0;
}
bool isSolution(const State& s) {
return s.vertex == m_goals[m_agentIdx] &&
s.time > m_lastGoalConstraint;
}
void getNeighbors(const State& s,
std::vector<Neighbor<State, Action, int> >& neighbors) {
// std::cout << "#VC " << constraints.vertexConstraints.size() << std::endl;
// for(const auto& vc : constraints.vertexConstraints) {
// std::cout << " " << vc.time << "," << vc.x << "," << vc.y <<
// std::endl;
// }
neighbors.clear();
auto es = boost::out_edges(s.vertex, m_roadmap);
for (auto eit = es.first; eit != es.second; ++eit) {
vertex_t v = boost::target(*eit, m_roadmap);
State n(s.time + 1, v);
if (stateValid(n) && transitionValid(s.time, *eit)) {
neighbors.emplace_back(
Neighbor<State, Action, int>(n, *eit, 1));
}
}
// Wait action
{
State n(s.time + 1, s.vertex);
if (stateValid(n)) {
neighbors.emplace_back(
Neighbor<State, Action, int>(n, edge_t(), 1));
}
}
}
bool getFirstConflict(
const std::vector<PlanResult<State, Action, int> >& solution,
Conflict& result) {
size_t max_t = 0;
for (const auto& sol : solution) {
max_t = std::max<size_t>(max_t, sol.states.size() - 1);
}
for (size_t t = 0; t <= max_t; ++t) {
// check vertex/vertex collisions
for (size_t i = 0; i < solution.size(); ++i) {
State state1 = getState(i, solution, t);
for (size_t j = i + 1; j < solution.size(); ++j) {
State state2 = getState(j, solution, t);
if (state1.equalExceptTime(state2)) {
result.time = t;
result.agent1 = i;
result.agent2 = j;
result.type = Conflict::Vertex;
result.vertex = state1.vertex;
return true;
}
}
}
// edge/edge (swap)
for (size_t i = 0; i < solution.size(); ++i) {
for (size_t j = i + 1; j < solution.size(); ++j) {
if (t < solution[i].actions.size() &&
t < solution[j].actions.size()) {
auto e1 = solution[i].actions[t].first;
auto e2 = solution[j].actions[t].first;
if (e1.m_eproperty) {
const auto& ce = m_roadmap[e1].conflictingEdges;
if (ce.find(e2) != ce.end()) {
result.time = t;
result.agent1 = i;
result.agent2 = j;
result.type = Conflict::Edge;
result.edge1 = e1;
result.edge2 = e2;
return true;
}
}
}
}
}
}
return false;
}
void createConstraintsFromConflict(
const Conflict& conflict, std::map<size_t, Constraints>& constraints) {
if (conflict.type == Conflict::Vertex) {
Constraints c1;
c1.vertexConstraints.emplace(
VertexConstraint(conflict.time, conflict.vertex));
constraints[conflict.agent1] = c1;
constraints[conflict.agent2] = c1;
} else if (conflict.type == Conflict::Edge) {
Constraints c1;
c1.edgeConstraints.emplace(EdgeConstraint(
conflict.time, conflict.edge1));
constraints[conflict.agent1] = c1;
Constraints c2;
c2.edgeConstraints.emplace(EdgeConstraint(
conflict.time, conflict.edge2));
constraints[conflict.agent2] = c2;
}
}
void onExpandHighLevelNode(int /*cost*/) { m_highLevelExpanded++; }
void onExpandLowLevelNode(const State& /*s*/, int /*fScore*/,
int /*gScore*/) {
m_lowLevelExpanded++;
}
int highLevelExpanded() { return m_highLevelExpanded; }
int lowLevelExpanded() const { return m_lowLevelExpanded; }
private:
State getState(size_t agentIdx,
const std::vector<PlanResult<State, Action, int> >& solution,
size_t t) {
assert(agentIdx < solution.size());
if (t < solution[agentIdx].states.size()) {
return solution[agentIdx].states[t].first;
}
assert(!solution[agentIdx].states.empty());
if (m_disappearAtGoal) {
// This is a trick to avoid changing the rest of the code significantly
// After an agent disappeared, put it at a unique but invalid position
// This will cause all calls to equalExceptTime(.) to return false.
return State(-1, -1-agentIdx);
}
return solution[agentIdx].states.back().first;
}
bool stateValid(const State& s) {
assert(m_constraints);
const auto& con = m_constraints->vertexConstraints;
return con.find(VertexConstraint(s.time, s.vertex)) == con.end();
}
bool transitionValid(int time, edge_t edge) {
assert(m_constraints);
const auto& con = m_constraints->edgeConstraints;
return con.find(EdgeConstraint(time, edge)) == con.end();
}
private:
const roadmap_t& m_roadmap;
std::vector<vertex_t> m_goals;
size_t m_agentIdx;
const Constraints* m_constraints;
int m_lastGoalConstraint;
int m_highLevelExpanded;
int m_lowLevelExpanded;
bool m_disappearAtGoal;
};
int main(int argc, char* argv[]) {
namespace po = boost::program_options;
// Declare the supported options.
po::options_description desc("Allowed options");
std::string inputFile;
std::string outputFile;
bool disappearAtGoal;
desc.add_options()("help", "produce help message")(
"input,i", po::value<std::string>(&inputFile)->required(),
"input file (YAML)")("output,o",
po::value<std::string>(&outputFile)->required(),
"output file (YAML)")(
"disappear-at-goal", po::bool_switch(&disappearAtGoal), "make agents to disappear at goal rather than staying there");
try {
po::variables_map vm;
po::store(po::parse_command_line(argc, argv, desc), vm);
po::notify(vm);
if (vm.count("help") != 0u) {
std::cout << desc << "\n";
return 0;
}
} catch (po::error& e) {
std::cerr << e.what() << std::endl << std::endl;
std::cerr << desc << std::endl;
return 1;
}
YAML::Node config = YAML::LoadFile(inputFile);
// read roadmap
roadmap_t roadmap;
std::unordered_map<std::string, vertex_t> vertexMap;
for (const auto& edge : config["roadmap"]["edges"]) {
// find or insert vertex1
auto v1str = edge[0].as<std::string>();
vertex_t v1;
const auto iter1 = vertexMap.find(v1str);
if (iter1 != vertexMap.end()) {
v1 = iter1->second;
} else {
v1 = boost::add_vertex(roadmap);
vertexMap.insert(std::make_pair(v1str, v1));
roadmap[v1].name = v1str;
}
// find or insert vertex2
auto v2str = edge[1].as<std::string>();
vertex_t v2;
const auto iter2 = vertexMap.find(v2str);
if (iter2 != vertexMap.end()) {
v2 = iter2->second;
} else {
v2 = boost::add_vertex(roadmap);
vertexMap.insert(std::make_pair(v2str, v2));
roadmap[v2].name = v2str;
}
auto e1 = boost::add_edge(v1, v2, roadmap);
if (config["roadmap"]["undirected"]) {
auto e2 = boost::add_edge(v2, v1, roadmap);
roadmap[e1.first].conflictingEdges.insert(e2.first);
roadmap[e2.first].conflictingEdges.insert(e1.first);
}
}
// read agents
std::vector<vertex_t> goalVertices;
std::vector<State> startStates;
for (const auto& node : config["agents"]) {
const auto start = node["start"].as<std::string>();
const auto goal = node["goal"].as<std::string>();
startStates.emplace_back(State(0, vertexMap[start]));
goalVertices.push_back(vertexMap[goal]);
}
Environment mapf(roadmap, goalVertices, disappearAtGoal);
CBS<State, Action, int, Conflict, Constraints, Environment> cbs(mapf);
std::vector<PlanResult<State, Action, int> > solution;
Timer timer;
bool success = cbs.search(startStates, solution);
timer.stop();
if (success) {
std::cout << "Planning successful! " << std::endl;
int cost = 0;
int makespan = 0;
for (const auto& s : solution) {
cost += s.cost;
makespan = std::max<int>(makespan, s.cost);
}
std::ofstream out(outputFile);
out << "statistics:" << std::endl;
out << " cost: " << cost << std::endl;
out << " makespan: " << makespan << std::endl;
out << " runtime: " << timer.elapsedSeconds() << std::endl;
out << " highLevelExpanded: " << mapf.highLevelExpanded() << std::endl;
out << " lowLevelExpanded: " << mapf.lowLevelExpanded() << std::endl;
out << "schedule:" << std::endl;
for (size_t a = 0; a < solution.size(); ++a) {
// std::cout << "Solution for: " << a << std::endl;
// for (size_t i = 0; i < solution[a].actions.size(); ++i) {
// std::cout << solution[a].states[i].second << ": " <<
// solution[a].states[i].first << "->" << solution[a].actions[i].first
// << "(cost: " << solution[a].actions[i].second << ")" << std::endl;
// }
// std::cout << solution[a].states.back().second << ": " <<
// solution[a].states.back().first << std::endl;
out << " agent" << a << ":" << std::endl;
for (const auto& state : solution[a].states) {
out << " - v: " << roadmap[state.first.vertex].name << std::endl
<< " t: " << state.second << std::endl;
}
}
} else {
std::cout << "Planning NOT successful!" << std::endl;
}
return 0;
}
| 6,676 |
1,323 | <reponame>jingxiufenghua/rec-model
"""
Created on May 19, 2021
modules of Wide&Deep: Linear, DNN
@author: <NAME>(<EMAIL>)
"""
import tensorflow as tf
from tensorflow.keras.layers import Dense, Layer, Dropout
from tensorflow.keras.regularizers import l2
class Linear(Layer):
def __init__(self, feature_length, w_reg=1e-6):
"""
Linear Part
:param feature_length: A scalar. The length of features.
:param w_reg: A scalar. The regularization coefficient of parameter w.
"""
super(Linear, self).__init__()
self.feature_length = feature_length
self.w_reg = w_reg
def build(self, input_shape):
self.w = self.add_weight(name="w",
shape=(self.feature_length, 1),
regularizer=l2(self.w_reg),
trainable=True)
def call(self, inputs, **kwargs):
result = tf.reduce_sum(tf.nn.embedding_lookup(self.w, inputs), axis=1) # (batch_size, 1)
return result
class DNN(Layer):
def __init__(self, hidden_units, activation='relu', dropout=0.):
"""Deep Neural Network
:param hidden_units: A list. Neural network hidden units.
:param activation: A string. Activation function of dnn.
:param dropout: A scalar. Dropout number.
"""
super(DNN, self).__init__()
self.dnn_network = [Dense(units=unit, activation=activation) for unit in hidden_units]
self.dropout = Dropout(dropout)
def call(self, inputs, **kwargs):
x = inputs
for dnn in self.dnn_network:
x = dnn(x)
x = self.dropout(x)
return x | 746 |
852 | <gh_stars>100-1000
#include "DetectorDescription/Core/interface/DDDivision.h"
#include <ostream>
#include "DetectorDescription/Core/src/Division.h"
#include "FWCore/MessageLogger/interface/MessageLogger.h"
using DDI::Division;
std::ostream& operator<<(std::ostream& os, const DDDivision& div) {
DDBase<DDName, Division*>::def_type defined(div.isDefined());
if (defined.first) {
os << *(defined.first) << " ";
if (defined.second) {
div.rep().stream(os);
} else {
os << "* division not defined * ";
}
} else {
os << "* division not declared * ";
}
return os;
}
DDDivision::DDDivision() : DDBase<DDName, std::unique_ptr<DDI::Division> >() {}
DDDivision::DDDivision(const DDName& name) : DDBase<DDName, std::unique_ptr<DDI::Division> >() { create(name); }
DDDivision::DDDivision(const DDName& name,
const DDLogicalPart& parent,
const DDAxes axis,
const int nReplicas,
const double width,
const double offset)
: DDBase<DDName, std::unique_ptr<DDI::Division> >() {
create(name, std::make_unique<Division>(parent, axis, nReplicas, width, offset));
}
DDDivision::DDDivision(
const DDName& name, const DDLogicalPart& parent, const DDAxes axis, const int nReplicas, const double offset) {
create(name, std::make_unique<Division>(parent, axis, nReplicas, offset));
}
DDDivision::DDDivision(
const DDName& name, const DDLogicalPart& parent, const DDAxes axis, const double width, const double offset) {
create(name, std::make_unique<Division>(parent, axis, width, offset));
}
DDAxes DDDivision::axis() const { return rep().axis(); }
int DDDivision::nReplicas() const { return rep().nReplicas(); }
double DDDivision::width() const { return rep().width(); }
double DDDivision::offset() const { return rep().offset(); }
const DDLogicalPart& DDDivision::parent() const { return rep().parent(); }
| 771 |
660 | /*
* Copyright (c) 2018, Intel Corporation
*
* Permission is hereby granted, free of charge, to any person obtaining a
* copy of this software and associated documentation files (the "Software"),
* to deal in the Software without restriction, including without limitation
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
* and/or sell copies of the Software, and to permit persons to whom the
* Software is furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be included
* in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
* THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
* OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
* OTHER DEALINGS IN THE SOFTWARE.
*/
//!
//! \file codechal_fei_hevc_g9_skl.cpp
//! \brief HEVC FEI dual-pipe encoder for GEN9 SKL.
//!
#include "codechal_fei_hevc_g9_skl.h"
#include "igcodeckrn_g9.h"
#include "codeckrnheader.h"
#define GPUMMU_WA_PADDING (64 * 1024)
//! HEVC encoder kernel header structure for G9 SKL
struct CODECHAL_ENC_HEVC_KERNEL_HEADER_FEI_G9_SKL
{
int nKernelCount; //!< Total number of kernels
CODECHAL_KERNEL_HEADER Hevc_FEI_LCUEnc_I_2xDownSampling_Kernel; //!< 2x down sampling kernel
CODECHAL_KERNEL_HEADER Hevc_FEI_LCUEnc_I_32x32_PU_ModeDecision_Kernel; //!< Intra 32x32 PU mode decision kernel
CODECHAL_KERNEL_HEADER Hevc_FEI_LCUEnc_I_16x16_PU_SADComputation_Kernel; //!< Intra 16x16 PU SAD computation kernel
CODECHAL_KERNEL_HEADER Hevc_FEI_LCUEnc_I_16x16_PU_ModeDecision_Kernel; //!< Intra 16x16 PU mode decision kernel
CODECHAL_KERNEL_HEADER Hevc_FEI_LCUEnc_I_8x8_PU_Kernel; //!< Intra 8x8 PU mode decision kernel
CODECHAL_KERNEL_HEADER Hevc_FEI_LCUEnc_I_8x8_PU_FMode_Kernel; //!< Intra 8x8 PU final mode decision kernel
CODECHAL_KERNEL_HEADER Hevc_FEI_LCUEnc_PB_32x32_PU_IntraCheck; //!< P/B 32x32 PU intra mode check kernel
CODECHAL_KERNEL_HEADER HEVC_FEI_LCUEnc_PB_MB; //!< P/B MbEnc Kernel
CODECHAL_KERNEL_HEADER Hevc_FEI_LCUEnc_I_DS4HME; //!< 4x Scaling kernel
CODECHAL_KERNEL_HEADER Hevc_FEI_LCUEnc_P_HME; //!< P frame HME kernel
CODECHAL_KERNEL_HEADER Hevc_FEI_LCUEnc_B_HME; //!< B frame HME kernel
CODECHAL_KERNEL_HEADER Hevc_FEI_LCUEnc_I_COARSE; //!< Intra coarse kernel
CODECHAL_KERNEL_HEADER Hevc_FEI_LCUEnc_PB_Pak; //!< P/B frame PAK kernel
CODECHAL_KERNEL_HEADER Hevc_FEI_LCUEnc_BRC_Blockcopy; //!< BRC blockcopy kerenel
CODECHAL_KERNEL_HEADER Hevc_FEI_LCUEnc_DS_Combined; //!< Down scale and format conversion kernel for 10 bit for KBL
CODECHAL_KERNEL_HEADER HEVC_FEI_LCUEnc_P_MB; //!< P frame MbEnc kernel
};
using PCODECHAL_ENC_HEVC_KERNEL_HEADER_FEI_G9_SKL = struct CODECHAL_ENC_HEVC_KERNEL_HEADER_FEI_G9_SKL*;
//! HEVC encoder FEI intra 8x8 PU final mode decision kernel curbe for GEN9
struct CODECHAL_FEI_HEVC_I_8x8_PU_FMODE_CURBE_G9
{
union {
struct {
uint32_t FrameWidth : MOS_BITFIELD_RANGE(0, 15);
uint32_t FrameHeight : MOS_BITFIELD_RANGE(16, 31);
};
uint32_t Value;
} DW0;
union {
struct {
uint32_t SliceType : MOS_BITFIELD_RANGE(0, 1);
uint32_t PuType : MOS_BITFIELD_RANGE(2, 3);
uint32_t PakReordingFlag : MOS_BITFIELD_BIT(4);
uint32_t ReservedMBZ : MOS_BITFIELD_BIT(5);
uint32_t LCUType : MOS_BITFIELD_BIT(6);
uint32_t ScreenContentFlag : MOS_BITFIELD_BIT(7);
uint32_t IntraRefreshEn : MOS_BITFIELD_RANGE(8, 9);
uint32_t EnableRollingIntra : MOS_BITFIELD_BIT(10);
uint32_t HalfUpdateMixedLCU : MOS_BITFIELD_BIT(11);
uint32_t Reserved_12_23 : MOS_BITFIELD_RANGE(12, 23);
uint32_t EnableIntraEarlyExit : MOS_BITFIELD_BIT(24);
uint32_t BRCEnable : MOS_BITFIELD_BIT(25);
uint32_t LCUBRCEnable : MOS_BITFIELD_BIT(26);
uint32_t ROIEnable : MOS_BITFIELD_BIT(27);
uint32_t FASTSurveillanceFlag : MOS_BITFIELD_BIT(28);
uint32_t EnableFlexibleParam : MOS_BITFIELD_BIT(29);
uint32_t EnableQualityImprovement : MOS_BITFIELD_BIT(30);
uint32_t EnableDebugDump : MOS_BITFIELD_BIT(31);
};
uint32_t Value;
} DW1;
union {
struct {
uint32_t LambdaForLuma;
};
uint32_t Value;
} DW2;
union {
// For inter frame or enable statictics data dump
struct {
uint32_t LambdaForDistCalculation;
};
uint32_t Value;
} DW3;
union {
struct {
uint32_t ModeCostFor8x8PU_TU8;
};
uint32_t Value;
} DW4;
union {
struct {
uint32_t ModeCostFor8x8PU_TU4;
};
uint32_t Value;
} DW5;
union {
struct {
uint32_t SATD16x16PuThreshold : MOS_BITFIELD_RANGE(0, 15);
uint32_t BiasFactorToward8x8 : MOS_BITFIELD_RANGE(16, 31);
};
uint32_t Value;
} DW6;
union {
struct {
uint32_t Qp : MOS_BITFIELD_RANGE(0, 15);
uint32_t QpForInter : MOS_BITFIELD_RANGE(16, 31);
};
uint32_t Value;
} DW7;
union {
struct {
uint32_t SimplifiedFlagForInter : MOS_BITFIELD_BIT(0);
uint32_t EnableStatsDataDump : MOS_BITFIELD_BIT(1);
uint32_t Reserved_2_7 : MOS_BITFIELD_RANGE(2, 7);
uint32_t KBLControlFlag : MOS_BITFIELD_BIT(8);
uint32_t Reserved_9_31 : MOS_BITFIELD_RANGE(9, 31);
};
uint32_t Value;
} DW8;
union {
struct {
uint32_t IntraRefreshMBNum : MOS_BITFIELD_RANGE(0, 15);
uint32_t IntraRefreshUnitInMB : MOS_BITFIELD_RANGE(16, 23);
uint32_t IntraRefreshQPDelta : MOS_BITFIELD_RANGE(24, 31);
};
uint32_t Value;
} DW9;
union {
struct {
uint32_t Reserved;
};
uint32_t Value;
} DW10;
union {
struct {
uint32_t Reserved;
};
uint32_t Value;
} DW11;
union {
struct {
uint32_t Reserved;
};
uint32_t Value;
} DW12;
union {
struct {
uint32_t Reserved;
};
uint32_t Value;
} DW13;
union {
struct {
uint32_t Reserved;
};
uint32_t Value;
} DW14;
union {
struct {
uint32_t Reserved;
};
uint32_t Value;
} DW15;
union {
struct {
uint32_t BTI_PAK_Object;
};
uint32_t Value;
} DW16;
union {
struct {
uint32_t BTI_VME_8x8_Mode;
};
uint32_t Value;
} DW17;
union {
struct {
uint32_t BTI_Intra_Mode;
};
uint32_t Value;
} DW18;
union {
struct {
uint32_t BTI_PAK_Command;
};
uint32_t Value;
} DW19;
union {
struct {
uint32_t BTI_Slice_Map;
};
uint32_t Value;
} DW20;
union {
struct {
uint32_t BTI_IntraDist;
};
uint32_t Value;
} DW21;
union {
struct {
uint32_t BTI_BRC_Input;
};
uint32_t Value;
} DW22;
union {
struct {
uint32_t BTI_Simplest_Intra;
};
uint32_t Value;
} DW23;
union {
struct {
uint32_t BTI_LCU_Qp_Surface;
};
uint32_t Value;
} DW24;
union {
struct {
uint32_t BTI_BRC_Data;
};
uint32_t Value;
} DW25;
union {
//Output (for inter and statictics data dump only)
struct {
uint32_t BTI_Haar_Dist16x16;
};
uint32_t Value;
} DW26;
union {
// This surface should take the statistics surface from Hevc_LCUEnc_I_32x32_PU_ModeDecision as input
struct {
uint32_t BTI_Stats_Data;
};
uint32_t Value;
} DW27;
union {
// Frame level Statistics data surface
struct {
uint32_t BTI_Frame_Stats_Data;
};
uint32_t Value;
} DW28;
union {
// Frame level CTB Distortion data surface
struct {
uint32_t BTI_CTB_Distortion_Surface;
};
uint32_t Value;
} DW29;
union {
struct {
uint32_t BTI_Debug;
};
uint32_t Value;
} DW30;
};
using PCODECHAL_FEI_HEVC_I_8x8_PU_FMODE_CURBE_G9 = struct CODECHAL_FEI_HEVC_I_8x8_PU_FMODE_CURBE_G9*;
C_ASSERT(MOS_BYTES_TO_DWORDS(sizeof(CODECHAL_FEI_HEVC_I_8x8_PU_FMODE_CURBE_G9)) == 31);
//! HEVC encoder FEI B 32x32 PU intra check kernel curbe for GEN9
struct CODECHAL_FEI_HEVC_B_32x32_PU_INTRA_CHECK_CURBE_G9
{
union {
struct {
uint32_t FrameWidth : MOS_BITFIELD_RANGE(0, 15);
uint32_t FrameHeight : MOS_BITFIELD_RANGE(16, 31);
};
uint32_t Value;
} DW0;
union {
struct {
uint32_t SliceType : MOS_BITFIELD_RANGE(0, 1);
uint32_t Reserved : MOS_BITFIELD_RANGE(2, 7);
uint32_t Log2MinTUSize : MOS_BITFIELD_RANGE(8, 15);
uint32_t Flags : MOS_BITFIELD_RANGE(16, 23);
uint32_t EnableIntraEarlyExit : MOS_BITFIELD_BIT(24);
uint32_t HMEEnable : MOS_BITFIELD_BIT(25);
uint32_t FASTSurveillanceFlag : MOS_BITFIELD_BIT(26);
uint32_t Res_27_30 : MOS_BITFIELD_RANGE(27, 30);
uint32_t EnableDebugDump : MOS_BITFIELD_BIT(31);
};
uint32_t Value;
} DW1;
union {
struct {
uint32_t QpValue : MOS_BITFIELD_RANGE(0, 15);
uint32_t QpMultiplier : MOS_BITFIELD_RANGE(16, 31);
};
uint32_t Value;
} DW2;
union {
struct {
uint32_t Reserved;
};
uint32_t Value;
} DW3;
union {
struct {
uint32_t Reserved;
};
uint32_t Value;
} DW4;
union {
struct {
uint32_t Reserved;
};
uint32_t Value;
} DW5;
union {
struct {
uint32_t Reserved;
};
uint32_t Value;
} DW6;
union {
struct {
uint32_t Reserved;
};
uint32_t Value;
} DW7;
union {
struct {
uint32_t BTI_Per32x32PuIntraCheck;
};
uint32_t Value;
} DW8;
union {
struct {
uint32_t BTI_Src_Y;
};
uint32_t Value;
} DW9;
union {
struct {
uint32_t BTI_Src_Y2X;
};
uint32_t Value;
} DW10;
union {
struct {
uint32_t BTI_Slice_Map;
};
uint32_t Value;
} DW11;
union {
struct {
uint32_t BTI_VME_Y2X;
};
uint32_t Value;
} DW12;
union {
struct {
uint32_t BTI_Simplest_Intra; // output only
};
uint32_t Value;
} DW13;
union {
struct {
uint32_t BTI_HME_MVPred;
};
uint32_t Value;
} DW14;
union {
struct {
uint32_t BTI_HME_Dist;
};
uint32_t Value;
} DW15;
union {
struct {
uint32_t BTI_LCU_Skip;
};
uint32_t Value;
} DW16;
union {
struct {
uint32_t BTI_Debug;
};
uint32_t Value;
} DW17;
};
using PCODECHAL_FEI_HEVC_B_32x32_PU_INTRA_CHECK_CURBE_G9 = struct CODECHAL_FEI_HEVC_B_32x32_PU_INTRA_CHECK_CURBE_G9;
C_ASSERT(MOS_BYTES_TO_DWORDS(sizeof(CODECHAL_FEI_HEVC_B_32x32_PU_INTRA_CHECK_CURBE_G9)) == 18);
//! HEVC encoder FEI B Pak kernel curbe for GEN9
struct CODECHAL_FEI_HEVC_B_PAK_CURBE_G9
{
union
{
struct
{
uint32_t FrameWidth : MOS_BITFIELD_RANGE(0, 15);
uint32_t FrameHeight : MOS_BITFIELD_RANGE(16, 31);
};
struct
{
uint32_t Value;
};
} DW0;
union
{
struct
{
uint32_t Qp : MOS_BITFIELD_RANGE(0, 7);
uint32_t Res_8_15 : MOS_BITFIELD_RANGE(8, 15);
uint32_t MaxVmvR : MOS_BITFIELD_RANGE(16, 31);
};
struct
{
uint32_t Value;
};
} DW1;
union
{
struct
{
uint32_t SliceType : MOS_BITFIELD_RANGE(0, 1);
uint32_t EnableWA : MOS_BITFIELD_BIT( 2);
uint32_t Res_3_7 : MOS_BITFIELD_RANGE(3, 7);
uint32_t SimplestIntraEnable : MOS_BITFIELD_BIT(8);
uint32_t BrcEnable : MOS_BITFIELD_BIT(9);
uint32_t LcuBrcEnable : MOS_BITFIELD_BIT(10);
uint32_t ROIEnable : MOS_BITFIELD_BIT(11);
uint32_t FASTSurveillanceFlag : MOS_BITFIELD_BIT(12);
uint32_t EnableRollingIntra : MOS_BITFIELD_BIT(13);
uint32_t Res_14 : MOS_BITFIELD_BIT(14);
uint32_t EnableQualityImprovement : MOS_BITFIELD_BIT(15);
uint32_t KBLControlFlag : MOS_BITFIELD_BIT(16);
uint32_t Res_17_30 : MOS_BITFIELD_RANGE(17, 30);
uint32_t ScreenContent : MOS_BITFIELD_BIT(31);
};
struct
{
uint32_t Value;
};
} DW2;
union
{
struct
{
uint32_t IntraRefreshMBNum : MOS_BITFIELD_RANGE(0, 15);
uint32_t IntraRefreshUnitInMB : MOS_BITFIELD_RANGE(16, 23);
uint32_t IntraRefreshQPDelta : MOS_BITFIELD_RANGE(24, 31);
};
struct
{
uint32_t Value;
};
} DW3;
union
{
struct
{
uint32_t Reserved;
};
struct
{
uint32_t Value;
};
} DW4_15[12];
union
{
struct
{
uint32_t BTI_CU_Record;
};
struct
{
uint32_t Value;
};
} DW16;
union
{
struct
{
uint32_t BTI_PAK_Obj;
};
struct
{
uint32_t Value;
};
} DW17;
union
{
struct
{
uint32_t BTI_Slice_Map;
};
struct
{
uint32_t Value;
};
} DW18;
union
{
struct
{
uint32_t BTI_Brc_Input;
};
struct
{
uint32_t Value;
};
} DW19;
union
{
struct
{
uint32_t BTI_LCU_Qp;
};
struct
{
uint32_t Value;
};
} DW20;
union
{
struct
{
uint32_t BTI_Brc_Data;
};
struct
{
uint32_t Value;
};
} DW21;
union
{
struct
{
uint32_t BTI_MB_Data;
};
struct
{
uint32_t Value;
};
} DW22;
union
{
struct
{
uint32_t BTI_MVP_Surface;
};
struct
{
uint32_t Value;
};
} DW23;
union
{
struct
{
uint32_t BTI_WA_PAK_Data;
};
struct
{
uint32_t Value;
};
} DW24;
union
{
struct
{
uint32_t BTI_WA_PAK_Obj;
};
struct
{
uint32_t Value;
};
} DW25;
union
{
struct
{
uint32_t BTI_Debug;
};
struct
{
uint32_t Value;
};
} DW26;
};
using PCODECHAL_FEI_HEVC_B_PAK_CURBE_G9 = struct CODECHAL_FEI_HEVC_B_PAK_CURBE_G9*;
C_ASSERT(MOS_BYTES_TO_DWORDS(sizeof(CODECHAL_FEI_HEVC_B_PAK_CURBE_G9)) == 27);
//! HEVC encoder B MBEnc kernel curbe for GEN9
struct CODECHAL_FEI_HEVC_B_MB_ENC_CURBE_G9
{
// DW0
union
{
struct
{
uint32_t SkipModeEn : MOS_BITFIELD_BIT(0);
uint32_t AdaptiveEn : MOS_BITFIELD_BIT(1);
uint32_t BiMixDis : MOS_BITFIELD_BIT(2);
uint32_t : MOS_BITFIELD_RANGE(3, 4);
uint32_t EarlyImeSuccessEn : MOS_BITFIELD_BIT(5);
uint32_t : MOS_BITFIELD_BIT(6);
uint32_t T8x8FlagForInterEn : MOS_BITFIELD_BIT(7);
uint32_t : MOS_BITFIELD_RANGE(8, 23);
uint32_t EarlyImeStop : MOS_BITFIELD_RANGE(24, 31);
};
struct
{
uint32_t Value;
};
} DW0;
// DW1
union
{
struct
{
uint32_t MaxNumMVs : MOS_BITFIELD_RANGE(0, 5);
uint32_t : MOS_BITFIELD_RANGE(6, 15);
uint32_t BiWeight : MOS_BITFIELD_RANGE(16, 21);
uint32_t : MOS_BITFIELD_RANGE(22, 27);
uint32_t UniMixDisable : MOS_BITFIELD_BIT(28);
uint32_t : MOS_BITFIELD_RANGE(29, 31);
};
struct
{
uint32_t Value;
};
} DW1;
// DW2
union
{
struct
{
uint32_t LenSP : MOS_BITFIELD_RANGE(0, 7);
uint32_t MaxNumSU : MOS_BITFIELD_RANGE(8, 15);
uint32_t PicWidth : MOS_BITFIELD_RANGE(16, 31);
};
struct
{
uint32_t Value;
};
} DW2;
// DW3
union
{
struct
{
uint32_t SrcSize : MOS_BITFIELD_RANGE(0, 1);
uint32_t : MOS_BITFIELD_RANGE(2, 3);
uint32_t MbTypeRemap : MOS_BITFIELD_RANGE(4, 5);
uint32_t SrcAccess : MOS_BITFIELD_BIT(6);
uint32_t RefAccess : MOS_BITFIELD_BIT(7);
uint32_t SearchCtrl : MOS_BITFIELD_RANGE(8, 10);
uint32_t DualSearchPathOption : MOS_BITFIELD_BIT(11);
uint32_t SubPelMode : MOS_BITFIELD_RANGE(12, 13);
uint32_t SkipType : MOS_BITFIELD_BIT(14);
uint32_t DisableFieldCacheAlloc : MOS_BITFIELD_BIT(15);
uint32_t InterChromaMode : MOS_BITFIELD_BIT(16);
uint32_t FTEnable : MOS_BITFIELD_BIT(17);
uint32_t BMEDisableFBR : MOS_BITFIELD_BIT(18);
uint32_t BlockBasedSkipEnable : MOS_BITFIELD_BIT(19);
uint32_t InterSAD : MOS_BITFIELD_RANGE(20, 21);
uint32_t IntraSAD : MOS_BITFIELD_RANGE(22, 23);
uint32_t SubMbPartMask : MOS_BITFIELD_RANGE(24, 30);
uint32_t : MOS_BITFIELD_BIT(31);
};
struct
{
uint32_t Value;
};
} DW3;
union
{
struct
{
uint32_t PicHeightMinus1 : MOS_BITFIELD_RANGE(0, 15);
uint32_t Res_16_22 : MOS_BITFIELD_RANGE(16,22);
uint32_t EnableQualityImprovement : MOS_BITFIELD_BIT(23);
uint32_t EnableDebug : MOS_BITFIELD_BIT(24);
uint32_t EnableFlexibleParam : MOS_BITFIELD_BIT(25);
uint32_t EnableStatsDataDump : MOS_BITFIELD_BIT(26);
uint32_t Res_27 : MOS_BITFIELD_BIT(27);
uint32_t HMEEnable : MOS_BITFIELD_BIT(28);
uint32_t SliceType : MOS_BITFIELD_RANGE(29, 30);
uint32_t UseActualRefQPValue : MOS_BITFIELD_BIT(31);
};
struct
{
uint32_t Value;
};
} DW4;
// DW5
union
{
struct
{
uint32_t Res_0_15 : MOS_BITFIELD_RANGE(0, 15);
uint32_t RefWidth : MOS_BITFIELD_RANGE(16, 23);
uint32_t RefHeight : MOS_BITFIELD_RANGE(24, 31);
};
struct
{
uint32_t Value;
};
} DW5;
union
{
struct
{
uint32_t FrameWidth : MOS_BITFIELD_RANGE(0, 15);
uint32_t FrameHeight : MOS_BITFIELD_RANGE(16, 31);
};
struct
{
uint32_t Value;
};
} DW6;
// DW7
union
{
struct
{
uint32_t IntraPartMask : MOS_BITFIELD_RANGE(0, 4);
uint32_t NonSkipZMvAdded : MOS_BITFIELD_BIT(5);
uint32_t NonSkipModeAdded : MOS_BITFIELD_BIT(6);
uint32_t LumaIntraSrcCornerSwap : MOS_BITFIELD_BIT(7);
uint32_t : MOS_BITFIELD_RANGE(8, 15);
uint32_t MVCostScaleFactor : MOS_BITFIELD_RANGE(16, 17);
uint32_t BilinearEnable : MOS_BITFIELD_BIT(18);
uint32_t Res_19 : MOS_BITFIELD_BIT(19);
uint32_t WeightedSADHAAR : MOS_BITFIELD_BIT(20);
uint32_t AConlyHAAR : MOS_BITFIELD_BIT(21);
uint32_t RefIDCostMode : MOS_BITFIELD_BIT(22);
uint32_t : MOS_BITFIELD_BIT(23);
uint32_t SkipCenterMask : MOS_BITFIELD_RANGE(24, 31);
};
struct
{
uint32_t Value;
};
} DW7;
// DW8
union
{
struct
{
uint32_t Mode0Cost : MOS_BITFIELD_RANGE(0, 7);
uint32_t Mode1Cost : MOS_BITFIELD_RANGE(8, 15);
uint32_t Mode2Cost : MOS_BITFIELD_RANGE(16, 23);
uint32_t Mode3Cost : MOS_BITFIELD_RANGE(24, 31);
};
struct
{
uint32_t Value;
};
} DW8;
// DW9
union
{
struct
{
uint32_t Mode4Cost : MOS_BITFIELD_RANGE(0, 7);
uint32_t Mode5Cost : MOS_BITFIELD_RANGE(8, 15);
uint32_t Mode6Cost : MOS_BITFIELD_RANGE(16, 23);
uint32_t Mode7Cost : MOS_BITFIELD_RANGE(24, 31);
};
struct
{
uint32_t Value;
};
} DW9;
// DW10
union
{
struct
{
uint32_t Mode8Cost : MOS_BITFIELD_RANGE(0, 7);
uint32_t Mode9Cost : MOS_BITFIELD_RANGE(8, 15);
uint32_t RefIDCost : MOS_BITFIELD_RANGE(16, 23);
uint32_t ChromaIntraModeCost : MOS_BITFIELD_RANGE(24, 31);
};
struct
{
uint32_t Value;
};
} DW10;
// DW11
union
{
struct
{
uint32_t MV0Cost : MOS_BITFIELD_RANGE(0, 7);
uint32_t MV1Cost : MOS_BITFIELD_RANGE(8, 15);
uint32_t MV2Cost : MOS_BITFIELD_RANGE(16, 23);
uint32_t MV3Cost : MOS_BITFIELD_RANGE(24, 31);
};
struct
{
uint32_t Value;
};
} DW11;
// DW12
union
{
struct
{
uint32_t MV4Cost : MOS_BITFIELD_RANGE(0, 7);
uint32_t MV5Cost : MOS_BITFIELD_RANGE(8, 15);
uint32_t MV6Cost : MOS_BITFIELD_RANGE(16, 23);
uint32_t MV7Cost : MOS_BITFIELD_RANGE(24, 31);
};
struct
{
uint32_t Value;
};
} DW12;
// DW13
union
{
struct
{
uint32_t QpPrimeY : MOS_BITFIELD_RANGE(0, 7);
uint32_t QpPrimeCb : MOS_BITFIELD_RANGE(8, 15);
uint32_t QpPrimeCr : MOS_BITFIELD_RANGE(16, 23);
uint32_t TargetSizeInWord : MOS_BITFIELD_RANGE(24, 31);
};
struct
{
uint32_t Value;
};
} DW13;
// DW14
union
{
struct
{
uint32_t SICFwdTransCoeffThreshold_0 : MOS_BITFIELD_RANGE(0, 15);
uint32_t SICFwdTransCoeffThreshold_1 : MOS_BITFIELD_RANGE(16, 23);
uint32_t SICFwdTransCoeffThreshold_2 : MOS_BITFIELD_RANGE(24, 31);
};
struct
{
uint32_t Value;
};
} DW14;
// DW15
union
{
struct
{
uint32_t SICFwdTransCoeffThreshold_3 : MOS_BITFIELD_RANGE(0, 7);
uint32_t SICFwdTransCoeffThreshold_4 : MOS_BITFIELD_RANGE(8, 15);
uint32_t SICFwdTransCoeffThreshold_5 : MOS_BITFIELD_RANGE(16, 23);
uint32_t SICFwdTransCoeffThreshold_6 : MOS_BITFIELD_RANGE(24, 31); // Highest Freq
};
struct
{
uint32_t Value;
};
} DW15;
// DW16
union
{
struct
{
SearchPathDelta SPDelta_0;
SearchPathDelta SPDelta_1;
SearchPathDelta SPDelta_2;
SearchPathDelta SPDelta_3;
};
struct
{
uint32_t Value;
};
} DW16;
// DW17
union
{
struct
{
SearchPathDelta SPDelta_4;
SearchPathDelta SPDelta_5;
SearchPathDelta SPDelta_6;
SearchPathDelta SPDelta_7;
};
struct
{
uint32_t Value;
};
} DW17;
// DW18
union
{
struct
{
SearchPathDelta SPDelta_8;
SearchPathDelta SPDelta_9;
SearchPathDelta SPDelta_10;
SearchPathDelta SPDelta_11;
};
struct
{
uint32_t Value;
};
} DW18;
// DW19
union
{
struct
{
SearchPathDelta SPDelta_12;
SearchPathDelta SPDelta_13;
SearchPathDelta SPDelta_14;
SearchPathDelta SPDelta_15;
};
struct
{
uint32_t Value;
};
} DW19;
// DW20
union
{
struct
{
SearchPathDelta SPDelta_16;
SearchPathDelta SPDelta_17;
SearchPathDelta SPDelta_18;
SearchPathDelta SPDelta_19;
};
struct
{
uint32_t Value;
};
} DW20;
// DW21
union
{
struct
{
SearchPathDelta SPDelta_20;
SearchPathDelta SPDelta_21;
SearchPathDelta SPDelta_22;
SearchPathDelta SPDelta_23;
};
struct
{
uint32_t Value;
};
} DW21;
// DW22
union
{
struct
{
SearchPathDelta SPDelta_24;
SearchPathDelta SPDelta_25;
SearchPathDelta SPDelta_26;
SearchPathDelta SPDelta_27;
};
struct
{
uint32_t Value;
};
} DW22;
// DW23
union
{
struct
{
SearchPathDelta SPDelta_28;
SearchPathDelta SPDelta_29;
SearchPathDelta SPDelta_30;
SearchPathDelta SPDelta_31;
};
struct
{
uint32_t Value;
};
} DW23;
// DW24
union
{
struct
{
SearchPathDelta SPDelta_32;
SearchPathDelta SPDelta_33;
SearchPathDelta SPDelta_34;
SearchPathDelta SPDelta_35;
};
struct
{
uint32_t Value;
};
} DW24;
// DW25
union
{
struct
{
SearchPathDelta SPDelta_36;
SearchPathDelta SPDelta_37;
SearchPathDelta SPDelta_38;
SearchPathDelta SPDelta_39;
};
struct
{
uint32_t Value;
};
} DW25;
// DW26
union
{
struct
{
SearchPathDelta SPDelta_40;
SearchPathDelta SPDelta_41;
SearchPathDelta SPDelta_42;
SearchPathDelta SPDelta_43;
};
struct
{
uint32_t Value;
};
} DW26;
// DW27
union
{
struct
{
SearchPathDelta SPDelta_44;
SearchPathDelta SPDelta_45;
SearchPathDelta SPDelta_46;
SearchPathDelta SPDelta_47;
};
struct
{
uint32_t Value;
};
} DW27;
// DW28
union
{
struct
{
SearchPathDelta SPDelta_48;
SearchPathDelta SPDelta_49;
SearchPathDelta SPDelta_50;
SearchPathDelta SPDelta_51;
};
struct
{
uint32_t Value;
};
} DW28;
// DW29
union
{
struct
{
SearchPathDelta SPDelta_52;
SearchPathDelta SPDelta_53;
SearchPathDelta SPDelta_54;
SearchPathDelta SPDelta_55;
};
struct
{
uint32_t Value;
};
} DW29;
// DW30
union
{
struct
{
uint32_t Intra4x4ModeMask : MOS_BITFIELD_RANGE(0, 8);
uint32_t : MOS_BITFIELD_RANGE(9, 15);
uint32_t Intra8x8ModeMask : MOS_BITFIELD_RANGE(16, 24);
uint32_t : MOS_BITFIELD_RANGE(25, 31);
};
struct
{
uint32_t Value;
};
} DW30;
// DW31
union
{
struct
{
uint32_t Intra16x16ModeMask : MOS_BITFIELD_RANGE(0, 3);
uint32_t IntraChromaModeMask : MOS_BITFIELD_RANGE(4, 7);
uint32_t IntraComputeType : MOS_BITFIELD_RANGE(8, 9);
uint32_t : MOS_BITFIELD_RANGE(10, 31);
};
struct
{
uint32_t Value;
};
} DW31;
// DW32
union
{
struct
{
uint32_t SkipVal : MOS_BITFIELD_RANGE(0, 15);
uint32_t MultiPredL0Disable : MOS_BITFIELD_RANGE(16, 23);
uint32_t MultiPredL1Disable : MOS_BITFIELD_RANGE(24, 31);
};
struct
{
uint32_t Value;
};
} DW32;
// DW33
union
{
struct
{
uint32_t Intra16x16NonDCPredPenalty : MOS_BITFIELD_RANGE(0, 7);
uint32_t Intra8x8NonDCPredPenalty : MOS_BITFIELD_RANGE(8, 15);
uint32_t Intra4x4NonDCPredPenalty : MOS_BITFIELD_RANGE(16, 23);
uint32_t : MOS_BITFIELD_RANGE(24, 31);
};
struct
{
uint32_t Value;
};
} DW33;
union {
struct {
uint32_t LambdaME;
};
uint32_t Value;
} DW34;
union {
struct {
uint32_t SimpIntraInterThreshold : MOS_BITFIELD_RANGE(0, 15);
uint32_t ModeCostSp : MOS_BITFIELD_RANGE(16, 23);
uint32_t IntraRefreshEn : MOS_BITFIELD_RANGE(24, 25);
uint32_t FirstIntraRefresh : MOS_BITFIELD_BIT(26);
uint32_t EnableRollingIntra : MOS_BITFIELD_BIT(27);
uint32_t HalfUpdateMixedLCU : MOS_BITFIELD_BIT(28);
uint32_t Res_29_31 : MOS_BITFIELD_RANGE(29, 31);
};
uint32_t Value;
} DW35;
union {
struct {
uint32_t NumRefIdxL0MinusOne : MOS_BITFIELD_RANGE(0, 7);
uint32_t HMECombinedExtraSUs : MOS_BITFIELD_RANGE(8, 15);
uint32_t NumRefIdxL1MinusOne : MOS_BITFIELD_RANGE(16, 23);
uint32_t PowerSaving : MOS_BITFIELD_BIT(24);
uint32_t BRCEnable : MOS_BITFIELD_BIT(25);
uint32_t LCUBRCEnable : MOS_BITFIELD_BIT(26);
uint32_t ROIEnable : MOS_BITFIELD_BIT(27);
uint32_t FASTSurveillanceFlag : MOS_BITFIELD_BIT(28);
uint32_t CheckAllFractionalEnable : MOS_BITFIELD_BIT(29);
uint32_t HMECombinedOverlap : MOS_BITFIELD_RANGE(30, 31);
};
uint32_t Value;
} DW36;
union {
struct {
uint32_t ActualQpRefID0List0 : MOS_BITFIELD_RANGE(0, 7);
uint32_t ActualQpRefID1List0 : MOS_BITFIELD_RANGE(8, 15);
uint32_t ActualQpRefID2List0 : MOS_BITFIELD_RANGE(16, 23);
uint32_t ActualQpRefID3List0 : MOS_BITFIELD_RANGE(24, 31);
};
uint32_t Value;
} DW37;
union {
struct {
uint32_t NumIntraRefreshOffFrames : MOS_BITFIELD_RANGE(0, 15);
uint32_t NumFrameInGOB : MOS_BITFIELD_RANGE(16, 31);
};
uint32_t Value;
} DW38;
union {
struct {
uint32_t ActualQpRefID0List1 : MOS_BITFIELD_RANGE(0, 7);
uint32_t ActualQpRefID1List1 : MOS_BITFIELD_RANGE(8, 15);
uint32_t RefCost : MOS_BITFIELD_RANGE(16, 31);
};
uint32_t Value;
} DW39;
union {
struct {
uint32_t TransformThreshold0 : MOS_BITFIELD_RANGE(0, 15);
uint32_t TransformThreshold1 : MOS_BITFIELD_RANGE(16, 31);
};
uint32_t Value;
} DW40;
union {
struct {
uint32_t TransformThreshold2 : MOS_BITFIELD_RANGE(0, 15);
uint32_t TextureIntraCostThreshold : MOS_BITFIELD_RANGE(16, 31);
};
uint32_t Value;
} DW41;
union {
struct
{
uint32_t NumMVPredictorsL0 : MOS_BITFIELD_RANGE(0, 3);
uint32_t NumMVPredictorsL1 : MOS_BITFIELD_RANGE(4, 7);
uint32_t Res_8 : MOS_BITFIELD_BIT(8);
uint32_t PerLCUQP : MOS_BITFIELD_BIT(9);
uint32_t PerCTBInput : MOS_BITFIELD_BIT(10);
uint32_t CTBDistortionOutput : MOS_BITFIELD_BIT(11);
uint32_t MVPredictorBlockSize : MOS_BITFIELD_RANGE(12, 14);
uint32_t Res_15 : MOS_BITFIELD_BIT(15);
uint32_t MultiPredL0 : MOS_BITFIELD_RANGE(16, 19);
uint32_t MultiPredL1 : MOS_BITFIELD_RANGE(20, 23);
uint32_t Res_24_31 : MOS_BITFIELD_RANGE(24, 31);
};
uint32_t Value;
} DW42;
union {
struct {
uint32_t Reserved;
};
uint32_t Value;
} DW43;
union {
struct {
uint32_t MaxNumMergeCandidates : MOS_BITFIELD_RANGE(0, 3);
uint32_t MaxNumRefList0 : MOS_BITFIELD_RANGE(4, 7);
uint32_t MaxNumRefList1 : MOS_BITFIELD_RANGE(8, 11);
uint32_t Res_12_15 : MOS_BITFIELD_RANGE(12, 15);
uint32_t MaxVmvR : MOS_BITFIELD_RANGE(16, 31);
};
uint32_t Value;
} DW44;
union {
struct {
uint32_t TemporalMvpEnableFlag : MOS_BITFIELD_BIT(0);
uint32_t Res_1_7 : MOS_BITFIELD_RANGE(1, 7);
uint32_t Log2ParallelMergeLevel : MOS_BITFIELD_RANGE(8, 15);
uint32_t HMECombineLenPslice : MOS_BITFIELD_RANGE(16, 23);
uint32_t HMECombineLenBslice : MOS_BITFIELD_RANGE(24, 31);
};
uint32_t Value;
} DW45;
union {
struct {
uint32_t Log2MinTUSize : MOS_BITFIELD_RANGE(0, 7);
uint32_t Log2MaxTUSize : MOS_BITFIELD_RANGE(8, 15);
uint32_t Log2MinCUSize : MOS_BITFIELD_RANGE(16, 23);
uint32_t Log2MaxCUSize : MOS_BITFIELD_RANGE(24, 31);
};
uint32_t Value;
} DW46;
union {
struct {
uint32_t NumRegionsInSlice : MOS_BITFIELD_RANGE(0, 7);
uint32_t TypeOfWalkingPattern : MOS_BITFIELD_RANGE(8, 11);
uint32_t ChromaFlatnessCheckFlag : MOS_BITFIELD_BIT(12);
uint32_t EnableIntraEarlyExit : MOS_BITFIELD_BIT(13);
uint32_t SkipIntraKrnFlag : MOS_BITFIELD_BIT(14);
uint32_t ScreenContentFlag : MOS_BITFIELD_BIT(15);
uint32_t IsLowDelay : MOS_BITFIELD_BIT(16);
uint32_t CollocatedFromL0Flag : MOS_BITFIELD_BIT(17);
uint32_t ArbitarySliceFlag : MOS_BITFIELD_BIT(18);
uint32_t MultiSliceFlag : MOS_BITFIELD_BIT(19);
uint32_t Res_20_23 : MOS_BITFIELD_RANGE(20, 23);
uint32_t isCurrRefL0LongTerm : MOS_BITFIELD_BIT(24);
uint32_t isCurrRefL1LongTerm : MOS_BITFIELD_BIT(25);
uint32_t NumRegionMinus1 : MOS_BITFIELD_RANGE(26, 31);
};
uint32_t Value;
} DW47;
union {
struct {
uint32_t CurrentTdL0_0 : MOS_BITFIELD_RANGE(0, 15);
uint32_t CurrentTdL0_1 : MOS_BITFIELD_RANGE(16, 31);
};
uint32_t Value;
} DW48;
union {
struct {
uint32_t CurrentTdL0_2 : MOS_BITFIELD_RANGE(0, 15);
uint32_t CurrentTdL0_3 : MOS_BITFIELD_RANGE(16, 31);
};
uint32_t Value;
} DW49;
union {
struct {
uint32_t CurrentTdL1_0 : MOS_BITFIELD_RANGE(0, 15);
uint32_t CurrentTdL1_1 : MOS_BITFIELD_RANGE(16, 31);
};
uint32_t Value;
} DW50;
union {
struct {
uint32_t IntraRefreshMBNum : MOS_BITFIELD_RANGE(0, 15);
uint32_t IntraRefreshUnitInMB : MOS_BITFIELD_RANGE(16, 23);
uint32_t IntraRefreshQPDelta : MOS_BITFIELD_RANGE(24, 31);
};
uint32_t Value;
} DW51;
union {
struct {
uint32_t NumofUnitInRegion : MOS_BITFIELD_RANGE(0, 15);
uint32_t MaxHeightInRegion : MOS_BITFIELD_RANGE(16, 31);
};
uint32_t Value;
} DW52;
union {
struct {
uint32_t IntraRefreshRefWidth : MOS_BITFIELD_RANGE(0, 7);
uint32_t IntraRefreshRefHeight : MOS_BITFIELD_RANGE(8, 15);
uint32_t Res_16_31 : MOS_BITFIELD_RANGE(16, 31);
};
uint32_t Value;
} DW53;
union {
struct {
uint32_t Reserved;
};
uint32_t Value;
} DW54;
union {
struct {
uint32_t Reserved;
};
uint32_t Value;
} DW55;
union {
struct {
uint32_t BTI_CU_Record;
};
uint32_t Value;
} DW56;
union {
struct {
uint32_t BTI_PAK_Cmd;
};
uint32_t Value;
} DW57;
union {
struct {
uint32_t BTI_Src_Y;
};
uint32_t Value;
} DW58;
union {
struct {
uint32_t BTI_Intra_Dist;
};
uint32_t Value;
} DW59;
union {
struct {
uint32_t BTI_Min_Dist;
};
uint32_t Value;
} DW60;
union {
struct {
uint32_t BTI_HMEMVPredFwdBwdSurfIndex;
};
uint32_t Value;
} DW61;
union {
struct {
uint32_t BTI_HMEDistSurfIndex;
};
uint32_t Value;
} DW62;
union {
struct {
uint32_t BTI_Slice_Map;
};
uint32_t Value;
} DW63;
union {
struct {
uint32_t BTI_VME_Saved_UNI_SIC;
};
uint32_t Value;
} DW64;
union {
struct {
uint32_t BTI_Simplest_Intra;
};
uint32_t Value;
} DW65;
union {
struct {
uint32_t BTI_Collocated_RefFrame;
};
uint32_t Value;
} DW66;
union {
struct {
uint32_t BTI_Reserved;
};
uint32_t Value;
} DW67;
union {
struct {
uint32_t BTI_BRC_Input;
};
uint32_t Value;
} DW68;
union {
struct {
uint32_t BTI_LCU_QP;
};
uint32_t Value;
} DW69;
union {
struct {
uint32_t BTI_BRC_Data;
};
uint32_t Value;
} DW70;
union {
struct {
uint32_t BTI_VMEInterPredictionSurfIndex;
};
uint32_t Value;
} DW71;
union {
//For B frame
struct {
uint32_t BTI_VMEInterPredictionBSurfIndex;
};
//For P frame
struct {
uint32_t BTI_ConcurrentThreadMap;
};
uint32_t Value;
} DW72;
union {
//For B frame
struct {
uint32_t BTI_ConcurrentThreadMap;
};
//For P frame
struct {
uint32_t BTI_MB_Data_CurFrame;
};
uint32_t Value;
} DW73;
union {
//For B frame
struct {
uint32_t BTI_MB_Data_CurFrame;
};
//For P frame
struct {
uint32_t BTI_MVP_CurFrame;
};
uint32_t Value;
} DW74;
union {
//For B frame
struct {
uint32_t BTI_MVP_CurFrame;
};
//For P frame
struct {
uint32_t BTI_Haar_Dist16x16;
};
uint32_t Value;
} DW75;
union {
// this surface need to take same surface name from Hevc_LCUEnc_I_8x8_PU_FMode_inLCU as input
//For B frame
struct {
uint32_t BTI_Haar_Dist16x16;
};
//For P frame
struct {
uint32_t BTI_Stats_Data;
};
uint32_t Value;
} DW76;
union {
//For B frame
struct {
uint32_t BTI_Stats_Data;
};
//For P frame
struct {
uint32_t BTI_Frame_Stats_Data;
};
uint32_t Value;
} DW77;
union {
//For B frame
struct {
uint32_t BTI_Frame_Stats_Data;
};
//For P frame
struct {
uint32_t BTI_MVPredictor_Surface;
};
uint32_t Value;
} DW78;
union {
//For B frame
struct {
uint32_t BTI_MVPredictor_Surface;
};
//For P frame
struct {
uint32_t BTI_CTB_Input_Surface;
};
uint32_t Value;
} DW79;
union {
//For B frame
struct {
uint32_t BTI_CTB_Input_Surface;
};
//For P frame
struct {
uint32_t BTI_CTB_Distortion_Output_Surface;
};
uint32_t Value;
} DW80;
union {
//For B frame
struct {
uint32_t BTI_CTB_Distortion_Output_Surface;
};
//For P frame
struct {
uint32_t BTI_Debug;
};
uint32_t Value;
} DW81;
union {
//For B frame
struct {
uint32_t BTI_Debug;
};
uint32_t Value;
} DW82;
};
using PCODECHAL_FEI_HEVC_B_MB_ENC_CURBE_G9 = struct CODECHAL_FEI_HEVC_B_MB_ENC_CURBE_G9*;
C_ASSERT(MOS_BYTES_TO_DWORDS(sizeof(CODECHAL_FEI_HEVC_B_MB_ENC_CURBE_G9)) == 83 );
MOS_STATUS CodechalFeiHevcStateG9Skl::SetMbEncKernelParams(MHW_KERNEL_PARAM* kernelParams, uint32_t idx)
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_CHK_NULL_RETURN(kernelParams);
auto curbeAlignment = m_stateHeapInterface->pStateHeapInterface->GetCurbeAlignment();
kernelParams->iThreadCount = m_renderEngineInterface->GetHwCaps()->dwMaxThreads;
kernelParams->iIdCount = 1;
switch (idx)
{
case CODECHAL_HEVC_MBENC_2xSCALING:
kernelParams->iBTCount = CODECHAL_HEVC_FEI_SCALING_FRAME_END - CODECHAL_HEVC_FEI_SCALING_FRAME_BEGIN;
kernelParams->iCurbeLength = MOS_ALIGN_CEIL(sizeof(MEDIA_OBJECT_DOWNSCALING_2X_STATIC_DATA_G9), curbeAlignment);
kernelParams->iBlockWidth = 32;
kernelParams->iBlockHeight = 32;
break;
case CODECHAL_HEVC_MBENC_32x32MD:
kernelParams->iBTCount = CODECHAL_HEVC_FEI_32x32_PU_END - CODECHAL_HEVC_FEI_32x32_PU_BEGIN;
kernelParams->iCurbeLength = MOS_ALIGN_CEIL(sizeof(CODECHAL_FEI_HEVC_I_32x32_PU_MODE_DECISION_CURBE_G9), curbeAlignment);
kernelParams->iBlockWidth = 32;
kernelParams->iBlockHeight = 32;
break;
case CODECHAL_HEVC_MBENC_16x16SAD:
kernelParams->iBTCount = CODECHAL_HEVC_FEI_16x16_PU_SAD_END - CODECHAL_HEVC_FEI_16x16_PU_SAD_BEGIN;
kernelParams->iCurbeLength = MOS_ALIGN_CEIL(sizeof(CODECHAL_ENC_HEVC_I_16x16_SAD_CURBE_G9), curbeAlignment);
kernelParams->iBlockWidth = 16;
kernelParams->iBlockHeight = 16;
break;
case CODECHAL_HEVC_MBENC_16x16MD:
kernelParams->iBTCount = CODECHAL_HEVC_FEI_16x16_PU_MD_END - CODECHAL_HEVC_FEI_16x16_PU_MD_BEGIN;
kernelParams->iCurbeLength = MOS_ALIGN_CEIL(sizeof(CODECHAL_FEI_HEVC_I_16x16_PU_MODEDECISION_CURBE_G9), curbeAlignment);
kernelParams->iBlockWidth = 32;
kernelParams->iBlockHeight = 32;
break;
case CODECHAL_HEVC_MBENC_8x8PU:
kernelParams->iBTCount = CODECHAL_HEVC_FEI_8x8_PU_END - CODECHAL_HEVC_FEI_8x8_PU_BEGIN;
kernelParams->iCurbeLength = MOS_ALIGN_CEIL(sizeof(CODECHAL_FEI_HEVC_I_8x8_PU_CURBE_G9), curbeAlignment);
kernelParams->iBlockWidth = 8;
kernelParams->iBlockHeight = 8;
break;
case CODECHAL_HEVC_MBENC_8x8FMODE:
kernelParams->iBTCount = CODECHAL_HEVC_FEI_8x8_PU_FMODE_END - CODECHAL_HEVC_FEI_8x8_PU_FMODE_BEGIN;
kernelParams->iCurbeLength = MOS_ALIGN_CEIL(sizeof(CODECHAL_FEI_HEVC_I_8x8_PU_FMODE_CURBE_G9), curbeAlignment);
kernelParams->iBlockWidth = 32;
kernelParams->iBlockHeight = 32;
break;
case CODECHAL_HEVC_MBENC_32x32INTRACHECK:
kernelParams->iBTCount = CODECHAL_HEVC_FEI_B_32x32_PU_END - CODECHAL_HEVC_FEI_B_32x32_PU_BEGIN;
kernelParams->iCurbeLength = MOS_ALIGN_CEIL(sizeof(CODECHAL_ENC_HEVC_B_32x32_PU_INTRA_CHECK_CURBE_G9), curbeAlignment);
kernelParams->iBlockWidth = 32;
kernelParams->iBlockHeight = 32;
break;
case CODECHAL_HEVC_FEI_MBENC_BENC:
kernelParams->iBTCount = CODECHAL_HEVC_FEI_B_MBENC_END - CODECHAL_HEVC_FEI_B_MBENC_BEGIN;
kernelParams->iCurbeLength = MOS_ALIGN_CEIL(sizeof(CODECHAL_FEI_HEVC_B_MB_ENC_CURBE_G9), curbeAlignment);
kernelParams->iBlockWidth = 16;
kernelParams->iBlockHeight = 16;
break;
case CODECHAL_HEVC_FEI_MBENC_BPAK:
kernelParams->iBTCount = CODECHAL_HEVC_FEI_B_PAK_END - CODECHAL_HEVC_FEI_B_PAK_BEGIN;
kernelParams->iCurbeLength = MOS_ALIGN_CEIL(sizeof(CODECHAL_ENC_HEVC_B_PAK_CURBE_G9), curbeAlignment);
kernelParams->iBlockWidth = 32;
kernelParams->iBlockHeight = 32;
break;
case CODECHAL_HEVC_FEI_MBENC_DS_COMBINED:
if (MEDIA_IS_SKU(m_skuTable, FtrEncodeHEVC10bit))
{
kernelParams->iBTCount = CODECHAL_HEVC_FEI_DS_COMBINED_END - CODECHAL_HEVC_FEI_DS_COMBINED_BEGIN;
uint32_t uiDSCombinedKernelCurbeSize = sizeof(CODECHAL_ENC_HEVC_DS_COMBINED_CURBE_G9);
kernelParams->iCurbeLength = MOS_ALIGN_CEIL(uiDSCombinedKernelCurbeSize, curbeAlignment);
kernelParams->iBlockWidth = 8;
kernelParams->iBlockHeight = 8;
}
else
{
CODECHAL_ENCODE_ASSERT(false);
eStatus = MOS_STATUS_INVALID_PARAMETER;
}
break;
case CODECHAL_HEVC_FEI_MBENC_PENC:
kernelParams->iBTCount = CODECHAL_HEVC_FEI_P_MBENC_END - CODECHAL_HEVC_FEI_P_MBENC_BEGIN;
//P MBEnc curbe has one less DWord than B MBEnc curbe
kernelParams->iCurbeLength = MOS_ALIGN_CEIL(sizeof(CODECHAL_FEI_HEVC_B_MB_ENC_CURBE_G9) - sizeof(uint32_t), (size_t)curbeAlignment);
kernelParams->iBlockWidth = 16;
kernelParams->iBlockHeight = 16;
break;
default:
CODECHAL_ENCODE_ASSERT(false);
eStatus = MOS_STATUS_INVALID_PARAMETER;
}
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::SetMbEncBindingTable(PCODECHAL_ENCODE_BINDING_TABLE_GENERIC bindingTable, uint32_t idx)
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_CHK_NULL_RETURN(bindingTable);
MOS_ZeroMemory(bindingTable, sizeof(*bindingTable));
bindingTable->dwMediaState = ConvertKrnOpsToMediaState(ENC_MBENC, idx);
switch (idx)
{
case CODECHAL_HEVC_MBENC_2xSCALING:
bindingTable->dwNumBindingTableEntries = CODECHAL_HEVC_FEI_SCALING_FRAME_END - CODECHAL_HEVC_FEI_SCALING_FRAME_BEGIN;
bindingTable->dwBindingTableStartOffset = CODECHAL_HEVC_FEI_SCALING_FRAME_BEGIN;
break;
case CODECHAL_HEVC_MBENC_32x32MD:
bindingTable->dwNumBindingTableEntries = CODECHAL_HEVC_FEI_32x32_PU_END - CODECHAL_HEVC_FEI_32x32_PU_BEGIN;
bindingTable->dwBindingTableStartOffset = CODECHAL_HEVC_FEI_32x32_PU_BEGIN;
break;
case CODECHAL_HEVC_MBENC_16x16SAD:
bindingTable->dwNumBindingTableEntries = CODECHAL_HEVC_FEI_16x16_PU_SAD_END - CODECHAL_HEVC_FEI_16x16_PU_SAD_BEGIN;
bindingTable->dwBindingTableStartOffset = CODECHAL_HEVC_FEI_16x16_PU_SAD_BEGIN;
break;
case CODECHAL_HEVC_MBENC_16x16MD:
bindingTable->dwNumBindingTableEntries = CODECHAL_HEVC_FEI_16x16_PU_MD_END - CODECHAL_HEVC_FEI_16x16_PU_MD_BEGIN;
bindingTable->dwBindingTableStartOffset = CODECHAL_HEVC_FEI_16x16_PU_MD_BEGIN;
break;
case CODECHAL_HEVC_MBENC_8x8PU:
bindingTable->dwNumBindingTableEntries = CODECHAL_HEVC_FEI_8x8_PU_END - CODECHAL_HEVC_FEI_8x8_PU_BEGIN;
bindingTable->dwBindingTableStartOffset = CODECHAL_HEVC_FEI_8x8_PU_BEGIN;
break;
case CODECHAL_HEVC_MBENC_8x8FMODE:
bindingTable->dwNumBindingTableEntries = CODECHAL_HEVC_FEI_8x8_PU_FMODE_END - CODECHAL_HEVC_FEI_8x8_PU_FMODE_BEGIN;
bindingTable->dwBindingTableStartOffset = CODECHAL_HEVC_FEI_8x8_PU_FMODE_BEGIN;
break;
case CODECHAL_HEVC_MBENC_32x32INTRACHECK:
bindingTable->dwNumBindingTableEntries = CODECHAL_HEVC_FEI_B_32x32_PU_END - CODECHAL_HEVC_FEI_B_32x32_PU_BEGIN;
bindingTable->dwBindingTableStartOffset = CODECHAL_HEVC_FEI_B_32x32_PU_BEGIN;
break;
case CODECHAL_HEVC_FEI_MBENC_BENC:
bindingTable->dwNumBindingTableEntries = CODECHAL_HEVC_FEI_B_MBENC_END - CODECHAL_HEVC_FEI_B_MBENC_BEGIN;
bindingTable->dwBindingTableStartOffset = CODECHAL_HEVC_FEI_B_MBENC_BEGIN;
break;
case CODECHAL_HEVC_FEI_MBENC_BPAK:
bindingTable->dwNumBindingTableEntries = CODECHAL_HEVC_FEI_B_PAK_END - CODECHAL_HEVC_FEI_B_PAK_BEGIN;
bindingTable->dwBindingTableStartOffset = CODECHAL_HEVC_FEI_B_PAK_BEGIN;
break;
case CODECHAL_HEVC_FEI_MBENC_DS_COMBINED:
bindingTable->dwNumBindingTableEntries = CODECHAL_HEVC_FEI_DS_COMBINED_END - CODECHAL_HEVC_FEI_DS_COMBINED_BEGIN;
bindingTable->dwBindingTableStartOffset = CODECHAL_HEVC_FEI_DS_COMBINED_BEGIN;
break;
case CODECHAL_HEVC_FEI_MBENC_PENC:
bindingTable->dwNumBindingTableEntries = CODECHAL_HEVC_FEI_P_MBENC_END - CODECHAL_HEVC_FEI_P_MBENC_BEGIN;
bindingTable->dwBindingTableStartOffset = CODECHAL_HEVC_FEI_P_MBENC_BEGIN;
break;
default:
CODECHAL_ENCODE_ASSERT(false);
eStatus = MOS_STATUS_INVALID_PARAMETER;
return eStatus;
}
for (uint32_t i = 0; i < bindingTable->dwNumBindingTableEntries; i++)
{
bindingTable->dwBindingTableEntries[i] = i;
}
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::EndKernelCall(
CODECHAL_MEDIA_STATE_TYPE mediaStateType,
PMHW_KERNEL_STATE kernelState,
PMOS_COMMAND_BUFFER cmdBuffer)
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_FUNCTION_ENTER;
CODECHAL_ENCODE_CHK_STATUS_RETURN(CodechalEncHevcStateG9::EndKernelCall(mediaStateType, kernelState, cmdBuffer));
// skip haar distortion surface, statstics data dump surface
// and frame level statstics data surface because they are not used
#if 0
CODECHAL_DEBUG_TOOL(
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpSurface(
&m_encStatsBuffers.m_puStatsSurface,
CodechalDbgAttr::attrOutput,
"HEVC_B_MBENC_PU_StatsSurface",
CODECHAL_MEDIA_STATE_HEVC_B_MBENC));
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpSurface(
&m_encStatsBuffers.m_8x8PuHaarDist,
CodechalDbgAttr::attrOutput,
"HEVC_B_MBENC_8X8_PU_HaarDistSurface",
CODECHAL_MEDIA_STATE_HEVC_B_MBENC));
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpBuffer(
&m_encStatsBuffers.m_8x8PuFrameStats.sResource,
"HEVC_B_MBENC_ConstantData_In",
CodechalDbgAttr::attrOutput,
m_encStatsBuffers.m_8x8PuFrameStats.dwSize,
0,
CODECHAL_MEDIA_STATE_HEVC_B_MBENC));
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpSurface(
&m_encStatsBuffers.m_mbEncStatsSurface,
CodechalDbgAttr::attrOutput,
"HEVC_B_MBENC_MB_ENC_StatsSurface",
CODECHAL_MEDIA_STATE_HEVC_B_MBENC));
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpBuffer(
&m_encStatsBuffers.m_mbEncFrameStats.sResource,
"HEVC_B_MBENC_ConstantData_In",
CodechalDbgAttr::attrOutput,
m_encStatsBuffers.m_mbEncFrameStats.dwSize,
0,
CODECHAL_MEDIA_STATE_HEVC_B_MBENC));
)
#endif
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::InitKernelState()
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_FUNCTION_ENTER;
// InitKernelStateMbEnc
m_numMbEncEncKrnStates = CODECHAL_HEVC_FEI_MBENC_NUM_BXT_SKL;
m_mbEncKernelStates = MOS_NewArray(MHW_KERNEL_STATE, m_numMbEncEncKrnStates);
CODECHAL_ENCODE_CHK_NULL_RETURN(m_mbEncKernelStates);
m_mbEncKernelBindingTable = (PCODECHAL_ENCODE_BINDING_TABLE_GENERIC)MOS_AllocAndZeroMemory(
sizeof(GenericBindingTable) * m_numMbEncEncKrnStates);
CODECHAL_ENCODE_CHK_NULL_RETURN(m_mbEncKernelBindingTable);
auto krnStateIdx = m_mbEncKernelStates;
for (uint32_t KrnStateIdx = 0; KrnStateIdx < m_numMbEncEncKrnStates; KrnStateIdx++)
{
auto kernelSize = m_combinedKernelSize;
CODECHAL_KERNEL_HEADER currKrnHeader;
if (KrnStateIdx == CODECHAL_HEVC_FEI_MBENC_DS_COMBINED &&
m_numMbEncEncKrnStates == CODECHAL_HEVC_FEI_MBENC_NUM_BXT_SKL) //Ignore. It isn't used on BXT.
{
krnStateIdx++;
continue;
}
CODECHAL_ENCODE_CHK_STATUS_RETURN(pfnGetKernelHeaderAndSize(
m_kernelBinary,
ENC_MBENC,
KrnStateIdx,
&currKrnHeader,
&kernelSize));
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetMbEncKernelParams(
&krnStateIdx->KernelParams,
KrnStateIdx));
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetMbEncBindingTable(
&m_mbEncKernelBindingTable[KrnStateIdx], KrnStateIdx));
krnStateIdx->dwCurbeOffset = m_stateHeapInterface->pStateHeapInterface->GetSizeofCmdInterfaceDescriptorData();
krnStateIdx->KernelParams.pBinary = m_kernelBinary + (currKrnHeader.KernelStartPointer << MHW_KERNEL_OFFSET_SHIFT);
krnStateIdx->KernelParams.iSize = kernelSize;
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_stateHeapInterface->pfnCalculateSshAndBtSizesRequested(
m_stateHeapInterface,
krnStateIdx->KernelParams.iBTCount,
&krnStateIdx->dwSshSize,
&krnStateIdx->dwBindingTableSize));
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_hwInterface->MhwInitISH(m_stateHeapInterface, krnStateIdx));
krnStateIdx++;
}
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::GetKernelHeaderAndSize(
void *binary,
EncOperation operation,
uint32_t krnStateIdx,
void *krnHeader,
uint32_t *krnSize)
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_FUNCTION_ENTER;
CODECHAL_ENCODE_CHK_NULL_RETURN(binary);
CODECHAL_ENCODE_CHK_NULL_RETURN(krnHeader);
CODECHAL_ENCODE_CHK_NULL_RETURN(krnSize);
PCODECHAL_ENC_HEVC_KERNEL_HEADER_FEI_G9_SKL kernelHeaderTable = (PCODECHAL_ENC_HEVC_KERNEL_HEADER_FEI_G9_SKL)binary;
PCODECHAL_KERNEL_HEADER currKrnHeader = nullptr;
if (operation == ENC_SCALING4X)
{
currKrnHeader = &kernelHeaderTable->Hevc_FEI_LCUEnc_I_DS4HME;
}
else if (operation == ENC_ME)
{
// SKL supports P frame. P HME index CODECHAL_ENCODE_ME_IDX_P is 0 and B HME index CODECHAL_ENCODE_ME_IDX_B is 1
if (krnStateIdx == 0)
{
currKrnHeader = &kernelHeaderTable->Hevc_FEI_LCUEnc_P_HME;
}
else
{
currKrnHeader = &kernelHeaderTable->Hevc_FEI_LCUEnc_B_HME;
}
}
else if (operation == ENC_BRC)
{
switch (krnStateIdx)
{
case CODECHAL_HEVC_BRC_COARSE_INTRA:
currKrnHeader = &kernelHeaderTable->Hevc_FEI_LCUEnc_I_COARSE;
break;
default:
CODECHAL_ENCODE_ASSERTMESSAGE("Unsupported BRC mode requested");
eStatus = MOS_STATUS_INVALID_PARAMETER;
return eStatus;
}
}
else if (operation == ENC_MBENC)
{
switch (krnStateIdx)
{
case CODECHAL_HEVC_MBENC_2xSCALING:
case CODECHAL_HEVC_MBENC_32x32MD:
case CODECHAL_HEVC_MBENC_16x16SAD:
case CODECHAL_HEVC_MBENC_16x16MD:
case CODECHAL_HEVC_MBENC_8x8PU:
case CODECHAL_HEVC_MBENC_8x8FMODE:
case CODECHAL_HEVC_MBENC_32x32INTRACHECK:
case CODECHAL_HEVC_FEI_MBENC_BENC:
currKrnHeader = &kernelHeaderTable->Hevc_FEI_LCUEnc_I_2xDownSampling_Kernel;
currKrnHeader += krnStateIdx;
break;
case CODECHAL_HEVC_FEI_MBENC_BPAK:
currKrnHeader = &kernelHeaderTable->Hevc_FEI_LCUEnc_PB_Pak;
break;
case CODECHAL_HEVC_FEI_MBENC_DS_COMBINED:
currKrnHeader = &kernelHeaderTable->Hevc_FEI_LCUEnc_DS_Combined;
break;
case CODECHAL_HEVC_FEI_MBENC_PENC:
currKrnHeader = &kernelHeaderTable->HEVC_FEI_LCUEnc_P_MB;
break;
default:
CODECHAL_ENCODE_ASSERTMESSAGE("Unsupported ENC mode requested");
eStatus = MOS_STATUS_INVALID_PARAMETER;
return eStatus;
}
}
else
{
CODECHAL_ENCODE_ASSERTMESSAGE("Unsupported ENC mode requested");
eStatus = MOS_STATUS_INVALID_PARAMETER;
return eStatus;
}
*((PCODECHAL_KERNEL_HEADER)krnHeader) = *currKrnHeader;
PCODECHAL_KERNEL_HEADER nextKrnHeader = (currKrnHeader + 1);
PCODECHAL_KERNEL_HEADER invalidEntry = (PCODECHAL_KERNEL_HEADER)(((uint8_t*)binary) + sizeof(*kernelHeaderTable));
uint32_t nextKrnOffset = *krnSize;
if (nextKrnHeader < invalidEntry)
{
nextKrnOffset = nextKrnHeader->KernelStartPointer << MHW_KERNEL_OFFSET_SHIFT;
}
*krnSize = nextKrnOffset - (currKrnHeader->KernelStartPointer << MHW_KERNEL_OFFSET_SHIFT);
return eStatus;
}
#ifndef HEVC_FEI_ENABLE_CMRT
MOS_STATUS CodechalFeiHevcStateG9Skl::Encode2xScalingKernel()
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
PerfTagSetting perfTag;
CODECHAL_ENCODE_SET_PERFTAG_INFO(perfTag, CODECHAL_ENCODE_PERFTAG_CALL_SCALING_KERNEL);
uint32_t krnIdx = CODECHAL_HEVC_MBENC_2xSCALING;
auto kernelState = &m_mbEncKernelStates[krnIdx];
auto pScalingBindingTable = &m_mbEncKernelBindingTable[krnIdx];
if (m_firstTaskInPhase || !m_singleTaskPhaseSupported)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(RequestSshAndVerifyCommandBufferSize(kernelState));
}
CODECHAL_ENCODE_CHK_STATUS_RETURN(CodecHalGetResourceInfo(
m_osInterface,
&m_scaled2xSurface));
// Setup DSH
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_hwInterface->AssignDshAndSshSpace(
m_stateHeapInterface,
kernelState,
false,
0,
false,
m_storeData));
//Setup CURBE
MEDIA_OBJECT_DOWNSCALING_2X_STATIC_DATA_G9 cmd, *curbe = &cmd;
MOS_ZeroMemory(curbe, sizeof(*curbe));
curbe->DW0.PicWidth = MOS_ALIGN_CEIL(m_frameWidth, CODECHAL_MACROBLOCK_WIDTH);
curbe->DW0.PicHeight = MOS_ALIGN_CEIL(m_frameHeight, CODECHAL_MACROBLOCK_HEIGHT);
uint32_t startBTI = 0;
curbe->DW8.BTI_Src_Y = pScalingBindingTable->dwBindingTableEntries[startBTI++];
curbe->DW9.BTI_Dst_Y = pScalingBindingTable->dwBindingTableEntries[startBTI++];
CODECHAL_MEDIA_STATE_TYPE encFunctionType = CODECHAL_MEDIA_STATE_2X_SCALING;
CODECHAL_ENCODE_CHK_STATUS_RETURN(
AddCurbeToStateHeap(kernelState, encFunctionType, &cmd, sizeof(cmd)));
MOS_COMMAND_BUFFER cmdBuffer;
CODECHAL_ENCODE_CHK_STATUS_RETURN(SendKernelCmdsAndBindingTable(
&cmdBuffer,
kernelState,
encFunctionType,
nullptr));
// Add surface states, 2X scaling uses U16Norm surface format
startBTI = 0;
// Source surface/s
auto surfaceCodecParams = &m_surfaceParams[SURFACE_RAW_Y];
surfaceCodecParams->bUse16UnormSurfaceFormat = true;
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_RAW_Y,
&pScalingBindingTable->dwBindingTableEntries[startBTI++]
));
CODECHAL_ENCODE_CHK_NULL_RETURN(m_mmcState);
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_mmcState->SetSurfaceParams(surfaceCodecParams));
// Destination surface/s
m_scaled2xSurface.dwWidth = MOS_ALIGN_CEIL((m_frameWidth / SCALE_FACTOR_2x), CODECHAL_MACROBLOCK_WIDTH);
m_scaled2xSurface.dwHeight = MOS_ALIGN_CEIL((m_frameHeight / SCALE_FACTOR_2x), CODECHAL_MACROBLOCK_HEIGHT);
m_surfaceParams[SURFACE_Y_2X].bUse16UnormSurfaceFormat =
m_surfaceParams[SURFACE_Y_2X].bIsWritable =
m_surfaceParams[SURFACE_Y_2X].bRenderTarget = true;
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_Y_2X,
&pScalingBindingTable->dwBindingTableEntries[startBTI++]
));
if (!m_hwWalker)
{
eStatus = MOS_STATUS_UNKNOWN;
CODECHAL_ENCODE_ASSERTMESSAGE("Currently HW walker shall not be disabled for CM based down scaling kernel.");
return eStatus;
}
CODECHAL_WALKER_CODEC_PARAMS walkerCodecParams;
MOS_ZeroMemory(&walkerCodecParams, sizeof(walkerCodecParams));
walkerCodecParams.WalkerMode = m_walkerMode;
// check kernel of Downscaling 2x kernels for Ultra HME.
walkerCodecParams.dwResolutionX = MOS_ALIGN_CEIL(m_frameWidth, 32) >> 5;
// The frame kernel process 32x32 input pixels and output 16x16 down sampled pixels
walkerCodecParams.dwResolutionY = MOS_ALIGN_CEIL(m_frameHeight, 32) >> 5;
/* Enforce no dependency dispatch order for Scaling kernel, */
walkerCodecParams.bNoDependency = true;
MHW_WALKER_PARAMS walkerParams;
CODECHAL_ENCODE_CHK_STATUS_RETURN(CodecHalInitMediaObjectWalkerParams(
m_hwInterface,
&walkerParams,
&walkerCodecParams));
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_renderEngineInterface->AddMediaObjectWalkerCmd(
&cmdBuffer,
&walkerParams));
CODECHAL_ENCODE_CHK_STATUS_RETURN(EndKernelCall(
encFunctionType,
kernelState,
&cmdBuffer));
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::Encode32x32PuModeDecisionKernel()
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
PerfTagSetting perfTag;
CODECHAL_ENCODE_SET_PERFTAG_INFO(perfTag, CODECHAL_ENCODE_PERFTAG_CALL_32X32_PU_MD);
uint32_t krnIdx = CODECHAL_HEVC_MBENC_32x32MD;
auto kernelState = &m_mbEncKernelStates[krnIdx];
auto bindingTable = &m_mbEncKernelBindingTable[krnIdx];
if (m_firstTaskInPhase || !m_singleTaskPhaseSupported)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(RequestSshAndVerifyCommandBufferSize(kernelState));
}
// Setup DSH
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_hwInterface->AssignDshAndSshSpace(
m_stateHeapInterface,
kernelState,
false,
0,
false,
m_storeData));
//Setup CURBE
uint32_t log2MaxCUSize = m_hevcSeqParams->log2_max_coding_block_size_minus3 + 3;
CalcLambda(CODECHAL_ENCODE_HEVC_I_SLICE, INTRA_TRANSFORM_HAAR);
int32_t sliceQp = CalSliceQp();
double lambdaScalingFactor = 1.0;
double qpLambda = m_qpLambdaMd[CODECHAL_ENCODE_HEVC_I_SLICE][sliceQp];
double squaredQpLambda = qpLambda * qpLambda;
m_fixedPointLambda = (uint32_t)(lambdaScalingFactor * squaredQpLambda * (1<<10));
CODECHAL_FEI_HEVC_I_32x32_PU_MODE_DECISION_CURBE_G9 cmd, *curbe = &cmd;
MOS_ZeroMemory(curbe, sizeof(*curbe));
curbe->DW0.FrameWidth = MOS_ALIGN_CEIL(m_frameWidth, CODECHAL_MACROBLOCK_WIDTH);
curbe->DW0.FrameHeight = MOS_ALIGN_CEIL(m_frameHeight, CODECHAL_MACROBLOCK_HEIGHT);
curbe->DW1.EnableDebugDump = false;
curbe->DW1.LCUType = (log2MaxCUSize==6)? 0 /*64x64*/ : 1 /*32x32*/;
curbe->DW1.PuType = 0; // 32x32 PU
curbe->DW1.BRCEnable = m_encodeParams.bMbQpDataEnabled || m_brcEnabled;
curbe->DW1.LCUBRCEnable = m_encodeParams.bMbQpDataEnabled || m_lcuBrcEnabled;
curbe->DW1.SliceType = PicCodingTypeToSliceType(m_hevcPicParams->CodingType);
curbe->DW1.FASTSurveillanceFlag = (m_hevcPicParams->CodingType == I_TYPE) ? 0 : m_hevcSeqParams->bVideoSurveillance;
curbe->DW1.ROIEnable = (m_hevcPicParams->NumROI > 0);
curbe->DW1.SliceQp = sliceQp;
curbe->DW1.EnableStatsDataDump = m_encodeParams.bReportStatisticsEnabled;
curbe->DW1.EnableQualityImprovement = m_encodeParams.bQualityImprovementEnable;
curbe->DW2.Lambda = m_fixedPointLambda;
curbe->DW3.ModeCost32x32 = 0;
curbe->DW4.EarlyExit = (uint32_t)-1;
if (curbe->DW1.EnableStatsDataDump)
{
double lambdaMd;
float hadBias = 2.0f;
lambdaMd = m_qpLambdaMd[curbe->DW1.SliceType][sliceQp];
lambdaMd = lambdaMd * hadBias;
curbe->DW5.NewLambdaForHaarTransform = (uint32_t)(lambdaMd*(1<<10));
}
uint32_t startIndex = 0;
curbe->DW8.BTI_32x32PU_Output = bindingTable->dwBindingTableEntries[startIndex++];
curbe->DW9.BTI_Src_Y = bindingTable->dwBindingTableEntries[startIndex++];
startIndex++; // skip one BTI for Y and UV have the same BTI
curbe->DW10.BTI_Src_Y2x = bindingTable->dwBindingTableEntries[startIndex++];
curbe->DW11.BTI_Slice_Map = bindingTable->dwBindingTableEntries[startIndex++];
curbe->DW12.BTI_Src_Y2x_VME = bindingTable->dwBindingTableEntries[startIndex++];
curbe->DW13.BTI_Brc_Input = bindingTable->dwBindingTableEntries[startIndex++];
curbe->DW14.BTI_LCU_Qp_Surface = bindingTable->dwBindingTableEntries[startIndex++];
curbe->DW15.BTI_Brc_Data = bindingTable->dwBindingTableEntries[startIndex++];
curbe->DW16.BTI_Stats_Data = bindingTable->dwBindingTableEntries[startIndex++];
curbe->DW17.BTI_Kernel_Debug = bindingTable->dwBindingTableEntries[startIndex++];
CODECHAL_ENCODE_ASSERT(startIndex == bindingTable->dwNumBindingTableEntries);
CODECHAL_MEDIA_STATE_TYPE encFunctionType = CODECHAL_MEDIA_STATE_32x32_PU_MODE_DECISION;
CODECHAL_ENCODE_CHK_STATUS_RETURN(
AddCurbeToStateHeap(kernelState, encFunctionType, &cmd, sizeof(cmd)));
MOS_COMMAND_BUFFER cmdBuffer;
CODECHAL_ENCODE_CHK_STATUS_RETURN(SendKernelCmdsAndBindingTable(
&cmdBuffer,
kernelState,
encFunctionType,
nullptr));
//Add surface states
startIndex = 0;
// 32x32 PU output
m_surfaceParams[SURFACE_32x32_PU_OUTPUT].bIsWritable =
m_surfaceParams[SURFACE_32x32_PU_OUTPUT].bRenderTarget = true;
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_32x32_PU_OUTPUT,
&bindingTable->dwBindingTableEntries[startIndex++]));
// Source Y and UV
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_RAW_Y_UV,
&bindingTable->dwBindingTableEntries[startIndex++]));
startIndex ++; // UV index
// Source Y2x
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_Y_2X,
&bindingTable->dwBindingTableEntries[startIndex++]));
// Slice map
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_SLICE_MAP,
&bindingTable->dwBindingTableEntries[startIndex++]));
// Source Y2x for VME
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_Y_2X_VME,
&bindingTable->dwBindingTableEntries[startIndex++]));
// BRC Input
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_BRC_INPUT,
&bindingTable->dwBindingTableEntries[startIndex++]));
// LCU Qp surface
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_LCU_QP,
&bindingTable->dwBindingTableEntries[startIndex++]));
// BRC data surface
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_BRC_DATA,
&bindingTable->dwBindingTableEntries[startIndex++]));
// skip statstics data dump surface because it is not used
if (!m_hwWalker)
{
eStatus = MOS_STATUS_UNKNOWN;
CODECHAL_ENCODE_ASSERTMESSAGE("Currently HW walker shall not be disabled for CM based down scaling kernel.");
return eStatus;
}
CODECHAL_WALKER_CODEC_PARAMS walkerCodecParams;
MOS_ZeroMemory(&walkerCodecParams, sizeof(walkerCodecParams));
walkerCodecParams.WalkerMode = m_walkerMode;
walkerCodecParams.dwResolutionX = MOS_ALIGN_CEIL(m_frameWidth, 32) >> 5; /* looping for Walker is needed at 8x8 block level */
walkerCodecParams.dwResolutionY = MOS_ALIGN_CEIL(m_frameHeight, 32) >> 5;
walkerCodecParams.bNoDependency = true; /* Enforce no dependency dispatch order for 32x32 MD kernel */
MHW_WALKER_PARAMS walkerParams;
CODECHAL_ENCODE_CHK_STATUS_RETURN(CodecHalInitMediaObjectWalkerParams(
m_hwInterface,
&walkerParams,
&walkerCodecParams));
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_renderEngineInterface->AddMediaObjectWalkerCmd(
&cmdBuffer,
&walkerParams));
CODECHAL_ENCODE_CHK_STATUS_RETURN(EndKernelCall(
encFunctionType,
kernelState,
&cmdBuffer));
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::Encode16x16SadPuComputationKernel()
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_FUNCTION_ENTER;
PerfTagSetting perfTag;
CODECHAL_ENCODE_SET_PERFTAG_INFO(perfTag, CODECHAL_ENCODE_PERFTAG_CALL_16X16_SAD);
uint32_t krnIdx = CODECHAL_HEVC_MBENC_16x16SAD;
auto kernelState = &m_mbEncKernelStates[krnIdx];
auto bindingTable = &m_mbEncKernelBindingTable[krnIdx];
if (m_firstTaskInPhase || !m_singleTaskPhaseSupported)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(RequestSshAndVerifyCommandBufferSize(kernelState));
}
//Setup DSH
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_hwInterface->AssignDshAndSshSpace(
m_stateHeapInterface,
kernelState,
false,
0,
false,
m_storeData));
// Setup CURBE
CODECHAL_ENC_HEVC_I_16x16_SAD_CURBE_G9 cmd, *curbe = &cmd;
MOS_ZeroMemory(curbe, sizeof(*curbe));
curbe->DW0.FrameWidth = MOS_ALIGN_CEIL(m_frameWidth, CODECHAL_MACROBLOCK_WIDTH);
curbe->DW0.FrameHeight = MOS_ALIGN_CEIL(m_frameHeight, CODECHAL_MACROBLOCK_HEIGHT);
curbe->DW1.Log2MaxCUSize = m_hevcSeqParams->log2_max_coding_block_size_minus3 + 3;
curbe->DW1.Log2MinCUSize = m_hevcSeqParams->log2_min_coding_block_size_minus3 + 3;
curbe->DW1.Log2MinTUSize = m_hevcSeqParams->log2_min_transform_block_size_minus2 + 2;
curbe->DW1.EnableIntraEarlyExit = (m_hevcSeqParams->TargetUsage == 0x04) ? ((m_hevcPicParams->CodingType == I_TYPE) ? 0 : 1) : 0;
curbe->DW2.SliceType = PicCodingTypeToSliceType(m_hevcPicParams->CodingType);
curbe->DW2.SimFlagForInter = false;
if(m_hevcPicParams->CodingType != I_TYPE)
{
curbe->DW2.FASTSurveillanceFlag = m_hevcSeqParams->bVideoSurveillance;
}
uint32_t startIndex = 0;
curbe->DW8.BTI_Src_Y = bindingTable->dwBindingTableEntries[startIndex++];
startIndex++; // skip UV BTI
curbe->DW9.BTI_Sad_16x16_PU_Output = bindingTable->dwBindingTableEntries[startIndex++];
curbe->DW10.BTI_32x32_Pu_ModeDecision = bindingTable->dwBindingTableEntries[startIndex++];
curbe->DW11.BTI_Slice_Map = bindingTable->dwBindingTableEntries[startIndex++];
curbe->DW12.BTI_Simplest_Intra = bindingTable->dwBindingTableEntries[startIndex++];
curbe->DW13.BTI_Debug = bindingTable->dwBindingTableEntries[startIndex++];
CODECHAL_ENCODE_ASSERT(startIndex == bindingTable->dwNumBindingTableEntries);
CODECHAL_MEDIA_STATE_TYPE encFunctionType = CODECHAL_MEDIA_STATE_16x16_PU_SAD;
CODECHAL_ENCODE_CHK_STATUS_RETURN(
AddCurbeToStateHeap(kernelState, encFunctionType, &cmd, sizeof(cmd)));
MOS_COMMAND_BUFFER cmdBuffer;
CODECHAL_ENCODE_CHK_STATUS_RETURN(SendKernelCmdsAndBindingTable(
&cmdBuffer,
kernelState,
encFunctionType,
nullptr));
//Add surface states
startIndex = 0;
// Source Y and UV
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_RAW_Y_UV,
&bindingTable->dwBindingTableEntries[startIndex++]));
startIndex++;
// 16x16 PU SAD output
m_surfaceParams[SURFACE_16x16PU_SAD].bIsWritable =
m_surfaceParams[SURFACE_16x16PU_SAD].bRenderTarget = true;
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_16x16PU_SAD,
&bindingTable->dwBindingTableEntries[startIndex++]));
// 32x32 PU MD data
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_32x32_PU_OUTPUT,
&bindingTable->dwBindingTableEntries[startIndex++]));
// Slice map
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_SLICE_MAP,
&bindingTable->dwBindingTableEntries[startIndex++]));
// Simplest Intra
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_SIMPLIFIED_INTRA,
&bindingTable->dwBindingTableEntries[startIndex++]));
if (!m_hwWalker)
{
eStatus = MOS_STATUS_UNKNOWN;
CODECHAL_ENCODE_ASSERTMESSAGE("Currently HW walker shall not be disabled for CM based down scaling kernel.");
return eStatus;
}
CODECHAL_WALKER_CODEC_PARAMS walkerCodecParams;
MOS_ZeroMemory(&walkerCodecParams, sizeof(walkerCodecParams));
walkerCodecParams.WalkerMode = m_walkerMode;
/* looping for Walker is needed at 16x16 block level */
walkerCodecParams.dwResolutionX = MOS_ALIGN_CEIL(m_frameWidth, 16) >> 4;
walkerCodecParams.dwResolutionY = MOS_ALIGN_CEIL(m_frameHeight, 16) >> 4;
/* Enforce no dependency dispatch order for the 16x16 SAD kernel */
walkerCodecParams.bNoDependency = true;
MHW_WALKER_PARAMS walkerParams;
CODECHAL_ENCODE_CHK_STATUS_RETURN(CodecHalInitMediaObjectWalkerParams(
m_hwInterface,
&walkerParams,
&walkerCodecParams));
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_renderEngineInterface->AddMediaObjectWalkerCmd(
&cmdBuffer,
&walkerParams));
CODECHAL_ENCODE_CHK_STATUS_RETURN(EndKernelCall(
encFunctionType,
kernelState,
&cmdBuffer));
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::Encode16x16PuModeDecisionKernel()
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_FUNCTION_ENTER;
PerfTagSetting perfTag;
CODECHAL_ENCODE_SET_PERFTAG_INFO(perfTag, CODECHAL_ENCODE_PERFTAG_CALL_16X16_PU_MD);
uint32_t krnIdx = CODECHAL_HEVC_MBENC_16x16MD;
auto kernelState = &m_mbEncKernelStates[krnIdx];
auto bindingTable = &m_mbEncKernelBindingTable[krnIdx];
if (m_firstTaskInPhase || !m_singleTaskPhaseSupported)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(RequestSshAndVerifyCommandBufferSize(kernelState));
}
// Setup DSH
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_hwInterface->AssignDshAndSshSpace(
m_stateHeapInterface,
kernelState,
false,
0,
false,
m_storeData));
// Setup CURBE
int32_t sliceQp = CalSliceQp();
uint8_t sliceType = PicCodingTypeToSliceType(m_hevcPicParams->CodingType);
double lambdaScaleFactor = 0.46 + sliceQp - 22;
if (lambdaScaleFactor < 0)
{
lambdaScaleFactor = 0.46;
}
if (lambdaScaleFactor > 15)
{
lambdaScaleFactor = 15;
}
double squredLambda = lambdaScaleFactor * pow(2.0, ((double)sliceQp-12.0)/6);
m_fixedPointLambdaForLuma = (uint32_t)(squredLambda * (1<<10));
double lambdaScalingFactor = 1.0;
double qpLambda = m_qpLambdaMd[sliceType][sliceQp];
double squaredQpLambda = qpLambda * qpLambda;
m_fixedPointLambdaForChroma = (uint32_t)(lambdaScalingFactor * squaredQpLambda * (1<<10));
LoadCosts(sliceType, (uint8_t)sliceQp, INTRA_TRANSFORM_HAAR);
CODECHAL_FEI_HEVC_I_16x16_PU_MODEDECISION_CURBE_G9 cmd, *curbe = &cmd;
MOS_ZeroMemory(curbe, sizeof(*curbe));
uint32_t log2MaxCUSize = m_hevcSeqParams->log2_max_coding_block_size_minus3 + 3;
curbe->DW0.FrameWidth = MOS_ALIGN_CEIL(m_frameWidth, CODECHAL_MACROBLOCK_WIDTH);
curbe->DW0.FrameHeight = MOS_ALIGN_CEIL(m_frameHeight, CODECHAL_MACROBLOCK_HEIGHT);
curbe->DW1.Log2MaxCUSize = log2MaxCUSize;
curbe->DW1.Log2MinCUSize = m_hevcSeqParams->log2_min_coding_block_size_minus3 + 3;
curbe->DW1.Log2MinTUSize = m_hevcSeqParams->log2_min_transform_block_size_minus2 + 2;
curbe->DW1.SliceQp = sliceQp;
curbe->DW2.FixedPoint_Lambda_PredMode = m_fixedPointLambdaForChroma;
curbe->DW3.LambdaScalingFactor = 1;
curbe->DW3.SliceType = sliceType;
curbe->DW3.EnableIntraEarlyExit = (m_hevcSeqParams->TargetUsage == 0x04) ? ((m_hevcPicParams->CodingType == I_TYPE) ? 0 : 1) : 0;
curbe->DW3.BRCEnable = m_encodeParams.bMbQpDataEnabled || m_brcEnabled;
curbe->DW3.LCUBRCEnable = m_encodeParams.bMbQpDataEnabled || m_lcuBrcEnabled;
curbe->DW3.ROIEnable = (m_hevcPicParams->NumROI > 0);
curbe->DW3.FASTSurveillanceFlag = (m_hevcPicParams->CodingType == I_TYPE) ? 0 : m_hevcSeqParams->bVideoSurveillance;
curbe->DW3.EnableRollingIntra = m_hevcPicParams->bEnableRollingIntraRefresh;
//Given only Column Rolling I is supported, if in future, Row Rolling I support to be added, then, need to make change here as per Kernel
curbe->DW3.IntraRefreshEn = m_hevcPicParams->bEnableRollingIntraRefresh;
curbe->DW3.HalfUpdateMixedLCU = 0;
curbe->DW3.EnableQualityImprovement = m_encodeParams.bQualityImprovementEnable;
curbe->DW4.PenaltyForIntra8x8NonDCPredMode = 0;
curbe->DW4.IntraComputeType = 1;
curbe->DW4.AVCIntra8x8Mask = 0;
curbe->DW4.IntraSadAdjust = 2;
double lambdaMd = sqrt(0.57*pow(2.0, ((double)sliceQp-12.0)/3));
squredLambda = lambdaMd * lambdaMd;
uint32_t newLambda = (uint32_t)(squredLambda*(1<<10));
curbe->DW5.FixedPoint_Lambda_CU_Mode_for_Cost_Calculation = newLambda;
curbe->DW6.ScreenContentFlag = m_hevcPicParams->bScreenContent;
curbe->DW7.ModeCostIntraNonPred = m_modeCost[0];
curbe->DW7.ModeCostIntra16x16 = m_modeCost[1];
curbe->DW7.ModeCostIntra8x8 = m_modeCost[2];
curbe->DW7.ModeCostIntra4x4 = m_modeCost[3];
curbe->DW8.FixedPoint_Lambda_CU_Mode_for_Luma = m_fixedPointLambdaForLuma;
if (m_hevcPicParams->bEnableRollingIntraRefresh)
{
curbe->DW9.IntraRefreshMBNum = m_hevcPicParams->IntraInsertionLocation;
curbe->DW9.IntraRefreshQPDelta = m_hevcPicParams->QpDeltaForInsertedIntra;
curbe->DW9.IntraRefreshUnitInMB = m_hevcPicParams->IntraInsertionSize;
}
curbe->DW10.SimplifiedFlagForInter = 0;
if (m_encodeParams.bReportStatisticsEnabled)
{
curbe->DW10.HaarTransformMode = true;
}
else
{
curbe->DW10.HaarTransformMode = (m_hevcPicParams->CodingType == I_TYPE)? false: true;
}
uint32_t startBTI = 0;
curbe->DW16.BTI_Src_Y = bindingTable->dwBindingTableEntries[startBTI++];
startBTI++; // skip UV BTI
curbe->DW17.BTI_Sad_16x16_PU = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW18.BTI_PAK_Object = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW19.BTI_SAD_32x32_PU_mode = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW20.BTI_VME_Mode_8x8 = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW21.BTI_Slice_Map = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW22.BTI_VME_Src = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW23.BTI_BRC_Input = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW24.BTI_Simplest_Intra = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW25.BTI_LCU_Qp_Surface = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW26.BTI_BRC_Data = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW27.BTI_Debug = bindingTable->dwBindingTableEntries[startBTI++];
CODECHAL_ENCODE_ASSERT(startBTI == bindingTable->dwNumBindingTableEntries);
CODECHAL_MEDIA_STATE_TYPE encFunctionType = CODECHAL_MEDIA_STATE_16x16_PU_MODE_DECISION;
CODECHAL_ENCODE_CHK_STATUS_RETURN(
AddCurbeToStateHeap(kernelState, encFunctionType, &cmd, sizeof(cmd)));
MOS_COMMAND_BUFFER cmdBuffer;
CODECHAL_ENCODE_CHK_STATUS_RETURN(SendKernelCmdsAndBindingTable(
&cmdBuffer,
kernelState,
encFunctionType,
nullptr));
//Add surface states
startBTI = 0;
// Source Y and UV:
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_RAW_Y_UV,
&bindingTable->dwBindingTableEntries[startBTI++]));
startBTI++;
// 16x16 PU SAD output
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_16x16PU_SAD,
&bindingTable->dwBindingTableEntries[startBTI++]));
// PAK object output
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_CU_RECORD,
&bindingTable->dwBindingTableEntries[startBTI++]));
// 32x32 PU MD data
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_32x32_PU_OUTPUT,
&bindingTable->dwBindingTableEntries[startBTI++]));
// VME 8x8 mode
m_surfaceParams[SURFACE_VME_8x8].bIsWritable =
m_surfaceParams[SURFACE_VME_8x8].bRenderTarget = true;
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_VME_8x8,
&bindingTable->dwBindingTableEntries[startBTI++]));
// Slice map
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_SLICE_MAP,
&bindingTable->dwBindingTableEntries[startBTI++]));
// Source Y for VME
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_RAW_VME,
&bindingTable->dwBindingTableEntries[startBTI++]));
// BRC Input
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_BRC_INPUT,
&bindingTable->dwBindingTableEntries[startBTI++]));
// Simplest Intra
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_SIMPLIFIED_INTRA,
&bindingTable->dwBindingTableEntries[startBTI++]));
// LCU Qp surface
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_LCU_QP,
&bindingTable->dwBindingTableEntries[startBTI++]));
// BRC data surface
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_BRC_DATA,
&bindingTable->dwBindingTableEntries[startBTI++]));
if (!m_hwWalker)
{
eStatus = MOS_STATUS_UNKNOWN;
CODECHAL_ENCODE_ASSERTMESSAGE("Currently HW walker shall not be disabled for CM based down scaling kernel.");
return eStatus;
}
CODECHAL_WALKER_CODEC_PARAMS walkerCodecParams;
MOS_ZeroMemory(&walkerCodecParams, sizeof(walkerCodecParams));
walkerCodecParams.WalkerMode = m_walkerMode;
/* looping for Walker is needed at 32x32 block level in OPT case*/
walkerCodecParams.dwResolutionX = MOS_ALIGN_CEIL(m_frameWidth, 32) >> 5;
walkerCodecParams.dwResolutionY = MOS_ALIGN_CEIL(m_frameHeight, 32) >> 5;
walkerCodecParams.bNoDependency = true;
MHW_WALKER_PARAMS walkerParams;
CODECHAL_ENCODE_CHK_STATUS_RETURN(CodecHalInitMediaObjectWalkerParams(
m_hwInterface,
&walkerParams,
&walkerCodecParams));
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_renderEngineInterface->AddMediaObjectWalkerCmd(
&cmdBuffer,
&walkerParams));
CODECHAL_ENCODE_CHK_STATUS_RETURN(EndKernelCall(
encFunctionType,
kernelState,
&cmdBuffer));
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::Encode8x8PUKernel()
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_FUNCTION_ENTER;
PerfTagSetting perfTag;
CODECHAL_ENCODE_SET_PERFTAG_INFO(perfTag, CODECHAL_ENCODE_PERFTAG_CALL_8X8_PU);
uint32_t krnIdx = CODECHAL_HEVC_MBENC_8x8PU;
auto kernelState = &m_mbEncKernelStates[krnIdx];
auto bindingTable = &m_mbEncKernelBindingTable[krnIdx];
if (m_firstTaskInPhase || !m_singleTaskPhaseSupported)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(RequestSshAndVerifyCommandBufferSize(kernelState));
}
// Setup DSH
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_hwInterface->AssignDshAndSshSpace(
m_stateHeapInterface,
kernelState,
false,
0,
false,
m_storeData));
// Setup CURBE
uint32_t log2MaxCUSize = m_hevcSeqParams->log2_max_coding_block_size_minus3 + 3;
CODECHAL_FEI_HEVC_I_8x8_PU_CURBE_G9 cmd, *curbe = &cmd;
MOS_ZeroMemory(curbe, sizeof(*curbe));
curbe->DW0.FrameWidth = MOS_ALIGN_CEIL(m_frameWidth, CODECHAL_MACROBLOCK_WIDTH);
curbe->DW0.FrameHeight = MOS_ALIGN_CEIL(m_frameHeight, CODECHAL_MACROBLOCK_HEIGHT);
curbe->DW1.SliceType = PicCodingTypeToSliceType(m_hevcPicParams->CodingType);
curbe->DW1.PuType = 2; // 8x8
curbe->DW1.DcFilterFlag = true;
curbe->DW1.AngleRefineFlag = true;
curbe->DW1.LCUType = (log2MaxCUSize==6)? 0 /*64x64*/ : 1 /*32x32*/;
curbe->DW1.ScreenContentFlag = m_hevcPicParams->bScreenContent;
curbe->DW1.EnableIntraEarlyExit = (m_hevcSeqParams->TargetUsage == 0x04) ? ((m_hevcPicParams->CodingType == I_TYPE) ? 0 : 1) : 0;
curbe->DW1.EnableDebugDump = false;
curbe->DW1.BRCEnable = m_encodeParams.bMbQpDataEnabled || m_brcEnabled;
curbe->DW1.LCUBRCEnable = m_encodeParams.bMbQpDataEnabled || m_lcuBrcEnabled;
curbe->DW1.ROIEnable = (m_hevcPicParams->NumROI > 0);
curbe->DW1.FASTSurveillanceFlag = (m_hevcPicParams->CodingType == I_TYPE) ? 0 : m_hevcSeqParams->bVideoSurveillance;
curbe->DW1.EnableQualityImprovement = m_encodeParams.bQualityImprovementEnable;
curbe->DW1.QPValue = CalSliceQp();
if (m_hevcPicParams->bEnableRollingIntraRefresh)
{
curbe->DW1.EnableRollingIntra = true;
curbe->DW1.IntraRefreshEn = true;
curbe->DW1.HalfUpdateMixedLCU = 0;
curbe->DW5.IntraRefreshMBNum = m_hevcPicParams->IntraInsertionLocation;
curbe->DW5.IntraRefreshQPDelta = m_hevcPicParams->QpDeltaForInsertedIntra;
curbe->DW5.IntraRefreshUnitInMB = m_hevcPicParams->IntraInsertionSize;
int32_t qp = CalSliceQp();
curbe->DW1.QPValue = (uint32_t)qp;
}
curbe->DW2.LumaLambda = m_fixedPointLambdaForLuma;
curbe->DW3.ChromaLambda = m_fixedPointLambdaForChroma;
if (m_encodeParams.bReportStatisticsEnabled)
{
curbe->DW4.HaarTransformFlag = true;
}
else
{
curbe->DW4.HaarTransformFlag = (m_hevcPicParams->CodingType == I_TYPE) ? false : true;
}
curbe->DW4.SimplifiedFlagForInter = false;
uint32_t startBTI = 0;
curbe->DW8.BTI_Src_Y = bindingTable->dwBindingTableEntries[startBTI++];
startBTI++; // skip one BTI for Y and UV have the same BTI
curbe->DW9.BTI_Slice_Map = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW10.BTI_VME_8x8_Mode = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW11.BTI_Intra_Mode = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW12.BTI_BRC_Input = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW13.BTI_Simplest_Intra = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW14.BTI_LCU_Qp_Surface = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW15.BTI_BRC_Data = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW16.BTI_Debug = bindingTable->dwBindingTableEntries[startBTI++];
CODECHAL_ENCODE_ASSERT(startBTI == bindingTable->dwNumBindingTableEntries);
CODECHAL_MEDIA_STATE_TYPE encFunctionType = CODECHAL_MEDIA_STATE_8x8_PU;
CODECHAL_ENCODE_CHK_STATUS_RETURN(
AddCurbeToStateHeap(kernelState, encFunctionType, &cmd, sizeof(cmd)));
MOS_COMMAND_BUFFER cmdBuffer;
if(m_numMb8x8IntraKernelSplit == 0)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(SendKernelCmdsAndBindingTable(&cmdBuffer,
kernelState,
encFunctionType,
nullptr));
}
else
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(GetCommandBuffer(&cmdBuffer));
MHW_INTERFACE_DESCRIPTOR_PARAMS idParams;
MOS_ZeroMemory(&idParams, sizeof(idParams));
idParams.pKernelState = kernelState;
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_stateHeapInterface->pfnSetInterfaceDescriptor(
m_stateHeapInterface,
1,
&idParams));
// Add binding table
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_stateHeapInterface->pfnSetBindingTable(
m_stateHeapInterface,
kernelState));
}
//Add surface states
startBTI = 0;
// Source Y and UV
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_RAW_Y_UV,
&bindingTable->dwBindingTableEntries[startBTI++]));
startBTI++;
// Slice Map
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_SLICE_MAP,
&bindingTable->dwBindingTableEntries[startBTI++]));
// VME 8x8 mode
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_VME_8x8,
&bindingTable->dwBindingTableEntries[startBTI++]));
// Intra mode
m_surfaceParams[SURFACE_INTRA_MODE].bIsWritable =
m_surfaceParams[SURFACE_INTRA_MODE].bRenderTarget = true;
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_INTRA_MODE,
&bindingTable->dwBindingTableEntries[startBTI++]));
// BRC Input
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_BRC_INPUT,
&bindingTable->dwBindingTableEntries[startBTI++]));
// Simplest Intra
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_SIMPLIFIED_INTRA,
&bindingTable->dwBindingTableEntries[startBTI++]));
// LCU Qp surface
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_LCU_QP,
&bindingTable->dwBindingTableEntries[startBTI++]));
// BRC data surface
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_BRC_DATA,
&bindingTable->dwBindingTableEntries[startBTI++]));
if (!m_hwWalker)
{
eStatus = MOS_STATUS_UNKNOWN;
CODECHAL_ENCODE_ASSERTMESSAGE("Currently HW walker shall not be disabled for CM based down scaling kernel.");
return eStatus;
}
CODECHAL_WALKER_CODEC_PARAMS walkerCodecParams;
MOS_ZeroMemory(&walkerCodecParams, sizeof(walkerCodecParams));
walkerCodecParams.WalkerMode = m_walkerMode;
// each EU is based on one 8x8 block
walkerCodecParams.dwResolutionX = MOS_ALIGN_CEIL(m_frameWidth, CODECHAL_MACROBLOCK_WIDTH) >> 3;
walkerCodecParams.dwResolutionY = MOS_ALIGN_CEIL(m_frameHeight, CODECHAL_MACROBLOCK_HEIGHT) >> 3;
/* Enforce no dependency dispatch order for 8x8 PU kernel */
walkerCodecParams.bNoDependency = true;
if(m_numMb8x8IntraKernelSplit == 0)
{
MHW_WALKER_PARAMS walkerParams;
CODECHAL_ENCODE_CHK_STATUS_RETURN(CodecHalInitMediaObjectWalkerParams(
m_hwInterface,
&walkerParams,
&walkerCodecParams));
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_renderEngineInterface->AddMediaObjectWalkerCmd(
&cmdBuffer,
&walkerParams));
}
else
{
uint32_t numRowPerSplit = (walkerCodecParams.dwResolutionY + m_numMb8x8IntraKernelSplit - 1) / m_numMb8x8IntraKernelSplit;
uint32_t currentNumRow = 0;
for(uint32_t i = 0; i < m_numMb8x8IntraKernelSplit; i++)
{
// Program render engine pipe commands
SendKernelCmdsParams sendKernelCmdsParams = SendKernelCmdsParams();
sendKernelCmdsParams.EncFunctionType = encFunctionType;
sendKernelCmdsParams.pKernelState = kernelState;
sendKernelCmdsParams.bEnableCustomScoreBoard= true;
sendKernelCmdsParams.pCustomScoreBoard = &m_walkingPatternParam.ScoreBoard;
CODECHAL_ENCODE_CHK_STATUS_RETURN(SendGenericKernelCmds(&cmdBuffer, &sendKernelCmdsParams));
MHW_WALKER_PARAMS walkerParams;
CODECHAL_ENCODE_CHK_STATUS_RETURN(CodecHalInitMediaObjectWalkerParams(
m_hwInterface,
&walkerParams,
&walkerCodecParams));
if(currentNumRow + numRowPerSplit >= walkerCodecParams.dwResolutionY)
{
// the last split may not have the same number of rows as previous splits
numRowPerSplit = walkerCodecParams.dwResolutionY - currentNumRow;
}
walkerParams.LocalStart.y = currentNumRow;
walkerParams.dwLocalLoopExecCount = numRowPerSplit * walkerCodecParams.dwResolutionX;
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_renderEngineInterface->AddMediaObjectWalkerCmd(
&cmdBuffer,
&walkerParams));
currentNumRow += numRowPerSplit;
if(currentNumRow >= walkerCodecParams.dwResolutionY)
{
break;
}
}
}
CODECHAL_ENCODE_CHK_STATUS_RETURN(EndKernelCall(
encFunctionType,
kernelState,
&cmdBuffer));
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::Encode8x8PUFMODEKernel()
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_FUNCTION_ENTER;
PerfTagSetting perfTag;
CODECHAL_ENCODE_SET_PERFTAG_INFO(perfTag, CODECHAL_ENCODE_PERFTAG_CALL_8X8_FMODE);
uint32_t krnIdx = CODECHAL_HEVC_MBENC_8x8FMODE;
auto kernelState = &m_mbEncKernelStates[krnIdx];
auto bindingTable = &m_mbEncKernelBindingTable[krnIdx];
if (m_firstTaskInPhase || !m_singleTaskPhaseSupported)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(RequestSshAndVerifyCommandBufferSize(kernelState));
}
// Setup DSH
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_hwInterface->AssignDshAndSshSpace(
m_stateHeapInterface,
kernelState,
false,
0,
false,
m_storeData));
// Setup CURBE
int32_t qp = CalSliceQp();
uint32_t sliceQp = (uint32_t)qp;
uint32_t log2MaxCUSize = m_hevcSeqParams->log2_max_coding_block_size_minus3 + 3;
CODECHAL_FEI_HEVC_I_8x8_PU_FMODE_CURBE_G9 cmd, *curbe = &cmd;
MOS_ZeroMemory(curbe, sizeof(*curbe));
curbe->DW0.FrameWidth = MOS_ALIGN_CEIL(m_frameWidth, CODECHAL_MACROBLOCK_WIDTH);
curbe->DW0.FrameHeight = MOS_ALIGN_CEIL(m_frameHeight, CODECHAL_MACROBLOCK_HEIGHT);
curbe->DW1.SliceType = PicCodingTypeToSliceType(m_hevcPicParams->CodingType);
curbe->DW1.PuType = 2;
curbe->DW1.PakReordingFlag = (m_hevcPicParams->CodingType == I_TYPE)? true : false;
curbe->DW1.LCUType = (log2MaxCUSize == 6)? 0 /*64x64*/: 1 /*32x32*/;
curbe->DW1.ScreenContentFlag = m_hevcPicParams->bScreenContent;
curbe->DW1.EnableIntraEarlyExit = (m_hevcSeqParams->TargetUsage == 0x04) ? ((m_hevcPicParams->CodingType == I_TYPE) ? 0 : 1) : 0;
curbe->DW1.EnableDebugDump = false;
curbe->DW1.BRCEnable = m_encodeParams.bMbQpDataEnabled || m_brcEnabled;
curbe->DW1.LCUBRCEnable = m_encodeParams.bMbQpDataEnabled || m_lcuBrcEnabled;
curbe->DW1.ROIEnable = (m_hevcPicParams->NumROI > 0);
curbe->DW1.FASTSurveillanceFlag = (m_hevcPicParams->CodingType == I_TYPE) ? 0 : m_hevcSeqParams->bVideoSurveillance;
curbe->DW1.EnableRollingIntra = m_hevcPicParams->bEnableRollingIntraRefresh;
curbe->DW1.IntraRefreshEn = m_hevcPicParams->bEnableRollingIntraRefresh;
curbe->DW1.HalfUpdateMixedLCU = 0;
curbe->DW1.EnableQualityImprovement = m_encodeParams.bQualityImprovementEnable;
curbe->DW2.LambdaForLuma = m_fixedPointLambdaForLuma;
if (m_hevcPicParams->CodingType != I_TYPE ||
m_encodeParams.bReportStatisticsEnabled)
{
float hadBias = 2.0f;
double lambdaMd = m_qpLambdaMd[curbe->DW1.SliceType][sliceQp];
lambdaMd = lambdaMd * hadBias;
curbe->DW3.LambdaForDistCalculation = (uint32_t)(lambdaMd*(1<<10));
}
curbe->DW4.ModeCostFor8x8PU_TU8 = 0;
curbe->DW5.ModeCostFor8x8PU_TU4 = 0;
curbe->DW6.SATD16x16PuThreshold = MOS_MAX(200 * ((int32_t)sliceQp - 12), 0);
curbe->DW6.BiasFactorToward8x8 = (m_hevcPicParams->bScreenContent) ? 1024 : 1126+102;
curbe->DW7.Qp = sliceQp;
curbe->DW7.QpForInter = 0;
curbe->DW8.SimplifiedFlagForInter = false;
curbe->DW8.EnableStatsDataDump = m_encodeParams.bReportStatisticsEnabled;
// KBLControlFlag determines the PAK OBJ format as it varies from Gen9 to Gen9.5+
curbe->DW8.KBLControlFlag = UsePlatformControlFlag();
curbe->DW9.IntraRefreshMBNum = m_hevcPicParams->IntraInsertionLocation;
curbe->DW9.IntraRefreshQPDelta = m_hevcPicParams->QpDeltaForInsertedIntra;
curbe->DW9.IntraRefreshUnitInMB = m_hevcPicParams->IntraInsertionSize;
uint32_t startBTI = 0;
curbe->DW16.BTI_PAK_Object = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW17.BTI_VME_8x8_Mode = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW18.BTI_Intra_Mode = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW19.BTI_PAK_Command = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW20.BTI_Slice_Map = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW21.BTI_IntraDist = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW22.BTI_BRC_Input = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW23.BTI_Simplest_Intra = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW24.BTI_LCU_Qp_Surface = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW25.BTI_BRC_Data = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW26.BTI_Haar_Dist16x16 = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW27.BTI_Stats_Data = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW28.BTI_Frame_Stats_Data = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW29.BTI_CTB_Distortion_Surface = 0;
startBTI++;
curbe->DW30.BTI_Debug = bindingTable->dwBindingTableEntries[startBTI++];
CODECHAL_ENCODE_ASSERT(startBTI == bindingTable->dwNumBindingTableEntries);
CODECHAL_MEDIA_STATE_TYPE encFunctionType = CODECHAL_MEDIA_STATE_8x8_PU_FMODE;
CODECHAL_ENCODE_CHK_STATUS_RETURN(
AddCurbeToStateHeap(kernelState, encFunctionType, &cmd, sizeof(cmd)));
MOS_COMMAND_BUFFER cmdBuffer;
CODECHAL_ENCODE_CHK_STATUS_RETURN(SendKernelCmdsAndBindingTable(
&cmdBuffer,
kernelState,
encFunctionType,
nullptr));
//Add surface states
startBTI = 0;
// PAK object
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_CU_RECORD,
&bindingTable->dwBindingTableEntries[startBTI++]));
// VME 8x8 mode
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_VME_8x8,
&bindingTable->dwBindingTableEntries[startBTI++]));
// Intra mode
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_INTRA_MODE,
&bindingTable->dwBindingTableEntries[startBTI++]));
// PAK command
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_HCP_PAK,
&bindingTable->dwBindingTableEntries[startBTI++]));
// Slice Map
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_SLICE_MAP,
&bindingTable->dwBindingTableEntries[startBTI++]));
// Intra dist
m_surfaceParams[SURFACE_INTRA_DIST].bIsWritable =
m_surfaceParams[SURFACE_INTRA_DIST].bRenderTarget = true;
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_INTRA_DIST,
&bindingTable->dwBindingTableEntries[startBTI++]));
// BRC Input
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_BRC_INPUT,
&bindingTable->dwBindingTableEntries[startBTI++]));
// Simplest Intra
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_SIMPLIFIED_INTRA,
&bindingTable->dwBindingTableEntries[startBTI++]));
// LCU Qp surface
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_LCU_QP,
&bindingTable->dwBindingTableEntries[startBTI++]));
// BRC data surface
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_BRC_DATA,
&bindingTable->dwBindingTableEntries[startBTI++]));
// skip haar distortion surface, statstics data dump surface
// and frame level statstics data surface because they are not used
if (!m_hwWalker)
{
eStatus = MOS_STATUS_UNKNOWN;
CODECHAL_ENCODE_ASSERTMESSAGE("Currently HW walker shall not be disabled for CM based down scaling kernel.");
return eStatus;
}
CODECHAL_WALKER_CODEC_PARAMS walkerCodecParams;
MOS_ZeroMemory(&walkerCodecParams, sizeof(walkerCodecParams));
walkerCodecParams.WalkerMode = m_walkerMode;
// each EU is based on one LCU
walkerCodecParams.dwResolutionX = MOS_ALIGN_CEIL(m_frameWidth, (1<<log2MaxCUSize)) >> log2MaxCUSize;
walkerCodecParams.dwResolutionY = MOS_ALIGN_CEIL(m_frameHeight, (1<<log2MaxCUSize)) >> log2MaxCUSize;
/* Enforce no dependency dispatch order for 8x8 PU FMODE kernel */
walkerCodecParams.bNoDependency = true;
MHW_WALKER_PARAMS walkerParams;
CODECHAL_ENCODE_CHK_STATUS_RETURN(CodecHalInitMediaObjectWalkerParams(
m_hwInterface,
&walkerParams,
&walkerCodecParams));
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_renderEngineInterface->AddMediaObjectWalkerCmd(
&cmdBuffer,
&walkerParams));
CODECHAL_ENCODE_CHK_STATUS_RETURN(EndKernelCall(
encFunctionType,
kernelState,
&cmdBuffer));
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::Encode32X32BIntraCheckKernel()
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_FUNCTION_ENTER;
PerfTagSetting perfTag;
CODECHAL_ENCODE_SET_PERFTAG_INFO(perfTag, CODECHAL_ENCODE_PERFTAG_CALL_32X32_B_IC);
uint32_t krnIdx = CODECHAL_HEVC_MBENC_32x32INTRACHECK;
auto kernelState = &m_mbEncKernelStates[krnIdx];
auto bindingTable = &m_mbEncKernelBindingTable[krnIdx];
if (m_firstTaskInPhase || !m_singleTaskPhaseSupported)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(RequestSshAndVerifyCommandBufferSize(kernelState));
}
// Setup DSH
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_hwInterface->AssignDshAndSshSpace(
m_stateHeapInterface,
kernelState,
false,
0,
false,
m_storeData));
// Setup CURBE
if (m_pictureCodingType == P_TYPE)
{
CalcLambda(CODECHAL_ENCODE_HEVC_P_SLICE, INTRA_TRANSFORM_HAAR);
}
else
{
CalcLambda(CODECHAL_ENCODE_HEVC_B_SLICE, INTRA_TRANSFORM_HAAR);
}
int32_t sliceQp = CalSliceQp();
double lambdaScalingFactor = 1.0;
double qpLambda = m_qpLambdaMd[CODECHAL_ENCODE_HEVC_I_SLICE][sliceQp];
double squaredQpLambda = qpLambda * qpLambda;
m_fixedPointLambda = (uint32_t)(lambdaScalingFactor * squaredQpLambda * (1<<10));
CODECHAL_FEI_HEVC_B_32x32_PU_INTRA_CHECK_CURBE_G9 cmd, *curbe = &cmd;
MOS_ZeroMemory(curbe, sizeof(*curbe));
curbe->DW0.FrameWidth = MOS_ALIGN_CEIL(m_frameWidth, CODECHAL_MACROBLOCK_WIDTH);
curbe->DW0.FrameHeight = MOS_ALIGN_CEIL(m_frameHeight, CODECHAL_MACROBLOCK_HEIGHT);
curbe->DW1.EnableDebugDump = false;
curbe->DW1.EnableIntraEarlyExit = (m_hevcPicParams->CodingType == I_TYPE) ? 0 : 1;
curbe->DW1.Flags = 0;
curbe->DW1.Log2MinTUSize = m_hevcSeqParams->log2_min_transform_block_size_minus2 + 2;
curbe->DW1.SliceType = m_hevcSliceParams->slice_type;
curbe->DW1.HMEEnable = 0;
curbe->DW1.FASTSurveillanceFlag = (m_hevcPicParams->CodingType == I_TYPE) ? 0 : m_hevcSeqParams->bVideoSurveillance;
curbe->DW2.QpMultiplier = 100;
curbe->DW2.QpValue = 0; // MBZ
uint32_t startIndex = 0;
curbe->DW8.BTI_Per32x32PuIntraCheck = bindingTable->dwBindingTableEntries[startIndex++];
curbe->DW9.BTI_Src_Y = bindingTable->dwBindingTableEntries[startIndex++];
startIndex++; // skip one BTI for Y and UV have the same BTI
curbe->DW10.BTI_Src_Y2X = bindingTable->dwBindingTableEntries[startIndex++];
curbe->DW11.BTI_Slice_Map = bindingTable->dwBindingTableEntries[startIndex++];
curbe->DW12.BTI_VME_Y2X = bindingTable->dwBindingTableEntries[startIndex++];
curbe->DW13.BTI_Simplest_Intra = bindingTable->dwBindingTableEntries[startIndex++];
curbe->DW14.BTI_HME_MVPred = bindingTable->dwBindingTableEntries[startIndex++];
curbe->DW15.BTI_HME_Dist = bindingTable->dwBindingTableEntries[startIndex++];
curbe->DW16.BTI_LCU_Skip = bindingTable->dwBindingTableEntries[startIndex++];
curbe->DW17.BTI_Debug = bindingTable->dwBindingTableEntries[startIndex++];
CODECHAL_ENCODE_ASSERT(startIndex == bindingTable->dwNumBindingTableEntries);
CODECHAL_MEDIA_STATE_TYPE encFunctionType = CODECHAL_MEDIA_STATE_32x32_B_INTRA_CHECK;
CODECHAL_ENCODE_CHK_STATUS_RETURN(
AddCurbeToStateHeap(kernelState, encFunctionType, &cmd, sizeof(cmd)));
MOS_COMMAND_BUFFER cmdBuffer;
CODECHAL_ENCODE_CHK_STATUS_RETURN(SendKernelCmdsAndBindingTable(
&cmdBuffer,
kernelState,
encFunctionType,
nullptr));
//Add surface states
startIndex = 0;
// 32x32 PU B Intra Check Output
m_surfaceParams[SURFACE_32x32_PU_OUTPUT].bIsWritable =
m_surfaceParams[SURFACE_32x32_PU_OUTPUT].bRenderTarget = true;
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_32x32_PU_OUTPUT,
&bindingTable->dwBindingTableEntries[startIndex++]));
// Source Y and UV
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_RAW_Y_UV,
&bindingTable->dwBindingTableEntries[startIndex++]));
startIndex++;
// Source Y2x
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_Y_2X,
&bindingTable->dwBindingTableEntries[startIndex++]));
// Slice map
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_SLICE_MAP,
&bindingTable->dwBindingTableEntries[startIndex++]));
// Source Y2x for VME
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_Y_2X_VME,
&bindingTable->dwBindingTableEntries[startIndex++]));
// Simplest Intra
m_surfaceParams[SURFACE_SIMPLIFIED_INTRA].bIsWritable =
m_surfaceParams[SURFACE_SIMPLIFIED_INTRA].bRenderTarget = true;
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_SIMPLIFIED_INTRA,
&bindingTable->dwBindingTableEntries[startIndex++]));
// skip SURFACE_HME_MVP and SURFACE_HME_DIST from HME since FEI alsways disables HME
startIndex += 2;
// LCU Qp/Skip surface
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_LCU_QP,
&bindingTable->dwBindingTableEntries[startIndex++]));
if (!m_hwWalker)
{
eStatus = MOS_STATUS_UNKNOWN;
CODECHAL_ENCODE_ASSERTMESSAGE("Currently HW walker shall not be disabled for CM based down scaling kernel.");
return eStatus;
}
CODECHAL_WALKER_CODEC_PARAMS walkerCodecParams;
MOS_ZeroMemory(&walkerCodecParams, sizeof(walkerCodecParams));
walkerCodecParams.WalkerMode = m_walkerMode;
/* looping for Walker is needed at 8x8 block level */
walkerCodecParams.dwResolutionX = MOS_ALIGN_CEIL(m_frameWidth, 32) >> 5;
walkerCodecParams.dwResolutionY = MOS_ALIGN_CEIL(m_frameHeight, 32) >> 5;
/* Enforce no dependency dispatch order for 32x32 B Intra Check kernel */
walkerCodecParams.bNoDependency = true;
MHW_WALKER_PARAMS walkerParams;
CODECHAL_ENCODE_CHK_STATUS_RETURN(CodecHalInitMediaObjectWalkerParams(
m_hwInterface,
&walkerParams,
&walkerCodecParams));
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_renderEngineInterface->AddMediaObjectWalkerCmd(
&cmdBuffer,
&walkerParams));
CODECHAL_ENCODE_CHK_STATUS_RETURN(EndKernelCall(
encFunctionType,
kernelState,
&cmdBuffer));
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::Encode8x8BPakKernel(
PCODECHAL_FEI_HEVC_B_MB_ENC_CURBE_G9 pEncBCurbe)
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_FUNCTION_ENTER;
CODECHAL_ENCODE_CHK_NULL_RETURN(pEncBCurbe);
PerfTagSetting perfTag;
CODECHAL_ENCODE_SET_PERFTAG_INFO(perfTag, CODECHAL_ENCODE_PERFTAG_CALL_PAK_KERNEL);
uint32_t krnIdx = CODECHAL_HEVC_FEI_MBENC_BPAK;
auto kernelState = &m_mbEncKernelStates[krnIdx];
auto bindingTable = &m_mbEncKernelBindingTable[krnIdx];
if (m_firstTaskInPhase || !m_singleTaskPhaseSupported)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(RequestSshAndVerifyCommandBufferSize(kernelState));
}
//Setup DSH
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_hwInterface->AssignDshAndSshSpace(
m_stateHeapInterface,
kernelState,
false,
0,
false,
m_storeData));
//Setup CURBE
CODECHAL_FEI_HEVC_B_PAK_CURBE_G9 cmd, *curbe = &cmd;
MOS_ZeroMemory(curbe, sizeof(*curbe));
curbe->DW0.FrameWidth = MOS_ALIGN_CEIL(m_frameWidth, CODECHAL_MACROBLOCK_WIDTH);
curbe->DW0.FrameHeight = MOS_ALIGN_CEIL(m_frameHeight, CODECHAL_MACROBLOCK_HEIGHT);
curbe->DW1.MaxVmvR = pEncBCurbe->DW44.MaxVmvR;
curbe->DW1.Qp = pEncBCurbe->DW13.QpPrimeY;
curbe->DW2.BrcEnable = pEncBCurbe->DW36.BRCEnable;
curbe->DW2.LcuBrcEnable = pEncBCurbe->DW36.LCUBRCEnable;
curbe->DW2.ScreenContent = pEncBCurbe->DW47.ScreenContentFlag;
curbe->DW2.SimplestIntraEnable = pEncBCurbe->DW47.SkipIntraKrnFlag;
curbe->DW2.SliceType = pEncBCurbe->DW4.SliceType;
curbe->DW2.EnableWA = 0;
curbe->DW2.ROIEnable = (m_hevcPicParams->NumROI > 0);
curbe->DW2.FASTSurveillanceFlag = (m_hevcPicParams->CodingType == I_TYPE) ? 0 : m_hevcSeqParams->bVideoSurveillance;
// KBLControlFlag determines the PAK OBJ format as it varies from Gen9 to Gen9.5+
curbe->DW2.KBLControlFlag = UsePlatformControlFlag();
curbe->DW2.EnableRollingIntra = m_hevcPicParams->bEnableRollingIntraRefresh;
curbe->DW2.EnableQualityImprovement = m_encodeParams.bQualityImprovementEnable;
curbe->DW3.IntraRefreshQPDelta = m_hevcPicParams->QpDeltaForInsertedIntra;
curbe->DW3.IntraRefreshMBNum = m_hevcPicParams->IntraInsertionLocation;
curbe->DW3.IntraRefreshUnitInMB = m_hevcPicParams->IntraInsertionSize;
uint32_t startBTI = 0;
curbe->DW16.BTI_CU_Record = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW17.BTI_PAK_Obj = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW18.BTI_Slice_Map = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW19.BTI_Brc_Input = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW20.BTI_LCU_Qp = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW21.BTI_Brc_Data = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW22.BTI_MB_Data = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW23.BTI_MVP_Surface = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW24.BTI_WA_PAK_Data = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW25.BTI_WA_PAK_Obj = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW26.BTI_Debug = bindingTable->dwBindingTableEntries[startBTI++];
CODECHAL_ENCODE_ASSERT(startBTI == bindingTable->dwNumBindingTableEntries);
CODECHAL_MEDIA_STATE_TYPE encFunctionType = CODECHAL_MEDIA_STATE_HEVC_B_PAK;
CODECHAL_ENCODE_CHK_STATUS_RETURN(
AddCurbeToStateHeap(kernelState, encFunctionType, &cmd, sizeof(cmd)));
MOS_COMMAND_BUFFER cmdBuffer;
CODECHAL_ENCODE_CHK_STATUS_RETURN(SendKernelCmdsAndBindingTable(
&cmdBuffer,
kernelState,
encFunctionType,
nullptr));
//Add surface states
startBTI = 0;
//0: CU record
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_CU_RECORD,
&bindingTable->dwBindingTableEntries[startBTI++]));
//1: PAK command
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_HCP_PAK,
&bindingTable->dwBindingTableEntries[startBTI++]));
//2: slice map
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_SLICE_MAP,
&bindingTable->dwBindingTableEntries[startBTI++]));
// 3: BRC Input
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_BRC_INPUT,
&bindingTable->dwBindingTableEntries[startBTI++]));
// 4: LCU Qp
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_LCU_QP,
&bindingTable->dwBindingTableEntries[startBTI++]));
// 5: LCU BRC constant
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_BRC_DATA,
&bindingTable->dwBindingTableEntries[startBTI++]));
// 6: MV index buffer or MB data
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_MB_MV_INDEX,
&bindingTable->dwBindingTableEntries[startBTI++]));
// 7: MVP index buffer
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_MVP_INDEX,
&bindingTable->dwBindingTableEntries[startBTI++]));
// skip 8 and 9 for SURFACE_WA_CU_RECORD and SURFACE_WA_HCP_PAK
if (!m_hwWalker)
{
eStatus = MOS_STATUS_UNKNOWN;
CODECHAL_ENCODE_ASSERTMESSAGE("Currently HW walker shall not be disabled for CM based down scaling kernel.");
return eStatus;
}
CODECHAL_WALKER_CODEC_PARAMS walkerCodecParams;
MOS_ZeroMemory(&walkerCodecParams, sizeof(walkerCodecParams));
walkerCodecParams.WalkerMode = m_walkerMode;
/* looping for Walker is needed at 8x8 block level */
walkerCodecParams.dwResolutionX = MOS_ALIGN_CEIL(m_frameWidth, 32) >> 5;
walkerCodecParams.dwResolutionY = MOS_ALIGN_CEIL(m_frameHeight, 32) >> 5;
/* Enforce no dependency dispatch order for 32x32 B Intra Check kernel */
walkerCodecParams.bNoDependency = true;
walkerCodecParams.wPictureCodingType = m_pictureCodingType;
walkerCodecParams.bUseScoreboard = m_useHwScoreboard;
MHW_WALKER_PARAMS walkerParams;
CODECHAL_ENCODE_CHK_STATUS_RETURN(CodecHalInitMediaObjectWalkerParams(
m_hwInterface,
&walkerParams,
&walkerCodecParams));
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_renderEngineInterface->AddMediaObjectWalkerCmd(
&cmdBuffer,
&walkerParams));
CODECHAL_ENCODE_CHK_STATUS_RETURN(EndKernelCall(
encFunctionType,
kernelState,
&cmdBuffer));
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::Encode8x8PBMbEncKernel()
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_FUNCTION_ENTER;
PerfTagSetting perfTag;
CODECHAL_ENCODE_SET_PERFTAG_INFO(perfTag, CODECHAL_ENCODE_PERFTAG_CALL_MBENC_KERNEL);
uint32_t krnIdx = CODECHAL_HEVC_FEI_MBENC_BENC;
if (m_pictureCodingType == P_TYPE)
{
//krnIdx = m_hevcPicParams->bEnableRollingIntraRefresh ? CODECHAL_HEVC_FEI_MBENC_ADV_P : CODECHAL_HEVC_FEI_MBENC_PENC;
krnIdx = CODECHAL_HEVC_FEI_MBENC_PENC;
}
else if (m_pictureCodingType == B_TYPE)
{
// In TU7, we still need the original ENC B kernel to process the I frame
//krnIdx = m_hevcPicParams->bEnableRollingIntraRefresh ? CODECHAL_HEVC_FEI_MBENC_ADV : CODECHAL_HEVC_FEI_MBENC_BENC;
krnIdx = CODECHAL_HEVC_FEI_MBENC_BENC;
}
auto kernelState = &m_mbEncKernelStates[krnIdx];
auto bindingTable = &m_mbEncKernelBindingTable[krnIdx];
if (m_firstTaskInPhase || !m_singleTaskPhaseSupported)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(RequestSshAndVerifyCommandBufferSize(kernelState));
}
int32_t sliceQp = CalSliceQp();
uint8_t sliceType = PicCodingTypeToSliceType(m_pictureCodingType);
if (m_feiPicParams->FastIntraMode)
{
// When TU=7, lambda is not computed in the 32x32 MD stage for it is skipped.
CalcLambda(sliceType, INTRA_TRANSFORM_HAAR);
}
LoadCosts(sliceType, (uint8_t)sliceQp, INTRA_TRANSFORM_REGULAR);
uint8_t mbCodeIdxForTempMVP = 0xFF;
if(m_pictureCodingType != I_TYPE)
{
if(m_hevcPicParams->CollocatedRefPicIndex != 0xFF && m_hevcPicParams->CollocatedRefPicIndex < CODEC_MAX_NUM_REF_FRAME_HEVC)
{
uint8_t FrameIdx = m_hevcPicParams->RefFrameList[m_hevcPicParams->CollocatedRefPicIndex].FrameIdx;
mbCodeIdxForTempMVP = m_refList[FrameIdx]->ucScalingIdx;
}
if(mbCodeIdxForTempMVP == 0xFF && m_hevcSliceParams->slice_temporal_mvp_enable_flag)
{
// Temporal reference MV index is invalid and so disable the temporal MVP
CODECHAL_ENCODE_ASSERT(false);
m_hevcSliceParams->slice_temporal_mvp_enable_flag = false;
}
}
CODECHAL_ENCODE_CHK_STATUS_RETURN(GenerateWalkingControlRegion());
//Setup DSH
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_hwInterface->AssignDshAndSshSpace(
m_stateHeapInterface,
kernelState,
false,
0,
false,
m_storeData));
//Setup CURBE
uint8_t forwardTransformThd[7] = { 0 };
CalcForwardCoeffThd(forwardTransformThd, sliceQp);
uint32_t curbeSize = 0;
void *defaultCurbe = (void *)GetDefaultCurbeEncBKernel(curbeSize);
CODECHAL_ENCODE_ASSERT(defaultCurbe);
CODECHAL_FEI_HEVC_B_MB_ENC_CURBE_G9 cmd, *curbe = &cmd;
CODECHAL_ENCODE_CHK_STATUS_RETURN(MOS_SecureMemcpy(curbe, sizeof(cmd), defaultCurbe, curbeSize));
bool transform_8x8_mode_flag = true;
uint32_t SearchPath = (m_feiPicParams->SearchWindow == 5) ? 2 : 1; // 2 means full search, 1 means diamand search
uint32_t LenSP = m_feiPicParams->LenSP;
uint32_t RefWidth = m_feiPicParams->RefWidth;
uint32_t RefHeight = m_feiPicParams->RefHeight;
switch (m_feiPicParams->SearchWindow)
{
case 0:
// not use predefined search window
if((m_feiPicParams->SearchPath != 0) && (m_feiPicParams->SearchPath != 1) && (m_feiPicParams->SearchPath != 2))
{
CODECHAL_ENCODE_ASSERTMESSAGE("Invalid picture FEI MB ENC input SearchPath for SearchWindow=0 case!!!.");
eStatus = MOS_STATUS_INVALID_PARAMETER;
return eStatus;
}
SearchPath = m_feiPicParams->SearchPath;
if(((RefWidth * RefHeight) > 2048) || (RefWidth > 64) || (RefHeight > 64))
{
CODECHAL_ENCODE_ASSERTMESSAGE("Invalid picture FEI MB ENC input RefWidth/RefHeight size for SearchWindow=0 case!!!.");
eStatus = MOS_STATUS_INVALID_PARAMETER;
return eStatus;
}
break;
case 1:
// Tiny SUs 24x24 window
RefWidth = 24;
RefHeight = 24;
LenSP = 4;
break;
case 2:
// Small SUs 28x28 window
RefWidth = 28;
RefHeight = 28;
LenSP = 9;
break;
case 3:
// Diamond SUs 48x40 window
RefWidth = 48;
RefHeight = 40;
LenSP = 16;
break;
case 4:
// Large Diamond SUs 48x40 window
RefWidth = 48;
RefHeight = 40;
LenSP = 32;
break;
case 5:
// Exhaustive SUs 48x40 window
RefWidth = 48;
RefHeight = 40;
LenSP = 48;
if (m_hevcSeqParams->TargetUsage != 7)
{
if (m_pictureCodingType == B_TYPE)
{
LenSP = 48;
} else {
LenSP = 57;
}
} else {
LenSP = 25;
}
break;
default:
CODECHAL_ENCODE_ASSERTMESSAGE("Invalid picture FEI MB ENC SearchWindow value for HEVC FEI on SKL!!!.");
eStatus = MOS_STATUS_INVALID_PARAMETER;
return eStatus;
}
if((m_pictureCodingType == B_TYPE) && (curbe->DW3.BMEDisableFBR == 0))
{
if(RefWidth > 32)
{
RefWidth = 32;
}
if(RefHeight > 32)
{
RefHeight = 32;
}
}
curbe->DW0.AdaptiveEn = m_feiPicParams->AdaptiveSearch;
curbe->DW0.T8x8FlagForInterEn = transform_8x8_mode_flag;
curbe->DW2.PicWidth = m_picWidthInMb;
curbe->DW2.LenSP = LenSP;
curbe->DW3.SrcAccess = curbe->DW3.RefAccess = 0;
if (m_feiPicParams->FastIntraMode)
{
curbe->DW3.FTEnable = (m_ftqBasedSkip[0x07] >> 1) & 0x01;
}
else
{
curbe->DW3.FTEnable = (m_ftqBasedSkip[0x04] >> 1) & 0x01;
}
curbe->DW3.SubPelMode = m_feiPicParams->SubPelMode;
curbe->DW4.PicHeightMinus1 = m_picHeightInMb - 1;
curbe->DW4.EnableStatsDataDump = m_encodeParams.bReportStatisticsEnabled;
curbe->DW4.HMEEnable = 0;
curbe->DW4.SliceType = sliceType;
curbe->DW4.EnableQualityImprovement = m_encodeParams.bQualityImprovementEnable;
curbe->DW4.UseActualRefQPValue = false;
curbe->DW5.RefWidth = RefWidth;
curbe->DW5.RefHeight = RefHeight;
curbe->DW7.IntraPartMask = 0x3;
curbe->DW6.FrameWidth = m_picWidthInMb * CODECHAL_MACROBLOCK_WIDTH;
curbe->DW6.FrameHeight = m_picHeightInMb * CODECHAL_MACROBLOCK_HEIGHT;
curbe->DW8.Mode0Cost = m_modeCost[0];
curbe->DW8.Mode1Cost = m_modeCost[1];
curbe->DW8.Mode2Cost = m_modeCost[2];
curbe->DW8.Mode3Cost = m_modeCost[3];
curbe->DW9.Mode4Cost = m_modeCost[4];
curbe->DW9.Mode5Cost = m_modeCost[5];
curbe->DW9.Mode6Cost = m_modeCost[6];
curbe->DW9.Mode7Cost = m_modeCost[7];
curbe->DW10.Mode8Cost= m_modeCost[8];
curbe->DW10.Mode9Cost= m_modeCost[9];
curbe->DW10.RefIDCost = m_modeCost[10];
curbe->DW10.ChromaIntraModeCost = m_modeCost[11];
curbe->DW11.MV0Cost = m_mvCost[0];
curbe->DW11.MV1Cost = m_mvCost[1];
curbe->DW11.MV2Cost = m_mvCost[2];
curbe->DW11.MV3Cost = m_mvCost[3];
curbe->DW12.MV4Cost = m_mvCost[4];
curbe->DW12.MV5Cost = m_mvCost[5];
curbe->DW12.MV6Cost = m_mvCost[6];
curbe->DW12.MV7Cost = m_mvCost[7];
curbe->DW13.QpPrimeY = sliceQp;
uint8_t bitDepthChromaMinus8 = 0; // support 4:2:0 only
int32_t qpBdOffsetC = 6 * bitDepthChromaMinus8;
int32_t qPi = (int32_t)CodecHal_Clip3((-qpBdOffsetC), 51, (sliceQp + m_hevcPicParams->pps_cb_qp_offset));
int32_t QPc = (qPi < 30) ? qPi : QPcTable[qPi - 30];
curbe->DW13.QpPrimeCb= QPc + qpBdOffsetC;
qPi = (int32_t)CodecHal_Clip3((-qpBdOffsetC), 51, (sliceQp + m_hevcPicParams->pps_cr_qp_offset));
QPc = (qPi < 30) ? qPi : QPcTable[qPi - 30];
curbe->DW13.QpPrimeCr= QPc;
curbe->DW14.SICFwdTransCoeffThreshold_0 = forwardTransformThd[0];
curbe->DW14.SICFwdTransCoeffThreshold_1 = forwardTransformThd[1];
curbe->DW14.SICFwdTransCoeffThreshold_2 = forwardTransformThd[2];
curbe->DW15.SICFwdTransCoeffThreshold_3 = forwardTransformThd[3];
curbe->DW15.SICFwdTransCoeffThreshold_4 = forwardTransformThd[4];
curbe->DW15.SICFwdTransCoeffThreshold_5 = forwardTransformThd[5];
curbe->DW15.SICFwdTransCoeffThreshold_6 = forwardTransformThd[6];
if (SearchPath == 1)
{
// diamond search
if (m_pictureCodingType == P_TYPE)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(MOS_SecureMemcpy(&(curbe->DW16), 14 * sizeof(uint32_t), &(m_encBTu7PCurbeInit[16]), 14 * sizeof(uint32_t)));
}
else if (m_pictureCodingType == B_TYPE)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(MOS_SecureMemcpy(&(curbe->DW16), 14 * sizeof(uint32_t), &(m_encBTu7BCurbeInit[16]), 14 * sizeof(uint32_t)));
}
}
else if((SearchPath != 0) && (SearchPath != 2))
{
// default 0 and 2 are full sparil search
CODECHAL_ENCODE_ASSERT(false);
}
curbe->DW32.SkipVal = m_skipValB[curbe->DW3.BlockBasedSkipEnable][transform_8x8_mode_flag][sliceQp];
if(m_pictureCodingType == I_TYPE)
{
*(float*)&(curbe->DW34.LambdaME) = 0.0;
}
else if (m_pictureCodingType == P_TYPE)
{
*(float*)&(curbe->DW34.LambdaME) = (float)m_qpLambdaMe[CODECHAL_ENCODE_HEVC_P_SLICE][sliceQp];
}
else
{
*(float*)&(curbe->DW34.LambdaME) = (float)m_qpLambdaMe[CODECHAL_ENCODE_HEVC_B_SLICE][sliceQp];
}
curbe->DW35.ModeCostSp = m_modeCostSp;
curbe->DW35.SimpIntraInterThreshold = m_simplestIntraInterThreshold;
curbe->DW36.NumRefIdxL0MinusOne = m_hevcSliceParams->num_ref_idx_l0_active_minus1;
curbe->DW36.NumRefIdxL1MinusOne = m_hevcSliceParams->num_ref_idx_l1_active_minus1;
curbe->DW36.BRCEnable = m_encodeParams.bMbQpDataEnabled || m_brcEnabled;
curbe->DW36.LCUBRCEnable = m_encodeParams.bMbQpDataEnabled || m_lcuBrcEnabled;
curbe->DW36.PowerSaving = m_powerSavingEnabled;
curbe->DW36.ROIEnable = (m_hevcPicParams->NumROI > 0);
curbe->DW36.FASTSurveillanceFlag= (m_hevcPicParams->CodingType == I_TYPE) ? 0 : m_hevcSeqParams->bVideoSurveillance;
if(m_pictureCodingType != I_TYPE)
{
curbe->DW37.ActualQpRefID0List0 = GetQPValueFromRefList(LIST_0, CODECHAL_ENCODE_REF_ID_0);
curbe->DW37.ActualQpRefID1List0 = GetQPValueFromRefList(LIST_0, CODECHAL_ENCODE_REF_ID_1);
curbe->DW37.ActualQpRefID2List0 = GetQPValueFromRefList(LIST_0, CODECHAL_ENCODE_REF_ID_2);
curbe->DW37.ActualQpRefID3List0 = GetQPValueFromRefList(LIST_0, CODECHAL_ENCODE_REF_ID_3);
curbe->DW41.TextureIntraCostThreshold = 500;
if(m_pictureCodingType == B_TYPE) {
curbe->DW39.ActualQpRefID0List1 = GetQPValueFromRefList(LIST_1, CODECHAL_ENCODE_REF_ID_0);
curbe->DW39.ActualQpRefID1List1 = GetQPValueFromRefList(LIST_1, CODECHAL_ENCODE_REF_ID_1);
float lambda_me = (float)m_qpLambdaMe[CODECHAL_ENCODE_HEVC_B_SLICE][sliceQp];
if (m_encodeParams.bQualityImprovementEnable)
{
curbe->DW40.TransformThreshold0 = (uint16_t) (lambda_me * 56.25 + 0.5);
curbe->DW40.TransformThreshold1 = (uint16_t) (lambda_me * 21 + 0.5);
curbe->DW41.TransformThreshold2 = (uint16_t) (lambda_me * 9 + 0.5);
}
}
}
curbe->DW42.NumMVPredictorsL0 = m_feiPicParams->NumMVPredictorsL0;
curbe->DW42.NumMVPredictorsL1 = m_feiPicParams->NumMVPredictorsL1;
curbe->DW42.PerLCUQP = m_encodeParams.bMbQpDataEnabled;
curbe->DW42.PerCTBInput = m_feiPicParams->bPerCTBInput;
curbe->DW42.CTBDistortionOutput = m_feiPicParams->bDistortionEnable;
curbe->DW42.MultiPredL0 = m_feiPicParams->MultiPredL0;
curbe->DW42.MultiPredL1 = m_feiPicParams->MultiPredL1;
curbe->DW42.MVPredictorBlockSize = m_feiPicParams->MVPredictorInput;
curbe->DW44.MaxVmvR = 511 * 4;
curbe->DW44.MaxNumMergeCandidates = m_hevcSliceParams->MaxNumMergeCand;
if(m_pictureCodingType != I_TYPE)
{
curbe->DW44.MaxNumRefList0 = curbe->DW36.NumRefIdxL0MinusOne + 1;
curbe->DW45.TemporalMvpEnableFlag = m_hevcSliceParams->slice_temporal_mvp_enable_flag;
curbe->DW45.HMECombineLenPslice = 8;
if(m_pictureCodingType == B_TYPE)
{
curbe->DW44.MaxNumRefList1 = curbe->DW36.NumRefIdxL1MinusOne + 1;
curbe->DW45.HMECombineLenBslice = 8;
}
}
curbe->DW45.Log2ParallelMergeLevel = m_hevcPicParams->log2_parallel_merge_level_minus2 + 2;
curbe->DW46.Log2MaxTUSize = m_hevcSeqParams->log2_max_transform_block_size_minus2 + 2;
curbe->DW46.Log2MinTUSize = m_hevcSeqParams->log2_min_transform_block_size_minus2 + 2;
curbe->DW46.Log2MaxCUSize = m_hevcSeqParams->log2_max_coding_block_size_minus3 + 3;
curbe->DW46.Log2MinCUSize = m_hevcSeqParams->log2_min_coding_block_size_minus3 + 3;
curbe->DW47.NumRegionsInSlice = m_numRegionsInSlice;
curbe->DW47.TypeOfWalkingPattern = m_enable26WalkingPattern;
curbe->DW47.ChromaFlatnessCheckFlag= (m_feiPicParams->FastIntraMode) ? 0 : 1;
curbe->DW47.EnableIntraEarlyExit = (m_feiPicParams->FastIntraMode) ? 0 : 1;
curbe->DW47.SkipIntraKrnFlag = (m_feiPicParams->FastIntraMode) ? 1 : 0;
curbe->DW47.CollocatedFromL0Flag = m_hevcSliceParams->collocated_from_l0_flag;
curbe->DW47.IsLowDelay = m_lowDelay;
curbe->DW47.ScreenContentFlag = m_hevcPicParams->bScreenContent;
curbe->DW47.MultiSliceFlag = (m_numSlices > 1);
curbe->DW47.ArbitarySliceFlag = m_arbitraryNumMbsInSlice;
curbe->DW47.NumRegionMinus1 = m_walkingPatternParam.dwNumRegion - 1;
if(m_pictureCodingType != I_TYPE)
{
curbe->DW48.CurrentTdL0_0 = ComputeTemporalDifference(m_hevcSliceParams->RefPicList[0][0]);
curbe->DW48.CurrentTdL0_1 = ComputeTemporalDifference(m_hevcSliceParams->RefPicList[0][1]);
curbe->DW49.CurrentTdL0_2 = ComputeTemporalDifference(m_hevcSliceParams->RefPicList[0][2]);
curbe->DW49.CurrentTdL0_3 = ComputeTemporalDifference(m_hevcSliceParams->RefPicList[0][3]);
if(m_pictureCodingType == B_TYPE) {
curbe->DW50.CurrentTdL1_0 = ComputeTemporalDifference(m_hevcSliceParams->RefPicList[1][0]);
curbe->DW50.CurrentTdL1_1 = ComputeTemporalDifference(m_hevcSliceParams->RefPicList[1][1]);
}
}
curbe->DW52.NumofUnitInRegion = m_walkingPatternParam.dwNumUnitsInRegion;
curbe->DW52.MaxHeightInRegion = m_walkingPatternParam.dwMaxHeightInRegion;
uint32_t startBTI = 0;
curbe->DW56.BTI_CU_Record = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW57.BTI_PAK_Cmd = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW58.BTI_Src_Y = bindingTable->dwBindingTableEntries[startBTI++];
startBTI++; //skip UV index
curbe->DW59.BTI_Intra_Dist = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW60.BTI_Min_Dist = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW61.BTI_HMEMVPredFwdBwdSurfIndex = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW62.BTI_HMEDistSurfIndex = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW63.BTI_Slice_Map = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW64.BTI_VME_Saved_UNI_SIC = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW65.BTI_Simplest_Intra = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW66.BTI_Collocated_RefFrame = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW67.BTI_Reserved = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW68.BTI_BRC_Input = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW69.BTI_LCU_QP = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW70.BTI_BRC_Data = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW71.BTI_VMEInterPredictionSurfIndex= bindingTable->dwBindingTableEntries[startBTI++];
if(m_pictureCodingType == P_TYPE)
{
//P MBEnc curbe 72~75 are different from B frame.
startBTI += (CODECHAL_HEVC_P_MBENC_CONCURRENT_THD_MAP - CODECHAL_HEVC_P_MBENC_VME_FORWARD_0);
curbe->DW72.BTI_ConcurrentThreadMap= bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW73.BTI_MB_Data_CurFrame = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW74.BTI_MVP_CurFrame = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW75.BTI_Haar_Dist16x16 = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW76.BTI_Stats_Data = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW77.BTI_Frame_Stats_Data = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW78.BTI_MVPredictor_Surface= bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW79.BTI_CTB_Input_Surface = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW80.BTI_CTB_Distortion_Output_Surface = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW81.BTI_Debug = bindingTable->dwBindingTableEntries[startBTI++];
}
else
{
startBTI += (CODECHAL_HEVC_B_MBENC_VME_BACKWARD_7 - CODECHAL_HEVC_B_MBENC_VME_FORWARD_0 + 1);
curbe->DW72.BTI_VMEInterPredictionBSurfIndex = bindingTable->dwBindingTableEntries[startBTI++];
startBTI += (CODECHAL_HEVC_B_MBENC_VME_MUL_NOUSE_3 - CODECHAL_HEVC_B_MBENC_VME_MUL_BACKWARD_0 + 1);
curbe->DW73.BTI_ConcurrentThreadMap= bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW74.BTI_MB_Data_CurFrame = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW75.BTI_MVP_CurFrame = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW76.BTI_Haar_Dist16x16 = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW77.BTI_Stats_Data = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW78.BTI_Frame_Stats_Data = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW79.BTI_MVPredictor_Surface= bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW80.BTI_CTB_Input_Surface = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW81.BTI_CTB_Distortion_Output_Surface = bindingTable->dwBindingTableEntries[startBTI++];
curbe->DW82.BTI_Debug = bindingTable->dwBindingTableEntries[startBTI++];
}
// Intra refresh is enabled. Program related CURBE fields
if (m_hevcPicParams->bEnableRollingIntraRefresh)
{
curbe->DW35.IntraRefreshEn = true;
curbe->DW35.FirstIntraRefresh = m_firstIntraRefresh;
curbe->DW35.HalfUpdateMixedLCU = 0;
curbe->DW35.EnableRollingIntra = true;
curbe->DW38.NumFrameInGOB = m_frameNumInGob;
curbe->DW38.NumIntraRefreshOffFrames = m_frameNumWithoutIntraRefresh;
curbe->DW51.IntraRefreshQPDelta = m_hevcPicParams->QpDeltaForInsertedIntra;
curbe->DW51.IntraRefreshMBNum = m_hevcPicParams->IntraInsertionLocation;
curbe->DW51.IntraRefreshUnitInMB = m_hevcPicParams->IntraInsertionSize;
curbe->DW53.IntraRefreshRefHeight = 40;
curbe->DW53.IntraRefreshRefWidth = 48;
m_firstIntraRefresh = false;
m_frameNumWithoutIntraRefresh = 0;
}
else if (m_pictureCodingType != I_TYPE) // don't increment num frames w/o refresh in case of TU7 I frames
{
m_frameNumWithoutIntraRefresh++;
}
CODECHAL_ENCODE_ASSERT(startBTI == bindingTable->dwNumBindingTableEntries);
CODECHAL_MEDIA_STATE_TYPE encFunctionType = CODECHAL_MEDIA_STATE_HEVC_B_MBENC;
if (m_pictureCodingType == P_TYPE)
{
//P frame curbe only use the DW0~DW75
CODECHAL_ENCODE_CHK_STATUS_RETURN(
AddCurbeToStateHeap(kernelState, encFunctionType, &cmd, sizeof(cmd) - sizeof(uint32_t)));
}
else
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(
AddCurbeToStateHeap(kernelState, encFunctionType, &cmd, sizeof(cmd)));
}
MOS_COMMAND_BUFFER cmdBuffer;
if(m_numMbBKernelSplit == 0)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(SendKernelCmdsAndBindingTable(&cmdBuffer,
kernelState,
encFunctionType,
&m_walkingPatternParam.ScoreBoard));
}
else
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(GetCommandBuffer(&cmdBuffer));
MHW_INTERFACE_DESCRIPTOR_PARAMS idParams;
MOS_ZeroMemory(&idParams, sizeof(idParams));
idParams.pKernelState = kernelState;
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_stateHeapInterface->pfnSetInterfaceDescriptor(
m_stateHeapInterface,
1,
&idParams));
// Add binding table
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_stateHeapInterface->pfnSetBindingTable(
m_stateHeapInterface,
kernelState));
}
//Add surface states
startBTI = 0;
//0: CU record
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_CU_RECORD,
&bindingTable->dwBindingTableEntries[startBTI++]));
//1: PAK command
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_HCP_PAK,
&bindingTable->dwBindingTableEntries[startBTI++]));
//2 and 3 Source Y and UV
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_RAW_Y_UV,
&bindingTable->dwBindingTableEntries[startBTI++]));
startBTI++;
//4: Intra dist
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_INTRA_DIST,
&bindingTable->dwBindingTableEntries[startBTI++]));
//5: min distortion
m_surfaceParams[SURFACE_MIN_DIST].bIsWritable =
m_surfaceParams[SURFACE_MIN_DIST].bRenderTarget = true;
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_MIN_DIST,
&bindingTable->dwBindingTableEntries[startBTI++]));
// 6 and 7, skip SURFACE_HME_MVP and SURFACE_HME_DIST from HME since FEI alsways disables HME
startBTI += 2;
//8: slice map
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_SLICE_MAP,
&bindingTable->dwBindingTableEntries[startBTI++]));
//9: VME UNI and SIC data
m_surfaceParams[SURFACE_VME_UNI_SIC_DATA].bIsWritable =
m_surfaceParams[SURFACE_VME_UNI_SIC_DATA].bRenderTarget = true;
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_VME_UNI_SIC_DATA,
&bindingTable->dwBindingTableEntries[startBTI++]));
//10: Simplest Intra
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_SIMPLIFIED_INTRA,
&bindingTable->dwBindingTableEntries[startBTI++]));
// 11: Reference frame col-located data surface
if(mbCodeIdxForTempMVP == 0xFF)
{
startBTI++;
}
else
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_COL_MB_MV,
&bindingTable->dwBindingTableEntries[startBTI++],
m_trackedBuf->GetMvTemporalBuffer(mbCodeIdxForTempMVP)));
}
// 12: Current frame col-located data surface -- reserved now
startBTI++;
// 13: BRC Input
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_BRC_INPUT,
&bindingTable->dwBindingTableEntries[startBTI++]));
// 14: LCU Qp
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_LCU_QP,
&bindingTable->dwBindingTableEntries[startBTI++]));
// 15: LCU BRC constant
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_BRC_DATA,
&bindingTable->dwBindingTableEntries[startBTI++]));
// 16 - 32 Current plus forward and backward surface 0-7
//16: Source Y for VME
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_RAW_VME,
&bindingTable->dwBindingTableEntries[startBTI++]));
for(uint32_t surfaceIdx = 0; surfaceIdx < 8; surfaceIdx++)
{
CODEC_PICTURE refPic = m_hevcSliceParams->RefPicList[LIST_0][surfaceIdx];
if(!CodecHal_PictureIsInvalid(refPic) &&
!CodecHal_PictureIsInvalid(m_hevcPicParams->RefFrameList[refPic.FrameIdx]))
{
uint8_t idx = m_hevcPicParams->RefFrameList[refPic.FrameIdx].FrameIdx;
// Picture Y VME
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_REF_FRAME_VME,
&bindingTable->dwBindingTableEntries[startBTI++],
&m_refList[idx]->sRefBuffer,
curbe->DW6.FrameWidth,
curbe->DW6.FrameHeight));
}
else
{
// Skip the binding table index because it is not used
startBTI++;
}
refPic = m_hevcSliceParams->RefPicList[LIST_1][surfaceIdx];
if(!CodecHal_PictureIsInvalid(refPic) &&
!CodecHal_PictureIsInvalid(m_hevcPicParams->RefFrameList[refPic.FrameIdx]))
{
uint8_t idx = m_hevcPicParams->RefFrameList[refPic.FrameIdx].FrameIdx;
// Picture Y VME
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_REF_FRAME_VME,
&bindingTable->dwBindingTableEntries[startBTI++],
&m_refList[idx]->sRefBuffer,
curbe->DW6.FrameWidth,
curbe->DW6.FrameHeight));
}
else
{
// Skip the binding table index because it is not used
startBTI++;
}
}
CODECHAL_ENCODE_ASSERT(startBTI == CODECHAL_HEVC_B_MBENC_VME_BACKWARD_7 - CODECHAL_HEVC_B_MBENC_BEGIN + 1);
if (m_pictureCodingType != P_TYPE)
{
//33-41 VME multi-ref BTI -- Current plus [backward, nil][0..3]
//33: Current Y VME surface
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_RAW_VME,
&bindingTable->dwBindingTableEntries[startBTI++]));
for(uint32_t surfaceIdx = 0; surfaceIdx < 4; surfaceIdx++)
{
CODEC_PICTURE refPic = m_hevcSliceParams->RefPicList[1][surfaceIdx];
if(!CodecHal_PictureIsInvalid(refPic) &&
!CodecHal_PictureIsInvalid(m_hevcPicParams->RefFrameList[refPic.FrameIdx]))
{
uint8_t idx = m_hevcPicParams->RefFrameList[refPic.FrameIdx].FrameIdx;
// Picture Y VME
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_REF_FRAME_VME,
&bindingTable->dwBindingTableEntries[startBTI++],
&m_refList[idx]->sRefBuffer,
curbe->DW6.FrameWidth,
curbe->DW6.FrameHeight));
}
else
{
// Skip the binding table index because it is not used
startBTI++;
}
// Skip the binding table index because it is not used
startBTI++;
}
CODECHAL_ENCODE_ASSERT(startBTI == CODECHAL_HEVC_B_MBENC_VME_MUL_NOUSE_3 - CODECHAL_HEVC_B_MBENC_BEGIN + 1);
}
// B 42 or P 33: Concurrent thread
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
(SURFACE_ID)(SURFACE_CONCURRENT_THREAD + m_concurrentThreadIndex),
&bindingTable->dwBindingTableEntries[startBTI++]));
if (++m_concurrentThreadIndex >= NUM_CONCURRENT_THREAD)
{
m_concurrentThreadIndex = 0;
}
// B 43 or P 34: MV index buffer
m_surfaceParams[SURFACE_MB_MV_INDEX].bIsWritable =
m_surfaceParams[SURFACE_MB_MV_INDEX].bRenderTarget = true;
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_MB_MV_INDEX,
&bindingTable->dwBindingTableEntries[startBTI++]));
// B 44: or P 35: MVP index buffer
m_surfaceParams[SURFACE_MVP_INDEX].bIsWritable =
m_surfaceParams[SURFACE_MVP_INDEX].bRenderTarget = true;
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_MVP_INDEX,
&bindingTable->dwBindingTableEntries[startBTI++]));
// skip three BTI for haar distortion surface, statstics data dump surface
// and frame level statstics data surface because they are not used
startBTI += 3;
// 48: FEI external MVPredictor surface
if (m_feiPicParams->MVPredictorInput)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_FEI_EXTERNAL_MVP,
&bindingTable->dwBindingTableEntries[startBTI++]));
}
else
{
startBTI++;
}
if (m_feiPicParams->bPerCTBInput)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetSurfacesState(
kernelState,
&cmdBuffer,
SURFACE_FEI_PER_CTB_CTRL,
&bindingTable->dwBindingTableEntries[startBTI++]));
}
else
{
startBTI ++;
}
startBTI += 1;
if (!m_hwWalker)
{
eStatus = MOS_STATUS_UNKNOWN;
CODECHAL_ENCODE_ASSERTMESSAGE("Currently HW walker shall not be disabled for CM based down scaling kernel.");
return eStatus;
}
if(m_numMbBKernelSplit == 0)
{
// always use customized media walker
MHW_WALKER_PARAMS walkerParams;
MOS_SecureMemcpy(&walkerParams, sizeof(walkerParams), &m_walkingPatternParam.MediaWalker, sizeof(m_walkingPatternParam.MediaWalker));
walkerParams.ColorCountMinusOne = m_walkingPatternParam.dwNumRegion - 1;
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_renderEngineInterface->AddMediaObjectWalkerCmd(
&cmdBuffer,
&walkerParams));
}
else
{
int32_t localOuterLoopExecCount = m_walkingPatternParam.MediaWalker.dwLocalLoopExecCount;
int32_t localInitialStartPointY = m_walkingPatternParam.MediaWalker.LocalStart.y;
int32_t phase = MOS_MIN(m_numMbBKernelSplit, MAX_NUM_KERNEL_SPLIT);
int32_t totalExecCount = localOuterLoopExecCount + 1;
int32_t deltaExecCount = (((totalExecCount+phase - 1) / phase) + 1) & 0xfffe;
int32_t remainExecCount = totalExecCount;
int32_t deltaY = 0;
if (m_enable26WalkingPattern)
{
deltaY = deltaExecCount / 2;
}
else
{
deltaY = deltaExecCount * 2;
}
int32_t startPointY[MAX_NUM_KERNEL_SPLIT] = { 0 };
int32_t currentExecCount[MAX_NUM_KERNEL_SPLIT] = { -1 };
currentExecCount[0] = (remainExecCount > deltaExecCount)?(deltaExecCount-1) : (remainExecCount-1);
startPointY[0] = localInitialStartPointY;
for (auto i = 1; i < phase; i++)
{
remainExecCount -= deltaExecCount;
if (remainExecCount < 1)
{
remainExecCount = 1;
}
currentExecCount[i] = (remainExecCount > deltaExecCount)?(deltaExecCount-1) : (remainExecCount-1);
startPointY[i] = startPointY[i-1] + deltaY;
}
for(auto i = 0; i < phase; i++)
{
if(currentExecCount[i] < 0)
{
break;
}
// Program render engine pipe commands
SendKernelCmdsParams sendKernelCmdsParams = SendKernelCmdsParams();
sendKernelCmdsParams.EncFunctionType = encFunctionType;
sendKernelCmdsParams.pKernelState = kernelState;
sendKernelCmdsParams.bEnableCustomScoreBoard= true;
sendKernelCmdsParams.pCustomScoreBoard = &m_walkingPatternParam.ScoreBoard;
CODECHAL_ENCODE_CHK_STATUS_RETURN(SendGenericKernelCmds(&cmdBuffer, &sendKernelCmdsParams));
// Change walker execution count and local start Y for different phases
m_walkingPatternParam.MediaWalker.dwLocalLoopExecCount = currentExecCount[i];
m_walkingPatternParam.MediaWalker.LocalStart.y = startPointY[i];
// always use customized media walker
MHW_WALKER_PARAMS walkerParams;
MOS_SecureMemcpy(&walkerParams, sizeof(walkerParams), &m_walkingPatternParam.MediaWalker, sizeof(m_walkingPatternParam.MediaWalker));
walkerParams.ColorCountMinusOne = m_walkingPatternParam.dwNumRegion - 1;
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_renderEngineInterface->AddMediaObjectWalkerCmd(
&cmdBuffer,
&walkerParams));
}
}
CODECHAL_ENCODE_CHK_STATUS_RETURN(EndKernelCall(
encFunctionType,
kernelState,
&cmdBuffer));
CODECHAL_DEBUG_TOOL(
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpBuffer(
&m_mvIndex.sResource,
CodechalDbgAttr::attrOutput,
"MbData",
m_mvpIndex.dwSize,
0,
CODECHAL_MEDIA_STATE_HEVC_B_MBENC));
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpBuffer(
&m_mvpIndex.sResource,
CodechalDbgAttr::attrOutput,
"MvData",
m_mvpIndex.dwSize,
0,
CODECHAL_MEDIA_STATE_HEVC_B_MBENC));
)
m_lastTaskInPhase = true;
eStatus = Encode8x8BPakKernel(curbe);
return eStatus;
}
#else
MOS_STATUS CodechalFeiHevcStateG9Skl::Encode2xScalingKernel()
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
PerfTagSetting perfTag;
CODECHAL_ENCODE_SET_PERFTAG_INFO(perfTag, CODECHAL_ENCODE_PERFTAG_CALL_SCALING_KERNEL);
//Setup CURBE
MEDIA_OBJECT_DOWNSCALING_2X_STATIC_DATA_G9 cmd, *curbe = &cmd;
MOS_ZeroMemory(curbe, sizeof(*curbe));
curbe->DW0.PicWidth = MOS_ALIGN_CEIL(m_frameWidth, CODECHAL_MACROBLOCK_WIDTH);
curbe->DW0.PicHeight = MOS_ALIGN_CEIL(m_frameHeight, CODECHAL_MACROBLOCK_HEIGHT);
DownScalingKernelParams scalingParams;
MOS_ZeroMemory(&scalingParams, sizeof(scalingParams));
scalingParams.m_cmSurfDS_TopIn = &m_rawSurfaceToEnc->OsResource;
scalingParams.m_cmSurfDS_TopOut = &m_scaled2xSurface.OsResource;
scalingParams.m_cmSurfTopVProc = nullptr;
if (m_cmKernelMap.count("2xScaling") == 0)
{
m_cmKernelMap["2xScaling"] = new CMRTKernelDownScalingUMD();
m_cmKernelMap["2xScaling"]->Init((void *)m_osInterface->pOsContext);
}
m_cmKernelMap["2xScaling"]->SetupCurbe(curbe);
CODECHAL_MEDIA_STATE_TYPE encFunctionType = CODECHAL_MEDIA_STATE_2X_SCALING;
CODECHAL_DEBUG_TOOL(
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpMDFCurbe(
encFunctionType,
(uint8_t *)curbe, sizeof(*curbe)));
)
m_cmKernelMap["2xScaling"]->AllocateSurfaces(&scalingParams);
//No need to wait for task finished
m_cmEvent = CM_NO_EVENT;
m_cmKernelMap["2xScaling"]->CreateAndDispatchKernel(m_cmEvent, false, (!m_singleTaskPhaseSupported));
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::Encode32x32PuModeDecisionKernel()
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
PerfTagSetting perfTag;
CODECHAL_ENCODE_SET_PERFTAG_INFO(perfTag, CODECHAL_ENCODE_PERFTAG_CALL_32X32_PU_MD);
//Setup CURBE
uint32_t log2MaxCUSize = m_hevcSeqParams->log2_max_coding_block_size_minus3 + 3;
CalcLambda(CODECHAL_ENCODE_HEVC_I_SLICE, INTRA_TRANSFORM_HAAR);
int32_t sliceQp = CalSliceQp();
double lambdaScalingFactor = 1.0;
double qpLambda = m_qpLambdaMd[CODECHAL_ENCODE_HEVC_I_SLICE][sliceQp];
double squaredQpLambda = qpLambda * qpLambda;
m_fixedPointLambda = (uint32_t)(lambdaScalingFactor * squaredQpLambda * (1<<10));
CODECHAL_FEI_HEVC_I_32x32_PU_MODE_DECISION_CURBE_G9 cmd, *curbe = &cmd;
MOS_ZeroMemory(curbe, sizeof(*curbe));
curbe->DW0.FrameWidth = MOS_ALIGN_CEIL(m_frameWidth, CODECHAL_MACROBLOCK_WIDTH);
curbe->DW0.FrameHeight = MOS_ALIGN_CEIL(m_frameHeight, CODECHAL_MACROBLOCK_HEIGHT);
curbe->DW1.EnableDebugDump = false;
curbe->DW1.LCUType = (log2MaxCUSize==6)? 0 /*64x64*/ : 1 /*32x32*/;
curbe->DW1.PuType = 0; // 32x32 PU
curbe->DW1.BRCEnable = m_encodeParams.bMbQpDataEnabled || m_brcEnabled;
curbe->DW1.LCUBRCEnable = m_encodeParams.bMbQpDataEnabled || m_lcuBrcEnabled;
curbe->DW1.SliceType = PicCodingTypeToSliceType(m_hevcPicParams->CodingType);
curbe->DW1.FASTSurveillanceFlag = (m_hevcPicParams->CodingType == I_TYPE) ? 0 : m_hevcSeqParams->bVideoSurveillance;
curbe->DW1.ROIEnable = (m_hevcPicParams->NumROI > 0);
curbe->DW1.SliceQp = sliceQp;
curbe->DW1.EnableStatsDataDump = m_encodeParams.bReportStatisticsEnabled;
curbe->DW1.EnableQualityImprovement = m_encodeParams.bQualityImprovementEnable;
curbe->DW2.Lambda = m_fixedPointLambda;
curbe->DW3.ModeCost32x32 = 0;
curbe->DW4.EarlyExit = (uint32_t)-1;
if (curbe->DW1.EnableStatsDataDump)
{
double lambdaMd;
float hadBias = 2.0f;
lambdaMd = m_qpLambdaMd[curbe->DW1.SliceType][sliceQp];
lambdaMd = lambdaMd * hadBias;
curbe->DW5.NewLambdaForHaarTransform = (uint32_t)(lambdaMd*(1<<10));
}
IFrameKernelParams I32x32Params;
MOS_ZeroMemory(&I32x32Params, sizeof(I32x32Params));
I32x32Params.m_cmSurfPer32x32PUDataOut = &m_32x32PuOutputData.sResource;
I32x32Params.m_cmSurfCurrY = &m_rawSurfaceToEnc->OsResource;
I32x32Params.m_cmSurfCurrY2 = &m_scaled2xSurface.OsResource;
I32x32Params.m_cmSurfSliceMap = &m_sliceMapSurface.OsResource;
I32x32Params.m_cmSurfCombinedQP = (MOS_RESOURCE*)m_allocator->GetResource(m_standard, brcInputForEncKernel);
I32x32Params.m_cmLCUQPSurf = &m_lcuQP.OsResource;
I32x32Params.m_cmBRCConstSurf = &m_brcBuffers.sBrcConstantDataBuffer[m_currRecycledBufIdx].OsResource;
if (m_cmKernelMap.count("I_32X32") == 0)
{
m_cmKernelMap["I_32X32"] = new CMRTKernelI32x32UMD();
m_cmKernelMap["I_32X32"]->Init(nullptr, m_cmKernelMap["2xScaling"]->m_cmDev, m_cmKernelMap["2xScaling"]->m_cmQueue, m_cmKernelMap["2xScaling"]->m_cmTask, nullptr);
}
m_cmKernelMap["I_32X32"]->SetupCurbe(curbe);
CODECHAL_MEDIA_STATE_TYPE encFunctionType = CODECHAL_MEDIA_STATE_32x32_PU_MODE_DECISION;
CODECHAL_DEBUG_TOOL(
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpMDFCurbe(
encFunctionType,
(uint8_t *)curbe, sizeof(*curbe)));
)
m_cmKernelMap["I_32X32"]->AllocateSurfaces(&I32x32Params);
//No need to wait for task finished
m_cmEvent = CM_NO_EVENT;
m_cmKernelMap["I_32X32"]->CreateAndDispatchKernel(m_cmEvent, false, (!m_singleTaskPhaseSupported));
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::Encode16x16SadPuComputationKernel()
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_FUNCTION_ENTER;
PerfTagSetting perfTag;
CODECHAL_ENCODE_SET_PERFTAG_INFO(perfTag, CODECHAL_ENCODE_PERFTAG_CALL_16X16_SAD);
// Setup CURBE
CODECHAL_ENC_HEVC_I_16x16_SAD_CURBE_G9 cmd, *curbe = &cmd;
MOS_ZeroMemory(curbe, sizeof(*curbe));
curbe->DW0.FrameWidth = MOS_ALIGN_CEIL(m_frameWidth, CODECHAL_MACROBLOCK_WIDTH);
curbe->DW0.FrameHeight = MOS_ALIGN_CEIL(m_frameHeight, CODECHAL_MACROBLOCK_HEIGHT);
curbe->DW1.Log2MaxCUSize = m_hevcSeqParams->log2_max_coding_block_size_minus3 + 3;
curbe->DW1.Log2MinCUSize = m_hevcSeqParams->log2_min_coding_block_size_minus3 + 3;
curbe->DW1.Log2MinTUSize = m_hevcSeqParams->log2_min_transform_block_size_minus2 + 2;
curbe->DW1.EnableIntraEarlyExit = (m_hevcSeqParams->TargetUsage == 0x04) ? ((m_hevcPicParams->CodingType == I_TYPE) ? 0 : 1) : 0;
curbe->DW2.SliceType = PicCodingTypeToSliceType(m_hevcPicParams->CodingType);
curbe->DW2.SimFlagForInter = false;
if (m_hevcPicParams->CodingType != I_TYPE)
{
curbe->DW2.FASTSurveillanceFlag = m_hevcSeqParams->bVideoSurveillance;
}
IFrameKernelParams I16x16SadParams;
MOS_ZeroMemory(&I16x16SadParams, sizeof(I16x16SadParams));
I16x16SadParams.m_cmSurfCurrY = &m_rawSurfaceToEnc->OsResource;
I16x16SadParams.m_cmSurfPer32x32PUDataOut = &m_32x32PuOutputData.sResource;
I16x16SadParams.m_cmSurfSAD16x16 = &m_sad16x16Pu.sResource;
I16x16SadParams.m_cmSurfSliceMap = &m_sliceMapSurface.OsResource;
I16x16SadParams.m_cmSurfSIF = &m_simplestIntraSurface.OsResource;
//in case I_32x32 isn't initialized when using FastIntraMode for per-frame control (I: enable; P/B: disable)
if (m_cmKernelMap.count("I_32X32") == 0)
{
m_cmKernelMap["I_32X32"] = new CMRTKernelI32x32UMD();
m_cmKernelMap["I_32X32"]->Init(nullptr, m_cmKernelMap["2xScaling"]->m_cmDev, m_cmKernelMap["2xScaling"]->m_cmQueue, m_cmKernelMap["2xScaling"]->m_cmTask, nullptr);
}
if (m_cmKernelMap.count("I_16X16_SAD") == 0)
{
m_cmKernelMap["I_16X16_SAD"] = new CMRTKernelI16x16SadUMD();
m_cmKernelMap["I_16X16_SAD"]->Init(nullptr, m_cmKernelMap["2xScaling"]->m_cmDev, m_cmKernelMap["2xScaling"]->m_cmQueue, m_cmKernelMap["2xScaling"]->m_cmTask, m_cmKernelMap["I_32X32"]->m_cmProgram);
}
m_cmKernelMap["I_16X16_SAD"]->SetupCurbe(curbe);
CODECHAL_MEDIA_STATE_TYPE encFunctionType = CODECHAL_MEDIA_STATE_16x16_PU_SAD;
CODECHAL_DEBUG_TOOL(
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpMDFCurbe(
encFunctionType,
(uint8_t *)curbe, sizeof(*curbe)));
)
m_cmKernelMap["I_16X16_SAD"]->AllocateSurfaces(&I16x16SadParams);
//No need to wait for task finished
m_cmEvent = CM_NO_EVENT;
m_cmKernelMap["I_16X16_SAD"]->CreateAndDispatchKernel(m_cmEvent, false, (!m_singleTaskPhaseSupported));
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::Encode16x16PuModeDecisionKernel()
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_FUNCTION_ENTER;
PerfTagSetting perfTag;
CODECHAL_ENCODE_SET_PERFTAG_INFO(perfTag, CODECHAL_ENCODE_PERFTAG_CALL_16X16_PU_MD);
// Setup CURBE
int32_t sliceQp = CalSliceQp();
uint8_t sliceType = PicCodingTypeToSliceType(m_hevcPicParams->CodingType);
double lambdaScaleFactor = 0.46 + sliceQp - 22;
if (lambdaScaleFactor < 0)
{
lambdaScaleFactor = 0.46;
}
if (lambdaScaleFactor > 15)
{
lambdaScaleFactor = 15;
}
double squredLambda = lambdaScaleFactor * pow(2.0, ((double)sliceQp-12.0)/6);
m_fixedPointLambdaForLuma = (uint32_t)(squredLambda * (1<<10));
double lambdaScalingFactor = 1.0;
double qpLambda = m_qpLambdaMd[sliceType][sliceQp];
double squaredQpLambda = qpLambda * qpLambda;
m_fixedPointLambdaForChroma = (uint32_t)(lambdaScalingFactor * squaredQpLambda * (1<<10));
LoadCosts(sliceType, (uint8_t)sliceQp, INTRA_TRANSFORM_HAAR);
CODECHAL_FEI_HEVC_I_16x16_PU_MODEDECISION_CURBE_G9 cmd, *curbe = &cmd;
MOS_ZeroMemory(curbe, sizeof(*curbe));
uint32_t log2MaxCUSize = m_hevcSeqParams->log2_max_coding_block_size_minus3 + 3;
curbe->DW0.FrameWidth = MOS_ALIGN_CEIL(m_frameWidth, CODECHAL_MACROBLOCK_WIDTH);
curbe->DW0.FrameHeight = MOS_ALIGN_CEIL(m_frameHeight, CODECHAL_MACROBLOCK_HEIGHT);
curbe->DW1.Log2MaxCUSize = log2MaxCUSize;
curbe->DW1.Log2MinCUSize = m_hevcSeqParams->log2_min_coding_block_size_minus3 + 3;
curbe->DW1.Log2MinTUSize = m_hevcSeqParams->log2_min_transform_block_size_minus2 + 2;
curbe->DW1.SliceQp = sliceQp;
curbe->DW2.FixedPoint_Lambda_PredMode = m_fixedPointLambdaForChroma;
curbe->DW3.LambdaScalingFactor = 1;
curbe->DW3.SliceType = sliceType;
curbe->DW3.EnableIntraEarlyExit = (m_hevcSeqParams->TargetUsage == 0x04) ? ((m_hevcPicParams->CodingType == I_TYPE) ? 0 : 1) : 0;
curbe->DW3.BRCEnable = m_encodeParams.bMbQpDataEnabled || m_brcEnabled;
curbe->DW3.LCUBRCEnable = m_encodeParams.bMbQpDataEnabled || m_lcuBrcEnabled;
curbe->DW3.ROIEnable = (m_hevcPicParams->NumROI > 0);
curbe->DW3.FASTSurveillanceFlag = (m_hevcPicParams->CodingType == I_TYPE) ? 0 : m_hevcSeqParams->bVideoSurveillance;
curbe->DW3.EnableRollingIntra = m_hevcPicParams->bEnableRollingIntraRefresh;
//Given only Column Rolling I is supported, if in future, Row Rolling I support to be added, then, need to make change here as per Kernel
curbe->DW3.IntraRefreshEn = m_hevcPicParams->bEnableRollingIntraRefresh;
curbe->DW3.HalfUpdateMixedLCU = 0;
curbe->DW3.EnableQualityImprovement = m_encodeParams.bQualityImprovementEnable;
curbe->DW4.PenaltyForIntra8x8NonDCPredMode = 0;
curbe->DW4.IntraComputeType = 1;
curbe->DW4.AVCIntra8x8Mask = 0;
curbe->DW4.IntraSadAdjust = 2;
double lambdaMd = sqrt(0.57*pow(2.0, ((double)sliceQp-12.0)/3));
squredLambda = lambdaMd * lambdaMd;
uint32_t newLambda = (uint32_t)(squredLambda*(1<<10));
curbe->DW5.FixedPoint_Lambda_CU_Mode_for_Cost_Calculation = newLambda;
curbe->DW6.ScreenContentFlag = m_hevcPicParams->bScreenContent;
curbe->DW7.ModeCostIntraNonPred = m_modeCost[0];
curbe->DW7.ModeCostIntra16x16 = m_modeCost[1];
curbe->DW7.ModeCostIntra8x8 = m_modeCost[2];
curbe->DW7.ModeCostIntra4x4 = m_modeCost[3];
curbe->DW8.FixedPoint_Lambda_CU_Mode_for_Luma = m_fixedPointLambdaForLuma;
if (m_hevcPicParams->bEnableRollingIntraRefresh)
{
curbe->DW9.IntraRefreshMBNum = m_hevcPicParams->IntraInsertionLocation;
curbe->DW9.IntraRefreshQPDelta = m_hevcPicParams->QpDeltaForInsertedIntra;
curbe->DW9.IntraRefreshUnitInMB = m_hevcPicParams->IntraInsertionSize;
}
curbe->DW10.SimplifiedFlagForInter = 0;
if (m_encodeParams.bReportStatisticsEnabled)
{
curbe->DW10.HaarTransformMode = true;
}
else
{
curbe->DW10.HaarTransformMode = (m_hevcPicParams->CodingType == I_TYPE) ? false : true;
}
IFrameKernelParams I16x16ModeParams;
MOS_ZeroMemory(&I16x16ModeParams, sizeof(I16x16ModeParams));
I16x16ModeParams.m_cmSurfCurrY = &m_rawSurfaceToEnc->OsResource;
I16x16ModeParams.m_cmSurfSAD16x16 = &m_sad16x16Pu.sResource;
I16x16ModeParams.m_cmSurfPOCDbuf = &m_resMbCodeSurface;
I16x16ModeParams.m_bufSize = m_mbCodeSize - m_mvOffset;
I16x16ModeParams.m_bufOffset = m_mvOffset;
I16x16ModeParams.m_cmSurfPer32x32PUDataOut = &m_32x32PuOutputData.sResource;
I16x16ModeParams.m_cmSurfVMEMode = &m_vme8x8Mode.sResource;
I16x16ModeParams.m_cmSurfSliceMap = &m_sliceMapSurface.OsResource;
I16x16ModeParams.m_cmSurfSIF = &m_simplestIntraSurface.OsResource;
I16x16ModeParams.m_cmSurfCombinedQP = (MOS_RESOURCE*)m_allocator->GetResource(m_standard, brcInputForEncKernel);
I16x16ModeParams.m_cmLCUQPSurf = &m_lcuQP.OsResource;
I16x16ModeParams.m_cmBRCConstSurf = &m_brcBuffers.sBrcConstantDataBuffer[m_currRecycledBufIdx].OsResource;
if (m_cmKernelMap.count("I_16X16_MODE") == 0)
{
m_cmKernelMap["I_16X16_MODE"] = new CMRTKernelI16x16ModeUMD();
m_cmKernelMap["I_16X16_MODE"]->Init(nullptr, m_cmKernelMap["2xScaling"]->m_cmDev, m_cmKernelMap["2xScaling"]->m_cmQueue, m_cmKernelMap["2xScaling"]->m_cmTask, m_cmKernelMap["I_32X32"]->m_cmProgram);
}
m_cmKernelMap["I_16X16_MODE"]->SetupCurbe(curbe);
CODECHAL_MEDIA_STATE_TYPE encFunctionType = CODECHAL_MEDIA_STATE_16x16_PU_MODE_DECISION;
CODECHAL_DEBUG_TOOL(
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpMDFCurbe(
encFunctionType,
(uint8_t *)curbe, sizeof(*curbe)));
)
m_cmKernelMap["I_16X16_MODE"]->AllocateSurfaces(&I16x16ModeParams);
//No need to wait for task finished
m_cmEvent = CM_NO_EVENT;
m_cmKernelMap["I_16X16_MODE"]->CreateAndDispatchKernel(m_cmEvent, false, (!m_singleTaskPhaseSupported));
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::Encode8x8PUKernel()
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_FUNCTION_ENTER;
PerfTagSetting perfTag;
CODECHAL_ENCODE_SET_PERFTAG_INFO(perfTag, CODECHAL_ENCODE_PERFTAG_CALL_8X8_PU);
// Setup CURBE
uint32_t log2MaxCUSize = m_hevcSeqParams->log2_max_coding_block_size_minus3 + 3;
CODECHAL_FEI_HEVC_I_8x8_PU_CURBE_G9 cmd, *curbe = &cmd;
MOS_ZeroMemory(curbe, sizeof(*curbe));
curbe->DW0.FrameWidth = MOS_ALIGN_CEIL(m_frameWidth, CODECHAL_MACROBLOCK_WIDTH);
curbe->DW0.FrameHeight = MOS_ALIGN_CEIL(m_frameHeight, CODECHAL_MACROBLOCK_HEIGHT);
curbe->DW1.SliceType = PicCodingTypeToSliceType(m_hevcPicParams->CodingType);
curbe->DW1.PuType = 2; // 8x8
curbe->DW1.DcFilterFlag = true;
curbe->DW1.AngleRefineFlag = true;
curbe->DW1.LCUType = (log2MaxCUSize==6)? 0 : 1;
curbe->DW1.ScreenContentFlag = m_hevcPicParams->bScreenContent;
curbe->DW1.EnableIntraEarlyExit = (m_hevcSeqParams->TargetUsage == 0x04) ? ((m_hevcPicParams->CodingType == I_TYPE) ? 0 : 1) : 0;
curbe->DW1.EnableDebugDump = false;
curbe->DW1.BRCEnable = m_encodeParams.bMbQpDataEnabled || m_brcEnabled;
curbe->DW1.LCUBRCEnable = m_encodeParams.bMbQpDataEnabled || m_lcuBrcEnabled;
curbe->DW1.ROIEnable = (m_hevcPicParams->NumROI > 0);
curbe->DW1.FASTSurveillanceFlag = (m_hevcPicParams->CodingType == I_TYPE) ? 0 : m_hevcSeqParams->bVideoSurveillance;
curbe->DW1.EnableQualityImprovement = m_encodeParams.bQualityImprovementEnable;
curbe->DW1.QPValue = CalSliceQp();
if (m_hevcPicParams->bEnableRollingIntraRefresh)
{
curbe->DW1.EnableRollingIntra = true;
curbe->DW1.IntraRefreshEn = true;
curbe->DW1.HalfUpdateMixedLCU = 0;
curbe->DW5.IntraRefreshMBNum = m_hevcPicParams->IntraInsertionLocation;
curbe->DW5.IntraRefreshQPDelta = m_hevcPicParams->QpDeltaForInsertedIntra;
curbe->DW5.IntraRefreshUnitInMB = m_hevcPicParams->IntraInsertionSize;
int32_t qp = CalSliceQp();
curbe->DW1.QPValue = (uint32_t)qp;
}
curbe->DW2.LumaLambda = m_fixedPointLambdaForLuma;
curbe->DW3.ChromaLambda = m_fixedPointLambdaForChroma;
if (m_encodeParams.bReportStatisticsEnabled)
{
curbe->DW4.HaarTransformFlag = true;
}
else
{
curbe->DW4.HaarTransformFlag = (m_hevcPicParams->CodingType == I_TYPE) ? false : true;
}
curbe->DW4.SimplifiedFlagForInter = false;
IFrameKernelParams I8x8Params;
MOS_ZeroMemory(&I8x8Params, sizeof(I8x8Params));
I8x8Params.m_cmSurfCurrY = &m_rawSurfaceToEnc->OsResource;
I8x8Params.m_cmSurfSliceMap = &m_sliceMapSurface.OsResource;
I8x8Params.m_cmSurfVMEMode = &m_vme8x8Mode.sResource;
I8x8Params.m_cmSurfMode = &m_intraMode.sResource;
I8x8Params.m_cmSurfCombinedQP = (MOS_RESOURCE*)m_allocator->GetResource(m_standard, brcInputForEncKernel);
I8x8Params.m_cmSurfSIF = &m_simplestIntraSurface.OsResource;
I8x8Params.m_cmLCUQPSurf = &m_lcuQP.OsResource;
I8x8Params.m_cmBRCConstSurf = &m_brcBuffers.sBrcConstantDataBuffer[m_currRecycledBufIdx].OsResource;
if (m_cmKernelMap.count("I_8X8") == 0)
{
m_cmKernelMap["I_8X8"] = new CMRTKernelI8x8UMD();
m_cmKernelMap["I_8X8"]->Init(nullptr, m_cmKernelMap["2xScaling"]->m_cmDev, m_cmKernelMap["2xScaling"]->m_cmQueue, m_cmKernelMap["2xScaling"]->m_cmTask, m_cmKernelMap["I_32X32"]->m_cmProgram);
}
m_cmKernelMap["I_8X8"]->SetupCurbe(curbe);
CODECHAL_MEDIA_STATE_TYPE encFunctionType = CODECHAL_MEDIA_STATE_8x8_PU;
CODECHAL_DEBUG_TOOL(
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpMDFCurbe(
encFunctionType,
(uint8_t *)curbe, sizeof(*curbe)));
)
m_cmKernelMap["I_8X8"]->AllocateSurfaces(&I8x8Params);
//No need to wait for task finished
m_cmEvent = CM_NO_EVENT;
m_cmKernelMap["I_8X8"]->CreateAndDispatchKernel(m_cmEvent, false, (!m_singleTaskPhaseSupported));
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::Encode8x8PUFMODEKernel()
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_FUNCTION_ENTER;
PerfTagSetting perfTag;
CODECHAL_ENCODE_SET_PERFTAG_INFO(perfTag, CODECHAL_ENCODE_PERFTAG_CALL_8X8_FMODE);
// Setup CURBE
int32_t qp = CalSliceQp();
uint32_t sliceQp = (uint32_t)qp;
uint32_t log2MaxCUSize = m_hevcSeqParams->log2_max_coding_block_size_minus3 + 3;
CODECHAL_FEI_HEVC_I_8x8_PU_FMODE_CURBE_G9 cmd, *curbe = &cmd;
MOS_ZeroMemory(curbe, sizeof(*curbe));
curbe->DW0.FrameWidth = MOS_ALIGN_CEIL(m_frameWidth, CODECHAL_MACROBLOCK_WIDTH);
curbe->DW0.FrameHeight = MOS_ALIGN_CEIL(m_frameHeight, CODECHAL_MACROBLOCK_HEIGHT);
curbe->DW1.SliceType = PicCodingTypeToSliceType(m_hevcPicParams->CodingType);
curbe->DW1.PuType = 2;
curbe->DW1.PakReordingFlag = (m_hevcPicParams->CodingType == I_TYPE) ? true : false;
curbe->DW1.LCUType = (log2MaxCUSize == 6)? 0 : 1;
curbe->DW1.ScreenContentFlag = m_hevcPicParams->bScreenContent;
curbe->DW1.EnableIntraEarlyExit = (m_hevcSeqParams->TargetUsage == 0x04) ? ((m_hevcPicParams->CodingType == I_TYPE) ? 0 : 1) : 0;
curbe->DW1.EnableDebugDump = false;
curbe->DW1.BRCEnable = m_encodeParams.bMbQpDataEnabled || m_brcEnabled;
curbe->DW1.LCUBRCEnable = m_encodeParams.bMbQpDataEnabled || m_lcuBrcEnabled;
curbe->DW1.ROIEnable = (m_hevcPicParams->NumROI > 0);
curbe->DW1.FASTSurveillanceFlag = (m_hevcPicParams->CodingType == I_TYPE) ? 0 : m_hevcSeqParams->bVideoSurveillance;
curbe->DW1.EnableRollingIntra = m_hevcPicParams->bEnableRollingIntraRefresh;
curbe->DW1.IntraRefreshEn = m_hevcPicParams->bEnableRollingIntraRefresh;
curbe->DW1.HalfUpdateMixedLCU = 0;
curbe->DW1.EnableQualityImprovement = m_encodeParams.bQualityImprovementEnable;
curbe->DW2.LambdaForLuma = m_fixedPointLambdaForLuma;
if (m_hevcPicParams->CodingType != I_TYPE ||
m_encodeParams.bReportStatisticsEnabled)
{
float hadBias = 2.0f;
double lambdaMd = m_qpLambdaMd[curbe->DW1.SliceType][sliceQp];
lambdaMd = lambdaMd * hadBias;
curbe->DW3.LambdaForDistCalculation = (uint32_t)(lambdaMd*(1<<10));
}
curbe->DW4.ModeCostFor8x8PU_TU8 = 0;
curbe->DW5.ModeCostFor8x8PU_TU4 = 0;
curbe->DW6.SATD16x16PuThreshold = MOS_MAX(200 * ((int32_t)sliceQp - 12), 0);
curbe->DW6.BiasFactorToward8x8 = (m_hevcPicParams->bScreenContent) ? 1024 : 1126 + 102;
curbe->DW7.Qp = sliceQp;
curbe->DW7.QpForInter = 0;
curbe->DW8.SimplifiedFlagForInter = false;
curbe->DW8.EnableStatsDataDump = m_encodeParams.bReportStatisticsEnabled;
// KBLControlFlag determines the PAK OBJ format as it varies from Gen9 to Gen9.5+
curbe->DW8.KBLControlFlag = UsePlatformControlFlag();
curbe->DW9.IntraRefreshMBNum = m_hevcPicParams->IntraInsertionLocation;
curbe->DW9.IntraRefreshQPDelta = m_hevcPicParams->QpDeltaForInsertedIntra;
curbe->DW9.IntraRefreshUnitInMB = m_hevcPicParams->IntraInsertionSize;
IFrameKernelParams I8x8ModeParams;
MOS_ZeroMemory(&I8x8ModeParams, sizeof(I8x8ModeParams));
I8x8ModeParams.m_cmSurfPOCDbuf = &m_resMbCodeSurface;
I8x8ModeParams.m_bufSize = m_mbCodeSize - m_mvOffset;
I8x8ModeParams.m_bufOffset = m_mvOffset;
I8x8ModeParams.m_cmSurfVMEMode = &m_vme8x8Mode.sResource;
I8x8ModeParams.m_cmSurfMode = &m_intraMode.sResource;
I8x8ModeParams.m_cmSurfSliceMap = &m_sliceMapSurface.OsResource;
I8x8ModeParams.m_cmSurfIntraDist = &m_intraDist.sResource;
I8x8ModeParams.m_cmSurfSIF = &m_simplestIntraSurface.OsResource;
I8x8ModeParams.m_cmSurfCombinedQP = (MOS_RESOURCE*)m_allocator->GetResource(m_standard, brcInputForEncKernel);
I8x8ModeParams.m_cmLCUQPSurf = &m_lcuQP.OsResource;
I8x8ModeParams.m_cmBRCConstSurf = &m_brcBuffers.sBrcConstantDataBuffer[m_currRecycledBufIdx].OsResource;
if (m_cmKernelMap.count("I_8X8_MODE") == 0)
{
m_cmKernelMap["I_8X8_MODE"] = new CMRTKernelI8x8ModeUMD();
m_cmKernelMap["I_8X8_MODE"]->Init(nullptr, m_cmKernelMap["2xScaling"]->m_cmDev, m_cmKernelMap["2xScaling"]->m_cmQueue, m_cmKernelMap["2xScaling"]->m_cmTask, m_cmKernelMap["I_32X32"]->m_cmProgram);
}
m_cmKernelMap["I_8X8_MODE"]->SetupCurbe(curbe);
CODECHAL_MEDIA_STATE_TYPE encFunctionType = CODECHAL_MEDIA_STATE_8x8_PU_FMODE;
CODECHAL_DEBUG_TOOL(
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpMDFCurbe(
encFunctionType,
(uint8_t *)curbe, sizeof(*curbe)));
)
m_cmKernelMap["I_8X8_MODE"]->AllocateSurfaces(&I8x8ModeParams);
//No need to wait for task finished
m_cmEvent = CM_NO_EVENT;
m_cmKernelMap["I_8X8_MODE"]->CreateAndDispatchKernel(m_cmEvent, false, ((!m_singleTaskPhaseSupported)|| m_lastTaskInPhase));
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::Encode32X32BIntraCheckKernel()
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_FUNCTION_ENTER;
PerfTagSetting perfTag;
CODECHAL_ENCODE_SET_PERFTAG_INFO(perfTag, CODECHAL_ENCODE_PERFTAG_CALL_32X32_B_IC);
// Setup CURBE
if (m_pictureCodingType == P_TYPE)
{
CalcLambda(CODECHAL_ENCODE_HEVC_P_SLICE, INTRA_TRANSFORM_HAAR);
}
else
{
CalcLambda(CODECHAL_ENCODE_HEVC_B_SLICE, INTRA_TRANSFORM_HAAR);
}
int32_t sliceQp = CalSliceQp();
double lambdaScalingFactor = 1.0;
double qpLambda = m_qpLambdaMd[CODECHAL_ENCODE_HEVC_I_SLICE][sliceQp];
double squaredQpLambda = qpLambda * qpLambda;
m_fixedPointLambda = (uint32_t)(lambdaScalingFactor * squaredQpLambda * (1<<10));
CODECHAL_FEI_HEVC_B_32x32_PU_INTRA_CHECK_CURBE_G9 cmd, *curbe = &cmd;
MOS_ZeroMemory(curbe, sizeof(*curbe));
curbe->DW0.FrameWidth = MOS_ALIGN_CEIL(m_frameWidth, CODECHAL_MACROBLOCK_WIDTH);
curbe->DW0.FrameHeight = MOS_ALIGN_CEIL(m_frameHeight, CODECHAL_MACROBLOCK_HEIGHT);
curbe->DW1.EnableDebugDump = false;
curbe->DW1.EnableIntraEarlyExit = (m_hevcPicParams->CodingType == I_TYPE) ? 0 : 1;
curbe->DW1.Flags = 0;
curbe->DW1.Log2MinTUSize = m_hevcSeqParams->log2_min_transform_block_size_minus2 + 2;
curbe->DW1.SliceType = m_hevcSliceParams->slice_type;
curbe->DW1.HMEEnable = 0;
curbe->DW1.FASTSurveillanceFlag = (m_hevcPicParams->CodingType == I_TYPE) ? 0 : m_hevcSeqParams->bVideoSurveillance;
curbe->DW2.QpMultiplier = 100;
curbe->DW2.QpValue = 0; // MBZ
PBFrameKernelParams PB32x32Params;
MOS_ZeroMemory(&PB32x32Params, sizeof(PB32x32Params));
PB32x32Params.m_cmSurfPer32x32ICOut = &m_32x32PuOutputData.sResource;
PB32x32Params.m_cmSurfCurrY = &m_rawSurfaceToEnc->OsResource;
PB32x32Params.m_cmSurfCurrY2 = &m_scaled2xSurface.OsResource;
PB32x32Params.m_cmSurfSliceMap = &m_sliceMapSurface.OsResource;
PB32x32Params.m_cmSurfSIF = &m_simplestIntraSurface.OsResource;
PB32x32Params.m_cmLCUQPSurf = &m_lcuQP.OsResource;
if (m_cmKernelMap.count("PB_32x32") == 0)
{
m_cmKernelMap["PB_32x32"] = new CMRTKernelPB32x32UMD();
m_cmKernelMap["PB_32x32"]->Init(nullptr, m_cmKernelMap["2xScaling"]->m_cmDev, m_cmKernelMap["2xScaling"]->m_cmQueue, m_cmKernelMap["2xScaling"]->m_cmTask, nullptr);
}
m_cmKernelMap["PB_32x32"]->SetupCurbe(curbe);
CODECHAL_MEDIA_STATE_TYPE encFunctionType = CODECHAL_MEDIA_STATE_32x32_B_INTRA_CHECK;
CODECHAL_DEBUG_TOOL(
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpMDFCurbe(
encFunctionType,
(uint8_t *)curbe, sizeof(*curbe)));
)
m_cmKernelMap["PB_32x32"]->AllocateSurfaces(&PB32x32Params);
//No need to wait for task finished
m_cmEvent = CM_NO_EVENT;
m_cmKernelMap["PB_32x32"]->CreateAndDispatchKernel(m_cmEvent, false, (!m_singleTaskPhaseSupported));
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::Encode8x8BPakKernel(
PCODECHAL_FEI_HEVC_B_MB_ENC_CURBE_G9 pEncBCurbe)
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_FUNCTION_ENTER;
CODECHAL_ENCODE_CHK_NULL_RETURN(pEncBCurbe);
PerfTagSetting perfTag;
CODECHAL_ENCODE_SET_PERFTAG_INFO(perfTag, CODECHAL_ENCODE_PERFTAG_CALL_PAK_KERNEL);
//Setup CURBE
CODECHAL_FEI_HEVC_B_PAK_CURBE_G9 cmd, *curbe = &cmd;
MOS_ZeroMemory(curbe, sizeof(*curbe));
curbe->DW0.FrameWidth = MOS_ALIGN_CEIL(m_frameWidth, CODECHAL_MACROBLOCK_WIDTH);
curbe->DW0.FrameHeight = MOS_ALIGN_CEIL(m_frameHeight, CODECHAL_MACROBLOCK_HEIGHT);
curbe->DW1.MaxVmvR = pEncBCurbe->DW44.MaxVmvR;
curbe->DW1.Qp = pEncBCurbe->DW13.QpPrimeY;
curbe->DW2.BrcEnable = pEncBCurbe->DW36.BRCEnable;
curbe->DW2.LcuBrcEnable = pEncBCurbe->DW36.LCUBRCEnable;
curbe->DW2.ScreenContent = pEncBCurbe->DW47.ScreenContentFlag;
curbe->DW2.SimplestIntraEnable = pEncBCurbe->DW47.SkipIntraKrnFlag;
curbe->DW2.SliceType = pEncBCurbe->DW4.SliceType;
curbe->DW2.EnableWA = 0;
curbe->DW2.ROIEnable = (m_hevcPicParams->NumROI > 0);
curbe->DW2.FASTSurveillanceFlag = (m_hevcPicParams->CodingType == I_TYPE) ? 0 : m_hevcSeqParams->bVideoSurveillance;
// KBLControlFlag determines the PAK OBJ format as it varies from Gen9 to Gen9.5+
curbe->DW2.KBLControlFlag = UsePlatformControlFlag();
curbe->DW2.EnableRollingIntra = m_hevcPicParams->bEnableRollingIntraRefresh;
curbe->DW2.EnableQualityImprovement = m_encodeParams.bQualityImprovementEnable;
curbe->DW3.IntraRefreshQPDelta = m_hevcPicParams->QpDeltaForInsertedIntra;
curbe->DW3.IntraRefreshMBNum = m_hevcPicParams->IntraInsertionLocation;
curbe->DW3.IntraRefreshUnitInMB = m_hevcPicParams->IntraInsertionSize;
PBFrameKernelParams PB8x8PakParams;
MOS_ZeroMemory(&PB8x8PakParams, sizeof(PB8x8PakParams));
PB8x8PakParams.m_cmSurfPOCDbuf = &m_resMbCodeSurface;
PB8x8PakParams.m_bufSize = m_mbCodeSize - m_mvOffset;
PB8x8PakParams.m_bufOffset = m_mvOffset;
PB8x8PakParams.m_cmSurfSliceMap = &m_sliceMapSurface.OsResource;
PB8x8PakParams.m_cmSurfCombinedQP = (MOS_RESOURCE*)m_allocator->GetResource(m_standard, brcInputForEncKernel);
PB8x8PakParams.m_cmLCUQPSurf = &m_lcuQP.OsResource;
PB8x8PakParams.m_cmBRCConstSurf = &m_brcBuffers.sBrcConstantDataBuffer[m_currRecycledBufIdx].OsResource;
PB8x8PakParams.m_cmSurfMVIndex = &m_mvIndex.sResource;
PB8x8PakParams.m_cmSurfMVPred = &m_mvpIndex.sResource;
if (m_cmKernelMap.count("PB_8x8_PAK") == 0)
{
m_cmKernelMap["PB_8x8_PAK"] = new CMRTKernelPB8x8PakUMD();
m_cmKernelMap["PB_8x8_PAK"]->Init(nullptr, m_cmKernelMap["2xScaling"]->m_cmDev, m_cmKernelMap["2xScaling"]->m_cmQueue, m_cmKernelMap["2xScaling"]->m_cmTask, m_cmKernelMap["PB_32x32"]->m_cmProgram);
}
m_cmKernelMap["PB_8x8_PAK"]->SetupCurbe(curbe);
CODECHAL_MEDIA_STATE_TYPE encFunctionType = CODECHAL_MEDIA_STATE_HEVC_B_PAK;
CODECHAL_DEBUG_TOOL(
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpMDFCurbe(
encFunctionType,
(uint8_t *)curbe, sizeof(*curbe)));
)
m_cmKernelMap["PB_8x8_PAK"]->AllocateSurfaces(&PB8x8PakParams);
//No need to wait for task finished
m_cmEvent = CM_NO_EVENT;
m_cmKernelMap["PB_8x8_PAK"]->CreateAndDispatchKernel(m_cmEvent, false, ((!m_singleTaskPhaseSupported)|| m_lastTaskInPhase));
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::Encode8x8PBMbEncKernel()
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_FUNCTION_ENTER;
PerfTagSetting perfTag;
CODECHAL_ENCODE_SET_PERFTAG_INFO(perfTag, CODECHAL_ENCODE_PERFTAG_CALL_MBENC_KERNEL);
int32_t sliceQp = CalSliceQp();
uint8_t sliceType = PicCodingTypeToSliceType(m_pictureCodingType);
if (m_feiPicParams->FastIntraMode)
{
// When TU=7, lambda is not computed in the 32x32 MD stage for it is skipped.
CalcLambda(sliceType, INTRA_TRANSFORM_HAAR);
}
LoadCosts(sliceType, (uint8_t)sliceQp, INTRA_TRANSFORM_REGULAR);
uint8_t mbCodeIdxForTempMVP = 0xFF;
if(m_pictureCodingType != I_TYPE)
{
if (m_hevcPicParams->CollocatedRefPicIndex != 0xFF && m_hevcPicParams->CollocatedRefPicIndex < CODEC_MAX_NUM_REF_FRAME_HEVC)
{
uint8_t FrameIdx = m_hevcPicParams->RefFrameList[m_hevcPicParams->CollocatedRefPicIndex].FrameIdx;
mbCodeIdxForTempMVP = m_refList[FrameIdx]->ucScalingIdx;
}
if (mbCodeIdxForTempMVP == 0xFF && m_hevcSliceParams->slice_temporal_mvp_enable_flag)
{
// Temporal reference MV index is invalid and so disable the temporal MVP
CODECHAL_ENCODE_ASSERT(false);
m_hevcSliceParams->slice_temporal_mvp_enable_flag = false;
}
}
else
{
mbCodeIdxForTempMVP = 0;
}
CODECHAL_ENCODE_CHK_STATUS_RETURN(GenerateWalkingControlRegion());
//Setup CURBE
uint8_t forwardTransformThd[7] = { 0 };
CalcForwardCoeffThd(forwardTransformThd, sliceQp);
uint32_t curbeSize = 0;
void *defaultCurbe = (void *)GetDefaultCurbeEncBKernel(curbeSize);
CODECHAL_ENCODE_ASSERT(defaultCurbe);
CODECHAL_FEI_HEVC_B_MB_ENC_CURBE_G9 cmd, *curbe = &cmd;
CODECHAL_ENCODE_CHK_STATUS_RETURN(MOS_SecureMemcpy(curbe, sizeof(cmd), defaultCurbe, curbeSize));
bool transform_8x8_mode_flag = true;
uint32_t SearchPath = (m_feiPicParams->SearchWindow == 5) ? 2 : 1; // 2 means full search, 1 means diamand search
uint32_t LenSP = m_feiPicParams->LenSP;
uint32_t RefWidth = (m_feiPicParams->RefWidth < 20) ? 20 : m_feiPicParams->RefWidth;
uint32_t RefHeight = (m_feiPicParams->RefHeight < 20) ? 20 : m_feiPicParams->RefHeight;
switch (m_feiPicParams->SearchWindow)
{
case 0:
// not use predefined search window
if ((m_feiPicParams->SearchPath != 0) && (m_feiPicParams->SearchPath != 1) && (m_feiPicParams->SearchPath != 2))
{
CODECHAL_ENCODE_ASSERTMESSAGE("Invalid picture FEI MB ENC input SearchPath for SearchWindow=0 case!!!.");
eStatus = MOS_STATUS_INVALID_PARAMETER;
return eStatus;
}
SearchPath = m_feiPicParams->SearchPath;
if(((RefWidth * RefHeight) > 2048) || (RefWidth > 64) || (RefHeight > 64))
{
CODECHAL_ENCODE_ASSERTMESSAGE("Invalid picture FEI MB ENC input RefWidth/RefHeight size for SearchWindow=0 case!!!.");
eStatus = MOS_STATUS_INVALID_PARAMETER;
return eStatus;
}
break;
case 1:
// Tiny SUs 24x24 window
RefWidth = 24;
RefHeight = 24;
LenSP = 4;
break;
case 2:
// Small SUs 28x28 window
RefWidth = 28;
RefHeight = 28;
LenSP = 9;
break;
case 3:
// Diamond SUs 48x40 window
RefWidth = 48;
RefHeight = 40;
LenSP = 16;
break;
case 4:
// Large Diamond SUs 48x40 window
RefWidth = 48;
RefHeight = 40;
LenSP = 32;
break;
case 5:
// Exhaustive SUs 48x40 window
RefWidth = 48;
RefHeight = 40;
LenSP = 48;
if (m_hevcSeqParams->TargetUsage != 7)
{
if (m_pictureCodingType == B_TYPE)
{
LenSP = 48;
} else {
LenSP = 57;
}
} else {
LenSP = 25;
}
break;
default:
CODECHAL_ENCODE_ASSERTMESSAGE("Invalid picture FEI MB ENC SearchWindow value for HEVC FEI on SKL!!!.");
eStatus = MOS_STATUS_INVALID_PARAMETER;
return eStatus;
}
if((m_pictureCodingType == B_TYPE) && (curbe->DW3.BMEDisableFBR == 0))
{
if(RefWidth > 32)
{
RefWidth = 32;
}
if(RefHeight > 32)
{
RefHeight = 32;
}
}
curbe->DW0.AdaptiveEn = m_feiPicParams->AdaptiveSearch;
curbe->DW0.T8x8FlagForInterEn = transform_8x8_mode_flag;
curbe->DW2.PicWidth = m_picWidthInMb;
curbe->DW2.LenSP = LenSP;
curbe->DW3.SrcAccess = curbe->DW3.RefAccess = 0;
if (m_feiPicParams->FastIntraMode)
{
curbe->DW3.FTEnable = (m_ftqBasedSkip[0x07] >> 1) & 0x01;
}
else
{
curbe->DW3.FTEnable = (m_ftqBasedSkip[0x04] >> 1) & 0x01;
}
curbe->DW3.SubPelMode = m_feiPicParams->SubPelMode;
curbe->DW4.PicHeightMinus1 = m_picHeightInMb - 1;
curbe->DW4.EnableStatsDataDump = m_encodeParams.bReportStatisticsEnabled;
curbe->DW4.HMEEnable = 0;
curbe->DW4.SliceType = sliceType;
curbe->DW4.EnableQualityImprovement = m_encodeParams.bQualityImprovementEnable;
curbe->DW4.UseActualRefQPValue = false;
curbe->DW5.RefWidth = RefWidth;
curbe->DW5.RefHeight = RefHeight;
curbe->DW7.IntraPartMask = 0x3;
curbe->DW6.FrameWidth = m_picWidthInMb * CODECHAL_MACROBLOCK_WIDTH;
curbe->DW6.FrameHeight = m_picHeightInMb * CODECHAL_MACROBLOCK_HEIGHT;
curbe->DW8.Mode0Cost = m_modeCost[0];
curbe->DW8.Mode1Cost = m_modeCost[1];
curbe->DW8.Mode2Cost = m_modeCost[2];
curbe->DW8.Mode3Cost = m_modeCost[3];
curbe->DW9.Mode4Cost = m_modeCost[4];
curbe->DW9.Mode5Cost = m_modeCost[5];
curbe->DW9.Mode6Cost = m_modeCost[6];
curbe->DW9.Mode7Cost = m_modeCost[7];
curbe->DW10.Mode8Cost= m_modeCost[8];
curbe->DW10.Mode9Cost= m_modeCost[9];
curbe->DW10.RefIDCost = m_modeCost[10];
curbe->DW10.ChromaIntraModeCost = m_modeCost[11];
curbe->DW11.MV0Cost = m_mvCost[0];
curbe->DW11.MV1Cost = m_mvCost[1];
curbe->DW11.MV2Cost = m_mvCost[2];
curbe->DW11.MV3Cost = m_mvCost[3];
curbe->DW12.MV4Cost = m_mvCost[4];
curbe->DW12.MV5Cost = m_mvCost[5];
curbe->DW12.MV6Cost = m_mvCost[6];
curbe->DW12.MV7Cost = m_mvCost[7];
curbe->DW13.QpPrimeY = sliceQp;
uint8_t bitDepthChromaMinus8 = 0; // support 4:2:0 only
int32_t qpBdOffsetC = 6 * bitDepthChromaMinus8;
int32_t qPi = (int32_t)CodecHal_Clip3((-qpBdOffsetC), 51, (sliceQp + m_hevcPicParams->pps_cb_qp_offset));
int32_t QPc = (qPi < 30) ? qPi : QPcTable[qPi - 30];
curbe->DW13.QpPrimeCb= QPc + qpBdOffsetC;
qPi = (int32_t)CodecHal_Clip3((-qpBdOffsetC), 51, (sliceQp + m_hevcPicParams->pps_cr_qp_offset));
QPc = (qPi < 30) ? qPi : QPcTable[qPi - 30];
curbe->DW13.QpPrimeCr= QPc;
curbe->DW14.SICFwdTransCoeffThreshold_0 = forwardTransformThd[0];
curbe->DW14.SICFwdTransCoeffThreshold_1 = forwardTransformThd[1];
curbe->DW14.SICFwdTransCoeffThreshold_2 = forwardTransformThd[2];
curbe->DW15.SICFwdTransCoeffThreshold_3 = forwardTransformThd[3];
curbe->DW15.SICFwdTransCoeffThreshold_4 = forwardTransformThd[4];
curbe->DW15.SICFwdTransCoeffThreshold_5 = forwardTransformThd[5];
curbe->DW15.SICFwdTransCoeffThreshold_6 = forwardTransformThd[6];
if (SearchPath == 1)
{
// diamond search
if (m_pictureCodingType == P_TYPE)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(MOS_SecureMemcpy(&(curbe->DW16), 14 * sizeof(uint32_t), &(m_encBTu7PCurbeInit[16]), 14 * sizeof(uint32_t)));
}
else if (m_pictureCodingType == B_TYPE)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(MOS_SecureMemcpy(&(curbe->DW16), 14 * sizeof(uint32_t), &(m_encBTu7BCurbeInit[16]), 14 * sizeof(uint32_t)));
}
}
else if((SearchPath != 0) && (SearchPath != 2))
{
// default 0 and 2 are full sparil search
CODECHAL_ENCODE_ASSERT(false);
}
curbe->DW32.SkipVal = m_skipValB[curbe->DW3.BlockBasedSkipEnable][transform_8x8_mode_flag][sliceQp];
if(m_pictureCodingType == I_TYPE)
{
*(float*)&(curbe->DW34.LambdaME) = 0.0;
}
else if (m_pictureCodingType == P_TYPE)
{
*(float*)&(curbe->DW34.LambdaME) = (float)m_qpLambdaMe[CODECHAL_ENCODE_HEVC_P_SLICE][sliceQp];
}
else
{
*(float*)&(curbe->DW34.LambdaME) = (float)m_qpLambdaMe[CODECHAL_ENCODE_HEVC_B_SLICE][sliceQp];
}
curbe->DW35.ModeCostSp = m_modeCostSp;
curbe->DW35.SimpIntraInterThreshold = m_simplestIntraInterThreshold;
curbe->DW36.NumRefIdxL0MinusOne = m_hevcSliceParams->num_ref_idx_l0_active_minus1;
curbe->DW36.NumRefIdxL1MinusOne = m_hevcSliceParams->num_ref_idx_l1_active_minus1;
curbe->DW36.BRCEnable = m_encodeParams.bMbQpDataEnabled || m_brcEnabled;
curbe->DW36.LCUBRCEnable = m_encodeParams.bMbQpDataEnabled || m_lcuBrcEnabled;
curbe->DW36.PowerSaving = m_powerSavingEnabled;
curbe->DW36.ROIEnable = (m_hevcPicParams->NumROI > 0);
curbe->DW36.FASTSurveillanceFlag = (m_hevcPicParams->CodingType == I_TYPE) ? 0 : m_hevcSeqParams->bVideoSurveillance;
if(m_pictureCodingType != I_TYPE)
{
curbe->DW37.ActualQpRefID0List0 = GetQPValueFromRefList(LIST_0, CODECHAL_ENCODE_REF_ID_0);
curbe->DW37.ActualQpRefID1List0 = GetQPValueFromRefList(LIST_0, CODECHAL_ENCODE_REF_ID_1);
curbe->DW37.ActualQpRefID2List0 = GetQPValueFromRefList(LIST_0, CODECHAL_ENCODE_REF_ID_2);
curbe->DW37.ActualQpRefID3List0 = GetQPValueFromRefList(LIST_0, CODECHAL_ENCODE_REF_ID_3);
curbe->DW41.TextureIntraCostThreshold = 500;
if(m_pictureCodingType == B_TYPE) {
curbe->DW39.ActualQpRefID0List1 = GetQPValueFromRefList(LIST_1, CODECHAL_ENCODE_REF_ID_0);
curbe->DW39.ActualQpRefID1List1 = GetQPValueFromRefList(LIST_1, CODECHAL_ENCODE_REF_ID_1);
float lambda_me = (float)m_qpLambdaMe[CODECHAL_ENCODE_HEVC_B_SLICE][sliceQp];
if (m_encodeParams.bQualityImprovementEnable)
{
curbe->DW40.TransformThreshold0 = (uint16_t) (lambda_me * 56.25 + 0.5);
curbe->DW40.TransformThreshold1 = (uint16_t) (lambda_me * 21 + 0.5);
curbe->DW41.TransformThreshold2 = (uint16_t) (lambda_me * 9 + 0.5);
}
}
}
curbe->DW42.NumMVPredictorsL0 = m_feiPicParams->NumMVPredictorsL0;
curbe->DW42.NumMVPredictorsL1 = m_feiPicParams->NumMVPredictorsL1;
curbe->DW42.PerLCUQP = m_encodeParams.bMbQpDataEnabled;
curbe->DW42.PerCTBInput = m_feiPicParams->bPerCTBInput;
curbe->DW42.CTBDistortionOutput = m_feiPicParams->bDistortionEnable;
curbe->DW42.MultiPredL0 = m_feiPicParams->MultiPredL0;
curbe->DW42.MultiPredL1 = m_feiPicParams->MultiPredL1;
curbe->DW42.MVPredictorBlockSize = m_feiPicParams->MVPredictorInput;
curbe->DW44.MaxVmvR = 511 * 4;
curbe->DW44.MaxNumMergeCandidates = m_hevcSliceParams->MaxNumMergeCand;
if(m_pictureCodingType != I_TYPE)
{
curbe->DW44.MaxNumRefList0 = curbe->DW36.NumRefIdxL0MinusOne + 1;
curbe->DW45.TemporalMvpEnableFlag = m_hevcSliceParams->slice_temporal_mvp_enable_flag;
curbe->DW45.HMECombineLenPslice = 8;
if(m_pictureCodingType == B_TYPE)
{
curbe->DW44.MaxNumRefList1 = curbe->DW36.NumRefIdxL1MinusOne + 1;
curbe->DW45.HMECombineLenBslice = 8;
}
}
curbe->DW45.Log2ParallelMergeLevel = m_hevcPicParams->log2_parallel_merge_level_minus2 + 2;
curbe->DW46.Log2MaxTUSize = m_hevcSeqParams->log2_max_transform_block_size_minus2 + 2;
curbe->DW46.Log2MinTUSize = m_hevcSeqParams->log2_min_transform_block_size_minus2 + 2;
curbe->DW46.Log2MaxCUSize = m_hevcSeqParams->log2_max_coding_block_size_minus3 + 3;
curbe->DW46.Log2MinCUSize = m_hevcSeqParams->log2_min_coding_block_size_minus3 + 3;
curbe->DW47.NumRegionsInSlice = m_numRegionsInSlice;
curbe->DW47.TypeOfWalkingPattern = m_enable26WalkingPattern;
curbe->DW47.ChromaFlatnessCheckFlag= (m_feiPicParams->FastIntraMode) ? 0 : 1;
curbe->DW47.EnableIntraEarlyExit = (m_feiPicParams->FastIntraMode) ? 0 : 1;
curbe->DW47.SkipIntraKrnFlag = (m_feiPicParams->FastIntraMode) ? 1 : 0;
curbe->DW47.CollocatedFromL0Flag = m_hevcSliceParams->collocated_from_l0_flag;
curbe->DW47.IsLowDelay = m_lowDelay;
curbe->DW47.ScreenContentFlag = m_hevcPicParams->bScreenContent;
curbe->DW47.MultiSliceFlag = (m_numSlices > 1);
curbe->DW47.ArbitarySliceFlag = m_arbitraryNumMbsInSlice;
curbe->DW47.NumRegionMinus1 = m_walkingPatternParam.dwNumRegion - 1;
if(m_pictureCodingType != I_TYPE)
{
curbe->DW48.CurrentTdL0_0 = ComputeTemporalDifference(m_hevcSliceParams->RefPicList[0][0]);
curbe->DW48.CurrentTdL0_1 = ComputeTemporalDifference(m_hevcSliceParams->RefPicList[0][1]);
curbe->DW49.CurrentTdL0_2 = ComputeTemporalDifference(m_hevcSliceParams->RefPicList[0][2]);
curbe->DW49.CurrentTdL0_3 = ComputeTemporalDifference(m_hevcSliceParams->RefPicList[0][3]);
if(m_pictureCodingType == B_TYPE) {
curbe->DW50.CurrentTdL1_0 = ComputeTemporalDifference(m_hevcSliceParams->RefPicList[1][0]);
curbe->DW50.CurrentTdL1_1 = ComputeTemporalDifference(m_hevcSliceParams->RefPicList[1][1]);
}
}
curbe->DW52.NumofUnitInRegion = m_walkingPatternParam.dwNumUnitsInRegion;
curbe->DW52.MaxHeightInRegion = m_walkingPatternParam.dwMaxHeightInRegion;
// Intra refresh is enabled. Program related CURBE fields
if (m_hevcPicParams->bEnableRollingIntraRefresh)
{
curbe->DW35.IntraRefreshEn = true;
curbe->DW35.FirstIntraRefresh = m_firstIntraRefresh;
curbe->DW35.HalfUpdateMixedLCU = 0;
curbe->DW35.EnableRollingIntra = true;
curbe->DW38.NumFrameInGOB = m_frameNumInGob;
curbe->DW38.NumIntraRefreshOffFrames = m_frameNumWithoutIntraRefresh;
curbe->DW51.IntraRefreshQPDelta = m_hevcPicParams->QpDeltaForInsertedIntra;
curbe->DW51.IntraRefreshMBNum = m_hevcPicParams->IntraInsertionLocation;
curbe->DW51.IntraRefreshUnitInMB = m_hevcPicParams->IntraInsertionSize;
curbe->DW53.IntraRefreshRefHeight = 40;
curbe->DW53.IntraRefreshRefWidth = 48;
m_firstIntraRefresh = false;
m_frameNumWithoutIntraRefresh = 0;
}
else if (m_pictureCodingType != I_TYPE) // don't increment num frames w/o refresh in case of TU7 I frames
{
m_frameNumWithoutIntraRefresh++;
}
PBFrameKernelParams PB8x8MbEncParams;
MOS_ZeroMemory(&PB8x8MbEncParams, sizeof(PB8x8MbEncParams));
PB8x8MbEncParams.m_width = curbe->DW6.FrameWidth;
PB8x8MbEncParams.m_height = curbe->DW6.FrameHeight;
for(uint32_t surfaceIdx = 0; surfaceIdx < 8; surfaceIdx++)
{
CODEC_PICTURE refPic = m_hevcSliceParams->RefPicList[LIST_0][surfaceIdx];
if (!CodecHal_PictureIsInvalid(refPic) &&
!CodecHal_PictureIsInvalid(m_hevcPicParams->RefFrameList[refPic.FrameIdx]))
{
uint8_t idx = m_hevcPicParams->RefFrameList[refPic.FrameIdx].FrameIdx;
PB8x8MbEncParams.m_cmSurfRef0[PB8x8MbEncParams.m_ucRefNum0] = &m_refList[idx]->sRefBuffer.OsResource;
PB8x8MbEncParams.m_ucRefNum0++;
}
refPic = m_hevcSliceParams->RefPicList[LIST_1][surfaceIdx];
if (!CodecHal_PictureIsInvalid(refPic) &&
!CodecHal_PictureIsInvalid(m_hevcPicParams->RefFrameList[refPic.FrameIdx]))
{
uint8_t idx = m_hevcPicParams->RefFrameList[refPic.FrameIdx].FrameIdx;
PB8x8MbEncParams.m_cmSurfRef1[PB8x8MbEncParams.m_ucRefNum1] = &m_refList[idx]->sRefBuffer.OsResource;
PB8x8MbEncParams.m_ucRefNum1++;
}
}
PB8x8MbEncParams.m_cmSurfCurrY = &m_rawSurfaceToEnc->OsResource;
PB8x8MbEncParams.m_cmSurfPOCDbuf = &m_resMbCodeSurface;
PB8x8MbEncParams.m_bufSize = m_mbCodeSize - m_mvOffset;
PB8x8MbEncParams.m_bufOffset = m_mvOffset;
if(mbCodeIdxForTempMVP == 0xFF)
{
PB8x8MbEncParams.m_cmSurfColRefData = nullptr;
}
else
{
PB8x8MbEncParams.m_cmSurfColRefData = m_trackedBuf->GetMvTemporalBuffer(mbCodeIdxForTempMVP);
}
PB8x8MbEncParams.m_cmSurfIntraDist = &m_intraDist.sResource;
PB8x8MbEncParams.m_cmSurfMinDist = &m_minDistortion.OsResource;
PB8x8MbEncParams.m_cmSurfSliceMap = &m_sliceMapSurface.OsResource;
PB8x8MbEncParams.m_cmSurfVMEIN = &m_vmeSavedUniSic.sResource;
PB8x8MbEncParams.m_cmSurfSIF = &m_simplestIntraSurface.OsResource;
PB8x8MbEncParams.m_cmSurfCombinedQP = (MOS_RESOURCE*)m_allocator->GetResource(m_standard, brcInputForEncKernel);
PB8x8MbEncParams.m_cmLCUQPSurf = &m_lcuQP.OsResource;
PB8x8MbEncParams.m_cmBRCConstSurf = &m_brcBuffers.sBrcConstantDataBuffer[m_currRecycledBufIdx].OsResource;
PB8x8MbEncParams.m_cmWaveFrontMap = &m_concurrentThreadSurface[m_concurrentThreadIndex].OsResource;
if (++m_concurrentThreadIndex >= NUM_CONCURRENT_THREAD)
{
m_concurrentThreadIndex = 0;
}
PB8x8MbEncParams.m_cmSurfMVIndex = &m_mvIndex.sResource;
PB8x8MbEncParams.m_cmSurfMVPred = &m_mvpIndex.sResource;
if (m_feiPicParams->MVPredictorInput)
{
PB8x8MbEncParams.m_cmSurfMVPredictor = &m_feiPicParams->resMVPredictor;
}
else
{
PB8x8MbEncParams.m_cmSurfMVPredictor = nullptr;
}
if (m_feiPicParams->bPerCTBInput)
{
PB8x8MbEncParams.m_cmSurfPerCTBInput = &m_feiPicParams->resCTBCtrl;
}
else
{
PB8x8MbEncParams.m_cmSurfPerCTBInput = nullptr;
}
//to avoid multi contexts in case per-frame control of FastIntraMode, always use 2xScaling kernel to initialize the context.
if (m_cmKernelMap.count("2xScaling") == 0)
{
m_cmKernelMap["2xScaling"] = new CMRTKernelDownScalingUMD();
m_cmKernelMap["2xScaling"]->Init((void *)m_osInterface->pOsContext);
}
//in case PB_32x32 isn't initialized when using FastIntraMode for per-frame control (I: disable; P/B: enable)
if (m_cmKernelMap.count("PB_32x32") == 0)
{
m_cmKernelMap["PB_32x32"] = new CMRTKernelPB32x32UMD();
m_cmKernelMap["PB_32x32"]->Init(nullptr, m_cmKernelMap["2xScaling"]->m_cmDev, m_cmKernelMap["2xScaling"]->m_cmQueue, m_cmKernelMap["2xScaling"]->m_cmTask, nullptr);
}
if (m_pictureCodingType == I_TYPE && m_feiPicParams->FastIntraMode)
{
if (m_cmKernelMap.count("I_8x8_MBENC") == 0)
{
m_cmKernelMap["I_8x8_MBENC"] = new CMRTKernelB8x8MbEncUMD();
m_cmKernelMap["I_8x8_MBENC"]->Init(nullptr, m_cmKernelMap["2xScaling"]->m_cmDev, m_cmKernelMap["2xScaling"]->m_cmQueue, m_cmKernelMap["2xScaling"]->m_cmTask, m_cmKernelMap["PB_32x32"]->m_cmProgram);
}
m_cmKernelMap["I_8x8_MBENC"]->SetupCurbe(curbe);
m_cmKernelMap["I_8x8_MBENC"]->AllocateSurfaces(&PB8x8MbEncParams);
//No need to wait for task finished
m_cmEvent = CM_NO_EVENT;
m_cmKernelMap["I_8x8_MBENC"]->CreateAndDispatchKernel(m_cmEvent, false, (!m_singleTaskPhaseSupported));
}
else if (m_pictureCodingType == B_TYPE)
{
if (m_cmKernelMap.count("B_8x8_MBENC") == 0)
{
m_cmKernelMap["B_8x8_MBENC"] = new CMRTKernelB8x8MbEncUMD();
m_cmKernelMap["B_8x8_MBENC"]->Init(nullptr, m_cmKernelMap["2xScaling"]->m_cmDev, m_cmKernelMap["2xScaling"]->m_cmQueue, m_cmKernelMap["2xScaling"]->m_cmTask, m_cmKernelMap["PB_32x32"]->m_cmProgram);
}
m_cmKernelMap["B_8x8_MBENC"]->SetupCurbe(curbe);
m_cmKernelMap["B_8x8_MBENC"]->AllocateSurfaces(&PB8x8MbEncParams);
//No need to wait for task finished
m_cmEvent = CM_NO_EVENT;
m_cmKernelMap["B_8x8_MBENC"]->CreateAndDispatchKernel(m_cmEvent, false, (!m_singleTaskPhaseSupported));
}
else if (m_pictureCodingType == P_TYPE)
{
if (m_cmKernelMap.count("P_8x8_MBENC") == 0)
{
m_cmKernelMap["P_8x8_MBENC"] = new CMRTKernelP8x8MbEncUMD();
m_cmKernelMap["P_8x8_MBENC"]->Init(nullptr, m_cmKernelMap["2xScaling"]->m_cmDev, m_cmKernelMap["2xScaling"]->m_cmQueue, m_cmKernelMap["2xScaling"]->m_cmTask, m_cmKernelMap["PB_32x32"]->m_cmProgram);
}
m_cmKernelMap["P_8x8_MBENC"]->SetupCurbe(curbe);
m_cmKernelMap["P_8x8_MBENC"]->AllocateSurfaces(&PB8x8MbEncParams);
//No need to wait for task finished
m_cmEvent = CM_NO_EVENT;
m_cmKernelMap["P_8x8_MBENC"]->CreateAndDispatchKernel(m_cmEvent, false, (!m_singleTaskPhaseSupported));
}
CODECHAL_MEDIA_STATE_TYPE encFunctionType = CODECHAL_MEDIA_STATE_HEVC_B_MBENC;
if (m_pictureCodingType == P_TYPE)
{
//P frame curbe only use the DW0~DW75
CODECHAL_DEBUG_TOOL(
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpMDFCurbe(
encFunctionType,
(uint8_t *)curbe, sizeof(*curbe) - sizeof(uint32_t)));
)
}
else
{
CODECHAL_DEBUG_TOOL(
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpMDFCurbe(
encFunctionType,
(uint8_t *)curbe, sizeof(*curbe)));
)
}
m_lastTaskInPhase = true;
eStatus = Encode8x8BPakKernel(curbe);
return eStatus;
}
#endif
MOS_STATUS CodechalFeiHevcStateG9Skl::EncodeKernelFunctions()
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_FUNCTION_ENTER;
m_feiPicParams = (CodecEncodeHevcFeiPicParams *)m_encodeParams.pFeiPicParams;
CODECHAL_DEBUG_TOOL(
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpYUVSurface(
m_rawSurfaceToEnc,
CodechalDbgAttr::attrEncodeRawInputSurface,
"SrcSurf"));
)
if (m_pakOnlyTest)
{
// Skip all ENC kernel operations for now it is in the PAK only test mode.
// PAK and CU records will be passed via the app
return eStatus;
}
if (m_brcEnabled || m_hmeEnabled)
{
eStatus = MOS_STATUS_UNKNOWN;
CODECHAL_ENCODE_ASSERTMESSAGE("HEVC FEI does not support BRC and HMEenabled.");
return eStatus;
}
if(m_osInterface->bSimIsActive)
{
MOS_LOCK_PARAMS lockFlags;
MOS_ZeroMemory(&lockFlags, sizeof(MOS_LOCK_PARAMS));
lockFlags.WriteOnly = 1;
uint8_t* data = (uint8_t* )m_osInterface->pfnLockResource(m_osInterface, &m_resMbCodeSurface, &lockFlags);
if (data)
{
MOS_ZeroMemory(data, m_mbCodeSize);
m_osInterface->pfnUnlockResource(m_osInterface, &m_resMbCodeSurface);
}
}
// Generate slice map for kernel
CODECHAL_ENCODE_CHK_STATUS_RETURN(GenerateSliceMap());
//Reset to use a different performance tag ID for I kernels. Each kernel has a different buffer ID
m_osInterface->pfnResetPerfBufferID(m_osInterface);
m_firstTaskInPhase = true;
m_lastTaskInPhase = false;
// ROI uses the BRC LCU update kernel, even in CQP. So we will call it
// first if in CQP. It has no other kernel execution dependencies, even
// that brc is not initialized is not a dependency
if (m_hevcPicParams->NumROI && !m_brcEnabled)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(EncodeBrcUpdateLCUBasedKernel(nullptr));
}
// config LCU QP input
if (m_encodeParams.bMbQpDataEnabled)
{
// Setup Lamda/Cost table for LCU QP mode
auto psBrcConstantData = &m_brcBuffers.sBrcConstantDataBuffer[m_currRecycledBufIdx];
CODECHAL_ENCODE_CHK_STATUS_RETURN(SetupBrcConstantTable(psBrcConstantData));
if (m_encodeParams.psMbQpDataSurface)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(Convert1byteTo2bytesQPperLCU(m_encodeParams.psMbQpDataSurface, &m_lcuQP));
m_surfaceParams[SURFACE_LCU_QP].psSurface = &m_lcuQP;
}
}
CODECHAL_DEBUG_TOOL(
if (m_feiPicParams->bPerBlockQP) {
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpSurface(
&m_lcuQP,
CodechalDbgAttr::attrInput,
"HEVC_B_MBENC_MB_QP",
CODECHAL_MEDIA_STATE_HEVC_B_MBENC));
}
if (m_feiPicParams->MVPredictorInput) {
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpBuffer(
&m_feiPicParams->resMVPredictor,
"HEVC_B_MBENC_ConstantData_In",
CodechalDbgAttr::attrInput,
m_feiPicParams->resMVPredictor.iSize,
0,
CODECHAL_MEDIA_STATE_HEVC_B_MBENC));
})
if(m_feiPicParams->FastIntraMode)
{
if (m_hevcPicParams->CodingType == I_TYPE)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(Encode8x8PBMbEncKernel());
}
}
else
{
//Step 1: perform 2:1 down-scaling
if (m_hevcSeqParams->bit_depth_luma_minus8 == 0) // use this for 8 bit only case.
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(Encode2xScalingKernel());
}
//Step 2: 32x32 PU Mode Decision or 32x32 PU Intra check kernel
if (m_hevcPicParams->CodingType == I_TYPE)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(Encode32x32PuModeDecisionKernel());
}
else
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(Encode32X32BIntraCheckKernel());
}
//Step 3: 16x16 SAD Computation
CODECHAL_ENCODE_CHK_STATUS_RETURN(Encode16x16SadPuComputationKernel());
CODECHAL_DEBUG_TOOL(
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpBuffer(
&m_sad16x16Pu.sResource,
CodechalDbgAttr::attrOutput,
"HEVC_16x16_PU_SAD_Out",
m_sad16x16Pu.dwSize,
0,
CODECHAL_MEDIA_STATE_16x16_PU_SAD));
)
//Step 4: 16x16 PU Mode Decision
CODECHAL_ENCODE_CHK_STATUS_RETURN(Encode16x16PuModeDecisionKernel());
CODECHAL_DEBUG_TOOL(
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpBuffer(
&m_vme8x8Mode.sResource,
CodechalDbgAttr::attrOutput,
"HEVC_16x16_PU_MD_Out",
m_vme8x8Mode.dwSize,
0,
CODECHAL_MEDIA_STATE_16x16_PU_MODE_DECISION));
)
//Step 5: 8x8 PU
CODECHAL_ENCODE_CHK_STATUS_RETURN(Encode8x8PUKernel());
//Step 6: 8x8 PU FMODE
m_lastTaskInPhase = true;
CODECHAL_ENCODE_CHK_STATUS_RETURN(Encode8x8PUFMODEKernel());
CODECHAL_DEBUG_TOOL(
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpYUVSurface(
&m_scaled2xSurface,
CodechalDbgAttr::attrReferenceSurfaces,
"2xScaledSurf"))
if (m_pictureCodingType == I_TYPE)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpBuffer(
&m_32x32PuOutputData.sResource,
CodechalDbgAttr::attrOutput,
"HEVC_32x32_PU_MD_Out",
m_32x32PuOutputData.dwSize,
0,
CODECHAL_MEDIA_STATE_32x32_PU_MODE_DECISION));
}
else
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpBuffer(
&m_32x32PuOutputData.sResource,
CodechalDbgAttr::attrOutput,
"HEVC_32x32_B_INTRA_CHECK_Out",
m_32x32PuOutputData.dwSize,
0,
CODECHAL_MEDIA_STATE_32x32_PU_MODE_DECISION));
}
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpBuffer(
&m_intraMode.sResource,
CodechalDbgAttr::attrOutput,
"HEVC_8x8_PU_MD_Out",
m_intraMode.dwSize,
0,
CODECHAL_MEDIA_STATE_8x8_PU));
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_debugInterface->DumpBuffer(
&m_intraDist.sResource,
CodechalDbgAttr::attrOutput,
"HEVC_8x8_PU_FMOD_Out",
m_intraDist.dwSize,
0,
CODECHAL_MEDIA_STATE_8x8_PU_FMODE));
)
}
// Sync-wait can be executed after I-kernel is submitted before there is no dependency for I to wait for PAK to be ready
CODECHAL_ENCODE_CHK_STATUS_RETURN(WaitForPak());
//Step 7: B MB ENC kernel for B picture only
if (m_hevcPicParams->CodingType != I_TYPE)
{
m_firstTaskInPhase = true;
m_lastTaskInPhase = false;
if (m_feiPicParams->MVPredictorInput)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
&m_surfaceParams[SURFACE_FEI_EXTERNAL_MVP],
&m_feiPicParams->resMVPredictor,
m_feiPicParams->resMVPredictor.iSize,
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE].Value,
0,
false));
}
if ((m_hevcSeqParams->bit_depth_luma_minus8))
{
bool formatConversionDone[NUM_FORMAT_CONV_FRAMES] = { false };
formatConversionDone[0] = true; // always true since its for the input surface.
for (auto i = 0; i < CODEC_MAX_NUM_REF_FRAME_HEVC; i++)
{
if (!m_picIdx[i].bValid || !m_currUsedRefPic[i])
{
continue;
}
uint8_t picIdx = m_picIdx[i].ucPicIdx;
CODECHAL_ENCODE_ASSERT(picIdx < 127);
uint8_t frameStoreId = (uint8_t)m_refIdxMapping[i];
if (frameStoreId >= CODECHAL_MAX_CUR_NUM_REF_FRAME_HEVC)
{
CODECHAL_ENCODE_ASSERT(0);
eStatus = MOS_STATUS_INVALID_PARAMETER;
return eStatus;
}
if (formatConversionDone[frameStoreId + 1] != true)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(EncodeDSCombinedKernel(dsDisabled, (frameStoreId + 1), picIdx));
formatConversionDone[frameStoreId + 1] = true;
m_refList[picIdx]->sRefBuffer = m_formatConvertedSurface[frameStoreId + 1];
}
}
}
CODECHAL_ENCODE_CHK_STATUS_RETURN(Encode8x8PBMbEncKernel());
}
#ifdef HEVC_FEI_ENABLE_CMRT
for (CmKernelMapType::iterator it = m_cmKernelMap.begin(); it != m_cmKernelMap.end(); it++)
{
it->second->DestroySurfResources();
}
#endif
// Notify PAK engine once ENC is done
if (!m_pakOnlyTest && !Mos_ResourceIsNull(&m_resSyncObjectRenderContextInUse))
{
MOS_SYNC_PARAMS syncParams = g_cInitSyncParams;
syncParams.GpuContext = m_renderContext;
syncParams.presSyncResource = &m_resSyncObjectRenderContextInUse;
CODECHAL_ENCODE_CHK_STATUS_RETURN(m_osInterface->pfnEngineSignal(m_osInterface, &syncParams));
}
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::Initialize(CodechalSetting * settings)
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_FUNCTION_ENTER;
// common initilization
CODECHAL_ENCODE_CHK_STATUS_RETURN(CodechalEncHevcState::Initialize(settings));
m_cscDsState->EnableMmc();
m_brcBuffers.dwBrcConstantSurfaceWidth = BRC_CONSTANT_SURFACE_WIDTH;
m_brcBuffers.dwBrcConstantSurfaceHeight = BRC_CONSTANT_SURFACE_HEIGHT;
// LCU size is 32x32 in Gen9
m_widthAlignedMaxLcu = MOS_ALIGN_CEIL(m_frameWidth, 32);
m_heightAlignedMaxLcu = MOS_ALIGN_CEIL(m_frameHeight, 32);
m_brcEnabled = false;
m_hmeEnabled = false;
m_hmeSupported = false;
m_16xMeUserfeatureControl = false;
m_16xMeSupported = false;
m_32xMeUserfeatureControl = false;
m_32xMeSupported = false;
// regkey setup
MOS_USER_FEATURE_VALUE_DATA userFeatureData;
MOS_ZeroMemory(&userFeatureData, sizeof(userFeatureData));
MOS_UserFeature_ReadValue_ID(
nullptr,
__MEDIA_USER_FEATURE_VALUE_SINGLE_TASK_PHASE_ENABLE_ID,
&userFeatureData,
m_osInterface->pOsContext);
m_singleTaskPhaseSupported = (userFeatureData.i32Data) ? true : false;
MOS_ZeroMemory(&userFeatureData, sizeof(userFeatureData));
MOS_UserFeature_ReadValue_ID(
nullptr,
__MEDIA_USER_FEATURE_VALUE_HEVC_ENCODE_26Z_ENABLE_ID,
&userFeatureData,
m_osInterface->pOsContext);
m_enable26WalkingPattern = (userFeatureData.i32Data) ? false : true;
MOS_ZeroMemory(&userFeatureData, sizeof(userFeatureData));
eStatus = MOS_UserFeature_ReadValue_ID(
nullptr,
__MEDIA_USER_FEATURE_VALUE_HEVC_ENCODE_REGION_NUMBER_ID,
&userFeatureData,
m_osInterface->pOsContext);
if (eStatus == MOS_STATUS_SUCCESS)
{
// Region number must be greater than 1
m_numRegionsInSlice = (userFeatureData.i32Data < 1) ? 1 : userFeatureData.i32Data;
}
else
{
// Reset the status to success if regkey is not set
eStatus = MOS_STATUS_SUCCESS;
}
MOS_ZeroMemory(&userFeatureData, sizeof(userFeatureData));
MOS_UserFeature_ReadValue_ID(
nullptr,
__MEDIA_USER_FEATURE_VALUE_HEVC_ENCODE_NUM_8x8_INTRA_KERNEL_SPLIT,
&userFeatureData,
m_osInterface->pOsContext);
m_numMb8x8IntraKernelSplit = (userFeatureData.i32Data < 0) ? 0 : userFeatureData.i32Data;
MOS_ZeroMemory(&userFeatureData, sizeof(userFeatureData));
MOS_UserFeature_ReadValue_ID(
nullptr,
__MEDIA_USER_FEATURE_VALUE_HEVC_ENCODE_NUM_B_KERNEL_SPLIT,
&userFeatureData,
m_osInterface->pOsContext);
m_numMbBKernelSplit = (userFeatureData.i32Data < 0) ? 0 : userFeatureData.i32Data;
MOS_ZeroMemory(&userFeatureData, sizeof(userFeatureData));
MOS_UserFeature_ReadValue_ID(
nullptr,
__MEDIA_USER_FEATURE_VALUE_HEVC_ENCODE_POWER_SAVING,
&userFeatureData,
m_osInterface->pOsContext);
m_powerSavingEnabled = (userFeatureData.i32Data) ? true : false;
if (MEDIA_IS_SKU(m_skuTable, FtrEncodeHEVC10bit))
{
/* Make the width aligned to a multiple of 32 and then get the no of macroblocks.*/
/* This is done to facilitate the use of format conversion kernel for downscaling to 4x and 2x along with formatconversion of 10 bit data to 8 bit data.
Refer format conversion kernel for further details .
We will use only 4x downscale for HME, Super and ultra HME use the traditional scaling kernels.
*/
uint32_t downscaledSurfaceWidth4x = MOS_ALIGN_CEIL((m_downscaledWidthInMb4x* CODECHAL_MACROBLOCK_WIDTH), (CODECHAL_MACROBLOCK_WIDTH * 2));
m_downscaledWidthInMb4x = CODECHAL_GET_WIDTH_IN_MACROBLOCKS(downscaledSurfaceWidth4x);
}
return eStatus;
}
uint32_t CodechalFeiHevcStateG9Skl::GetMaxBtCount()
{
auto wBtIdxAlignment = m_stateHeapInterface->pStateHeapInterface->GetBtIdxAlignment();
// 6 I kernels
uint32_t uiBtCountPhase1 = MOS_ALIGN_CEIL(m_mbEncKernelStates[CODECHAL_HEVC_MBENC_2xSCALING].KernelParams.iBTCount, wBtIdxAlignment) +
MOS_ALIGN_CEIL(m_mbEncKernelStates[CODECHAL_HEVC_MBENC_16x16SAD].KernelParams.iBTCount, wBtIdxAlignment) +
MOS_ALIGN_CEIL(m_mbEncKernelStates[CODECHAL_HEVC_MBENC_16x16MD].KernelParams.iBTCount, wBtIdxAlignment) +
MOS_ALIGN_CEIL(m_mbEncKernelStates[CODECHAL_HEVC_MBENC_8x8PU].KernelParams.iBTCount, wBtIdxAlignment) +
MOS_ALIGN_CEIL(m_mbEncKernelStates[CODECHAL_HEVC_MBENC_8x8FMODE].KernelParams.iBTCount, wBtIdxAlignment);
uiBtCountPhase1 += MOS_MAX(
MOS_ALIGN_CEIL(m_mbEncKernelStates[CODECHAL_HEVC_MBENC_32x32MD].KernelParams.iBTCount, wBtIdxAlignment),
MOS_ALIGN_CEIL(m_mbEncKernelStates[CODECHAL_HEVC_MBENC_32x32INTRACHECK].KernelParams.iBTCount, wBtIdxAlignment));
if (MEDIA_IS_SKU(m_skuTable, FtrEncodeHEVC10bit))
{
uiBtCountPhase1 += MOS_ALIGN_CEIL(m_mbEncKernelStates[CODECHAL_HEVC_FEI_MBENC_DS_COMBINED].KernelParams.iBTCount, wBtIdxAlignment);
}
// two B kernels
uint32_t uiBtCountPhase2 = MOS_ALIGN_CEIL(m_mbEncKernelStates[CODECHAL_HEVC_FEI_MBENC_BENC].KernelParams.iBTCount, wBtIdxAlignment) +
MOS_ALIGN_CEIL(m_mbEncKernelStates[CODECHAL_HEVC_FEI_MBENC_BPAK].KernelParams.iBTCount, wBtIdxAlignment);
uint32_t uiMaxBtCount = MOS_MAX(uiBtCountPhase1, uiBtCountPhase2);
return uiMaxBtCount;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::AllocateEncResources()
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_FUNCTION_ENTER;
m_sliceMap = (PCODECHAL_ENCODE_HEVC_SLICE_MAP)MOS_AllocAndZeroMemory(
m_widthAlignedMaxLcu * m_heightAlignedMaxLcu * sizeof(m_sliceMap[0]));
CODECHAL_ENCODE_CHK_NULL_RETURN(m_sliceMap);
uint32_t Downscaling2xWidth = m_widthAlignedMaxLcu >> 1;
uint32_t Downscaling2xHeight = m_heightAlignedMaxLcu >> 1;
CODECHAL_ENCODE_CHK_STATUS_RETURN(AllocateSurface(
&m_scaled2xSurface,
Downscaling2xWidth,
Downscaling2xHeight,
"2x Downscaling"));
uint32_t uiWidth = m_widthAlignedMaxLcu >> 3;
uint32_t uiHeight = m_heightAlignedMaxLcu >> 5;
CODECHAL_ENCODE_CHK_STATUS_RETURN(AllocateBuffer2D(
&m_sliceMapSurface,
uiWidth,
uiHeight,
"Slice Map"));
uint32_t uiSize = 32 * (m_widthAlignedMaxLcu >> 5) * (m_heightAlignedMaxLcu >> 5);
CODECHAL_ENCODE_CHK_STATUS_RETURN(AllocateBuffer(
&m_32x32PuOutputData,
uiSize,
"32x32 PU Output Data"));
uiSize = 8 * 4 * (m_widthAlignedMaxLcu >> 4) * (m_heightAlignedMaxLcu >> 4);
CODECHAL_ENCODE_CHK_STATUS_RETURN(AllocateBuffer(
&m_sad16x16Pu,
uiSize,
"SAD 16x16 PU"));
// need 64 bytes for statistics report .
uiSize = 64 * (m_widthAlignedMaxLcu >> 4) * (m_heightAlignedMaxLcu >> 4);
CODECHAL_ENCODE_CHK_STATUS_RETURN(AllocateBuffer(
&m_vme8x8Mode,
uiSize,
"VME 8x8 mode"));
uiSize = 32 * (m_widthAlignedMaxLcu >> 3) * (m_heightAlignedMaxLcu >> 3);
CODECHAL_ENCODE_CHK_STATUS_RETURN(AllocateBuffer(
&m_intraMode,
uiSize,
"Intra mode"));
uiSize = 16 * (m_widthAlignedMaxLcu >> 4) * (m_heightAlignedMaxLcu >> 4);
CODECHAL_ENCODE_CHK_STATUS_RETURN(AllocateBuffer(
&m_intraDist,
uiSize,
"Intra dist"));
// Change the surface size
uiWidth = m_widthAlignedMaxLcu >> 1;
uiHeight = m_heightAlignedMaxLcu >> 4;
CODECHAL_ENCODE_CHK_STATUS_RETURN(AllocateBuffer2D(
&m_minDistortion,
uiWidth,
uiHeight,
"Min distortion surface"));
// Allocate FEI 2D 2bytes LCU QP surface
uiWidth = MOS_ALIGN_CEIL((m_widthAlignedMaxLcu >> 4), 64);
uiHeight = MOS_ALIGN_CEIL((m_heightAlignedMaxLcu >> 5), 4);
CODECHAL_ENCODE_CHK_STATUS_RETURN(AllocateBuffer2D(
&m_lcuQP,
uiWidth,
uiHeight,
"LCU_QP surface"));
uiWidth = sizeof(CODECHAL_ENCODE_HEVC_WALKING_CONTROL_REGION);
uiHeight = HEVC_CONCURRENT_SURFACE_HEIGHT;
for (uint32_t i = 0; i < NUM_CONCURRENT_THREAD; i++)
{
CODECHAL_ENCODE_CHK_STATUS_RETURN(AllocateBuffer2D(
&m_concurrentThreadSurface[i],
uiWidth,
uiHeight,
"Concurrent Thread"));
}
//uiSize = (dwWidthAlignedMaxLCU * dwHeightAlignedMaxLCU / 4);
uiSize = (m_widthAlignedMaxLcu * m_heightAlignedMaxLcu / 4) + GPUMMU_WA_PADDING;
CODECHAL_ENCODE_CHK_STATUS_RETURN(AllocateBuffer(
&m_mvIndex,
uiSize,
"MV index surface"));
//uiSize = (dwWidthAlignedMaxLCU * dwHeightAlignedMaxLCU / 2);
uiSize = (m_widthAlignedMaxLcu * m_heightAlignedMaxLcu / 2) + GPUMMU_WA_PADDING;
CODECHAL_ENCODE_CHK_STATUS_RETURN(AllocateBuffer(
&m_mvpIndex,
uiSize,
"MVP index surface"));
uiSize = m_widthAlignedMaxLcu * m_heightAlignedMaxLcu;
CODECHAL_ENCODE_CHK_STATUS_RETURN(AllocateBuffer(
&m_vmeSavedUniSic,
uiSize,
"VME Saved UniSic surface"));
uiWidth = m_widthAlignedMaxLcu >> 3;
uiHeight = m_heightAlignedMaxLcu >> 5;
CODECHAL_ENCODE_CHK_STATUS_RETURN(AllocateBuffer2D(
&m_simplestIntraSurface,
uiWidth,
uiHeight,
"Simplest Intra surface"));
m_allocator->AllocateResource(m_standard, 1024, 1, brcInputForEncKernel, "brcInputForEncKernel", true);
if (MEDIA_IS_SKU(m_skuTable, FtrEncodeHEVC10bit))
{
// adding 10 bit support for KBL : output surface for format conversion from 10bit to 8 bit
for (uint32_t i = 0; i < NUM_FORMAT_CONV_FRAMES; i++)
{
if (Mos_ResourceIsNull(&m_formatConvertedSurface[i].OsResource))
{
uiWidth = m_widthAlignedMaxLcu;
uiHeight = m_heightAlignedMaxLcu;
CODECHAL_ENCODE_CHK_STATUS_RETURN(AllocateSurface(
&m_formatConvertedSurface[i],
uiWidth,
uiHeight,
"Format Converted Surface"));
}
}
if (Mos_ResourceIsNull(&m_resMbStatisticsSurface.sResource))
{
uiSize = 52 * m_picWidthInMb * m_picHeightInMb; // 13 DWs or 52 bytes for statistics per MB
CODECHAL_ENCODE_CHK_STATUS_RETURN(AllocateBuffer(
&m_resMbStatisticsSurface,
uiSize,
"MB stats surface"));
}
}
// ROI
// ROI buffer size uses MB units for HEVC, not LCU
uiWidth = MOS_ALIGN_CEIL(m_picWidthInMb * 4, 64);
uiHeight = MOS_ALIGN_CEIL(m_picHeightInMb, 8);
MOS_ZeroMemory(&m_roiSurface, sizeof(m_roiSurface));
m_roiSurface.TileType = MOS_TILE_LINEAR;
m_roiSurface.bArraySpacing = true;
m_roiSurface.Format = Format_Buffer_2D;
m_roiSurface.dwWidth = uiWidth;
m_roiSurface.dwPitch = uiWidth;
m_roiSurface.dwHeight = uiHeight;
CODECHAL_ENCODE_CHK_STATUS_RETURN(AllocateBuffer2D(
&m_roiSurface,
uiWidth,
uiHeight,
"ROI Buffer"));
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::FreeEncResources()
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_FUNCTION_ENTER;
MOS_Delete(m_meKernelState);
m_meKernelState = nullptr;
MOS_FreeMemory(m_meKernelBindingTable);
m_meKernelBindingTable = nullptr;
MOS_DeleteArray(m_mbEncKernelStates);
m_mbEncKernelStates = nullptr;
MOS_FreeMemory(m_mbEncKernelBindingTable);
m_mbEncKernelBindingTable = nullptr;
MOS_DeleteArray(m_brcKernelStates);
m_brcKernelStates = nullptr;
MOS_FreeMemory(m_brcKernelBindingTable);
m_brcKernelBindingTable = nullptr;
MOS_FreeMemory(m_surfaceParams); m_surfaceParams = nullptr;
for (auto i = 0; i < NUM_FORMAT_CONV_FRAMES; i++)
{
m_osInterface->pfnFreeResource(
m_osInterface,
&m_formatConvertedSurface[i].OsResource);
}
m_osInterface->pfnFreeResource(
m_osInterface,
&m_scaled2xSurface.OsResource);
m_osInterface->pfnFreeResource(
m_osInterface,
&m_resMbStatisticsSurface.sResource);
m_osInterface->pfnFreeResource(
m_osInterface,
&m_sliceMapSurface.OsResource);
m_osInterface->pfnFreeResource(
m_osInterface,
&m_32x32PuOutputData.sResource);
m_osInterface->pfnFreeResource(
m_osInterface,
&m_sad16x16Pu.sResource);
m_osInterface->pfnFreeResource(
m_osInterface,
&m_vme8x8Mode.sResource);
m_osInterface->pfnFreeResource(
m_osInterface,
&m_intraMode.sResource);
m_osInterface->pfnFreeResource(
m_osInterface,
&m_intraDist.sResource);
m_osInterface->pfnFreeResource(
m_osInterface,
&m_mvIndex.sResource);
m_osInterface->pfnFreeResource(
m_osInterface,
&m_mvpIndex.sResource);
m_osInterface->pfnFreeResource(
m_osInterface,
&m_vmeSavedUniSic.sResource);
m_osInterface->pfnFreeResource(
m_osInterface,
&m_minDistortion.OsResource);
m_osInterface->pfnFreeResource(
m_osInterface,
&m_lcuQP.OsResource);
for (uint32_t i = 0; i < NUM_CONCURRENT_THREAD; i++)
{
m_osInterface->pfnFreeResource(
m_osInterface,
&m_concurrentThreadSurface[i].OsResource);
}
m_osInterface->pfnFreeResource(
m_osInterface,
&m_simplestIntraSurface.OsResource);
MOS_FreeMemory(m_sliceMap);
m_sliceMap = nullptr;
m_osInterface->pfnFreeResource(
m_osInterface,
&m_roiSurface.OsResource);
#ifdef HEVC_FEI_ENABLE_CMRT
for (CmKernelMapType::iterator it = m_cmKernelMap.begin(); it != m_cmKernelMap.end(); it++)
{
it->second->DestroyKernelResources();
}
if (m_cmKernelMap.count("2xScaling"))
{
m_cmKernelMap["2xScaling"]->DestroyProgramResources();
}
if (m_cmKernelMap.count("I_32x32"))
{
m_cmKernelMap["I_32x32"]->DestroyProgramResources();
}
if (m_cmKernelMap.count("PB_32x32"))
{
m_cmKernelMap["PB_32x32"]->DestroyProgramResources();
}
if (m_cmKernelMap.count("2xScaling"))
{
m_cmKernelMap["2xScaling"]->Destroy();
}
for (CmKernelMapType::iterator it = m_cmKernelMap.begin(); it != m_cmKernelMap.end(); it++)
{
delete it->second;
}
m_cmKernelMap.clear();
CmKernelMapType deallocator;
m_cmKernelMap.swap(deallocator);
#endif
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::InitSurfaceInfoTable()
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
m_surfaceParams = (PCODECHAL_SURFACE_CODEC_PARAMS)MOS_AllocAndZeroMemory(
sizeof(*m_surfaceParams) * SURFACE_NUM_TOTAL);
CODECHAL_ENCODE_CHK_NULL_RETURN(m_surfaceParams);
PCODECHAL_SURFACE_CODEC_PARAMS param = &m_surfaceParams[SURFACE_RAW_Y];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams2D(
param,
m_rawSurfaceToEnc,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_CURR_ENCODE].Value,
0,
m_verticalLineStride,
false));
param = &m_surfaceParams[SURFACE_RAW_10bit_Y];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams2D(
param,
m_rawSurfaceToEnc,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_CURR_ENCODE].Value,
0,
m_verticalLineStride,
false));
// MB stats surface -- currently not used
param = &m_surfaceParams[SURFACE_RAW_MBSTAT];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
param,
&m_resMbStatisticsSurface.sResource,
m_resMbStatisticsSurface.dwSize,
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_HME_DOWNSAMPLED_ENCODE].Value,
0,
true));
param->bRawSurface = true;
param = &m_surfaceParams[SURFACE_RAW_FC_8bit_Y_UV];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams2D(
param,
&m_formatConvertedSurface[0],
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_CURR_ENCODE].Value,
0,
m_verticalLineStride,
true)); //this should be writable as it is output of formatconversion
param->bUseUVPlane = true;
param = &m_surfaceParams[SURFACE_RAW_Y_UV];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams2D(
param,
m_rawSurfaceToEnc,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_CURR_ENCODE].Value,
0,
m_verticalLineStride,
false));
param->bUseUVPlane = true;
param = &m_surfaceParams[SURFACE_RAW_10bit_Y_UV];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams2D(
param,
m_rawSurfaceToEnc,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_CURR_ENCODE].Value,
0,
m_verticalLineStride,
false));//this should be writable as it is output of formatconversion
param->bUseUVPlane = true;
param = &m_surfaceParams[SURFACE_Y_2X];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams2D(
param,
&m_scaled2xSurface,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_HME_DOWNSAMPLED_ENCODE].Value,
0,
m_verticalLineStride,
false));
param = &m_surfaceParams[SURFACE_32x32_PU_OUTPUT];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
param,
&m_32x32PuOutputData.sResource,
m_32x32PuOutputData.dwSize,
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE].Value,
0,
false));
param = &m_surfaceParams[SURFACE_SLICE_MAP];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams2D(
param,
&m_sliceMapSurface,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_HME_DOWNSAMPLED_ENCODE].Value,
0,
m_verticalLineStride,
false));
param = &m_surfaceParams[SURFACE_Y_2X_VME];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParamsVME(
param,
&m_scaled2xSurface,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_REF_ENCODE].Value,
0));
param = &m_surfaceParams[SURFACE_BRC_INPUT];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
param,
(MOS_RESOURCE*)m_allocator->GetResource(m_standard, brcInputForEncKernel),
m_allocator->GetResourceSize(m_standard, brcInputForEncKernel),
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE].Value,
0,
false));
param = &m_surfaceParams[SURFACE_LCU_QP];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams2D(
param,
&m_lcuQP,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_HME_DOWNSAMPLED_ENCODE].Value,
0,
m_verticalLineStride,
false));
param = &m_surfaceParams[SURFACE_ROI];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams2D(
param,
&m_roiSurface,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_HME_DOWNSAMPLED_ENCODE].Value,
0,
m_verticalLineStride,
false));
param = &m_surfaceParams[SURFACE_BRC_DATA];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams2D(
param,
&m_brcBuffers.sBrcConstantDataBuffer[m_currRecycledBufIdx],
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_HME_DOWNSAMPLED_ENCODE].Value,
0,
m_verticalLineStride,
false));
param = &m_surfaceParams[SURFACE_SIMPLIFIED_INTRA];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams2D(
param,
&m_simplestIntraSurface,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_HME_DOWNSAMPLED_ENCODE].Value,
0,
m_verticalLineStride,
false));
// skip SURFACE_HME_MVP and SURFACE_HME_DIST from HME since FEI alsways disables HME
param = &m_surfaceParams[SURFACE_16x16PU_SAD];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
param,
&m_sad16x16Pu.sResource,
m_sad16x16Pu.dwSize,
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE].Value,
0,
false));
param = &m_surfaceParams[SURFACE_RAW_VME];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParamsVME(
param,
m_rawSurfaceToEnc,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_CURR_ENCODE].Value,
0));
param = &m_surfaceParams[SURFACE_VME_8x8];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
param,
&m_vme8x8Mode.sResource,
m_vme8x8Mode.dwSize,
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE].Value,
0,
false));
param = &m_surfaceParams[SURFACE_CU_RECORD];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
param,
&m_resMbCodeSurface,
m_mbCodeSize - m_mvOffset,
m_mvOffset,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE].Value,
0,
true));
param = &m_surfaceParams[SURFACE_INTRA_MODE];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
param,
&m_intraMode.sResource,
m_intraMode.dwSize,
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE].Value,
0,
false));
param = &m_surfaceParams[SURFACE_HCP_PAK];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
param,
&m_resMbCodeSurface,
m_mvOffset,
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE].Value,
0,
true));
param = &m_surfaceParams[SURFACE_INTRA_DIST];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
param,
&m_intraDist.sResource,
m_intraDist.dwSize,
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE].Value,
0,
false));
param = &m_surfaceParams[SURFACE_MIN_DIST];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams2D(
param,
&m_minDistortion,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_ME_DISTORTION_ENCODE].Value,
0,
m_verticalLineStride,
false));
param = &m_surfaceParams[SURFACE_VME_UNI_SIC_DATA];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
param,
&m_vmeSavedUniSic.sResource,
m_vmeSavedUniSic.dwSize,
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE].Value,
0,
false));
param = &m_surfaceParams[SURFACE_COL_MB_MV];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
param,
nullptr,
m_sizeOfMvTemporalBuffer,
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE].Value,
0,
false));
m_concurrentThreadIndex = 0;
for (uint32_t i = 0; i < NUM_CONCURRENT_THREAD; i++)
{
param = &m_surfaceParams[SURFACE_CONCURRENT_THREAD + i];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams2D(
param,
&m_concurrentThreadSurface[i],
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_ME_DISTORTION_ENCODE].Value,
0,
m_verticalLineStride,
false));
}
param = &m_surfaceParams[SURFACE_MB_MV_INDEX];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
param,
&m_mvIndex.sResource,
m_mvIndex.dwSize,
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE].Value,
0,
false));
param = &m_surfaceParams[SURFACE_MVP_INDEX];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
param,
&m_mvpIndex.sResource,
m_mvpIndex.dwSize,
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE].Value,
0,
false));
param = &m_surfaceParams[SURFACE_REF_FRAME_VME];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParamsVME(
param,
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_CURR_ENCODE].Value,
0));
param = &m_surfaceParams[SURFACE_Y_4X];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams2D(
param,
nullptr,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_HME_DOWNSAMPLED_ENCODE].Value,
0,
m_verticalLineStride,
false));
param = &m_surfaceParams[SURFACE_Y_4X_VME];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParamsVME(
param,
nullptr,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_REF_ENCODE].Value,
0));
param = &m_surfaceParams[SURFACE_BRC_HISTORY];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
param,
&m_brcBuffers.resBrcHistoryBuffer,
m_brcHistoryBufferSize,
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE].Value,
0,
true));
param = &m_surfaceParams[SURFACE_BRC_ME_DIST];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams2D(
param,
&m_brcBuffers.sMeBrcDistortionBuffer,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_HME_DOWNSAMPLED_ENCODE].Value,
0,
m_verticalLineStride,
true));
param = &m_surfaceParams[SURFACE_BRC_PAST_PAK_INFO];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
param,
&m_brcBuffers.resBrcPakStatisticBuffer[0],
m_hevcBrcPakStatisticsSize,
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE].Value,
0,
false));
param = &m_surfaceParams[SURFACE_BRC_HCP_PIC_STATE];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
param,
&m_brcBuffers.resBrcImageStatesWriteBuffer[0],
m_brcBuffers.dwBrcHcpPicStateSize,
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE].Value,
0,
false));
#if 0
param = &m_surfaceParams[SURFACE_PU_STATS];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams2D(
param,
&m_encStatsBuffers.m_puStatsSurface,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_HME_DOWNSAMPLED_ENCODE].Value,
0,
m_verticalLineStride,
true));
param = &m_surfaceParams[SURFACE_8X8_PU_HAAR_DIST];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams2D(
param,
&m_encStatsBuffers.m_8x8PuHaarDist,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_HME_DOWNSAMPLED_ENCODE].Value,
0,
m_verticalLineStride,
true));
param = &m_surfaceParams[SURFACE_8X8_PU_FRAME_STATS];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
param,
&m_encStatsBuffers.m_8x8PuFrameStats.sResource,
m_encStatsBuffers.m_8x8PuFrameStats.dwSize,
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE].Value,
0,
true));
param = &m_surfaceParams[SURFACE_MB_ENC_STATS];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams2D(
param,
&m_encStatsBuffers.m_mbEncStatsSurface,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_HME_DOWNSAMPLED_ENCODE].Value,
0,
m_verticalLineStride,
true));
param = &m_surfaceParams[SURFACE_MB_ENC_FRAME_STATS];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
param,
&m_encStatsBuffers.m_mbEncFrameStats.sResource,
m_encStatsBuffers.m_mbEncFrameStats.dwSize,
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE].Value,
0,
true));
param = &m_surfaceParams[SURFACE_FEI_EXTERNAL_MVP];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
param,
&m_feiPicParams->resMVPredictor,
m_feiPicParams->resMVPredictor.iSize,
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE].Value,
0,
false));
param = &m_surfaceParams[SURFACE_FEI_PER_LCU_QP];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
param,
&m_feiPicParams->resCTBQp,
m_feiPicParams->resCTBQp.iSize,
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE].Value,
0,
false));
param = &m_surfaceParams[SURFACE_FEI_PER_CTB_CTRL];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
param,
&m_feiPicParams->resCTBCtrl,
m_feiPicParams->resCTBCtrl.iSize,
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE].Value,
0,
false));
param = &m_surfaceParams[SURFACE_FEI_CTB_DISTORTION];
CODECHAL_ENCODE_CHK_STATUS_RETURN(InitSurfaceCodecParams1D(
param,
&m_feiPicParams->resDistortion,
m_feiPicParams->resDistortion.iSize,
0,
m_hwInterface->GetCacheabilitySettings()[MOS_CODEC_RESOURCE_USAGE_SURFACE_MV_DATA_ENCODE].Value,
0,
false));
#endif
return eStatus;
}
MOS_STATUS CodechalFeiHevcStateG9Skl::SetSequenceStructs()
{
MOS_STATUS eStatus = MOS_STATUS_SUCCESS;
CODECHAL_ENCODE_FUNCTION_ENTER;
m_feiPicParams = (CodecEncodeHevcFeiPicParams *)m_encodeParams.pFeiPicParams;
CODECHAL_ENCODE_CHK_STATUS_RETURN(CodechalEncHevcState::SetSequenceStructs());
m_enable26WalkingPattern = m_feiPicParams->bForceLCUSplit;
m_numRegionsInSlice = m_feiPicParams->NumConcurrentEncFramePartition;
m_encodeParams.bReportStatisticsEnabled = 0;
m_encodeParams.bQualityImprovementEnable = 0;
if (m_feiPicParams->FastIntraMode)
{
m_hevcSeqParams->TargetUsage = 0x07;
}
return eStatus;
}
CodechalFeiHevcStateG9Skl::CodechalFeiHevcStateG9Skl(CodechalHwInterface* hwInterface,
CodechalDebugInterface* debugInterface,
PCODECHAL_STANDARD_INFO standardInfo)
:CodechalEncHevcStateG9(hwInterface, debugInterface, standardInfo)
{
m_kernelBase = (uint8_t *)IGCODECKRN_G9;
m_kuid = IDR_CODEC_HEVC_FEI_COMBINED_KENREL_INTEL;
pfnGetKernelHeaderAndSize = GetKernelHeaderAndSize;
m_noMeKernelForPFrame = false;
m_feiEnable = true;
MOS_STATUS eStatus = InitMhw();
if (eStatus != MOS_STATUS_SUCCESS)
{
CODECHAL_ENCODE_ASSERTMESSAGE("HEVC FEI encoder MHW initialization failed.");
}
}
| 133,281 |
5,300 | <filename>frameworks/Java/restexpress/src/main/java/hello/controller/MysqlController.java
package hello.controller;
import hello.domain.World;
import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.concurrent.ThreadLocalRandom;
import javax.sql.DataSource;
import org.restexpress.Request;
import org.restexpress.Response;
public class MysqlController {
// Database details.
private static final String DB_QUERY = "SELECT * FROM World WHERE id = ?";
private static final int DB_ROWS = 10000;
private DataSource mysqlDataSource;
public MysqlController(DataSource dataSource) {
super();
this.mysqlDataSource = dataSource;
}
public Object read(Request request, Response response) throws SQLException {
World world = null;
// Fetch some rows from the database.
try (Connection conn = mysqlDataSource.getConnection()) {
try (PreparedStatement statement = conn.prepareStatement(DB_QUERY,
ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY)) {
final Long id = (long) (ThreadLocalRandom.current().nextInt(DB_ROWS) + 1);
statement.setLong(1, id);
try (ResultSet results = statement.executeQuery()) {
results.next(); // Here the expectation is ONLY only one
// result row
world = new World(results.getLong("id"), results.getInt("randomNumber"));
}
}
}
return world;
}
} | 474 |
428 | <filename>Java/Loon-Lite(PureJava)/Loon-Lite-Core/src/loon/action/collision/CollisionClassQuery.java
/**
*
* Copyright 2008 - 2011
*
* 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.
*
* @project loon
* @author cping
* @email:<EMAIL>
* @version 0.1
*/
package loon.action.collision;
import loon.geom.Vector2f;
public class CollisionClassQuery implements CollisionQuery {
private String flag;
private CollisionQuery subQuery;
private Vector2f offsetLocation;
public CollisionClassQuery(String flag, CollisionQuery subQuery,Vector2f offset) {
this.flag = flag;
this.subQuery = subQuery;
this.offsetLocation = offset;
}
@Override
public boolean checkCollision(CollisionObject actor) {
return flag.equals(actor.getObjectFlag()) ? this.subQuery.checkCollision(actor)
: false;
}
@Override
public void setOffsetPos(Vector2f offset) {
offsetLocation = offset;
}
@Override
public Vector2f getOffsetPos() {
return offsetLocation;
}
}
| 456 |
431 | <filename>modules/core/admin/package.json
{
"name":"admin",
"label":"Administration",
"description":"Forms and functions to provide administration of configuration, installation and reloading of Calipso.",
"version":"0.2.0",
"homepage":"http://calip.so",
"repository":{
"type":"git",
"url":"git://github.com/cliftonc/calipso.git"
},
"author":"<NAME> <<EMAIL>> (<EMAIL>)"
}
| 165 |
9,724 | // -*- C++ -*-
//===----------------------------------------------------------------------===//
//
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
// See https://llvm.org/LICENSE.txt for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
#ifndef _LIBCPP___NUMERIC_INNER_PRODUCT_H
#define _LIBCPP___NUMERIC_INNER_PRODUCT_H
#include <__config>
#include <__utility/move.h>
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
#pragma GCC system_header
#endif
_LIBCPP_BEGIN_NAMESPACE_STD
template <class _InputIterator1, class _InputIterator2, class _Tp>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
_Tp
inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2, _Tp __init)
{
for (; __first1 != __last1; ++__first1, (void) ++__first2)
#if _LIBCPP_STD_VER > 17
__init = _VSTD::move(__init) + *__first1 * *__first2;
#else
__init = __init + *__first1 * *__first2;
#endif
return __init;
}
template <class _InputIterator1, class _InputIterator2, class _Tp, class _BinaryOperation1, class _BinaryOperation2>
_LIBCPP_INLINE_VISIBILITY _LIBCPP_CONSTEXPR_AFTER_CXX17
_Tp
inner_product(_InputIterator1 __first1, _InputIterator1 __last1, _InputIterator2 __first2,
_Tp __init, _BinaryOperation1 __binary_op1, _BinaryOperation2 __binary_op2)
{
for (; __first1 != __last1; ++__first1, (void) ++__first2)
#if _LIBCPP_STD_VER > 17
__init = __binary_op1(_VSTD::move(__init), __binary_op2(*__first1, *__first2));
#else
__init = __binary_op1(__init, __binary_op2(*__first1, *__first2));
#endif
return __init;
}
_LIBCPP_END_NAMESPACE_STD
#endif // _LIBCPP___NUMERIC_INNER_PRODUCT_H
| 714 |
6,224 | <filename>samples/shields/x_nucleo_iks02a1/standard/src/main.c
/*
* Copyright (c) 2019 STMicroelectronics
*
* SPDX-License-Identifier: Apache-2.0
*/
#include <zephyr.h>
#include <device.h>
#include <drivers/sensor.h>
#include <stdio.h>
#include <sys/util.h>
#ifdef CONFIG_IIS2DLPC_TRIGGER
static int iis2dlpc_trig_cnt;
static void iis2dlpc_trigger_handler(const struct device *dev,
const struct sensor_trigger *trig)
{
sensor_sample_fetch_chan(dev, SENSOR_CHAN_ACCEL_XYZ);
iis2dlpc_trig_cnt++;
}
#endif
#ifdef CONFIG_IIS2MDC_TRIGGER
static int iis2mdc_trig_cnt;
static void iis2mdc_trigger_handler(const struct device *dev,
const struct sensor_trigger *trig)
{
sensor_sample_fetch_chan(dev, SENSOR_CHAN_ALL);
iis2mdc_trig_cnt++;
}
#endif
#ifdef CONFIG_ISM330DHCX_TRIGGER
static int ism330dhcx_acc_trig_cnt;
static int ism330dhcx_gyr_trig_cnt;
static void ism330dhcx_acc_trigger_handler(const struct device *dev,
const struct sensor_trigger *trig)
{
sensor_sample_fetch_chan(dev, SENSOR_CHAN_ACCEL_XYZ);
ism330dhcx_acc_trig_cnt++;
}
static void ism330dhcx_gyr_trigger_handler(const struct device *dev,
const struct sensor_trigger *trig)
{
sensor_sample_fetch_chan(dev, SENSOR_CHAN_GYRO_XYZ);
ism330dhcx_gyr_trig_cnt++;
}
#endif
static void iis2dlpc_config(const struct device *iis2dlpc)
{
struct sensor_value odr_attr, fs_attr;
/* set IIS2DLPC accel/gyro sampling frequency to 100 Hz */
odr_attr.val1 = 100;
odr_attr.val2 = 0;
if (sensor_attr_set(iis2dlpc, SENSOR_CHAN_ACCEL_XYZ,
SENSOR_ATTR_SAMPLING_FREQUENCY, &odr_attr) < 0) {
printk("Cannot set sampling frequency for IIS2DLPC accel\n");
return;
}
sensor_g_to_ms2(16, &fs_attr);
if (sensor_attr_set(iis2dlpc, SENSOR_CHAN_ACCEL_XYZ,
SENSOR_ATTR_FULL_SCALE, &fs_attr) < 0) {
printk("Cannot set sampling frequency for IIS2DLPC gyro\n");
return;
}
#ifdef CONFIG_IIS2DLPC_TRIGGER
struct sensor_trigger trig;
trig.type = SENSOR_TRIG_DATA_READY;
trig.chan = SENSOR_CHAN_ACCEL_XYZ;
sensor_trigger_set(iis2dlpc, &trig, iis2dlpc_trigger_handler);
#endif
}
static void iis2mdc_config(const struct device *iis2mdc)
{
struct sensor_value odr_attr;
/* set IIS2MDC sampling frequency to 100 Hz */
odr_attr.val1 = 100;
odr_attr.val2 = 0;
if (sensor_attr_set(iis2mdc, SENSOR_CHAN_ALL,
SENSOR_ATTR_SAMPLING_FREQUENCY, &odr_attr) < 0) {
printk("Cannot set sampling frequency for IIS2MDC\n");
return;
}
#ifdef CONFIG_IIS2MDC_TRIGGER
struct sensor_trigger trig;
trig.type = SENSOR_TRIG_DATA_READY;
trig.chan = SENSOR_CHAN_MAGN_XYZ;
sensor_trigger_set(iis2mdc, &trig, iis2mdc_trigger_handler);
#endif
}
static void ism330dhcx_config(const struct device *ism330dhcx)
{
struct sensor_value odr_attr, fs_attr;
/* set ISM330DHCX sampling frequency to 416 Hz */
odr_attr.val1 = 416;
odr_attr.val2 = 0;
if (sensor_attr_set(ism330dhcx, SENSOR_CHAN_ACCEL_XYZ,
SENSOR_ATTR_SAMPLING_FREQUENCY, &odr_attr) < 0) {
printk("Cannot set sampling frequency for ISM330DHCX accel\n");
return;
}
sensor_g_to_ms2(16, &fs_attr);
if (sensor_attr_set(ism330dhcx, SENSOR_CHAN_ACCEL_XYZ,
SENSOR_ATTR_FULL_SCALE, &fs_attr) < 0) {
printk("Cannot set sampling frequency for ISM330DHCX accel\n");
return;
}
/* set ISM330DHCX gyro sampling frequency to 208 Hz */
odr_attr.val1 = 208;
odr_attr.val2 = 0;
if (sensor_attr_set(ism330dhcx, SENSOR_CHAN_GYRO_XYZ,
SENSOR_ATTR_SAMPLING_FREQUENCY, &odr_attr) < 0) {
printk("Cannot set sampling frequency for ISM330DHCX gyro\n");
return;
}
sensor_degrees_to_rad(250, &fs_attr);
if (sensor_attr_set(ism330dhcx, SENSOR_CHAN_GYRO_XYZ,
SENSOR_ATTR_FULL_SCALE, &fs_attr) < 0) {
printk("Cannot set fs for ISM330DHCX gyro\n");
return;
}
#ifdef CONFIG_ISM330DHCX_TRIGGER
struct sensor_trigger trig;
trig.type = SENSOR_TRIG_DATA_READY;
trig.chan = SENSOR_CHAN_ACCEL_XYZ;
sensor_trigger_set(ism330dhcx, &trig, ism330dhcx_acc_trigger_handler);
trig.type = SENSOR_TRIG_DATA_READY;
trig.chan = SENSOR_CHAN_GYRO_XYZ;
sensor_trigger_set(ism330dhcx, &trig, ism330dhcx_gyr_trigger_handler);
#endif
}
void main(void)
{
#ifdef CONFIG_ISM330DHCX_ENABLE_TEMP
struct sensor_value die_temp;
#endif
struct sensor_value die_temp2;
struct sensor_value accel1[3], accel2[3];
struct sensor_value gyro[3];
struct sensor_value magn[3];
const struct device *iis2dlpc = device_get_binding(DT_LABEL(DT_INST(0, st_iis2dlpc)));
const struct device *iis2mdc = device_get_binding(DT_LABEL(DT_INST(0, st_iis2mdc)));
const struct device *ism330dhcx = device_get_binding(DT_LABEL(DT_INST(0, st_ism330dhcx)));
int cnt = 1;
if (iis2dlpc == NULL) {
printf("Could not get IIS2DLPC device\n");
return;
}
if (iis2mdc == NULL) {
printf("Could not get IIS2MDC Magn device\n");
return;
}
if (ism330dhcx == NULL) {
printf("Could not get ISM330DHCX IMU device\n");
return;
}
iis2dlpc_config(iis2dlpc);
iis2mdc_config(iis2mdc);
ism330dhcx_config(ism330dhcx);
while (1) {
/* Get sensor samples */
#ifndef CONFIG_IIS2DLPC_TRIGGER
if (sensor_sample_fetch(iis2dlpc) < 0) {
printf("IIS2DLPC Sensor sample update error\n");
return;
}
#endif
#ifndef CONFIG_IIS2MDC_TRIGGER
if (sensor_sample_fetch(iis2mdc) < 0) {
printf("IIS2MDC Magn Sensor sample update error\n");
return;
}
#endif
#ifndef CONFIG_ISM330DHCX_TRIGGER
if (sensor_sample_fetch(ism330dhcx) < 0) {
printf("ISM330DHCX IMU Sensor sample update error\n");
return;
}
#endif
/* Get sensor data */
sensor_channel_get(iis2dlpc, SENSOR_CHAN_ACCEL_XYZ, accel2);
sensor_channel_get(iis2mdc, SENSOR_CHAN_MAGN_XYZ, magn);
sensor_channel_get(iis2mdc, SENSOR_CHAN_DIE_TEMP, &die_temp2);
sensor_channel_get(ism330dhcx, SENSOR_CHAN_ACCEL_XYZ, accel1);
sensor_channel_get(ism330dhcx, SENSOR_CHAN_GYRO_XYZ, gyro);
/* Display sensor data */
/* Erase previous */
printf("\0033\014");
printf("X-NUCLEO-IKS02A1 sensor Mode 1 dashboard\n\n");
printf("IIS2DLPC: Accel (m.s-2): x: %.3f, y: %.3f, z: %.3f\n",
sensor_value_to_double(&accel2[0]),
sensor_value_to_double(&accel2[1]),
sensor_value_to_double(&accel2[2]));
/* iis2mdc */
printf("IIS2MDC: Magn (gauss): x: %.3f, y: %.3f, z: %.3f\n",
sensor_value_to_double(&magn[0]),
sensor_value_to_double(&magn[1]),
sensor_value_to_double(&magn[2]));
printf("IIS2MDC: Temperature: %.1f C\n",
sensor_value_to_double(&die_temp2));
printf("ISM330DHCX: Accel (m.s-2): x: %.3f, y: %.3f, z: %.3f\n",
sensor_value_to_double(&accel1[0]),
sensor_value_to_double(&accel1[1]),
sensor_value_to_double(&accel1[2]));
printf("ISM330DHCX: GYro (dps): x: %.3f, y: %.3f, z: %.3f\n",
sensor_value_to_double(&gyro[0]),
sensor_value_to_double(&gyro[1]),
sensor_value_to_double(&gyro[2]));
#ifdef CONFIG_IIS2DLPC_TRIGGER
printk("%d:: iis2dlpc trig %d\n", cnt, iis2dlpc_trig_cnt);
#endif
#if defined(CONFIG_IIS2MDC_TRIGGER)
printk("%d:: iis2mdc trig %d\n", cnt, iis2mdc_trig_cnt);
#endif
#ifdef CONFIG_ISM330DHCX_TRIGGER
printk("%d:: ism330dhcx acc trig %d\n", cnt, ism330dhcx_acc_trig_cnt);
printk("%d:: ism330dhcx gyr trig %d\n", cnt, ism330dhcx_gyr_trig_cnt);
#endif
cnt++;
k_sleep(K_MSEC(2000));
}
}
| 3,434 |
1,019 | package com.roncoo.education.course.service.api.pc;
import com.roncoo.education.course.service.api.pc.biz.PcApiZoneBiz;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import com.roncoo.education.course.common.req.ZoneDeleteREQ;
import com.roncoo.education.course.common.req.ZonePageREQ;
import com.roncoo.education.course.common.req.ZoneSaveREQ;
import com.roncoo.education.course.common.req.ZoneUpdateREQ;
import com.roncoo.education.course.common.req.ZoneViewREQ;
import com.roncoo.education.course.common.resq.ZonePageRESQ;
import com.roncoo.education.course.common.resq.ZoneViewRESQ;
import com.roncoo.education.util.base.BaseController;
import com.roncoo.education.util.base.Page;
import com.roncoo.education.util.base.Result;
import io.swagger.annotations.ApiOperation;
/**
* 专区表
*
* @author wuyun
*/
@RestController
@RequestMapping(value = "/course/pc/zone")
public class PcApiZoneController extends BaseController {
@Autowired
private PcApiZoneBiz biz;
/**
* 分页列出专区信息
*
* @param zonePageREQ
* @return
*/
@ApiOperation(value = "分页列出专区信息", notes = "分页列出专区信息")
@RequestMapping(value = "/list", method = RequestMethod.POST)
public Result<Page<ZonePageRESQ>> listForPage(@RequestBody ZonePageREQ zonePageREQ) {
return biz.listForPage(zonePageREQ);
}
/**
* 添加专区信息
*
* @param zoneSaveREQ
* @return
*/
@ApiOperation(value = "添加专区信息", notes = "添加专区信息")
@RequestMapping(value = "/save", method = RequestMethod.POST)
public Result<Integer> save(@RequestBody ZoneSaveREQ zoneSaveREQ) {
return biz.save(zoneSaveREQ);
}
/**
* 删除专区信息
*
* @param zoneDeleteREQ
* @return
*/
@ApiOperation(value = "删除专区信息", notes = "删除专区信息")
@RequestMapping(value = "/delete", method = RequestMethod.POST)
public Result<Integer> delete(@RequestBody ZoneDeleteREQ zoneDeleteREQ) {
return biz.delete(zoneDeleteREQ);
}
/**
* 更新专区信息
*
* @param zoneUpdateREQ
* @return
*/
@ApiOperation(value = "更新专区信息", notes = "更新专区信息")
@RequestMapping(value = "/update", method = RequestMethod.POST)
public Result<Integer> update(@RequestBody ZoneUpdateREQ zoneUpdateREQ) {
return biz.update(zoneUpdateREQ);
}
/**
* 查看专区信息
*
* @param zoneViewREQ
* @return
*/
@ApiOperation(value = "查看专区信息", notes = "查看专区信息")
@RequestMapping(value = "/view", method = RequestMethod.POST)
public Result<ZoneViewRESQ> view(@RequestBody ZoneViewREQ zoneViewREQ) {
return biz.view(zoneViewREQ);
}
}
| 1,311 |
348 | {"nom":"Moustey","circ":"1ère circonscription","dpt":"Landes","inscrits":468,"abs":256,"votants":212,"blancs":17,"nuls":19,"exp":176,"res":[{"nuance":"MDM","nom":"<NAME>","voix":118},{"nuance":"SOC","nom":"<NAME>","voix":58}]} | 89 |
2,151 | <reponame>coreydowning/robolectric<gh_stars>1000+
package org.robolectric.lib2;
public final class R {
public static final class id {
public static int lib_button = 0x7f010001;
public static int lib2_button = 0x7f010002;
}
public static final class string {
public static int only_in_lib2 = 0x7f020001;
public static int in_all_libs = 0x7f020002;
public static int also_in_all_libs = 0x7f020003;
}
public static final class styleable {
public static final int[] SomeStyleable = new int[]{attr.offsetX, attr.offsetY};
public static final int SomeStyleable_offsetX = 0;
public static final int SomeStyleable_offsetY = 1;
}
public static final class attr {
public static int offsetX = 0x7f0b0001;
public static int offsetY = 0x7f0b0001;
}
}
| 290 |
930 | /*
* ******************************************************************************
* * Copyright 2015 See AUTHORS file.
* *
* * 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.
* *****************************************************************************
*/
package com.uwsoft.editor.view.ui.box;
import com.kotcrab.vis.ui.VisUI;
import com.kotcrab.vis.ui.util.Validators;
import com.kotcrab.vis.ui.widget.VisLabel;
import com.kotcrab.vis.ui.widget.VisTextField;
import com.kotcrab.vis.ui.widget.VisValidatableTextField;
import com.uwsoft.editor.event.KeyboardListener;
/**
* Created by azakhary on 4/15/2015.
*/
public class UIGridBox extends UIBaseBox {
private static final String GRID_BOX_PREFIX = "com.uwsoft.editor.view.ui.box.UIGridBox";
public static final String GRID_SIZE_TEXT_FIELD_UPDATED = GRID_BOX_PREFIX + ".GRID_SIZE_TEXT_FIELD_UPDATED";
private VisValidatableTextField gridSizeTextField;
public UIGridBox() {
super();
init();
setVisible(false);
}
@Override
public void update() {
setVisible(true);
}
private void init() {
VisLabel lbl = new VisLabel("Grid Size:");
add(lbl).padRight(4);
gridSizeTextField = new VisValidatableTextField(new Validators.IntegerValidator());
gridSizeTextField.setStyle(VisUI.getSkin().get("light", VisTextField.VisTextFieldStyle.class));
//gridSizeTextField.setRightAligned(true);
gridSizeTextField.addListener(new KeyboardListener(GRID_SIZE_TEXT_FIELD_UPDATED));
add(gridSizeTextField).width(60);
}
public void setGridSize(int gridSize) {
gridSizeTextField.setText(gridSize + "");
}
public void hide() {
setVisible(false);
}
public void show() {
setVisible(true);
}
}
| 817 |
1,346 | package com.ctrip.platform.dal.dao.datasource.cluster.strategy;
import com.ctrip.platform.dal.dao.datasource.cluster.ConnectionFactory;
/**
* @Author limingdong
* @create 2021/8/25
*/
public interface ConnectionFactoryAware {
void setConnectionFactory(ConnectionFactory connectionFactory);
}
| 95 |
517 | package ro.isdc.wro.model;
import java.util.ArrayList;
import java.util.Collection;
import java.util.HashMap;
import java.util.HashSet;
import java.util.List;
import java.util.Map;
import java.util.Set;
import java.util.TreeSet;
import org.apache.commons.lang3.StringUtils;
import org.apache.commons.lang3.Validate;
import ro.isdc.wro.model.group.Group;
import ro.isdc.wro.model.resource.Resource;
/**
* Helper for querying a snapshot of a model. Any changes of the model performed after model inspector instantiation
* will not be reflected.
*
* @author <NAME>
* @created 21 Sep 2012
* @since 1.5.0
*/
public class WroModelInspector {
private final Map<String, Group> map = new HashMap<String, Group>();
public WroModelInspector(final WroModel model) {
Validate.notNull(model);
for (final Group group : model.getGroups()) {
map.put(group.getName(), group);
}
}
/**
* @param name
* of group to find.
* @return group with searched name (if available) or null otherwise.
*
*/
public Group getGroupByName(final String name) {
return map.get(name);
}
/**
* @param resource
* the {@link Resource} to search in all available groups.
* @return t collection of group names containing provided resource. If the resource is not availalbe, an empty collection
* will be returned.
*/
public Collection<String> getGroupNamesContainingResource(final String resourceUri) {
Validate.notNull(resourceUri);
final Set<String> groupNames = new TreeSet<String>();
for (final Group group : map.values()) {
if (group.hasResource(resourceUri)) {
groupNames.add(group.getName());
}
}
return groupNames;
}
/**
* @return a set of group names.
*/
public final List<String> getGroupNames() {
//decorate with tree set to keep them sorted (for jdk5).
return new ArrayList<String>(new TreeSet<String>(map.keySet()));
}
/**
* @param groupName the nam of the group to check.
* @return true if the provided groupName is available.
*/
public boolean hasGroup(final String groupName) {
return map.containsKey(groupName);
}
/**
* This implementation would be simpler if java would have closures :).
*
* @return a comma separated list of group names.
*/
public String getGroupNamesAsString() {
return String.format("%s", StringUtils.join(getGroupNames(), ", "));
}
/**
* @return the set of all unique resources from all the groups of the model (no particular order).
*/
public Collection<Resource> getAllUniqueResources() {
return collectResources(new HashSet<Resource>());
}
/**
* @return the set of all resources from all the groups of the model (no particular order).
*/
public Collection<Resource> getAllResources() {
return collectResources(new ArrayList<Resource>());
}
private Collection<Resource> collectResources(final Collection<Resource> resources) {
for (final Group group : map.values()) {
resources.addAll(group.getResources());
}
return resources;
}
}
| 1,017 |
2,406 | <filename>model-optimizer/extensions/front/onnx/hard_sigmoid_ext.py
# Copyright (C) 2018-2021 Intel Corporation
# SPDX-License-Identifier: Apache-2.0
import numpy as np
from extensions.ops.hard_sigmoid import HardSigmoid
from mo.front.common.replacement import FrontReplacementOp
from mo.front.onnx.extractors.utils import onnx_attr
from mo.graph.graph import Node, Graph
from mo.front.tf.graph_utils import create_op_with_const_inputs
class HardSigmoidFrontExtractor(FrontReplacementOp):
op = 'HardSigmoid'
enabled = True
def replace_op(self, graph: Graph, node: Node):
alpha = onnx_attr(node, 'alpha', 'f', default=0.2)
beta = onnx_attr(node, 'beta', 'f', default=0.5)
hard_sigmoid = create_op_with_const_inputs(graph, HardSigmoid, {1: np.array(alpha), 2: np.array(beta)},
{'name': node.name + '/HardSigmoid_'})
node.in_port(0).get_connection().set_destination(hard_sigmoid.in_port(0))
return [hard_sigmoid.id]
| 433 |
2,151 | // Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef CHROME_BROWSER_UI_VIEWS_OVERLAY_OVERLAY_WINDOW_VIEWS_H_
#define CHROME_BROWSER_UI_VIEWS_OVERLAY_OVERLAY_WINDOW_VIEWS_H_
#include "content/public/browser/overlay_window.h"
#include "ui/gfx/geometry/size.h"
#include "ui/views/widget/widget.h"
namespace views {
class ImageButton;
class ToggleImageButton;
} // namespace views
// The Chrome desktop implementation of OverlayWindow. This will only be
// implemented in views, which will support all desktop platforms.
class OverlayWindowViews : public content::OverlayWindow, public views::Widget {
public:
explicit OverlayWindowViews(
content::PictureInPictureWindowController* controller);
~OverlayWindowViews() override;
// OverlayWindow:
bool IsActive() const override;
void Close() override;
void Show() override;
void Hide() override;
bool IsVisible() const override;
bool IsAlwaysOnTop() const override;
ui::Layer* GetLayer() override;
gfx::Rect GetBounds() const override;
void UpdateVideoSize(const gfx::Size& natural_size) override;
ui::Layer* GetVideoLayer() override;
ui::Layer* GetControlsBackgroundLayer() override;
ui::Layer* GetCloseControlsLayer() override;
ui::Layer* GetPlayPauseControlsLayer() override;
gfx::Rect GetCloseControlsBounds() override;
gfx::Rect GetPlayPauseControlsBounds() override;
// views::Widget:
gfx::Size GetMinimumSize() const override;
gfx::Size GetMaximumSize() const override;
void OnNativeWidgetWorkspaceChanged() override;
void OnMouseEvent(ui::MouseEvent* event) override;
// views::internal::NativeWidgetDelegate:
void OnNativeWidgetMove() override;
void OnNativeWidgetSizeChanged(const gfx::Size& new_size) override;
private:
// Determine the intended bounds of |this|. This should be called when there
// is reason for the bounds to change, such as switching primary displays or
// playing a new video (i.e. different aspect ratio). This also updates
// |min_size_| and |max_size_|.
gfx::Rect CalculateAndUpdateBounds();
// Set up the views::Views that will be shown on the window.
void SetUpViews();
// Update |current_size_| closest to the |new_size| while adhering to the
// aspect ratio of the video, which is retrieved from |natural_size_|.
void UpdateCurrentSizeWithAspectRatio(gfx::Size new_size);
// Not owned; |controller_| owns |this|.
content::PictureInPictureWindowController* controller_;
// The upper and lower bounds of |current_size_|. These are determined by the
// size of the primary display work area when Picture-in-Picture is initiated.
// TODO(apacible): Update these bounds when the display the window is on
// changes. http://crbug.com/819673
gfx::Size min_size_;
gfx::Size max_size_;
// Current bounds of the Picture-in-Picture window.
gfx::Rect current_bounds_;
// The natural size of the video to show. This is used to compute sizing and
// ensuring factors such as aspect ratio is maintained.
gfx::Size natural_size_;
// Views to be shown.
std::unique_ptr<views::View> video_view_;
std::unique_ptr<views::View> controls_background_view_;
std::unique_ptr<views::ImageButton> close_controls_view_;
std::unique_ptr<views::ToggleImageButton> play_pause_controls_view_;
DISALLOW_COPY_AND_ASSIGN(OverlayWindowViews);
};
#endif // CHROME_BROWSER_UI_VIEWS_OVERLAY_OVERLAY_WINDOW_VIEWS_H_
| 1,080 |
836 | /*
* Copyright (C) 2016 The Android Open Source Project
*
* 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.
*/
package androidx.test.filters;
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
/**
* Use this annotation on test classes or test methods that should not be included in a test suite.
* If the annotation appears on the class then no tests in that class will be included. If the
* annotation appears only on a test method then only that method will be excluded.
*
* <p>Note: This class replaces the deprecated Android platform annotation <a
* href="http://developer.android.com/reference/android/test/suitebuilder/annotation/Suppress.html">
* android.test.suitebuilder.annotation.Suppress</a> and is the recommended way to suppress tests
* written with the AndroidX Test Library.
*/
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.METHOD, ElementType.TYPE})
public @interface Suppress {}
| 403 |
541 | /**
* The contents of this file are subject to the license and copyright
* detailed in the LICENSE and NOTICE files at the root of the source
* tree and available online at
*
* http://www.dspace.org/license/
*/
package org.dspace.app.bulkedit;
import java.sql.SQLException;
import org.apache.commons.cli.ParseException;
import org.apache.commons.lang3.ArrayUtils;
import org.dspace.content.MetadataField;
import org.dspace.content.factory.ContentServiceFactory;
import org.dspace.content.service.MetadataFieldService;
import org.dspace.content.service.MetadataValueService;
import org.dspace.core.Context;
import org.dspace.scripts.DSpaceRunnable;
import org.dspace.services.ConfigurationService;
import org.dspace.services.factory.DSpaceServicesFactory;
import org.dspace.utils.DSpace;
/**
* {@link DSpaceRunnable} implementation to delete all the values of the given
* metadata field.
*
* @author <NAME> (luca.giamminonni at 4science.it)
*
*/
public class MetadataDeletion extends DSpaceRunnable<MetadataDeletionScriptConfiguration<MetadataDeletion>> {
private MetadataValueService metadataValueService;
private MetadataFieldService metadataFieldService;
private ConfigurationService configurationService;
private String metadataField;
private boolean list;
@Override
public void internalRun() throws Exception {
if (list) {
listErasableMetadata();
return;
}
Context context = new Context();
try {
context.turnOffAuthorisationSystem();
performMetadataValuesDeletion(context);
} finally {
context.restoreAuthSystemState();
context.complete();
}
}
private void listErasableMetadata() {
String[] erasableMetadata = getErasableMetadata();
if (ArrayUtils.isEmpty(erasableMetadata)) {
handler.logInfo("No fields has been configured to be cleared via bulk deletion");
} else {
handler.logInfo("The fields that can be bulk deleted are: " + String.join(", ", erasableMetadata));
}
}
private void performMetadataValuesDeletion(Context context) throws SQLException {
MetadataField field = metadataFieldService.findByString(context, metadataField, '.');
if (field == null) {
throw new IllegalArgumentException("No metadata field found with name " + metadataField);
}
if (!ArrayUtils.contains(getErasableMetadata(), metadataField)) {
throw new IllegalArgumentException("The given metadata field cannot be bulk deleted");
}
handler.logInfo(String.format("Deleting the field '%s' from all objects", metadataField));
metadataValueService.deleteByMetadataField(context, field);
}
private String[] getErasableMetadata() {
return configurationService.getArrayProperty("bulkedit.allow-bulk-deletion");
}
@Override
@SuppressWarnings("unchecked")
public MetadataDeletionScriptConfiguration<MetadataDeletion> getScriptConfiguration() {
return new DSpace().getServiceManager()
.getServiceByName("metadata-deletion", MetadataDeletionScriptConfiguration.class);
}
@Override
public void setup() throws ParseException {
metadataValueService = ContentServiceFactory.getInstance().getMetadataValueService();
metadataFieldService = ContentServiceFactory.getInstance().getMetadataFieldService();
configurationService = DSpaceServicesFactory.getInstance().getConfigurationService();
metadataField = commandLine.getOptionValue('m');
list = commandLine.hasOption('l');
if (!list && metadataField == null) {
throw new ParseException("One of the following parameters is required: -m or -l");
}
}
}
| 1,311 |
2,542 | // ------------------------------------------------------------
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License (MIT). See License.txt in the repo root for license information.
// ------------------------------------------------------------
#pragma once
namespace Hosting2
{
class FinishRegisterApplicationHostRequest : public Serialization::FabricSerializable
{
public:
FinishRegisterApplicationHostRequest() ;
FinishRegisterApplicationHostRequest(std::wstring const & applicationHostId);
__declspec(property(get=get_hostId)) std::wstring const & Id;
std::wstring const & get_hostId() const { return id_; }
void WriteTo(Common::TextWriter & w, Common::FormatOptions const &) const;
FABRIC_FIELDS_01(id_);
private:
std::wstring id_;
};
}
| 263 |
8,772 | package org.apereo.cas.authentication;
import org.apereo.cas.config.CasCoreAuthenticationConfiguration;
import org.apereo.cas.config.CasCoreAuthenticationPrincipalConfiguration;
import org.apereo.cas.config.CasCoreAuthenticationServiceSelectionStrategyConfiguration;
import org.apereo.cas.config.CasCoreAuthenticationSupportConfiguration;
import org.apereo.cas.config.CasCoreConfiguration;
import org.apereo.cas.config.CasCoreHttpConfiguration;
import org.apereo.cas.config.CasCoreNotificationsConfiguration;
import org.apereo.cas.config.CasCoreServicesConfiguration;
import org.apereo.cas.config.CasCoreTicketCatalogConfiguration;
import org.apereo.cas.config.CasCoreTicketIdGeneratorsConfiguration;
import org.apereo.cas.config.CasCoreTicketsConfiguration;
import org.apereo.cas.config.CasCoreUtilConfiguration;
import org.apereo.cas.config.CasCoreWebConfiguration;
import org.apereo.cas.config.CasPersonDirectoryTestConfiguration;
import org.apereo.cas.config.CassandraAuthenticationConfiguration;
import org.apereo.cas.config.support.CasWebApplicationServiceFactoryConfiguration;
import org.apereo.cas.configuration.CasConfigurationProperties;
import org.apereo.cas.logout.config.CasCoreLogoutConfiguration;
import org.apereo.cas.util.junit.EnabledIfPortOpen;
import lombok.val;
import org.junit.jupiter.api.Tag;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.cloud.autoconfigure.RefreshAutoConfiguration;
import javax.security.auth.login.AccountNotFoundException;
import javax.security.auth.login.FailedLoginException;
import static org.junit.jupiter.api.Assertions.*;
/**
* This is {@link CassandraAuthenticationHandlerTests}.
*
* @author <NAME>
* @since 5.3.0
*/
@SpringBootTest(classes = {
RefreshAutoConfiguration.class,
CasCoreNotificationsConfiguration.class,
CasCoreServicesConfiguration.class,
CasPersonDirectoryTestConfiguration.class,
CasCoreHttpConfiguration.class,
CasCoreAuthenticationConfiguration.class,
CasCoreAuthenticationSupportConfiguration.class,
CasCoreAuthenticationPrincipalConfiguration.class,
CasCoreAuthenticationServiceSelectionStrategyConfiguration.class,
CasWebApplicationServiceFactoryConfiguration.class,
CasCoreTicketIdGeneratorsConfiguration.class,
CasCoreTicketCatalogConfiguration.class,
CasCoreTicketsConfiguration.class,
CasCoreWebConfiguration.class,
CasCoreUtilConfiguration.class,
CasCoreLogoutConfiguration.class,
CasCoreConfiguration.class,
CassandraAuthenticationConfiguration.class
}, properties = {
"cas.authn.cassandra.table-name=users_table",
"cas.authn.cassandra.local-dc=datacenter1",
"cas.authn.cassandra.username-attribute=user_attr",
"cas.authn.cassandra.password-attribute=pwd_attr",
"cas.authn.cassandra.keyspace=cas",
"cas.authn.cassandra.username=casuser",
"cas.authn.cassandra.password=password"
})
@EnableConfigurationProperties(CasConfigurationProperties.class)
@Tag("Cassandra")
@EnabledIfPortOpen(port = 9042)
public class CassandraAuthenticationHandlerTests {
@Autowired
@Qualifier("cassandraAuthenticationHandler")
private AuthenticationHandler cassandraAuthenticationHandler;
@Test
public void verifyUserNotFound() {
val c = CoreAuthenticationTestUtils.getCredentialsWithDifferentUsernameAndPassword("baduser", "<PASSWORD>");
assertThrows(AccountNotFoundException.class, () -> cassandraAuthenticationHandler.authenticate(c));
}
@Test
public void verifyUserBadPassword() {
val c = CoreAuthenticationTestUtils.getCredentialsWithDifferentUsernameAndPassword("casuser", "bad");
assertThrows(FailedLoginException.class, () -> cassandraAuthenticationHandler.authenticate(c));
}
@Test
public void verifyUser() throws Exception {
val c = CoreAuthenticationTestUtils.getCredentialsWithDifferentUsernameAndPassword("casuser", "<PASSWORD>");
val result = cassandraAuthenticationHandler.authenticate(c);
assertNotNull(result);
assertEquals("casuser", result.getPrincipal().getId());
}
}
| 1,355 |
45,293 | package custom;
public enum AEnum {
AX;
} | 19 |
5,169 | <filename>Specs/0/f/a/MERPageViewController/1.2.1/MERPageViewController.podspec.json
{
"name": "MERPageViewController",
"version": "1.2.1",
"summary": "Custom horizontal scroll PageViewController. Support paging scroll and transition with animation.",
"description": "'the UIPageViewController has some bugs in UIPageViewControllerTransitionStyleScroll & UIPageViewControllerNavigationOrientationHorizontal, here has a custom horizontal scroll PageViewController.'",
"homepage": "https://github.com/Mervin1024/MERPageViewController",
"license": {
"type": "MIT",
"file": "LICENSE"
},
"authors": {
"Mervin1024": "<EMAIL>"
},
"source": {
"git": "https://github.com/Mervin1024/MERPageViewController.git",
"tag": "1.2.1"
},
"platforms": {
"ios": "8.0"
},
"swift_versions": "4.2",
"source_files": "MERPageViewController/Classes/**/*",
"swift_version": "4.2"
}
| 324 |
4,342 | <filename>rx/internal/concurrency.py
from threading import Thread
from rx.core.typing import StartableTarget
def default_thread_factory(target: StartableTarget) -> Thread:
return Thread(target=target, daemon=True)
def synchronized(lock):
"""A decorator for synchronizing access to a given function."""
def wrapper(fn):
def inner(*args, **kw):
with lock:
return fn(*args, **kw)
return inner
return wrapper
| 171 |
432 | <filename>data/tools/monocular.json
[
{
"slug": "monocular",
"name": "Monocular",
"description": "Monocular is a web-based application that enables the search and discovery of charts from multiple Helm Chart repositories. It is the codebase that powers the Helm Hub project.",
"url": "https://github.com/helm/monocular",
"tags": [
"linux",
"open-source",
"service-discovery"
]
}
]
| 151 |
1,697 | <filename>IOT-Guide-DB-PostgreSQL/src/main/java/iot/technology/postgresql/dao/entity/DeviceEntity.java
package iot.technology.postgresql.dao.entity;
import javax.persistence.*;
import static iot.technology.postgresql.constants.ModelConstants.*;
/**
* @author jamesmsw
* @description 设备表
* @date 2020/11/15 3:58 下午
*/
@Entity
@Table(name = "device")
public class DeviceEntity {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
@Column(name = ID_COLUMN)
private Integer id;
@Column(name = NAME_COLUMN)
private String name;
@Column(name = ADDITIONAL_INFO_COLUMN)
private String additionalInfo;
public Integer getId() {
return id;
}
public void setId(Integer id) {
this.id = id;
}
public String getName() {
return name;
}
public void setName(String name) {
this.name = name;
}
public String getAdditionalInfo() {
return additionalInfo;
}
public void setAdditionalInfo(String additionalInfo) {
this.additionalInfo = additionalInfo;
}
}
| 425 |
679 | /**************************************************************
*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*
*************************************************************/
#ifndef SVTOOLS_URIHELPER_HXX
#define SVTOOLS_URIHELPER_HXX
#include "svl/svldllapi.h"
#include "com/sun/star/uno/Reference.hxx"
#include <com/sun/star/uno/RuntimeException.hpp>
#include <rtl/textenc.h>
#include <tools/link.hxx>
#include <tools/solar.h>
#include <tools/urlobj.hxx>
namespace com { namespace sun { namespace star {
namespace uno { class XComponentContext; }
namespace uri { class XUriReference; }
} } }
namespace rtl { class OUString; }
class ByteString;
class CharClass;
class UniString;
//============================================================================
namespace URIHelper {
/**
@ATT
Calling this function with defaulted arguments rMaybeFileHdl = Link() and
bCheckFileExists = true often leads to results that are not intended:
Whenever the given rTheBaseURIRef is a file URL, the given rTheRelURIRef is
relative, and rTheRelURIRef could also be smart-parsed as a non-file URL
(e.g., the relative URL "foo/bar" can be smart-parsed as "http://foo/bar"),
then SmartRel2Abs called with rMaybeFileHdl = Link() and bCheckFileExists =
true returns the non-file URL interpretation. To avoid this, either pass
some non-null rMaybeFileHdl if you want to check generated file URLs for
existence (see URIHelper::GetMaybeFileHdl), or use bCheckFileExists = false
if you want to generate file URLs without checking for their existence.
*/
SVL_DLLPUBLIC UniString
SmartRel2Abs(INetURLObject const & rTheBaseURIRef,
ByteString const & rTheRelURIRef,
Link const & rMaybeFileHdl = Link(),
bool bCheckFileExists = true,
bool bIgnoreFragment = false,
INetURLObject::EncodeMechanism eEncodeMechanism
= INetURLObject::WAS_ENCODED,
INetURLObject::DecodeMechanism eDecodeMechanism
= INetURLObject::DECODE_TO_IURI,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8,
bool bRelativeNonURIs = false,
INetURLObject::FSysStyle eStyle = INetURLObject::FSYS_DETECT);
/**
@ATT
Calling this function with defaulted arguments rMaybeFileHdl = Link() and
bCheckFileExists = true often leads to results that are not intended:
Whenever the given rTheBaseURIRef is a file URL, the given rTheRelURIRef is
relative, and rTheRelURIRef could also be smart-parsed as a non-file URL
(e.g., the relative URL "foo/bar" can be smart-parsed as "http://foo/bar"),
then SmartRel2Abs called with rMaybeFileHdl = Link() and bCheckFileExists =
true returns the non-file URL interpretation. To avoid this, either pass
some non-null rMaybeFileHdl if you want to check generated file URLs for
existence (see URIHelper::GetMaybeFileHdl), or use bCheckFileExists = false
if you want to generate file URLs without checking for their existence.
*/
SVL_DLLPUBLIC UniString
SmartRel2Abs(INetURLObject const & rTheBaseURIRef,
UniString const & rTheRelURIRef,
Link const & rMaybeFileHdl = Link(),
bool bCheckFileExists = true,
bool bIgnoreFragment = false,
INetURLObject::EncodeMechanism eEncodeMechanism
= INetURLObject::WAS_ENCODED,
INetURLObject::DecodeMechanism eDecodeMechanism
= INetURLObject::DECODE_TO_IURI,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8,
bool bRelativeNonURIs = false,
INetURLObject::FSysStyle eStyle = INetURLObject::FSYS_DETECT);
//============================================================================
SVL_DLLPUBLIC void SetMaybeFileHdl(Link const & rTheMaybeFileHdl);
//============================================================================
SVL_DLLPUBLIC Link GetMaybeFileHdl();
/**
Converts a URI reference to a relative one, ignoring certain differences (for
example, treating file URLs for case-ignoring file systems
case-insensitively).
@param context a component context; must not be null
@param baseUriReference a base URI reference
@param uriReference a URI reference
@return a URI reference representing the given uriReference relative to the
given baseUriReference; if the given baseUriReference is not an absolute,
hierarchical URI reference, or the given uriReference is not a valid URI
reference, null is returned
@exception std::bad_alloc if an out-of-memory condition occurs
@exception com::sun::star::uno::RuntimeException if any error occurs
*/
SVL_DLLPUBLIC com::sun::star::uno::Reference< com::sun::star::uri::XUriReference >
normalizedMakeRelative(
com::sun::star::uno::Reference< com::sun::star::uno::XComponentContext >
const & context,
rtl::OUString const & baseUriReference, rtl::OUString const & uriReference);
/**
A variant of normalizedMakeRelative with a simplified interface.
Internally calls normalizedMakeRelative with the default component context.
@param baseUriReference a base URI reference, passed to
normalizedMakeRelative
@param uriReference a URI reference, passed to normalizedMakeRelative
@return if the XUriReference returned by normalizedMakeRelative is empty,
uriReference is returned unmodified; otherwise, the result of calling
XUriReference::getUriReference on the XUriReference returned by
normalizedMakeRelative is returned
@exception std::bad_alloc if an out-of-memory condition occurs
@exception com::sun::star::uno::RuntimeException if any error occurs
@deprecated
No code should rely on the default component context.
*/
SVL_DLLPUBLIC rtl::OUString simpleNormalizedMakeRelative(
rtl::OUString const & baseUriReference, rtl::OUString const & uriReference);
//============================================================================
SVL_DLLPUBLIC UniString
FindFirstURLInText(UniString const & rText,
xub_StrLen & rBegin,
xub_StrLen & rEnd,
CharClass const & rCharClass,
INetURLObject::EncodeMechanism eMechanism
= INetURLObject::WAS_ENCODED,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8,
INetURLObject::FSysStyle eStyle
= INetURLObject::FSYS_DETECT);
//============================================================================
/** Remove any password component from both absolute and relative URLs.
@ATT The current implementation will not remove a password from a
relative URL that has an authority component (e.g., the password is not
removed from the relative ftp URL <//user:password@domain/path>). But
since our functions to translate between absolute and relative URLs never
produce relative URLs with authority components, this is no real problem.
@ATT For relative URLs (or anything not recognized as an absolute URI),
the current implementation will return the input unmodified, not applying
any translations implied by the encode/decode parameters.
@param rURI An absolute or relative URI reference.
@param eEncodeMechanism See the general discussion for INetURLObject set-
methods.
@param eDecodeMechanism See the general discussion for INetURLObject get-
methods.
@param eCharset See the general discussion for INetURLObject get- and
set-methods.
@return The input URI with any password component removed.
*/
SVL_DLLPUBLIC UniString
removePassword(UniString const & rURI,
INetURLObject::EncodeMechanism eEncodeMechanism
= INetURLObject::WAS_ENCODED,
INetURLObject::DecodeMechanism eDecodeMechanism
= INetURLObject::DECODE_TO_IURI,
rtl_TextEncoding eCharset = RTL_TEXTENCODING_UTF8);
//============================================================================
/** Query the notational conventions used in the file system provided by some
file content provider.
@param rFileUrl This file URL determines which file content provider is
used to query the desired information. (The UCB's usual mapping from URLs
to content providers is used.)
@param bAddConvenienceStyles If true, the return value contains not only
the style bit corresponding to the queried content provider's conventions,
but may also contain additional style bits that make using this function
more convenient in certain situations. Currently, the effect is that
FSYS_UNX is extended with FSYS_VOS, and both FSYS_DOS and FSYS_MAC are
extended with FSYS_VOS and FSYS_UNX (i.e., the---unambiguous---detection
of VOS style and Unix style file system paths is always enabled); also, in
case the content provider's conventions cannot be determined, FSYS_DETECT
is returned instead of FSysStyle(0).
@return The style bit corresponding to the queried content provider's
conventions, or FSysStyle(0) if these cannot be determined.
*/
SVL_DLLPUBLIC INetURLObject::FSysStyle queryFSysStyle(UniString const & rFileUrl,
bool bAddConvenienceStyles = true)
throw (com::sun::star::uno::RuntimeException);
}
#endif // SVTOOLS_URIHELPER_HXX
| 2,893 |
442 | <reponame>violet-Bin/read-spring-code
/*
* Copyright 2002-2018 the original author or authors.
*
* 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
*
* https://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.
*/
package org.springframework.scheduling.quartz;
import java.sql.Connection;
import java.sql.SQLException;
import javax.sql.DataSource;
import org.quartz.SchedulerConfigException;
import org.quartz.impl.jdbcjobstore.JobStoreCMT;
import org.quartz.impl.jdbcjobstore.SimpleSemaphore;
import org.quartz.spi.ClassLoadHelper;
import org.quartz.spi.SchedulerSignaler;
import org.quartz.utils.ConnectionProvider;
import org.quartz.utils.DBConnectionManager;
import org.springframework.jdbc.datasource.DataSourceUtils;
import org.springframework.jdbc.support.JdbcUtils;
import org.springframework.jdbc.support.MetaDataAccessException;
import org.springframework.lang.Nullable;
/**
* Subclass of Quartz's {@link JobStoreCMT} class that delegates to a Spring-managed
* {@link DataSource} instead of using a Quartz-managed JDBC connection pool.
* This JobStore will be used if SchedulerFactoryBean's "dataSource" property is set.
*
* <p>Supports both transactional and non-transactional DataSource access.
* With a non-XA DataSource and local Spring transactions, a single DataSource
* argument is sufficient. In case of an XA DataSource and global JTA transactions,
* SchedulerFactoryBean's "nonTransactionalDataSource" property should be set,
* passing in a non-XA DataSource that will not participate in global transactions.
*
* <p>Operations performed by this JobStore will properly participate in any
* kind of Spring-managed transaction, as it uses Spring's DataSourceUtils
* connection handling methods that are aware of a current transaction.
*
* <p>Note that all Quartz Scheduler operations that affect the persistent
* job store should usually be performed within active transactions,
* as they assume to get proper locks etc.
*
* @author <NAME>
* @since 1.1
* @see SchedulerFactoryBean#setDataSource
* @see SchedulerFactoryBean#setNonTransactionalDataSource
* @see org.springframework.jdbc.datasource.DataSourceUtils#doGetConnection
* @see org.springframework.jdbc.datasource.DataSourceUtils#releaseConnection
*/
@SuppressWarnings("unchecked") // due to a warning in Quartz 2.2's JobStoreCMT
public class LocalDataSourceJobStore extends JobStoreCMT {
/**
* Name used for the transactional ConnectionProvider for Quartz.
* This provider will delegate to the local Spring-managed DataSource.
* @see org.quartz.utils.DBConnectionManager#addConnectionProvider
* @see SchedulerFactoryBean#setDataSource
*/
public static final String TX_DATA_SOURCE_PREFIX = "springTxDataSource.";
/**
* Name used for the non-transactional ConnectionProvider for Quartz.
* This provider will delegate to the local Spring-managed DataSource.
* @see org.quartz.utils.DBConnectionManager#addConnectionProvider
* @see SchedulerFactoryBean#setDataSource
*/
public static final String NON_TX_DATA_SOURCE_PREFIX = "springNonTxDataSource.";
@Nullable
private DataSource dataSource;
@Override
public void initialize(ClassLoadHelper loadHelper, SchedulerSignaler signaler) throws SchedulerConfigException {
// Absolutely needs thread-bound DataSource to initialize.
this.dataSource = SchedulerFactoryBean.getConfigTimeDataSource();
if (this.dataSource == null) {
throw new SchedulerConfigException("No local DataSource found for configuration - " +
"'dataSource' property must be set on SchedulerFactoryBean");
}
// Configure transactional connection settings for Quartz.
setDataSource(TX_DATA_SOURCE_PREFIX + getInstanceName());
setDontSetAutoCommitFalse(true);
// Register transactional ConnectionProvider for Quartz.
DBConnectionManager.getInstance().addConnectionProvider(
TX_DATA_SOURCE_PREFIX + getInstanceName(),
new ConnectionProvider() {
@Override
public Connection getConnection() throws SQLException {
// Return a transactional Connection, if any.
return DataSourceUtils.doGetConnection(dataSource);
}
@Override
public void shutdown() {
// Do nothing - a Spring-managed DataSource has its own lifecycle.
}
/* Quartz 2.2 initialize method */
public void initialize() {
// Do nothing - a Spring-managed DataSource has its own lifecycle.
}
}
);
// Non-transactional DataSource is optional: fall back to default
// DataSource if not explicitly specified.
DataSource nonTxDataSource = SchedulerFactoryBean.getConfigTimeNonTransactionalDataSource();
final DataSource nonTxDataSourceToUse = (nonTxDataSource != null ? nonTxDataSource : this.dataSource);
// Configure non-transactional connection settings for Quartz.
setNonManagedTXDataSource(NON_TX_DATA_SOURCE_PREFIX + getInstanceName());
// Register non-transactional ConnectionProvider for Quartz.
DBConnectionManager.getInstance().addConnectionProvider(
NON_TX_DATA_SOURCE_PREFIX + getInstanceName(),
new ConnectionProvider() {
@Override
public Connection getConnection() throws SQLException {
// Always return a non-transactional Connection.
return nonTxDataSourceToUse.getConnection();
}
@Override
public void shutdown() {
// Do nothing - a Spring-managed DataSource has its own lifecycle.
}
/* Quartz 2.2 initialize method */
public void initialize() {
// Do nothing - a Spring-managed DataSource has its own lifecycle.
}
}
);
// No, if HSQL is the platform, we really don't want to use locks...
try {
String productName = JdbcUtils.extractDatabaseMetaData(this.dataSource, "getDatabaseProductName");
productName = JdbcUtils.commonDatabaseName(productName);
if (productName != null && productName.toLowerCase().contains("hsql")) {
setUseDBLocks(false);
setLockHandler(new SimpleSemaphore());
}
}
catch (MetaDataAccessException ex) {
logWarnIfNonZero(1, "Could not detect database type. Assuming locks can be taken.");
}
super.initialize(loadHelper, signaler);
}
@Override
protected void closeConnection(Connection con) {
// Will work for transactional and non-transactional connections.
DataSourceUtils.releaseConnection(con, this.dataSource);
}
}
| 2,058 |
5,169 | {
"name": "MBAudienceSwift",
"version": "0.1.2",
"summary": "MBurger audience plugin.",
"swift_versions": "4.2",
"description": "MBurger audience plugin used to target messages only to certain audience.",
"homepage": "https://github.com/Mumble-SRL/MBAudienceSwift",
"license": {
"type": "Apache",
"file": "LICENSE"
},
"authors": {
"LorenzOliveto": "<EMAIL>"
},
"platforms": {
"ios": "11.0"
},
"source": {
"git": "https://github.com/Mumble-SRL/MBAudienceSwift.git",
"tag": "0.1.2"
},
"source_files": [
"MBAudienceSwift/*.{h,m,swift}",
"MBAudienceSwift/**/*.{h,m,swift}"
],
"frameworks": "CoreLocation",
"requires_arc": true,
"dependencies": {
"MBurgerSwift": [
]
},
"swift_version": "4.2"
}
| 342 |
461 | <gh_stars>100-1000
#include <am.h>
#include <amdev.h>
#include <nemu.h>
void draw_sync();
int screen_width();
int screen_height();
size_t __am_video_read(uintptr_t reg, void *buf, size_t size) {
switch (reg) {
case _DEVREG_VIDEO_INFO: {
_DEV_VIDEO_INFO_t *info = (_DEV_VIDEO_INFO_t *)buf;
info->width = 400;
info->height = 300;
return sizeof(_DEV_VIDEO_INFO_t);
}
}
return 0;
}
size_t __am_video_write(uintptr_t reg, void *buf, size_t size) {
switch (reg) {
case _DEVREG_VIDEO_FBCTL: {
_DEV_VIDEO_FBCTL_t *ctl = (_DEV_VIDEO_FBCTL_t *)buf;
int x=ctl->x,y=ctl->y,h=ctl->h,w=ctl->w;
int W=screen_width();
int H=screen_height();
uint32_t *pixels=ctl->pixels;
uint32_t *fb=(uint32_t *)(uintptr_t)FB_ADDR;
for(int i=0;i<h;i++){
for(int j=0;j<w;j++){
fb[(y+i)*W+x+j]=pixels[i*w+j];
}
}
if (ctl->sync) {
outl(SYNC_ADDR, 0);
}
return size;
}
}
return 0;
}
void __am_vga_init() {
int i;
int size = screen_width() * screen_height();
uint32_t *fb = (uint32_t *)(uintptr_t)FB_ADDR;
for (i = 0; i < size; i ++) fb[i] = 0;
draw_sync();
}
| 617 |
551 | <reponame>apohl79/audiogridder
/*
* Copyright (c) 2021 <NAME>
* Licensed under MIT (https://github.com/apohl79/audiogridder/blob/master/COPYING)
*
* Author: <NAME>
*/
#include "Sentry.hpp"
#include "Sentry.hpp"
#include "Defaults.hpp"
#include "Utils.hpp"
#include "Version.hpp"
#ifndef AG_SENTRY_ENABLED
#define AG_SENTRY_ENABLED 0
#endif
#if AG_SENTRY_ENABLED
#define SENTRY_BUILD_STATIC
#include <sentry.h>
#endif
namespace e47 {
namespace Sentry {
#if AG_SENTRY_ENABLED
static std::atomic_bool l_sentryEnabled{true};
static std::atomic_bool l_sentryInitialized{false};
#endif
void initialize() {
#if AG_SENTRY_ENABLED
auto crashpadPath = Defaults::getSentryCrashpadPath();
setLogTagStatic("sentry");
if (l_sentryEnabled && crashpadPath.isNotEmpty() && !l_sentryInitialized.exchange(true)) {
logln("initializing crash reporting...");
sentry_options_t* options = sentry_options_new();
sentry_options_set_dsn(options, AG_SENTRY_DSN);
sentry_options_set_handler_path(options, crashpadPath.toRawUTF8());
sentry_options_set_database_path(options, Defaults::getSentryDbPath().toRawUTF8());
if (String(AUDIOGRIDDER_VERSION) != "dev-build") {
StringArray parts = StringArray::fromTokens(AUDIOGRIDDER_VERSION, "-", {});
StringArray version = StringArray::fromTokens(AUDIOGRIDDER_VERSION_NUM, ".", {});
String rel = "release_";
rel << version[0] << "_" << version[1] << "_" << version[2];
if (parts.size() > 1) {
rel << "_" << parts[1];
}
sentry_options_set_release(options, rel.toRawUTF8());
}
if (AGLogger::isEnabled()) {
auto logfile = AGLogger::getLogFile().getFullPathName();
if (logfile.isNotEmpty()) {
logln(" attaching logfile: " << AGLogger::getLogFile().getFileName());
sentry_options_add_attachment(options, logfile.toRawUTF8());
}
}
if (Tracer::isEnabled()) {
auto tracefile = Tracer::getTraceFile().getFullPathName();
if (tracefile.isNotEmpty()) {
logln(" attaching tracefile: " << Tracer::getTraceFile().getFileName());
sentry_options_add_attachment(options, tracefile.toRawUTF8());
}
}
sentry_init(options);
}
#endif
}
void cleanup() {
#if AG_SENTRY_ENABLED
if (l_sentryInitialized.exchange(false)) {
sentry_close();
}
#endif
}
void setEnabled(bool b) {
#if AG_SENTRY_ENABLED
l_sentryEnabled = b;
#else
ignoreUnused(b);
#endif
}
bool isEnabled() {
#if AG_SENTRY_ENABLED
return l_sentryEnabled;
#else
return false;
#endif
}
} // namespace Sentry
} // namespace e47
| 1,238 |
4,140 | <gh_stars>1000+
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
package org.apache.hadoop.hive.ql.exec;
import java.util.Random;
import org.apache.hadoop.hive.conf.HiveConf;
import org.apache.hadoop.hive.llap.io.api.LlapProxy;
import org.apache.hadoop.hive.ql.CompilationOpContext;
import org.apache.hadoop.hive.ql.exec.tez.ObjectCache;
import org.apache.hadoop.hive.ql.exec.tez.TezProcessor;
import org.apache.hadoop.hive.ql.metadata.HiveException;
import org.apache.hadoop.hive.ql.plan.LimitDesc;
import org.apache.tez.runtime.common.objectregistry.ObjectRegistryImpl;
import org.junit.Assert;
import org.junit.Test;
public class TestLimitOperator {
private static final Object fakeObjectToPass = new Object();
private Random random = new Random(TestLimitOperator.class.toString().hashCode());
@Test
public void testGlobalLimitReached() throws HiveException {
// no offset
testGlobalLimitReachedInDaemonOrContainer(true, 0, 2);
testGlobalLimitReachedInDaemonOrContainer(false, 0, 2);
// offset < limit
testGlobalLimitReachedInDaemonOrContainer(true, 1, 2);
testGlobalLimitReachedInDaemonOrContainer(false, 1, 2);
// offset = limit
testGlobalLimitReachedInDaemonOrContainer(true, 2, 2);
testGlobalLimitReachedInDaemonOrContainer(false, 2, 2);
// offset > limit
testGlobalLimitReachedInDaemonOrContainer(true, 3, 2);
testGlobalLimitReachedInDaemonOrContainer(false, 3, 2);
}
private void testGlobalLimitReachedInDaemonOrContainer(boolean isDaemon, int offset, int limit)
throws HiveException {
int numProcessedElements = 0; // from FakeVectorRowBatchFromObjectIterables
LlapProxy.setDaemon(isDaemon);
if (!isDaemon) {// init tez object registry
ObjectCache.setupObjectRegistry(new ObjectRegistryImpl());
}
HiveConf conf = new HiveConf();
HiveConf.setVar(conf, HiveConf.ConfVars.HIVEQUERYID, "query-" + random.nextInt(10000));
HiveConf.setVar(conf, HiveConf.ConfVars.HIVE_EXECUTION_ENGINE, "tez");
conf.set(TezProcessor.HIVE_TEZ_VERTEX_NAME, "Map 1");
LimitOperator lo1 = new LimitOperator(new CompilationOpContext());
lo1.setConf(new LimitDesc(offset, limit));
lo1.initialize(conf, null);
lo1.initializeOp(conf);
LimitOperator lo2 = new LimitOperator(new CompilationOpContext());
lo2.setConf(new LimitDesc(offset, limit));
lo2.initialize(conf, null);
lo2.initializeOp(conf);
Assert.assertEquals(0, lo1.currCount);
Assert.assertEquals(0, lo2.currCount);
// operator id is important, as it's the base of the limit cache key
// these operator instances represent the same operator running in different tasks
Assert.assertEquals("LIM_0", lo1.getOperatorId());
Assert.assertEquals("LIM_0", lo2.getOperatorId());
// assertion no.1: unlike VectorLimitOperator, we op.process checks limit before every element,
// so we can notice limit reached while processing the offset+limit+1st element, so op.getDone()
// is true if we already processed at least limit + offset
// assertion no.2: number of processed rows properly set to global cache and is equal to the
// count by which op.process was called
// assertion no.3: the local counter is in sync with the global counter (in this test case, no
// other tasks work concurrently)
// element: 1,2
processRowNTimes(lo1, 2);
numProcessedElements += 2;
Assert.assertEquals(numProcessedElements > limit + offset, lo1.getDone());
Assert.assertEquals(Math.min(numProcessedElements, limit + offset),
lo1.getCurrentCount().get());
Assert.assertEquals(lo1.getCurrentCount().get(), lo1.currCount);
// element: 3
processRowNTimes(lo1, 1);
numProcessedElements += 1;
Assert.assertEquals(numProcessedElements > limit + offset, lo1.getDone());
Assert.assertEquals(Math.min(numProcessedElements, limit + offset),
lo1.getCurrentCount().get());
Assert.assertEquals(lo1.getCurrentCount().get(), lo1.currCount);
// element: 4
processRowNTimes(lo1, 1);
numProcessedElements += 1;
Assert.assertEquals(numProcessedElements > limit + offset, lo1.getDone());
Assert.assertEquals(Math.min(numProcessedElements, limit + offset),
lo1.getCurrentCount().get());
Assert.assertEquals(lo1.getCurrentCount().get(), lo1.currCount);
// if lo1 already processed enough rows, lo2 will turn to done without processing any elements
// lo2.getCurrentCount().get() should return the same as lo1.getCurrentCount().get()
Assert.assertEquals(Math.min(numProcessedElements, limit + offset),
lo2.getCurrentCount().get());
// ...but lo2's current count hasn't been touched yet, as process hasn't been called
Assert.assertEquals(0, lo2.currCount);
// getDone() = false before processing
Assert.assertEquals(false, lo2.getDone());
// try to process one more element with op2
processRowNTimes(lo2, 1);
// op2 will be noticed as done only if "numProcessedElements" (the number of elements processed
// by lo1) is more than limit + offset + 1, because in that case lo2 has nothing to do
boolean lo2DoneExpected = numProcessedElements > limit + offset + 1;
Assert.assertEquals(lo2DoneExpected, lo2.getDone());
// if lo2 is done, it hasn't processed any elements (currCount=0), otherwise it processed the
// new element
int lo2Count = lo2.currCount;
Assert.assertEquals(lo2DoneExpected ? 0 : 1, lo2.currCount);
// repeat once more (to test cases where limit+offset+1 < number of all elements to process
processRowNTimes(lo2, 1);
if (!lo2DoneExpected) {// if lo2 had the chance to process one more element (!done) ...
// ... let's count that in
numProcessedElements += 1;
if (lo2.getDone()) { // turn to done after processing => hasn't processed any element
Assert.assertEquals(lo2Count, lo2.currCount);
} else { // hasn't turned to done after processing => processed 1 more element
Assert.assertEquals(lo2Count + 1, lo2.currCount);
}
} else {
// current count hasn't changed
Assert.assertEquals(lo2Count, lo2.currCount);
}
lo2DoneExpected = numProcessedElements > limit + offset + 1;
Assert.assertEquals(lo2DoneExpected, lo2.getDone());
}
private void processRowNTimes(LimitOperator op, int n) throws HiveException {
for (int i = 0; i < n; i++) {
op.process(fakeObjectToPass, 0);
}
}
}
| 2,451 |
353 | /**
* Provides code that allows interaction with MySQL databases over AF_UNIX sockets.
*/
package org.newsclub.net.mysql; | 32 |
3,553 | <gh_stars>1000+
/* -*- Mode: C; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
/* Fluent Bit
* ==========
* Copyright (C) 2019-2021 The Fluent Bit Authors
* Copyright (C) 2015-2018 Treasure Data Inc.
*
* 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.
*/
#include <fluent-bit/flb_output_plugin.h>
#include <fluent-bit/flb_utils.h>
#include <fluent-bit/flb_slist.h>
#include <fluent-bit/flb_time.h>
#include <fluent-bit/flb_pack.h>
#include <fluent-bit/flb_config_map.h>
#include <fluent-bit/flb_metrics.h>
#include <msgpack.h>
#include "stdout.h"
static int cb_stdout_init(struct flb_output_instance *ins,
struct flb_config *config, void *data)
{
int ret;
const char *tmp;
struct flb_stdout *ctx = NULL;
(void) ins;
(void) config;
(void) data;
ctx = flb_calloc(1, sizeof(struct flb_stdout));
if (!ctx) {
flb_errno();
return -1;
}
ctx->ins = ins;
ret = flb_output_config_map_set(ins, (void *) ctx);
if (ret == -1) {
flb_free(ctx);
return -1;
}
ctx->out_format = FLB_PACK_JSON_FORMAT_NONE;
tmp = flb_output_get_property("format", ins);
if (tmp) {
ret = flb_pack_to_json_format_type(tmp);
if (ret == -1) {
flb_plg_error(ctx->ins, "unrecognized 'format' option. "
"Using 'msgpack'");
}
else {
ctx->out_format = ret;
}
}
/* Date key */
ctx->date_key = ctx->json_date_key;
tmp = flb_output_get_property("json_date_key", ins);
if (tmp) {
/* Just check if we have to disable it */
if (flb_utils_bool(tmp) == FLB_FALSE) {
ctx->date_key = NULL;
}
}
/* Date format for JSON output */
ctx->json_date_format = FLB_PACK_JSON_DATE_DOUBLE;
tmp = flb_output_get_property("json_date_format", ins);
if (tmp) {
ret = flb_pack_to_json_date_type(tmp);
if (ret == -1) {
flb_plg_error(ctx->ins, "invalid json_date_format '%s'. "
"Using 'double' type", tmp);
}
else {
ctx->json_date_format = ret;
}
}
/* Export context */
flb_output_set_context(ins, ctx);
return 0;
}
#ifdef FLB_HAVE_METRICS
static void print_metrics_text(struct flb_output_instance *ins,
const void *data, size_t bytes)
{
int ret;
size_t off = 0;
cmt_sds_t text;
struct cmt *cmt = NULL;
/* get cmetrics context */
ret = cmt_decode_msgpack_create(&cmt, (char *) data, bytes, &off);
if (ret != 0) {
flb_plg_error(ins, "could not process metrics payload");
return;
}
/* convert to text representation */
text = cmt_encode_text_create(cmt);
/* destroy cmt context */
cmt_destroy(cmt);
printf("%s", text);
fflush(stdout);
cmt_encode_text_destroy(text);
}
#endif
static void cb_stdout_flush(struct flb_event_chunk *event_chunk,
struct flb_output_flush *out_flush,
struct flb_input_instance *i_ins,
void *out_context,
struct flb_config *config)
{
msgpack_unpacked result;
size_t off = 0, cnt = 0;
struct flb_stdout *ctx = out_context;
flb_sds_t json;
char *buf = NULL;
(void) config;
struct flb_time tmp;
msgpack_object *p;
#ifdef FLB_HAVE_METRICS
/* Check if the event type is metrics, handle the payload differently */
if (event_chunk->type == FLB_EVENT_TYPE_METRIC) {
print_metrics_text(ctx->ins, (char *)
event_chunk->data,
event_chunk->size);
FLB_OUTPUT_RETURN(FLB_OK);
}
#endif
/* Assuming data is a log entry...*/
if (ctx->out_format != FLB_PACK_JSON_FORMAT_NONE) {
json = flb_pack_msgpack_to_json_format(event_chunk->data,
event_chunk->size,
ctx->out_format,
ctx->json_date_format,
ctx->date_key);
write(STDOUT_FILENO, json, flb_sds_len(json));
flb_sds_destroy(json);
/*
* If we are 'not' in json_lines mode, we need to add an extra
* breakline.
*/
if (ctx->out_format != FLB_PACK_JSON_FORMAT_LINES) {
printf("\n");
}
fflush(stdout);
}
else {
msgpack_unpacked_init(&result);
while (msgpack_unpack_next(&result,
event_chunk->data,
event_chunk->size, &off) == MSGPACK_UNPACK_SUCCESS) {
printf("[%zd] %s: [", cnt++, event_chunk->tag);
flb_time_pop_from_msgpack(&tmp, &result, &p);
printf("%"PRIu32".%09lu, ", (uint32_t)tmp.tm.tv_sec, tmp.tm.tv_nsec);
msgpack_object_print(stdout, *p);
printf("]\n");
}
msgpack_unpacked_destroy(&result);
flb_free(buf);
}
fflush(stdout);
FLB_OUTPUT_RETURN(FLB_OK);
}
static int cb_stdout_exit(void *data, struct flb_config *config)
{
struct flb_stdout *ctx = data;
if (!ctx) {
return 0;
}
flb_free(ctx);
return 0;
}
/* Configuration properties map */
static struct flb_config_map config_map[] = {
{
FLB_CONFIG_MAP_STR, "format", NULL,
0, FLB_FALSE, 0,
"Specifies the data format to be printed. Supported formats are msgpack json, json_lines and json_stream."
},
{
FLB_CONFIG_MAP_STR, "json_date_format", NULL,
0, FLB_FALSE, 0,
"Specifies the name of the date field in output."
},
{
FLB_CONFIG_MAP_STR, "json_date_key", "date",
0, FLB_TRUE, offsetof(struct flb_stdout, json_date_key),
"Specifies the format of the date. Supported formats are double, iso8601 and epoch."
},
/* EOF */
{0}
};
/* Plugin registration */
struct flb_output_plugin out_stdout_plugin = {
.name = "stdout",
.description = "Prints events to STDOUT",
.cb_init = cb_stdout_init,
.cb_flush = cb_stdout_flush,
.cb_exit = cb_stdout_exit,
.flags = 0,
.event_type = FLB_OUTPUT_LOGS | FLB_OUTPUT_METRICS,
.config_map = config_map
};
| 3,422 |
2,860 | <reponame>nostro-im/pipelines
# Copyright 2019 The Kubeflow Authors
#
# 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.
from typing import NamedTuple
def automl_prediction_service_batch_predict(
model_path,
gcs_input_uris: list = None,
gcs_output_uri_prefix: str = None,
bq_input_uri: str = None,
bq_output_uri: str = None,
params=None,
retry=None, #google.api_core.gapic_v1.method.DEFAULT,
timeout=None, #google.api_core.gapic_v1.method.DEFAULT,
metadata: dict = None,
) -> NamedTuple('Outputs', [('gcs_output_directory', str), ('bigquery_output_dataset', str)]):
import sys
import subprocess
subprocess.run([sys.executable, '-m', 'pip', 'install', 'google-cloud-automl==0.4.0', '--quiet', '--no-warn-script-location'], env={'PIP_DISABLE_PIP_VERSION_CHECK': '1'}, check=True)
input_config = {}
if gcs_input_uris:
input_config['gcs_source'] = {'input_uris': gcs_input_uris}
if bq_input_uri:
input_config['bigquery_source'] = {'input_uri': bq_input_uri}
output_config = {}
if gcs_output_uri_prefix:
output_config['gcs_destination'] = {'output_uri_prefix': gcs_output_uri_prefix}
if bq_output_uri:
output_config['bigquery_destination'] = {'output_uri': bq_output_uri}
from google.cloud import automl
client = automl.PredictionServiceClient()
response = client.batch_predict(
model_path,
input_config,
output_config,
params,
retry,
timeout,
metadata,
)
print('Operation started:')
print(response.operation)
result = response.result()
metadata = response.metadata
print('Operation finished:')
print(metadata)
output_info = metadata.batch_predict_details.output_info
# Workaround for Argo issue - it fails when output is empty: https://github.com/argoproj/argo-workflows/pull/1277/files#r326028422
return (output_info.gcs_output_directory or '-', output_info.bigquery_output_dataset or '-')
if __name__ == '__main__':
from kfp.components import create_component_from_func
automl_prediction_service_batch_predict_op = create_component_from_func(
automl_prediction_service_batch_predict,
output_component_file='component.yaml',
base_image='python:3.7',
annotations={
"author": "<NAME> <<EMAIL>>",
"canonical_location": "https://raw.githubusercontent.com/Ark-kun/pipeline_components/master/components/gcp/automl/prediction_service_batch_predict/component.yaml",
},
)
| 1,168 |
19,920 | <gh_stars>1000+
/*
* Copyright 2021 The Android Open Source Project
*
* 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.
*/
package com.google.android.exoplayer2.source.rtsp;
import com.google.common.collect.ImmutableList;
import java.util.List;
/** Represents an RTSP PLAY response. */
/* package */ final class RtspPlayResponse {
/** The response's status code. */
public final int status;
/** The playback start timing, {@link RtspSessionTiming#DEFAULT} if not present. */
public final RtspSessionTiming sessionTiming;
/** The list of {@link RtspTrackTiming} representing the {@link RtspHeaders#RTP_INFO} header. */
public final ImmutableList<RtspTrackTiming> trackTimingList;
/**
* Creates a new instance.
*
* @param status The response's status code.
* @param sessionTiming The {@link RtspSessionTiming}, pass {@link RtspSessionTiming#DEFAULT} if
* not present.
* @param trackTimingList The list of {@link RtspTrackTiming} representing the {@link
* RtspHeaders#RTP_INFO} header.
*/
public RtspPlayResponse(
int status, RtspSessionTiming sessionTiming, List<RtspTrackTiming> trackTimingList) {
this.status = status;
this.sessionTiming = sessionTiming;
this.trackTimingList = ImmutableList.copyOf(trackTimingList);
}
}
| 566 |
582 | <gh_stars>100-1000
/**
* This program and the accompanying materials
* are made available under the terms of the License
* which accompanies this distribution in the file LICENSE.txt
*/
package com.archimatetool.editor.diagram.policies;
import org.eclipse.emf.ecore.EClass;
import org.eclipse.gef.commands.Command;
import org.eclipse.gef.editpolicies.GraphicalNodeEditPolicy;
import org.eclipse.gef.requests.CreateConnectionRequest;
import org.eclipse.gef.requests.ReconnectRequest;
import com.archimatetool.editor.diagram.commands.CreateDiagramConnectionCommand;
import com.archimatetool.editor.diagram.commands.ReconnectDiagramConnectionCommand;
import com.archimatetool.model.IConnectable;
import com.archimatetool.model.IDiagramModelConnection;
import com.archimatetool.model.IDiagramModelObject;
/**
* A policy which allows a component to be connected to another component via a connection
*
* @author <NAME>
*/
public class BasicConnectionPolicy extends GraphicalNodeEditPolicy {
@Override
protected Command getConnectionCreateCommand(CreateConnectionRequest request) {
CreateDiagramConnectionCommand cmd = null;
EClass classType = (EClass)request.getNewObjectType();
IDiagramModelObject source = (IDiagramModelObject)getHost().getModel();
if(isValidConnectionSource(source, classType)) {
cmd = new CreateDiagramConnectionCommand(request);
cmd.setSource(source);
request.setStartCommand(cmd);
}
return cmd;
}
@Override
protected Command getConnectionCompleteCommand(CreateConnectionRequest request) {
IConnectable source = (IConnectable)request.getSourceEditPart().getModel();
IConnectable target = (IConnectable)getHost().getModel();
EClass relationshipType = (EClass)request.getNewObjectType();
CreateDiagramConnectionCommand cmd = null;
if(isValidConnection(source, target, relationshipType)) {
// Pick up the command that was created in getConnectionCreateCommand(CreateConnectionRequest request)
cmd = (CreateDiagramConnectionCommand)request.getStartCommand();
cmd.setTarget(target);
}
return cmd;
}
@Override
protected Command getReconnectSourceCommand(ReconnectRequest request) {
ReconnectDiagramConnectionCommand cmd = null;
IDiagramModelConnection connection = (IDiagramModelConnection)request.getConnectionEditPart().getModel();
IDiagramModelObject newSource = (IDiagramModelObject)getHost().getModel();
if(isValidConnectionSource(newSource, connection.eClass())) {
cmd = new ReconnectDiagramConnectionCommand(connection);
cmd.setNewSource(newSource);
}
return cmd;
}
@Override
protected Command getReconnectTargetCommand(ReconnectRequest request) {
ReconnectDiagramConnectionCommand cmd = null;
IDiagramModelConnection connection = (IDiagramModelConnection)request.getConnectionEditPart().getModel();
IDiagramModelObject newTarget = (IDiagramModelObject)getHost().getModel();
if(isValidConnectionTarget(newTarget, connection.eClass())) {
cmd = new ReconnectDiagramConnectionCommand(connection);
cmd.setNewTarget(newTarget);
}
return cmd;
}
protected boolean isValidConnectionSource(IConnectable source, EClass relationshipType) {
return true;
}
protected boolean isValidConnectionTarget(IConnectable target, EClass relationshipType) {
return true;
}
protected boolean isValidConnection(IConnectable source, IConnectable target, EClass relationshipType) {
return isValidConnectionSource(source, relationshipType) && isValidConnectionTarget(target, relationshipType);
}
}
| 1,523 |
450 | <gh_stars>100-1000
package org.apache.hawq.pxf.service.utilities;
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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.
*/
import java.util.ArrayList;
import java.util.BitSet;
import java.util.List;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.hawq.pxf.api.Fragment;
/**
* Helper class to get statistics for ANALYZE.
*/
public class AnalyzeUtils {
private static final Log LOG = LogFactory.getLog(AnalyzeUtils.class);
/**
* In case pxf_max_fragments parameter is declared, make sure not to get
* over the limit. The returned fragments are evenly distributed, in order
* to achieve good sampling.
*
* @param fragments fragments list
* @param protData container for parameters, including sampling data.
* @return a list of fragments no bigger than pxf_max_fragments parameter.
*/
static public List<Fragment> getSampleFragments(List<Fragment> fragments,
ProtocolData protData) {
int listSize = fragments.size();
int maxSize = protData.getStatsMaxFragments();
List<Fragment> samplingList = new ArrayList<Fragment>();
BitSet bitSet;
if (maxSize == 0) {
return fragments;
}
LOG.debug("fragments list has " + listSize
+ " fragments, maxFragments = " + maxSize);
bitSet = generateSamplingBitSet(listSize, maxSize);
for (int i = 0; i < listSize; ++i) {
if (bitSet.get(i)) {
samplingList.add(fragments.get(i));
}
}
return samplingList;
}
/**
* Marks sampleSize bits out of the poolSize, in a uniform way.
*
* @param poolSize pool size
* @param sampleSize sample size
* @return bit set with sampleSize bits set out of poolSize.
*/
static public BitSet generateSamplingBitSet(int poolSize, int sampleSize) {
int skip = 0, chosen = 0, curIndex = 0;
BitSet bitSet = new BitSet();
if (poolSize <= 0 || sampleSize <= 0) {
return bitSet;
}
if (sampleSize >= poolSize) {
LOG.debug("sampling bit map has " + poolSize + " elements (100%)");
bitSet.set(0, poolSize);
return bitSet;
}
skip = (poolSize / sampleSize) + 1;
while (chosen < sampleSize) {
bitSet.set(curIndex);
chosen++;
if (chosen == sampleSize) {
break;
}
for (int i = 0; i < skip; ++i) {
curIndex = nextClearBitModulo((++curIndex) % poolSize,
poolSize, bitSet);
if (curIndex == -1) {
// should never happen
throw new IllegalArgumentException(
"Trying to sample more than pool size "
+ "(pool size " + poolSize
+ ", sampling size " + sampleSize);
}
}
}
LOG.debug("sampling bit map has " + chosen + " elements:"
+ bitSet.toString());
return bitSet;
}
/**
* Returns index of next clear (false) bit, starting from and including
* index. If all bits from index to the end are set (true), search from the
* beginning. Return -1 if all bits are set (true).
*
* @param index starting point
* @param poolSize the bit set size
* @param bitSet bitset to search
* @return index of next clear bit, starting in index
*/
static private int nextClearBitModulo(int index, int poolSize, BitSet bitSet) {
int indexToSet = bitSet.nextClearBit(index);
if (indexToSet == poolSize && index != 0) {
indexToSet = bitSet.nextClearBit(0);
}
/* means that all bits are already set, so we return -1 */
if (indexToSet == poolSize) {
return -1;
}
return indexToSet;
}
}
| 1,987 |
2,227 | <filename>Solutions/FlareSystemsFirework/Data/Solution_FlareSystemsFirework.json
{
"Name": "FlareSystemsFirework",
"Author": "<NAME> - <EMAIL>",
"Logo": "<img src=\"https://raw.githubusercontent.com/Azure/Azure-Sentinel/master/Solutions/FlareSystemsFirework/Data%20Connectors/Logo/FlareSystems.svg\"width=\"75px\"height=\"75px\">",
"Description": "The Flare Systems [Firework](https://flare.systems/firework/) connector allows you to receive data and intelligence from Firework on Azure Sentinel.\n\rAzure Sentinel Solutions provide a consolidated way to acquire Azure Sentinel content like data connectors, workbooks, analytics, and automations in your workspace with a single deployment step.",
"Data Connectors": [
"Data Connectors/Connector_REST_API_FlareSystemsFirework.json"
],
"Workbook": [
"Workbooks/FlareSystemsFireworkOverview.json"
],
"Metadata": "SolutionMetadata.json",
"BasePath": "C:\\GitHub\\azure\\Solutions\\FlareSystemsFirework",
"Version": "1.1.0"
} | 318 |
1,006 | /****************************************************************************
* arch/arm/src/sama5/hardware/sam_udphs.h
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership. The
* ASF licenses this file to you 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.
*
****************************************************************************/
/* References:
* SAMA5D3 Series Data Sheet
*/
#ifndef __ARCH_ARM_SRC_SAMA5_HARDWARE_SAM_UDPHS_H
#define __ARCH_ARM_SRC_SAMA5_HARDWARE_SAM_UDPHS_H
/****************************************************************************
* Included Files
****************************************************************************/
#include <nuttx/config.h>
#include "chip.h"
#include "hardware/sam_memorymap.h"
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
/* General Definitions ******************************************************/
/* Number of endpoints and DMA channels */
#define SAM_UDPHS_NENDPOINTS 16 /* EP0-15 */
#define SAM_UDPHS_NDMACHANNELS 7 /* For EP1-7 */
/* Capabilities and characteristics of endpoints */
#define SAM_UDPHS_MAXPACKETSIZE(ep) \
(((unsigned)(ep) < 1) ? 64 : 1024)
#define SAM_UDPHS_NBANKS(ep) \
(((unsigned)(ep) < 1) ? 1 : (((unsigned)(ep) < 3) ? 3 : 2))
#define SAM_UDPHS_DMA(ep) \
(((unsigned)(ep) < 1) ? false : (((unsigned)(ep) < 8) ? true : false))
/* Register offsets *********************************************************/
/* Global Registers */
#define SAM_UDPHS_CTRL_OFFSET 0x0000 /* UDPHS Control Register */
#define SAM_UDPHS_FNUM_OFFSET 0x0004 /* UDPHS Frame Number Register */
/* 0x0008-0x000c Reserved */
#define SAM_UDPHS_IEN_OFFSET 0x0010 /* UDPHS Interrupt Enable Register */
#define SAM_UDPHS_INTSTA_OFFSET 0x0014 /* UDPHS Interrupt Status Register */
#define SAM_UDPHS_CLRINT_OFFSET 0x0018 /* UDPHS Clear Interrupt Register */
#define SAM_UDPHS_EPTRST_OFFSET 0x001c /* UDPHS Endpoints Reset Register */
/* 0x0020-0x00cc Reserved */
#define SAM_UDPHS_TST_OFFSET 0x00e0 /* UDPHS Test Register */
/* 0x00e4-0x00e8 Reserved */
/* Endpoint Offsets */
#define SAM_UDPHS_EP_OFFSET(ep) (0x0100+((unsigned int)(ep)<<5))
#define SAM_UDPHS_EP0_OFFSET 0x0100
#define SAM_UDPHS_EP1_OFFSET 0x0120
#define SAM_UDPHS_EP2_OFFSET 0x0140
#define SAM_UDPHS_EP3_OFFSET 0x0160
#define SAM_UDPHS_EP4_OFFSET 0x0180
#define SAM_UDPHS_EP5_OFFSET 0x01a0
#define SAM_UDPHS_EP6_OFFSET 0x01c0
#define SAM_UDPHS_EP7_OFFSET 0x01e0
#define SAM_UDPHS_EP8_OFFSET 0x0200
#define SAM_UDPHS_EP9_OFFSET 0x0220
#define SAM_UDPHS_EP10_OFFSET 0x0240
#define SAM_UDPHS_EP11_OFFSET 0x0260
#define SAM_UDPHS_EP12_OFFSET 0x0280
#define SAM_UDPHS_EP13_OFFSET 0x02a0
#define SAM_UDPHS_EP14_OFFSET 0x02c0
#define SAM_UDPHS_EP15_OFFSET 0x02e0
/* Endpoint registers */
#define SAM_UDPHS_EPTCFG_OFFSET 0x0000 /* UDPHS Endpoint Configuration Register */
#define SAM_UDPHS_EPTCTLENB_OFFSET 0x0004 /* UDPHS Endpoint Control Enable Register */
#define SAM_UDPHS_EPTCTLDIS_OFFSET 0x0008 /* UDPHS Endpoint Control Disable Register */
#define SAM_UDPHS_EPTCTL_OFFSET 0x000c /* UDPHS Endpoint Control Register */
/* 0x0010 Reserved */
#define SAM_UDPHS_EPTSETSTA_OFFSET 0x0014 /* UDPHS Endpoint Set Status Register */
#define SAM_UDPHS_EPTCLRSTA_OFFSET 0x0018 /* UDPHS Endpoint Clear Status Register */
#define SAM_UDPHS_EPTSTA_OFFSET 0x001c /* UDPHS Endpoint Status Register */
/* DMA Channel Offsets */
#define SAM_UDPHS_CH_OFFSET(ch) (0x0300+((unsigned int)(ch)<<4))
#define SAM_UDPHS_CH0_OFFSET 0x0300
#define SAM_UDPHS_CH1_OFFSET 0x0310
#define SAM_UDPHS_CH2_OFFSET 0x0320
#define SAM_UDPHS_CH3_OFFSET 0x0330
#define SAM_UDPHS_CH4_OFFSET 0x0340
#define SAM_UDPHS_CH5_OFFSET 0x0350
#define SAM_UDPHS_CH6_OFFSET 0x0360
/* DMA Channel Registers */
#define SAM_UDPHS_DMANXTDSC_OFFSET 0x0000 /* UDPHS DMA Next Descriptor Address Register */
#define SAM_UDPHS_DMAADDRESS_OFFSET 0x0004 /* UDPHS DMA Channel Address Register */
#define SAM_UDPHS_DMACONTROL_OFFSET 0x0008 /* UDPHS DMA Channel Control Register */
#define SAM_UDPHS_DMASTATUS_OFFSET 0x000c /* UDPHS DMA Channel Status Register */
/* Register addresses *******************************************************/
/* Global Registers */
#define SAM_UDPHS_CTRL (SAM_UDPHS_VBASE+SAM_UDPHS_CTRL_OFFSET)
#define SAM_UDPHS_FNUM (SAM_UDPHS_VBASE+SAM_UDPHS_FNUM_OFFSET)
#define SAM_UDPHS_IEN (SAM_UDPHS_VBASE+SAM_UDPHS_IEN_OFFSET)
#define SAM_UDPHS_INTSTA (SAM_UDPHS_VBASE+SAM_UDPHS_INTSTA_OFFSET)
#define SAM_UDPHS_CLRINT (SAM_UDPHS_VBASE+SAM_UDPHS_CLRINT_OFFSET)
#define SAM_UDPHS_EPTRST (SAM_UDPHS_VBASE+SAM_UDPHS_EPTRST_OFFSET)
#define SAM_UDPHS_TST (SAM_UDPHS_VBASE+SAM_UDPHS_TST_OFFSET)
/* Endpoint Base Addresses */
#define SAM_UDPHS_EP_BASE(ep) (SAM_UDPHS_VBASE+SAM_UDPHS_EP_OFFSET(ep))
#define SAM_UDPHS_EP0_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_EP0_OFFSET)
#define SAM_UDPHS_EP1_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_EP1_OFFSET)
#define SAM_UDPHS_EP2_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_EP2_OFFSET)
#define SAM_UDPHS_EP3_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_EP3_OFFSET)
#define SAM_UDPHS_EP4_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_EP4_OFFSET)
#define SAM_UDPHS_EP5_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_EP5_OFFSET)
#define SAM_UDPHS_EP6_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_EP6_OFFSET)
#define SAM_UDPHS_EP7_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_EP7_OFFSET)
#define SAM_UDPHS_EP8_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_EP8_OFFSET)
#define SAM_UDPHS_EP9_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_EP9_OFFSET)
#define SAM_UDPHS_EP10_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_EP10_OFFSET)
#define SAM_UDPHS_EP11_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_EP11_OFFSET)
#define SAM_UDPHS_EP12_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_EP12_OFFSET)
#define SAM_UDPHS_EP13_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_EP13_OFFSET)
#define SAM_UDPHS_EP14_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_EP14_OFFSET)
#define SAM_UDPHS_EP15_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_EP15_OFFSET)
/* Endpoint registers */
#define SAM_UDPHS_EPTCFG(ep) (SAM_UDPHS_EP_BASE(ep)+SAM_UDPHS_EPTCFG_OFFSET)
#define SAM_UDPHS_EPTCTLENB(ep) (SAM_UDPHS_EP_BASE(ep)+SAM_UDPHS_EPTCTLENB_OFFSET)
#define SAM_UDPHS_EPTCTLDIS(ep) (SAM_UDPHS_EP_BASE(ep)+SAM_UDPHS_EPTCTLDIS_OFFSET)
#define SAM_UDPHS_EPTCTL(ep) (SAM_UDPHS_EP_BASE(ep)+SAM_UDPHS_EPTCTL_OFFSET)
#define SAM_UDPHS_EPTSETSTA(ep) (SAM_UDPHS_EP_BASE(ep)+SAM_UDPHS_EPTSETSTA_OFFSET)
#define SAM_UDPHS_EPTCLRSTA(ep) (SAM_UDPHS_EP_BASE(ep)+SAM_UDPHS_EPTCLRSTA_OFFSET)
#define SAM_UDPHS_EPTSTA(ep) (SAM_UDPHS_EP_BASE(ep)+SAM_UDPHS_EPTSTA_OFFSET)
/* DMA Channel Base Addresses */
#define SAM_UDPHS_CH_BASE(ch) (SAM_UDPHS_VBASE+SAM_UDPHS_CH_OFFSET(ch))
#define SAM_UDPHS_CH1_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_CH1_OFFSET)
#define SAM_UDPHS_CH2_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_CH2_OFFSET)
#define SAM_UDPHS_CH3_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_CH3_OFFSET)
#define SAM_UDPHS_CH4_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_CH4_OFFSET)
#define SAM_UDPHS_CH5_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_CH5_OFFSET)
#define SAM_UDPHS_CH6_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_CH6_OFFSET)
#define SAM_UDPHS_CH7_BASE (SAM_UDPHS_VBASE+SAM_UDPHS_CH7_OFFSET)
/* DMA Channel Registers */
#define SAM_UDPHS_DMANXTDSC(ch) (SAM_UDPHS_CH_BASE(ch)+SAM_UDPHS_DMANXTDSC_OFFSET)
#define SAM_UDPHS_DMAADDRESS(ch) (SAM_UDPHS_CH_BASE(ch)+SAM_UDPHS_DMAADDRESS_OFFSET)
#define SAM_UDPHS_DMACONTROL(ch) (SAM_UDPHS_CH_BASE(ch)+SAM_UDPHS_DMACONTROL_OFFSET)
#define SAM_UDPHS_DMASTATUS(ch) (SAM_UDPHS_CH_BASE(ch)+SAM_UDPHS_DMASTATUS_OFFSET)
/* Register bit-field definitions *******************************************/
/* Global Registers */
/* UDPHS Control Register */
#define UDPHS_CTRL_DEVADDR_SHIFT (0) /* Bits 0-6: UDPHS Address */
#define UDPHS_CTRL_DEVADDR_MASK (0x7f << UDPHS_CTRL_DEVADDR_SHIFT)
# define UDPHS_CTRL_DEVADDR(addr) ((addr) << UDPHS_CTRL_DEVADDR_SHIFT)
#define UDPHS_CTRL_FADDREN (1 << 7) /* Bit 7: Function Address Enable */
#define UDPHS_CTRL_ENUDPHS (1 << 8) /* Bit 8: UDPHS Enable */
#define UDPHS_CTRL_DETACH (1 << 9) /* Bit 9: Detach Command */
#define UDPHS_CTRL_REWAKEUP (1 << 10) /* Bit 10: Send Remote Wake Up */
#define UDPHS_CTRL_PULLDDIS (1 << 11) /* Bit 11: Pull-Down Disable */
/* UDPHS Frame Number Register */
#define UDPHS_FNUM_UFRAMENUM_SHIFT (0) /* Bits 0-2: Microframe Number */
#define UDPHS_FNUM_UFRAMENUM_MASK (7 << UDPHS_FNUM_UFRAMENUM_SHIFT)
#define UDPHS_FNUM_FRAMENUM_SHIFT (3) /* Bits 3-13: Frame Number */
#define UDPHS_FNUM_FRAMENUM_MASK (0x7ff << UDPHS_FNUM_FRAMENUM_SHIFT)
#define UDPHS_FNUM_FNUMERR (1 << 31) /* Bit 31: Frame Number CRC Error */
/* Common interrupt bits */
/* UDPHS Interrupt Status Register (only) */
#define UDPHS_INTSTA_SPEED (1 << 0) /* Bit 0: Speed Status */
/* UDPHS Interrupt Enable Register, UDPHS Interrupt Status Register,
* and UDPHS Clear Interrupt Register
*/
#define UDPHS_INT_DETSUSPD (1 << 1) /* Bit 1: Suspend Interrupt */
#define UDPHS_INT_MICROSOF (1 << 2) /* Bit 2: Micro Start Of Frame Interrupt */
#define UDPHS_INT_INTSOF (1 << 3) /* Bit 3: Start Of Frame Interrupt */
#define UDPHS_INT_ENDRESET (1 << 4) /* Bit 4: End Of Reset Interrupt */
#define UDPHS_INT_WAKEUP (1 << 5) /* Bit 5: Wake Up CPU Interrupt */
#define UDPHS_INT_ENDOFRSM (1 << 6) /* Bit 6: End Of Resume Interrupt */
#define UDPHS_INT_UPSTRRES (1 << 7) /* Bit 7: Upstream Resume Interrupt */
/* UDPHS Interrupt Enable Register and UDPHS Interrupt Status Register */
#define UDPHS_INT_EPT_SHIFT (8) /* Bits 8-23: Endpoint interrupts */
#define UDPHS_INT_EPT_MASK (0xffff << UDPHS_INT_EPT_SHIFT)
#define UDPHS_INT_EPT(ep) (1 << +((ep)+8)) /* Endpoint ep Interrupt */
# define UDPHS_INT_EPT0 (1 << 8) /* Bit 8: Endpoint 0 Interrupt */
# define UDPHS_INT_EPT1 (1 << 9) /* Bit 9: Endpoint 1 Interrupt */
# define UDPHS_INT_EPT2 (1 << 10) /* Bit 10: Endpoint 2 Interrupt */
# define UDPHS_INT_EPT3 (1 << 11) /* Bit 11: Endpoint 3 Interrupt */
# define UDPHS_INT_EPT4 (1 << 12) /* Bit 12: Endpoint 4 Interrupt */
# define UDPHS_INT_EPT5 (1 << 13) /* Bit 13: Endpoint 5 Interrupt */
# define UDPHS_INT_EPT6 (1 << 14) /* Bit 14: Endpoint 6 Interrupt */
# define UDPHS_INT_EPT7 (1 << 15) /* Bit 15: Endpoint 7 Interrupt */
# define UDPHS_INT_EPT8 (1 << 16) /* Bit 16: Endpoint 8 Interrupt */
# define UDPHS_INT_EPT9 (1 << 17) /* Bit 17: Endpoint 9 Interrupt */
# define UDPHS_INT_EPT10 (1 << 18) /* Bit 18: Endpoint 10 Interrupt */
# define UDPHS_INT_EPT11 (1 << 19) /* Bit 19: Endpoint 11 Interrupt */
# define UDPHS_INT_EPT12 (1 << 20) /* Bit 20: Endpoint 12 Interrupt */
# define UDPHS_INT_EPT13 (1 << 21) /* Bit 21: Endpoint 13 Interrupt */
# define UDPHS_INT_EPT14 (1 << 22) /* Bit 22: Endpoint 14 Interrupt */
# define UDPHS_INT_EPT15 (1 << 23) /* Bit 23: Endpoint 15 Interrupt */
#define UDPHS_INT_DMA_SHIFT (25) /* Bits 25-31: Endpoint interrupts */
#define UDPHS_INT_DMA_MASK (0x7f << UDPHS_INT_DMA_SHIFT)
#define UDPHS_INT_DMA(ch) (1 << ((ch)+24)) /* DMA Channel ch Interrupt */
# define UDPHS_INT_DMA1 (1 << 25) /* Bit 25: DMA Channel 1 Interrupt */
# define UDPHS_INT_DMA2 (1 << 26) /* Bit 26: DMA Channel 2 Interrupt */
# define UDPHS_INT_DMA3 (1 << 27) /* Bit 27: DMA Channel 3 Interrupt */
# define UDPHS_INT_DMA4 (1 << 28) /* Bit 28: DMA Channel 4 Interrupt */
# define UDPHS_INT_DMA5 (1 << 29) /* Bit 29: DMA Channel 5 Interrupt */
# define UDPHS_INT_DMA6 (1 << 30) /* Bit 30: DMA Channel 6 Interrupt */
# define UDPHS_INT_DMA7 (1 << 31) /* Bit 31: DMA Channel 7 Interrupt */
/* UDPHS Endpoints Reset Register */
#define UDPHS_EPTRST(ep) (1 << (ep)) /* Endpoint ep Reset */
# define UDPHS_EPT0RST (1 << 0) /* Bit 0: Endpoint 0 Reset */
# define UDPHS_EPT1RST (1 << 1) /* Bit 1: Endpoint 1 Reset */
# define UDPHS_EPT2RST (1 << 2) /* Bit 2: Endpoint 2 Reset */
# define UDPHS_EPT3RST (1 << 3) /* Bit 3: Endpoint 3 Reset */
# define UDPHS_EPT4RST (1 << 4) /* Bit 4: Endpoint 4 Reset */
# define UDPHS_EPT5RST (1 << 5) /* Bit 5: Endpoint 5 Reset */
# define UDPHS_EPT6RST (1 << 6) /* Bit 6: Endpoint 6 Reset */
# define UDPHS_EPT7RST (1 << 7) /* Bit 7: Endpoint 7 Reset */
# define UDPHS_EPT8RST (1 << 8) /* Bit 8: Endpoint 8 Reset */
# define UDPHS_EPT9RST (1 << 9) /* Bit 9: Endpoint 9 Reset */
# define UDPHS_EPT10RST (1 << 10) /* Bit 10: Endpoint 10 Reset */
# define UDPHS_EPT11RST (1 << 11) /* Bit 11: Endpoint 11 Reset */
# define UDPHS_EPT12RST (1 << 12) /* Bit 12: Endpoint 12 Reset */
# define UDPHS_EPT13RST (1 << 13) /* Bit 13: Endpoint 13 Reset */
# define UDPHS_EPT14RST (1 << 14) /* Bit 14: Endpoint 14 Reset */
# define UDPHS_EPT15RST (1 << 15) /* Bit 15: Endpoint 15 Reset */
/* UDPHS Test Register */
#define UDPHS_TST_SPEED_SHIFT (0) /* Bits 0-1: Speed Configuration */
#define UDPHS_TST_SPEED_MASK (3 << UDPHS_TST_SPEED_SHIFT)
# define UDPHS_TST_SPEED_NORMAL (0 << UDPHS_TST_SPEED_SHIFT) /* Normal Mode */
# define UDPHS_TST_SPEED_HIGH (2 << UDPHS_TST_SPEED_SHIFT) /* Force High Speed */
# define UDPHS_TST_SPEED_FULL (3 << UDPHS_TST_SPEED_SHIFT) /* Force Full Speed */
#define UDPHS_TST_TSTJ (1 << 2) /* Bit 2: Test J Mode */
#define UDPHS_TST_TSTK (1 << 3) /* Bit 3: Test K Mode */
#define UDPHS_TST_TSTPKT (1 << 4) /* Bit 4: Test Packet Mode */
#define UDPHS_TST_OPMODE2 (1 << 5) /* Bit 4: OpMode2 */
/* Endpoint registers */
/* UDPHS Endpoint Configuration Register */
#define UDPHS_EPTCFG_SIZE_SHIFT (0) /* Bits 0-2: Endpoint Size */
#define UDPHS_EPTCFG_SIZE_MASK (7 << UDPHS_EPTCFG_SIZE_SHIFT)
# define UDPHS_EPTCFG_SIZE_8 (0 << UDPHS_EPTCFG_SIZE_SHIFT) /* 8 bytes */
# define UDPHS_EPTCFG_SIZE_16 (1 << UDPHS_EPTCFG_SIZE_SHIFT) /* 16 bytes */
# define UDPHS_EPTCFG_SIZE_32 (2 << UDPHS_EPTCFG_SIZE_SHIFT) /* 32 bytes */
# define UDPHS_EPTCFG_SIZE_64 (3 << UDPHS_EPTCFG_SIZE_SHIFT) /* 64 bytes */
# define UDPHS_EPTCFG_SIZE_128 (4 << UDPHS_EPTCFG_SIZE_SHIFT) /* 128 bytes */
# define UDPHS_EPTCFG_SIZE_256 (5 << UDPHS_EPTCFG_SIZE_SHIFT) /* 256 bytes */
# define UDPHS_EPTCFG_SIZE_512 (6 << UDPHS_EPTCFG_SIZE_SHIFT) /* 512 bytes */
# define UDPHS_EPTCFG_SIZE_1024 (7 << UDPHS_EPTCFG_SIZE_SHIFT) /* 1024 bytes */
#define UDPHS_EPTCFG_DIR (1 << 3) /* Bit 3: Endpoint Direction */
#define UDPHS_EPTCFG_TYPE_SHIFT (4) /* Bits 4-5: Endpoint Type */
#define UDPHS_EPTCFG_TYPE_MASK (3 << UDPHS_EPTCFG_TYPE_SHIFT)
# define UDPHS_EPTCFG_TYPE_CTRL8 (0 << UDPHS_EPTCFG_TYPE_SHIFT) /* Control endpoint */
# define UDPHS_EPTCFG_TYPE_ISO (1 << UDPHS_EPTCFG_TYPE_SHIFT) /* Isochronous endpoint */
# define UDPHS_EPTCFG_TYPE_BULK (2 << UDPHS_EPTCFG_TYPE_SHIFT) /* Bulk endpoint */
# define UDPHS_EPTCFG_TYPE_INT (3 << UDPHS_EPTCFG_TYPE_SHIFT) /* Interrupt endpoint */
#define UDPHS_EPTCFG_BKNUMBER_SHIFT (6) /* Bits 6-7: Number of Banks */
#define UDPHS_EPTCFG_BKNUMBER_MASK (3 << UDPHS_EPTCFG_BKNUMBER_SHIFT)
#define UDPHS_EPTCFG_NBTRANS_SHIFT (8) /* Bits 8-9: Number Transaction per uframe */
#define UDPHS_EPTCFG_NBTRANS_MASK (3 << UDPHS_EPTCFG_NBTRANS_SHIFT)
#define UDPHS_EPTCFG_MAPD (1 << 31) /* Bit 31: Endpoint Mapped */
/* UDPHS Endpoint Control Enable Register,
* UDPHS Endpoint Control Disable Register, and UDPHS
* Endpoint Control Register
*/
/* Common bits definitions */
#define UDPHS_EPTCTL_EPTENABL (1 << 0) /* Bit 0: Endpoint Enable */
#define UDPHS_EPTCTL_AUTOVALID (1 << 1) /* Bit 1: Packet Auto-Valid Enable */
#define UDPHS_EPTCTL_INTDISDMA (1 << 3) /* Bit 3: Interrupts Disable DMA */
/* Control/Bulk/Interrupt */
#define UDPHS_EPTCTL_NYETDIS (1 << 4) /* Bit 4: NYET Disable (High Speed Bulk OUT) */
/* Isochronous Endpoints Only */
#define UDPHS_EPTCTL_DATAXRX (1 << 8) /* Bit 8: Interrupt Enable (Isochronous OUT) */
#define UDPHS_EPTCTL_MDATARX (1 << 9) /* Bit 9: MDATA Interrupt Enable (Isochronous OUT) */
/* Common Bit Definitions */
#define UDPHS_EPTCTL_ERROVFLW (1 << 8) /* Bit 8: Overflow Error Interrupt Enable */
#define UDPHS_EPTCTL_RXRDYTXKL (1 << 9) /* Bit 9: Received OUT Data Interrupt Enable */
#define UDPHS_EPTCTL_TXCOMPLT (1 << 10) /* Bit 10: Transmitted IN Data Complete Interrupt Enable */
/* Control/Bulk/Interrupt */
#define UDPHS_EPTCTL_TXRDY (1 << 11) /* Bit 11: TX Packet Ready Interrupt Enable */
#define UDPHS_EPTCTL_RXSETUP (1 << 12) /* Bit 12: Received SETUP */
#define UDPHS_EPTCTL_STALLSNT (1 << 13) /* Bit 13: Stall Sent Interrupt Enable */
#define UDPHS_EPTCTL_NAKIN (1 << 14) /* Bit 14: NAKIN Interrupt Enable */
#define UDPHS_EPTCTL_NAKOUT (1 << 15) /* Bit 15: NAKOUT Interrupt Enable */
/* Isochronous Endpoints Only */
#define UDPHS_EPTCTL_TXRDYTRER (1 << 11) /* Bit 11: TX Packet Ready/Transaction Error Interrupt Enable */
#define UDPHS_EPTCTL_ERRFLISO (1 << 12) /* Bit 12: Error Flow Interrupt Enable */
#define UDPHS_EPTCTL_ERRCRCNTR (1 << 13) /* Bit 13: ISO CRC Error/Number of Transaction Error Interrupt Enable */
#define UDPHS_EPTCTL_ERRFLUSH (1 << 14) /* Bit 14: Bank Flush Error Interrupt Enable */
/* Common Bit Definitions */
#define UDPHS_EPTCTL_BUSYBANK (1 << 18) /* Bit 28: Busy Bank Interrupt Enable */
#define UDPHS_EPTCTL_SHRTPCKT (1 << 31) /* Bit 31: Short Packet Send/Short Packet Interrupt Enable */
/* UDPHS Endpoint Set Status Register */
/* Control/Bulk/Interrupt */
#define UDPHS_EPTSETSTA_FRCESTALL (1 << 5) /* Bit 5: Stall Handshake Request Set */
/* Common Bit Definitions */
#define UDPHS_EPTSETSTA_RXRDYTXKL (1 << 9) /* Bit 9: KILL Bank Set (IN Endpoint) */
/* Control/Bulk/Interrupt */
#define UDPHS_EPTSETSTA_TXRDY (1 << 11) /* Bit 11: TX Packet Ready Set */
/* Isochronous Endpoints Only */
#define UDPHS_EPTSETSTA_TXRDYTRER (1 << 11) /* Bit 11: TX Packet Ready Set */
/* UDPHS Endpoint Clear Status Register */
/* Control/Bulk/Interrupt */
#define UDPHS_EPTCLRSTA_FRCESTALL (1 << 5) /* Bit 5: Stall Handshake Request Clear */
/* Common Bit Definitions */
#define UDPHS_EPTCLRSTA_TOGGLESQ (1 << 6) /* Bit 6: Data Toggle Clear */
#define UDPHS_EPTCLRSTA_RXRDYTXKL (1 << 9) /* Bit 9: Received OUT Data Clear */
#define UDPHS_EPTCLRSTA_TXCOMPLT (1 << 10) /* Bit 10: Transmitted IN Data Complete Clear */
/* Control/Bulk/Interrupt */
#define UDPHS_EPTCLRSTA_RXSETUP (1 << 12) /* Bit 12: Received SETUP Clear */
#define UDPHS_EPTCLRSTA_STALLSNT (1 << 13) /* Bit 13: Stall Sent Clear */
#define UDPHS_EPTCLRSTA_NAKIN (1 << 14) /* Bit 14: NAKIN Clear */
#define UDPHS_EPTCLRSTA_NAKOUT (1 << 15) /* Bit 15: NAKOUT Clear */
/* Isochronous Endpoints Only */
#define UDPHS_EPTCLRSTA_ERRFLISO (1 << 12) /* Bit 12: Error Flow Clear */
#define UDPHS_EPTCLRSTA_ERRCRCNTR (1 << 13) /* Bit 13: Number of Transaction Error Clear */
#define UDPHS_EPTCLRSTA_ERRFLUSH (1 << 14) /* Bit 14: Bank Flush Error Clear */
/* UDPHS Endpoint Status Register */
/* Control/Bulk/Interrupt */
#define UDPHS_EPTSTA_FRCESTALL (1 << 5) /* Bit 5: Stall Handshake Request */
/* Common Bit Definitions */
#define UDPHS_EPTSTA_TOGGLESQ_SHIFT (6) /* Bits 6-7: Toggle Sequencing */
#define UDPHS_EPTSTA_TOGGLESQ_MASK (3 << UDPHS_EPTSTA_TOGGLESQ_SHIFT)
# define UDPHS_EPTSTA_TOGGLESQ_DATA0 (0 << UDPHS_EPTSTA_TOGGLESQ_SHIFT) /* DATA0 */
# define UDPHS_EPTSTA_TOGGLESQ_DATA1 (1 << UDPHS_EPTSTA_TOGGLESQ_SHIFT) /* DATA1 */
# define UDPHS_EPTSTA_TOGGLESQ_DATA2 (2 << UDPHS_EPTSTA_TOGGLESQ_SHIFT) /* Isochronous Endpoint */
# define UDPHS_EPTSTA_TOGGLESQ_MDATA (3 << UDPHS_EPTSTA_TOGGLESQ_SHIFT) /* Isochronous Endpoint */
#define UDPHS_EPTSTA_ERROVFLW (1 << 8) /* Bit 8: Overflow Error */
#define UDPHS_EPTSTA_RXRDYTXKL (1 << 9) /* Bit 9: Received OUT Data/KILL Bank */
#define UDPHS_EPTSTA_TXCOMPLT (1 << 10) /* Bit 10: Transmitted IN Data Complete */
/* Control/Bulk/Interrupt */
#define UDPHS_EPTSTA_TXRDY (1 << 11) /* Bit 11: TX Packet Ready */
#define UDPHS_EPTSTA_RXSETUP (1 << 12) /* Bit 12: Received SETUP */
#define UDPHS_EPTSTA_STALLSNT (1 << 13) /* Bit 13: Stall Sent */
#define UDPHS_EPTSTA_NAKIN (1 << 14) /* Bit 14: NAK IN */
#define UDPHS_EPTSTA_NAKOUT (1 << 15) /* Bit 15: NAK OUT */
/* Isochronous Endpoints Only */
#define UDPHS_EPTSTA_TXRDYTRER (1 << 11) /* Bit 11: TX Packet Ready/Transaction Error */
#define UDPHS_EPTSTA_ERRFLISO (1 << 12) /* Bit 12: Error Flow */
#define UDPHS_EPTSTA_ERRCRCNTR (1 << 13) /* Bit 13: CRC ISO Error/Number of Transaction Error */
#define UDPHS_EPTSTA_ERRFLUSH (1 << 14) /* Bit 14: Bank Flush Error */
/* Control Only */
#define UDPHS_EPTSTA_CTLDIR_SHIFT (16) /* Bits 16-17: Control Direction */
#define UDPHS_EPTSTA_CTLDIR_MASK (3 << UDPHS_EPTSTA_CTLDIR_SHIFT)
# define UDPHS_EPTSTA_CTLDIR_WRITE (0 << UDPHS_EPTSTA_CTLDIR_SHIFT) /* Control Write requested */
# define UDPHS_EPTSTA_CTLDIR_READ (1 << UDPHS_EPTSTA_CTLDIR_SHIFT) /* Control Read requested */
/* Bulk/Interrupt/Isochronous */
#define UDPHS_EPTSTA_CURBK_SHIFT (16) /* Bits 16-17: Current Bank */
#define UDPHS_EPTSTA_CURBK_MASK (3 << UDPHS_EPTSTA_CURBK_SHIFT)
# define UDPHS_EPTSTA_CURBK_BANK0 (0 << UDPHS_EPTSTA_CURBK_SHIFT) /* Bank 0 (or single bank) */
# define UDPHS_EPTSTA_CURBK_BANK1 (1 << UDPHS_EPTSTA_CURBK_SHIFT) /* Bank 1 */
# define UDPHS_EPTSTA_CURBK_BANK2 (2 << UDPHS_EPTSTA_CURBK_SHIFT) /* Bank 2 */
/* Common Bit Definitions */
#define UDPHS_EPTSTA_BUSYBANK_SHIFT (18) /* Bits 18-19: Busy Bank Number */
#define UDPHS_EPTSTA_BUSYBANK_MASK (3 << UDPHS_EPTSTA_BUSYBANK_SHIFT)
# define UDPHS_EPTSTA_BUSYBANK_1 (0 << UDPHS_EPTSTA_BUSYBANK_SHIFT) /* 1 busy bank */
# define UDPHS_EPTSTA_BUSYBANK_2 (1 << UDPHS_EPTSTA_BUSYBANK_SHIFT) /* 2 busy banks */
# define UDPHS_EPTSTA_BUSYBANK_3 (2 << UDPHS_EPTSTA_BUSYBANK_SHIFT) /* 3 busy banks */
#define UDPHS_EPTSTA_BYTECNT_SHIFT (20) /* Bits 20-30: UDPHS Byte Count */
#define UDPHS_EPTSTA_BYTECNT_MASK (0x7ff << UDPHS_EPTSTA_BYTECNT_SHIFT)
#define UDPHS_EPTSTA_SHRTPCKT (1 << 31) /* Bit 31: Short Packet */
/* DMA Channel Registers */
/* UDPHS DMA Next Descriptor Address Register (32-bit address) */
/* UDPHS DMA Channel Address Register (32-bit address) */
/* UDPHS DMA Channel Control Register */
#define UDPHS_DMACONTROL_CHANNENB (1 << 0) /* Bit 0: Channel Enable Command */
#define UDPHS_DMACONTROL_LDNXTDSC (1 << 1) /* Bit 1: Load Next Channel Transfer Descriptor Enable (Command) */
#define UDPHS_DMACONTROL_ENDTREN (1 << 2) /* Bit 2: End of Transfer Enable (Control) */
#define UDPHS_DMACONTROL_ENDBEN (1 << 3) /* Bit 3: End of Buffer Enable (Control) */
#define UDPHS_DMACONTROL_ENDTRIT (1 << 4) /* Bit 4: End of Transfer Interrupt Enable */
#define UDPHS_DMACONTROL_ENDBUFFIT (1 << 5) /* Bit 5: End of Buffer Interrupt Enable */
#define UDPHS_DMACONTROL_DESCLDIT (1 << 6) /* Bit 6: Descriptor Loaded Interrupt Enable */
#define UDPHS_DMACONTROL_BURSTLCK (1 << 7) /* Bit 7: Burst Lock Enable */
#define UDPHS_DMACONTROL_BUFLEN_SHIFT (16) /* Bits 16-31: Buffer Byte Length (Write-only) */
#define UDPHS_DMACONTROL_BUFLEN_MASK (0xffff << UDPHS_DMACONTROL_BUFLEN_SHIFT)
# define UDPHS_DMACONTROL_BUFLEN(n) ((uint32_t)(n) << UDPHS_DMACONTROL_BUFLEN_SHIFT)
/* UDPHS DMA Channel Status Register */
#define UDPHS_DMASTATUS_CHANNENB (1 << 0) /* Bit 0: Channel Enable Status */
#define UDPHS_DMASTATUS_CHANNACT (1 << 1) /* Bit 1: Channel Active Status */
#define UDPHS_DMASTATUS_ENDTRST (1 << 4) /* Bit 4: End of Channel Transfer Status */
#define UDPHS_DMASTATUS_ENDBFST (1 << 5) /* Bit 5: End of Channel Buffer Status */
#define UDPHS_DMASTATUS_DESCLDST (1 << 6) /* Bit 6: Descriptor Loaded Status */
#define UDPHS_DMASTATUS_BUFCNT_SHIFT (16) /* Bits 16-31: Buffer Byte Counut */
#define UDPHS_DMASTATUS_BUFCNT_MASK (0xffff << UDPHS_DMASTATUS_BUFCNT_SHIFT)
/****************************************************************************
* Public Types
****************************************************************************/
/* This structure defines the UDPHS DMA Transfer Descriptor.
* Instances of DMA transfer descriptors must by aligned to 16-byte
* address boundaries.
*
* Each value contains the next value of each of three UDPHS DMA registers.
* The first register value (UDPHS_DMANXTDSCx) is a link that can be used
* to chain sequences of DMA transfers.
*/
struct udphs_dtd_s
{
uint32_t nxtd; /* Next Descriptor Address Register: UDPHS_DMANXTDSCx */
uint32_t addr; /* DMA Channelx Address Register: UDPHS_DMAADDRESSx */
uint32_t ctrl; /* DMA Channelx Control Register: UDPHS_DMACONTROLx */
};
#define SIZEOF_USPHS_DTD_S 12
/****************************************************************************
* Public Data
****************************************************************************/
/****************************************************************************
* Public Functions Prototypes
****************************************************************************/
#endif /* __ARCH_ARM_SRC_SAMA5_HARDWARE_SAM_UDPHS_H */
| 14,046 |
317 | /*
* Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES)
*
* This file is part of Orfeo Toolbox
*
* https://www.orfeo-toolbox.org/
*
* 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.
*/
#ifndef otbGenericMapProjection_hxx
#define otbGenericMapProjection_hxx
#include "otbGenericMapProjection.h"
#include "otbMacro.h"
namespace otb
{
template <TransformDirection TDirectionOfMapping, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
GenericMapProjection<TDirectionOfMapping, TScalarType, NInputDimensions, NOutputDimensions>::GenericMapProjection()
: Superclass(ParametersDimension), m_MapProjection()
{
}
template <TransformDirection TDirectionOfMapping, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
GenericMapProjection<TDirectionOfMapping, TScalarType, NInputDimensions, NOutputDimensions>::~GenericMapProjection()
{
}
template <TransformDirection TDirectionOfMapping, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
std::string GenericMapProjection<TDirectionOfMapping, TScalarType, NInputDimensions, NOutputDimensions>::GetWkt()
{
if (m_MapProjection)
{
// Use partial template specialisation instead ?
if (DirectionOfMapping == TransformDirection::FORWARD)
{
return m_MapProjection->GetTargetSpatialReference().ToWkt();
}
else
{
return m_MapProjection->GetSourceSpatialReference().ToWkt();
}
}
return "";
}
template <TransformDirection TDirectionOfMapping, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
void GenericMapProjection<TDirectionOfMapping, TScalarType, NInputDimensions, NOutputDimensions>::SetWkt(const std::string& projectionRefWkt)
{
SpatialReference wgs84 = SpatialReference::FromWGS84();
SpatialReference wktSpatialReference = SpatialReference::FromDescription(projectionRefWkt);
#if GDAL_VERSION_NUM >= 3000000
wgs84.SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER);
wktSpatialReference.SetAxisMappingStrategy(OAMS_TRADITIONAL_GIS_ORDER);
#endif
if (DirectionOfMapping == TransformDirection::INVERSE)
{
std::unique_ptr<CoordinateTransformation> newMapProjection(new CoordinateTransformation(wktSpatialReference, wgs84));
if (newMapProjection)
m_MapProjection.swap(newMapProjection);
}
else
{
std::unique_ptr<CoordinateTransformation> newMapProjection(new CoordinateTransformation(wgs84, wktSpatialReference));
if (newMapProjection)
m_MapProjection.swap(newMapProjection);
}
this->Modified();
}
template <TransformDirection TDirectionOfMapping, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
typename GenericMapProjection<TDirectionOfMapping, TScalarType, NInputDimensions, NOutputDimensions>::OutputPointType
GenericMapProjection<TDirectionOfMapping, TScalarType, NInputDimensions, NOutputDimensions>::TransformPoint(const InputPointType& point) const
{
OutputPointType outputPoint;
// Can be collapsed
if (DirectionOfMapping == TransformDirection::INVERSE)
{
double lon, lat, h;
double z = 0.0;
if (InputPointType::PointDimension == 3)
z = point[2];
std::tie(lon, lat, h) = m_MapProjection->Transform(std::make_tuple(point[0], point[1], z));
outputPoint[0] = lon;
outputPoint[1] = lat;
if (OutputPointType::PointDimension == 3)
outputPoint[2] = h;
}
if (DirectionOfMapping == TransformDirection::FORWARD)
{
double x, y, z;
double h = 0.0;
if (InputPointType::PointDimension == 3)
h = point[2];
std::tie(x, y, z) = m_MapProjection->Transform(std::make_tuple(point[0], point[1], h));
outputPoint[0] = x;
outputPoint[1] = y;
if (OutputPointType::PointDimension == 3)
outputPoint[2] = z;
}
return outputPoint;
}
template <TransformDirection TDirectionOfMapping, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
bool GenericMapProjection<TDirectionOfMapping, TScalarType, NInputDimensions, NOutputDimensions>::IsProjectionDefined() const
{
return m_MapProjection != nullptr;
}
template <TransformDirection TDirectionOfMapping, class TScalarType, unsigned int NInputDimensions, unsigned int NOutputDimensions>
void GenericMapProjection<TDirectionOfMapping, TScalarType, NInputDimensions, NOutputDimensions>::PrintSelf(std::ostream& os, itk::Indent indent) const
{
Superclass::PrintSelf(os, indent);
os << indent << *m_MapProjection.get() << std::endl;
}
} // namespace otb
#endif
| 1,695 |
1,350 | // Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License.
// Code generated by Microsoft (R) AutoRest Code Generator.
package com.azure.resourcemanager.consumption.models;
import com.azure.resourcemanager.consumption.fluent.models.ChargesListResultInner;
import java.util.List;
/** An immutable client-side representation of ChargesListResult. */
public interface ChargesListResult {
/**
* Gets the value property: The list of charge summary.
*
* @return the value value.
*/
List<ChargeSummary> value();
/**
* Gets the inner com.azure.resourcemanager.consumption.fluent.models.ChargesListResultInner object.
*
* @return the inner object.
*/
ChargesListResultInner innerModel();
}
| 238 |
968 | <filename>taokeeper-monitor/src/main/java/com/taobao/taokeeper/monitor/web/AlarmSettingsController.java
package com.taobao.taokeeper.monitor.web;
import static common.toolkit.java.constant.EmptyObjectConstant.EMPTY_STRING;
import java.util.HashMap;
import java.util.Map;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import com.taobao.taokeeper.common.GlobalInstance;
import com.taobao.taokeeper.model.AlarmSettings;
import com.taobao.taokeeper.model.ZooKeeperCluster;
import common.toolkit.java.exception.DaoException;
import common.toolkit.java.util.StringUtil;
import common.toolkit.java.util.io.ServletUtil;
/**
* @author <EMAIL>
* @since 2011-08-10
*/
@Controller
@RequestMapping("/alarmSettings.do")
public class AlarmSettingsController extends BaseController {
@RequestMapping(params = "method=alarmSettingsPAGE")
public ModelAndView alarmSettingsPAGE(HttpServletRequest request, HttpServletResponse response, String clusterId, String handleMessage ) {
clusterId = StringUtil.defaultIfBlank( clusterId, 1 + EMPTY_STRING );
try {
Map<Integer, ZooKeeperCluster > zooKeeperClusterMap = GlobalInstance.getAllZooKeeperCluster();
Map<Integer, AlarmSettings > alarmSettingsMap = GlobalInstance.getAllAlarmSettings();
AlarmSettings alarmSettings = GlobalInstance.getAlarmSettingsByClusterId( Integer.parseInt( clusterId ) );
if( null == alarmSettings ){
alarmSettings = alarmSettingsDAO.getAlarmSettingsByCulsterId( Integer.parseInt( clusterId) );
}
if( null == alarmSettings ){
ServletUtil.writeToResponse( response, "目前还没有这样的ZK集群<a href='zooKeeper.do?method=zooKeeperRegisterPAGE'><font color='red'> 加入监控</font></a>" );
return null;
}
Map<String, Object> model = new HashMap<String, Object>();
model.put( "alarmSettings", alarmSettings );
model.put( "alarmSettingsMap", alarmSettingsMap );
model.put("clusterId", clusterId );
model.put( "zooKeeperClusterMap", zooKeeperClusterMap );
model.put( "handleMessage", StringUtil.trimToEmpty( handleMessage ) );
return new ModelAndView("monitor/alarmSettingsPAGE", model );
} catch ( NumberFormatException e ) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch ( DaoException e ) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch ( Exception e ) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
@RequestMapping(params = "method=updateAlarmSettingsHandle")
public String updateAlarmSettingsHandle( HttpServletRequest request, HttpServletResponse response,
String clusterId,
String maxDelayOfCheck,
String maxCpuUsage,
String maxMemoryUsage,
String maxLoad,
String wangwangList,
String phoneList,
String emailList,
String maxConnectionPerIp,
String maxWatchPerIp,
String dataDir,
String dataLogDir,
String maxDiskUsage,
String nodePathCheckRule ) {
try {
if( StringUtil.isBlank( clusterId ) )
throw new Exception( "clusterId 不能为空" );
AlarmSettings alarmSettings = new AlarmSettings();
alarmSettings.setClusterId( Integer.parseInt( clusterId) );
alarmSettings.setMaxDelayOfCheck( StringUtil.trimToEmpty( maxDelayOfCheck ) );
alarmSettings.setMaxCpuUsage( StringUtil.trimToEmpty( maxCpuUsage ) );
alarmSettings.setMaxMemoryUsage( StringUtil.trimToEmpty( maxMemoryUsage ) );
alarmSettings.setMaxLoad( StringUtil.trimToEmpty( maxLoad ) );
alarmSettings.setWangwangList( StringUtil.trimToEmpty( wangwangList ) );
alarmSettings.setPhoneList( StringUtil.trimToEmpty( phoneList ) );
alarmSettings.setEmailList( StringUtil.trimToEmpty( emailList ) );
alarmSettings.setMaxConnectionPerIp( StringUtil.trimToEmpty( maxConnectionPerIp ) );
alarmSettings.setMaxWatchPerIp( StringUtil.trimToEmpty( maxWatchPerIp ) );
alarmSettings.setDataDir( StringUtil.trimToEmpty( dataDir ) );
alarmSettings.setDataLogDir( StringUtil.trimToEmpty( dataLogDir ) );
alarmSettings.setMaxDiskUsage( StringUtil.trimToEmpty( maxDiskUsage ) );
alarmSettings.setNodePathCheckRule( StringUtil.trimToEmpty( nodePathCheckRule ) );
//进行Update
String handleMessage = null;
if( alarmSettingsDAO.updateAlarmSettingsByClusterId( alarmSettings ) ){
handleMessage = "Update Success";
}else{
handleMessage = "Update Fail";
}
return "redirect:/alarmSettings.do?method=alarmSettingsPAGE&clusterId=" + clusterId + "&handleMessage=" + handleMessage;
} catch ( NumberFormatException e ) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch ( DaoException e ) {
// TODO Auto-generated catch block
e.printStackTrace();
} catch ( Exception e ) {
// TODO Auto-generated catch block
e.printStackTrace();
}
return null;
}
}
| 1,933 |
Subsets and Splits
No saved queries yet
Save your SQL queries to embed, download, and access them later. Queries will appear here once saved.