[Libva] [RFC] VA API extension proposals to support encode and post-processing

Bian, Jonathan jonathan.bian at intel.com
Tue Aug 16 22:17:51 PDT 2011


Hi,

Attached are API extension proposals from Intel to support additional profiles for H.264 encode and video post-processing. The main changes/additions from the existing APIs are described below and comments/feedbacks are appreciated to help with finalizing the API extensions. A proposal page for API enhancements has also been created at http://www.freedesktop.org/wiki/Software/vaapi/proposals 

Regards,
Jonathan Bian

1. Added new entrypoint for video post-processing 2. Added a number of configuration attributes to accommodate differing capabilities in hardware encoders.
3. Added "Ext" buffer types to extend encode parameters buffers without impacting compatibility with existing encode data structures 4. Added new buffer types for packed header to be sent by the app, and various buffers required for video post-processing 5. Added "Ext" version of sequence, picture and slice parameter buffer structures for H.264 to support High Profile encoding.
6. Added new functions and data structures to support video post-processing (see va_vpp.h).

With this proposal, video post-processing is modeled as a pipeline of connected and configurable processing filters. The existing vaBeginPicture/vaRenderPicture/vaEndPicture semantics is used to perform video post-processing frame by frame, with configuration parameters passed through vaRenderPicture as buffers. For optimal performance, the assumption is made that the implementation will retain the parameter settings affecting the processing pipeline until the application makes explicit modifications of these parameters.  Following is some pseudo code to demonstrate the usage of the video post-processing APIs:

  // find out if post-processing entrypoint is available
  va_status = vaQueryConfigEntrypoints(va_dpy, 
                                        VAProfileNone,
                                        va_entrypoints,
                                        &entrypointsCount);

  if(VAEntrypointVideoProc == va_entrypoints[entrypointsIndx])

  va_status = vaCreateConfig(va_dpy, 
                            VAProfileNone, 
                            VAEntrypointVideoProc,
                            &va_attributes,
                            1,
                            &va_config);

  // create context for post-processing
  va_status = vaCreateContext(va_dpy,...)

  // query pipeline level capabilities
  va_status = vaQueryVideoProcPipelineCap(caps) // for ex: Denoise (DN), DI, sharpening (SHRP), procamp are supported by driver

  // query individual filter capabilities, e.g. parameter value range
  va_status = vaQueryVideoProcFilterCap(dn, caps_dn);
  Va_status = vaQueryVideoProcFilterCap(procamp, caps_procamp);

  While( is_new_input )
  {
    vaBeginPicture(out);

    // setup pipeline parameter (VAProcPipelineParameterBuffer)
    vaRenderPicture(pipeline_param);

    // query reference frame requirements for this pipeline
    vaQueryVideoProcReferenceFrameCap(&forward_ref, &backward_ref);

    // set up input parameter (VAProcInputParameterBuffer)
    vaRenderPicture(input_param); 

    // set up denoise parameters (VAProcFilterBaseParameterBuffer)
    vaRenderPicture(dn_param);

    // set up procamp parameters (VAProcFilterProcAmpParameterBuffer)
    vaRenderPicture(procamp_param);

    vaEndPicture();

    // find out whether processing has completed at some later time
    vaQueryStatus();
}

-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: va_vpp.h
URL: <http://lists.freedesktop.org/archives/libva/attachments/20110816/4c33a0fd/attachment-0001.h>
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: va_patch.txt
URL: <http://lists.freedesktop.org/archives/libva/attachments/20110816/4c33a0fd/attachment-0001.txt>


More information about the Libva mailing list