[Libva] [RFC PATCH Libva-intel-driver 0/6] H264_encoding: Add the support of packed header rawdata/slice data

Zhao, Yakui yakui.zhao at intel.com
Tue May 20 22:51:14 PDT 2014


From: Zhao Yakui <yakui.zhao at intel.com>

Under some encoding scenario the user-space app hopes that the driver
can insert passed packed header rawdata/slice data into the coded clip. 
This is the patch set that adds the support of inserting the packed header
rawdata/slice data from the user. But as H264 can have multi-slices
and several packed rawdata are inserted, it has to follow
some rules so that the packed data can be inserted correctly:
1. the packed rawdata header type/data should be paired.
2. the packed rawdata data is inserted by following the passed order
3. the packed rawdata header/data is split by using VAEncSliceParameterBuffer.
That is to say: The packed rawdata for slice 0 should be passed before the first
VAEncSliceParameterBuffer. After one VAEncSliceParameterBuffer is parsed,
the subseuquent packed rawdata is for another new slice. The subsequent
packed rawdata after the last VAEncSliceParameterBuffer is ignored.
4. it does not change the rule for the packed data of SPS/PPS/MISC type.
5. the packed slice header data can also be passed from the user. And
the flag of VAEncPackedHeaderSlice is *optional*. That is to say: if
the packed slice header data is passed, it is directly inserted. Otherwise
the driver will help to generate the slice header data by itself.
6. the packed slice header data is inserted after the packed rawdata for one slice. 


Welcome the comments. 

Zhao, Yakui (6):
  H264_Encoding: Parse the packed header data from user to fix the
    hacked code of HW skip bytes
  H264_Encoding: Prepare some data structures for adding packed raw
    data
  H264_Encoding: Add the support of inserting the packed raw data passed
    from user
  Encoding: Reset the last_packed_header_type to avoid the unpaired
    packed header type/data
  H264_Encoding: Add the support of packed slice header to be flexible
  H264_Encoding: Don't update the slice qp for CBR mode when finding packed
    slice_header data

 src/gen6_mfc.c        |  34 ++-------
 src/gen6_mfc.h        |   7 ++
 src/gen6_mfc_common.c | 194 +++++++++++++++++++++++++++++++++++++++++++++++++-
 src/gen75_mfc.c       | 143 ++++---------------------------------
 src/gen8_mfc.c        | 128 ++-------------------------------
 src/i965_drv_video.c  | 138 ++++++++++++++++++++++++++++++++---
 src/i965_drv_video.h  |  23 ++++++
 7 files changed, 376 insertions(+), 291 deletions(-)

-- 
1.7.12-rc1



More information about the Libva mailing list