The User Guide of Video Codec
Engine Library
Author CXC
Date Created 2011.3.29
Current Version 1.01
Confidential 3 Copyright ○
c
All Winner Limited. All right reserved. 1
Version History:
Date Vesion Modify Contents
2011.3.29 1.00 Calder Create this document.
Confidential 3 Copyright ○
c
All Winner Limited. All right reserved. II
Content
PREFACE ...................................................................................................................I
PREFACE ...................................................................................................................I
GLOSSARY ...............................................................................................................II
GLOSSARY ...............................................................................................................II
REFERENCE............................................................................................................III
REFERENCE..................................................
...................................................
.......III
PART
A
REQUIREMENT......................................................................................1
PART A REQUIREMENT......................................................................................1
A.1.
Application
Scene.................................................................................................................................... 1
A.1. Application Scene..................................................
...................................................
............................... 1
A.2.
Function
Requirement............................................................................................................................ 1
A.2. Function Requirement..................................................
...................................................
....................... 1
A.3.
Supplement.............................................................................................................................................. 1
A.3. Supplement..................................................
...................................................
......................................... 1
PART
B
ARCHITECTURE ....................................................................................1
PART B ARCHITECTURE ....................................................................................1
B.1.
Architecture
of
Libve.............................................................................................................................. 1
B.1. Architecture of Libve..................................................
...................................................
......................... 1
B.2.
Recommended
Architecture
of
Drivers
using
Libve ............................................................................ 2
B.2. Recommended Architecture of Drivers using Libve ..................................................
.......................... 2
B.3.
Basic
Execute
Flows................................................................................................................................ 3
B.3. Basic Execute Flows..................................................
...................................................
........................... 3
B3.1.
Open
Libve ....................................................................................................................................... 3
B3.1. Open Libve ..................................................
...................................................
.................................. 3
B3.2.
Close
Libve....................................................................................................................................... 3
B3.2. Close Libve..................................................
...................................................
.................................. 3
B3.3.
Decode
Stream
Frame....................................................................................................................... 4
B3.3. Decode Stream Frame..................................................
...................................................
.................. 4
B3.4.
Reset
Libve....................................................................................................................................... 5
B3.4. Reset Libve..................................................
...................................................
.................................. 5
B3.5.
Request
Pictures
to
Show
and
return
Pictures .................................................................................. 5
B3.5. Request Pictures to Show and return Pictures ..................................................
................................ 5
PART
C
INTERFACE
SPECIFICATION................................................................6
PART C INTERFACE SPECIFICATION..................................................
..............6
C.1.
Libve
Output
Interface
Design............................................................................................................... 6
C.1. Libve Output Interface Design..................................................
...................................................
.......... 6
libve_open......................................................................................................................................................... 7
libve_open..................................................
...................................................
..................................................
.. 7
libve_close......................................................................................................................................................... 8
libve_close..................................................
...................................................
..................................................
.. 8
libve_reset ......................................................................................................................................................... 9
libve_reset ..................................................
...................................................
..................................................
.. 9
libve_set_vbv..................................................................................................................................................... 9
libve_set_vbv..................................................
...................................................
................................................ 9
libve_get_fbm.................................................................................................................................................. 10
libve_get_fbm..................................................
...................................................
............................................. 10
libve_decode.................................................................................................................................................... 10
libve_decode..................................................
...................................................
............................................... 10
libve_get_stream_info......................................................................................................................................11
libve_get_stream_info..................................................
...................................................
.................................11
libve_get_version ............................................................................................................................................ 12
libve_get_version ..................................................
...................................................
....................................... 12
libve_get_last_error......................................................................................................................................... 12
libve_get_last_error..................................................
...................................................
.................................... 12
libve_flush....................................................................................................................................................... 12
libve_flush..................................................
...................................................
..................................................
12
C.2.
Input
Interface
for
Libve...................................................................................................................... 14
C.2. Input Interface for Libve..................................................
...................................................
................. 14
Confidential 3 Copyright ○
c
All Winner Limited. All right reserved. III
C2.1.
The
VE
controlling
interface
–
IVE................................................................................................ 14
C2.1. The VE controlling interface – IVE..................................................
.............................................. 14
C2.2.
The
Frame
Buffer
Manager
interface
–
IFBM................................................................................ 17
C2.2. The Frame Buffer Manager interface – IFBM..................................................
.............................. 17
C2.3.
The
OS
interface
–
IOS................................................................................................................... 20
C2.3. The OS interface – IOS..................................................
...................................................
.............. 20
C2.4.
The
VBV
interface
–
IVBV............................................................................................................ 23
C2.4. The VBV interface – IVBV..................................................
...................................................
....... 23
ANNEX.....................................................................................................................26
ANNEX.....................................................................................................................26
D.1.
A
recommended
design
of
the
VBV
module........................................................................................ 26
D.1. A recommended design of the VBV module..................................................
...................................... 26
D.2.
A
recommended
design
of
the
FBM
module....................................................................................... 27
D.2. A recommended design of the FBM module..................................................
..................................... 27
D.3.
Requirement
for
initializing
stream
information ............................................................................... 28
D.3. Requirement for initializing stream information ..................................................
............................. 28
D.4.
Requirement
on
bitstream
format....................................................................................................... 30
D.4. Requirement on bitstream format..................................................
...................................................
.. 30
D.5.
Recommendation
of
memory
size
for
decoders.................................................................................. 31
D.5. Recommendation of memory size for decoders..................................................
................................ 31
Preface
The Video Codec Engine is an embedded logic circuit in our Chip. This circuit consists of decoders such as
MPEG1/2/4, JPEG, H.263, H.264, AVS, VC-1, WMV7/8 and VP-6. It also contains an H.264 video encoder. So far
based on this engine, we have developed a library to decode video streams using the video codec engine, this library
is called ‘libve’.
The Libve is designed to work with different players on Linux or other operating systems. With this library, you
can play video streams, and easily implement some tricks such as jump play, fast forward, fast backward, rotate
videos, scaledown videos, get video preview. This document describes the user interface of Libve, and also introduce
an architecture of video decode driver base on the Libve.
To link and use the libve, you should get the ‘libve.a’ file and three C code header files, libve.h, libve_adapter.h
and libve_typedef.h.
To show how the libve works, we give a demo. This demo use the ‘VBV’ module described in ‘vbv.h’ and ‘vbv.c’
to receive video bitstream data and manage video bitstream frames. When libve_decode method is called, libve will
request bitstream frames from the ‘VBV’ module for decoding. This demo also use the ‘FBM’ module described in
‘fbm.h’ and ‘fbm.c’ to manage picture frames. Libve requests empty frame buffer from the ‘FBM’ module, decode one
picture to the buffer and then returns it to the ‘FBM’ module. The control flow of using ‘VBV’, ‘FBM’ modules and libve
to decode is described in a C code file ‘vdecoder.c’.
Confidential 3 Copyright ○
c
All Winner Limited. All right reserved. I
- 1
- 2
- 3
- 4
- 5
- 6
前往页