API: h264 decode: clarify slice_data_bit_offset field.

slice_data_bit_offset represents a bit offset from the NAL Header Unit
byte to the begining of the slice_data(), thus including any emulation
prevention bytes. Baiscally, this represents the number of bits parsed
for slice_header().

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
API: h264 decode: fix the definition of slice_data_bit_offset.

Align with the existing practice in various media stacks available
in Linux today. i.e. codec layer submits slice data that represents
the original bitstream, thus including any emulation prevent bytes.
However, the slice_data_bit_offset represents an offset relative
to the buffer that contains the NAL unit byte and the rest of the
slice with any emulation prevention bytes removed.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Add JPEG decoding API.

Cherry-pick'ed from:
336a563: add initial JPEG decoding API
8a7f92b: cosmetics (vertical align)
9092ecf: fix IQ matrix and Huffman table buffer name
5d30647: add "Baseline" suffix the existing data structures
6eefff7: document decoding API is only suitable to baseline profile
de2df79: include <va/va_dec_jpeg.h> into core VA header
979f0e1: drop JPEG-2000 fields from structures for baseline profile
8a6b12d: drop sample_precision since P=8 for baseline profile

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
tests: add simple JPEG decoding example.

It is based on Luc Saillard's JPEG program.

Usage: loadjpeg <input_filename.jpeg>

Cherry-pick'ed from:
ffce398: a simple JPEG example to use VAAPI
1af5416: update JPEG decode demo to match current API
da40f08: fix display of dimensions
54b1002: mark default Huffman table as valid
a3ca113: build: fix make dist
5017c64: .gitignore: update
d3b46ce: update JPEG decoding test case

Signed-off-by: Zhao Halley <halley.zhao@intel.com>
Singed-off-by: Wind Yuan <feng.yuan@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
configure: bump API version for new JPEG codec.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
test/basic: fix build of basic tests.

Signed-off-by: Haitao Huang <haitao.huang@intel.com>
(cherry picked from commit baf2a44ee431df2a151bcc1ffd67f79468d81a40)
test/basic: changed build target to noinst so they are built by default

Signed-off-by: Haitao Huang <haitao.huang@intel.com>
(cherry picked from commit cc86031259117b3cd5607865858c9054cd44db0e)
test/basic: fix make dist.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
(cherry picked from commit 8b2835e883936d28388b72b92d3d492d0c32c57e)
tests: fix JPEG decoding test to match the latest API.

Fix bug in parsing Huffman DC table and also sync the code to match
the latest API change. In particular, pad the Huffman table with
zero to suit 4-byte boundaries.

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
(cherry picked from commit d4c88950dafefead1a775c0ae6636917e23339fd)
jpeg: pad Huffman table to 4-byte boundaries (Haihao).

Some VA driver implementations require alignment to 4-byte boundaries
so that to allow for direct memory transfers.

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

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
libva: bump version to 1.0.17 for development

Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
adding Provides for libva*-emgd
Merge branch 'v1.0-upstream'

Conflicts:
	configure.ac
	test/decode/Makefile.am
	test/decode/loadjpeg.c
	test/decode/tinyjpeg.c
	va/Makefile.am
	va/va.h