h264: support process for gaps in frame_num

Follow 8.2.5.2 when frame_num is not equeal to
PreRefFrameNum and is not equal to
(PreRefFrameNum+1)%MaxFrameNum, there would be
"non-existing" picture "used for short-term reference".

Because the driver needs to test the effectiveness
of the picture, dummy picture needs a surfaceID.
And according to the provisions of spec, the dummy
pictures is not used for reference,so surfaceID of
current picture is set to the dummy picture.

Signed-off-by: Zhong Cong <congx.zhong@intel.com>
codecparsers: h264: fix derivation of default scaling lists.

When useDefaultScalingMatrixFlag is computed to be 1 while parsing
scaling_list(), then the scaling list shall be inferred to be equal
to the default list (7.4.2.1.1.1). That default list is really one
of Default_4x4_{Intra,Inter} or Default_8x8_{Intra,Inter} and not
one from fall-back rule sets A or B.

This fixes parsing for FRExt1_Panasonic_D, FRExt2_Panasonic_C,
FRExt3_Panasonic_E and FRExt4_Panasonic_B.

https://bugzilla.gnome.org/show_bug.cgi?id=724518

Signed-off-by: Gwenole Beauchesne <gwenole.beauchesne@intel.com>
Signed-off-by: Zhong Cong <congx.zhong@intel.com>
vaapidisplay: init version, abstract for VADisplay
vaapicontext: init version, abstract for VaContext
decoder: uses vaapicontext
picture: uses vaapicontext
decoder: h264: fix initialization of RefPicLists for multiple slices.

The initialization of reference picture lists (8.2.4.2) applies to all
slices. So, the RefPicList0/1 lists need to be constructed prior to
each slice submission to the HW decoder.

This fixes decoding of video sequences where frames are encoded with
multiple slices of different types, e.g. 4 slices in this order I, P,
I, and P. More precisely, CABAST3_Sony_E and CABASTBR3_Sony_B.

Signed-off-by: Zhong Cong <congx.zhong@intel.com>
decoder: h264: fix long-term reference picture marking process.

Fix reference picture marking process with memory_management_control_op
set to 3 and 6, i.e. assign LongTermFrameIdx to a short-term reference
picture, or the current picture.

This fixes decoding of FRExt_MMCO4_Sony_B.

Signed-off-by: Zhong Cong <congx.zhong@intel.com>
decoder: h264: unified variable type to prevent the occurrence of abnormal variable contrast.

Signed-off-by: Zhong Cong <congx.zhong@intel.com>
codecparsers: h264: fix mistake of pic timing payload parse.

Signed-off-by: Zhong Cong <congx.zhong@intel.com>
Cancel the estimate of version when set loop_filter_level
revise namespace YamiMediaCodec;

Signed-off-by: Tang Xin <xin.t.tang@intel.com>
interface: move host interface out of YamiMediaCodec namespace

move VideoDecoderHost/VideoEncoderHost interface/implementation
out of YamiMediaCodec namespace.
so, dlopen/dlsym can access the functions
compile: remove some warnings
interface: add preSandboxInit for chromeos support
h264enc: add forceKeyFrame support
h264enc: add setParameters support for framerate/bitrate
h264enc: add getMaxOutSize support
encoder: set input buffer reusable after data upload
h264enc: add flags support for encoded frames