Added OTC hybrid UMD driver to the list of supported drivers

This will be used for hybrid codecs like VP8 h-encode. No change
to existing KMD interface.

Signed-off-by: Sameer Kibey <sameer.kibey@intel.com>
(cherry picked from commit 98669760e62f50ca3e38e99835692aee5f89a4bf)
Added VAConfigEncQualityRange attribute and VAEncMiscParameterBufferQualityLevel to support encoder quality settings.

(cherry picked from commit 24a14f9d13e6fe0c25d4094c4884aa4076ed05bc)

Conflicts:
	va/va.h
Update comment for quality_level

Allow user set VAEncMiscParameterBufferQualityLevel::quality_level
to 0 to use default quality level

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
(cherry picked from commit b05e38f64c5aa2d6edfc2bd1d6e1f4339a54095a)

Conflicts:
	va/va.h
API: add support for buffer exports.

Add interfaces for low-level buffer exports to suport interop with
external APIs like EGL or OpenCL (OCL). Theory of operations:

- vaAcquireBufferHandle(): locks buffer for external API usage. This
  is a synchronization point. Upon successful return, useful buffer
  details are returned in a somewhat implementation-specific way to
  support interop with external APIs.

- vaReleaseBufferHandle(): unlocks buffer after usage from external
  API, and deallocates any resources that were needed.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
(cherry picked from commit 544d31d2fc096a838c21f4684cec05746cfdd7b6)

Conflicts:
	va/va.h
Enable 64bit build for Android, compatible with 32bit.

Refined the Android.mk to compatible with both 32 and 64 bit android
build.

Signed-off-by: Tinghong Li <tinghong.li@intel.com>
Signed-off-by: Qiming Shi <qiming.shi@intel.com>
(cherry picked from commit 03de01dce6f2b88b9c5ee54705aeebe17c6c5919)
vatrace: make standalone LIBVA_TRACE_CODEDBUF work w/o LIBVA_TRACE

Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
(cherry picked from commit 22925d9b7d1730468fc7435bee96d9d9c39f5987)
vatrace: make LIBVA_TRACE_SURFACE work even without LIBVA_TRACE

Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
(cherry picked from commit e39ebdd95062995e4bdf082d50bd7d9005a3be6c)
vafool: simplify VAFOOL

Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
(cherry picked from commit ce00603a8d58f2e25c7a6bb312f60fda0833e042)
vatrace: fix a overwrite

Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
(cherry picked from commit 7f1b4be6623f5fe65063581252d2b68bd77fd076)
vafool: fix the vaMapBuffer for the buffer from vaDeriveImage

It is not desired to run into FOOL path for the vaMapBuffer
from vaDeriveImage

Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
(cherry picked from commit 2896166fefa36772ea6946ebc5df85024928dd6c)
vatrace: fix segfault of VASurfaceAttribExternalBufferDescriptor dumpping

Signed-off-by: Austin Yuan <shengquan.yuan@intel.com>
(cherry picked from commit e286c3264ebf7582792ff56537dd14c9f49903cf)
test/avcenc: Remove the dynamic shrink of coded buffer

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 296e5a548b260fcca5713bbb3ed6477f63ac977f)
test/avcenc: Fix the incorrect parameter setting for SPS under CBR mode

Currently the parameter setting is incorrect for CBR, which causes that
it will complain the underflow/overflow during encoding.

V1->V2: Follow Haihao's comment to update some incorrect usage about the
frame_bit_rate.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 5e10a246287fa2dd3fae2bf756a5b33087cc097c)
test/encode/avcenc: update the SPS parameter for encoding

It will simplify the calculation of POC and frame_num.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit d794d040b8f7311d7b19d62826fbd3725d3bc7b9)
test/encode/avcenc: Follow the idea in h264encode to generalize avcenc test case

The following is generalized:
a. the switch between encoding order and displaying order.
b. Reference list0/1
c. It can insert more IDR frames intead of one IDR frame.

Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
(cherry picked from commit 615c2a0f3210ec567fde5b0bac60c3a17cff3aed)

Conflicts:
	test/encode/avcenc.c
Test/encode/avcenc: Follow the H264 spec to fix wrong SEI parameter setting for CBR HRD

V1->V2: Follow Haihao's comments to add some comments and remove some
magic number.

Signed-off-by: Zhao, Yakui <yakui.zhao@intel.com>
(cherry picked from commit 51901e340cc467a2d562491121e0de38f5a066fe)
Bump VA API to 0.36

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
drm: add support for render nodes.

Allow vaGetDisplayDRM() to accept DRM Render-Nodes file descriptors,
thus skipping authentication burdens in that case. This also allows
remote users, connected through ssh for instance, to enjoy hardware
acceleration even if there is a local display opened (user logged in).

Signed-off-by: Andrey Larionov <andrey.larionov@intel.com>
[checked if fd is a render-node, fixed VA_DISPLAY_DRM_RENDERNODES]
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Reviewed-by: Sean V Kelley <sean.v.kelley@intel.com>
Tested-by: Rafal A Sapala <rafal.a.sapala@intel.com>
tests: try a render-node device first for VA/DRM displays.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Reviewed-by: Sean V Kelley <sean.v.kelley@intel.com>
doc: don't add timestamps in generated documentation.