Sample Usage
3-3
The test application is divided into four logical blocks:
Parameter setup
Algorithm instance creation and initialization
Process call
Algorithm instance deletion
3.1.1 Parameter
Setup
Each codec component requires various codec configuration parameters to
be set at initialization. For example, a video codec requires parameters
such as video height, video width, etc. The test application obtains the
required parameters from the Encoder configuration files.
In this logical block, the test application does the following:
1) Opens the configuration file, configparams_1080.cfg and reads the
input file name, and output/reference file name, and the various
configuration parameters required for the algorithm.
For more details on the configuration files, see Section 2.5.
2)
Sets
the
IVIDENC1_Params
structure based on the values it reads
from the configparams_1080.cfg file.
3) Reads the input bit-stream into the application input buffer.
After successful completion of the above steps, the test application does
the algorithm instance creation and initialization.
3.1.2 Algorithm Instance Creation and Initialization
In this logical block, the test application accepts the various initialization
parameters and returns an algorithm instance pointer. The following APIs
are called in a sequence:
1)
algNumAlloc()
- To query the algorithm about the number of memory
records it requires.
2)
algAlloc()
- To query the algorithm about the memory requirement
to be filled in the memory records.
3)
algInit()
- To initialize the algorithm with the memory structures
provided by the application.
A sample implementation of the create function that calls
algNumAlloc()
,
algAlloc()
, and
algInit()
in a sequence is provided in the
ALG_create()
function implemented in the alg_create.c file.
After successful creation of the algorithm instance, the test application
does DMA and HDVICP Resource allocation for the algorithm. This
requires initialization of Resource Manager Module (RMAN) and grant of
DMA and HDVICP resources. This is implemented by calling the RMAN
interface functions in the following sequence:
Содержание DM6467
Страница 1: ...H 264 1080p 30 BP Encoder on DM6467 User s Guide Literature Number SPRUGN8 October 2009 ...
Страница 10: ...x This page is intentionally left blank ...
Страница 12: ...xii This page is intentionally left blank ...
Страница 18: ...Introduction 1 6 This page is intentionally left blank ...
Страница 36: ...Sample Usage 3 10 This page is intentionally left blank ...