Age | Commit message (Collapse) | Author | Files | Lines |
|
This implements a simple reactive VBR rate control mode for single-layer H.264.
The primary aim here is to avoid the problematic behaviour that the CBR rate
controller displays on scene changes, where the QP can get pushed up by a large
amount in a short period and compromise the quality of following frames to a
very visible degree.
The main idea, then, is to try to keep the HRD buffering above the target level
most of the time, so that when a large frame is generated (on a scene change or
when the stream complexity increases) we have plenty of slack to be able to
encode the more difficult region without compromising quality immediately on
the following frames. It is optimistic about the complexity of future frames,
so even after generating one or more large frames on a significant change it
will try to keep the QP at its current level until the HRD buffer bounds force
a change to maintain the intended rate.
Compared to the CBR rate controller, it keeps the quality level much more
stable - QP does not always spike up as large frames are generated when the
complexity of the stream increases transiently, but equally it does not reduce
as quickly when the complexity of the stream decreases.
Signed-off-by: Mark Thompson <sw@jkqxz.net>
|
|
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
|
|
Conflicts:
configure.ac
src/gen6_mfc.h
src/gen6_mfc_common.c
src/gen75_picture_process.c
src/gen75_vpp_vebox.h
src/gen8_mfc.c
src/gen9_mfc_hevc.c
src/gen9_vdenc.c
src/gen9_vme.c
src/gen9_vp9_encoder.c
src/i965_drv_video.c
src/i965_drv_video.h
src/i965_encoder.c
src/i965_encoder.h
src/intel_driver.c
src/intel_driver.h
test/i965_avcd_config_test.cpp
test/i965_avce_config_test.cpp
test/i965_jpegd_config_test.cpp
test/i965_jpege_config_test.cpp
|
|
User can still use the old setting if needed because the setting is
stored in a common structure now.
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Mark Thompson <sw@jkqxz.net>
Tested-by: Mark Thompson <sw@jkqxz.net>
|
|
Presently ROI parameters are stored in the common structure, each
codec can use these parameters.
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
|
|
Signed-off-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
|
|
Signed-off-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
|
|
Sometimes user doesn't assign a proper value to each field in a buffer
when calling vaRenderPicture(), which will result in random issues
if we want to use these fields in the future. E.g. recently we used
window_size in VAEncMiscParameterRateControl for bitrate control.
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
Begin/Render/End sequence
User can use VAEncMiscParameterRateControl to update bitrate, so we should ignore
the bitrate in the sequence parameter if VAEncMiscParameterRateControl is present.
Hence it is not needed to reset brc if VAEncMiscParameterRateControl doesn't change
the used bitrate.
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
|
|
I verified AVC VDEnc on KBL with the HuC loading patch from
https://patchwork.freedesktop.org/api/1.0/series/16584/revisions/1/mbox/
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Kelley, Sean V <sean.v.kelley@intel.com>
Tested-by: Tang, FuweiX <fuweix.tang@intel.com>
|
|
I verified AVC VDEnc with the HuC loading patch from
https://patchwork.freedesktop.org/api/1.0/series/16584/revisions/1/mbox/
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Tang, FuweiX <fuweix.tang@intel.com>
|
|
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Kelley, Sean V <sean.v.kelley@intel.com>
|
|
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Kelley, Sean V <sean.v.kelley@intel.com>
|
|
Don't enable brc domain rate control if HuC is not used.
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Kelley, Sean V <sean.v.kelley@intel.com>
|
|
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Kelley, Sean V <sean.v.kelley@intel.com>
|
|
Also adds support for fractional framerate.
Signed-off-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
|
|
Signed-off-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
|
|
Signed-off-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
|
|
Update references in both H.264 encoders (gen6_mfc and gen9_vdenc).
Signed-off-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
|
|
Signed-off-by: Mark Thompson <sw@jkqxz.net>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
These parameters are irrelative to platforms
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
|
|
It is useful for sharing GPE based code between different platforms
Currently it is available on GEN8+
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
xxx is mem/imm/reg and the 3 functions can be used for GEN8 too
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
|
|
Instead we can use the parameters saved in the common encoder context.
It also corrects frame rate used in VDEnc
v2: Align the ROI region and fix compile error after rebase
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
These parameters can be used for all codecs
v2: Save mb_rate_control/target_percentage per layer too
Signed-off-by: peng.chen <peng.c.chen@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
These parameters can be used for all codecs
v2: Don't align ROI region, each codec might have
special requirement
Signed-off-by: peng.chen <peng.c.chen@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
The following conversion is supported:
NV12->NV12
NV12->I420
I420->NV12
I420->I420
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
|
|
V1->V2: Add the support of clearing background color for NV12
The following conversion is supported:
NV12->NV12
NV12->I420
I420->NV12
I420->I420
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
|
|
platforms
This is to define some common structures/functions so that they can
be used on more platforms when adding new VPP functions.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang, Haihao<haihao.xiang@intel.com>
|
|
flags need to be propagated for user to know which flags
are supported by VADisplayAttribType.
When only VA_DISPLAY_ATTRIB_SETTABLE is reported as flag
then it has to be propagated back to user. The rest of the
values should be left untouched
Signed-off-by: Daniel Charles <daniel.charles@intel.com>
|
|
I010 format is another kind of 10-bit surface. And its layout is similar to I420.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
And it is treated as non-tiling for I010 surfaces, which is like I420.
Every pixel also uses two bytes like P010 but it occupies the lower 10-bit.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
If it is not supported, it will fall back to the original config.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Charles Daniel <daniel.charles@intel.com>
|
|
This info can be used to configure the max EU threads of GPU device.
>eu_total * 6
V2->V3: Refresh the patches again.
V1->V2: Remove the extra bit_field of has_eu_flag. Instead the eu_total > 0
can be used.
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Charles Daniel <daniel.charles@intel.com>
|
|
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
on GEN8
v2: Add support for override_offset, clean up the code for 2D surface.
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
This function can be used on GEN8 too
v2: rebased
v3: Fix commit log
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
This function can be used on GEN8 too
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
This function can be used on GEN8 too
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
This function can be used on GEN8 too
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
This function can be used on GEN8 too
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
i965_dri_object_to_2d_gpe_resource()
Like as i965_dri_object_to_buffer_gpe_resource(), use i965_ instead of i965_gpe_ as prefix
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
i965_gpe_context_map_curbe()/i965_gpe_context_unmap_curbe()
gpe_context->curbe.bo always points to the curbe buffer now, and the two functions
can be used on all platforms
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
It is multiple of 64 bytes
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
Make sure the size for each part in dynamic state buffer is multiple of 64 bytes.
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
User can set sampler entry size and the number of sampler entries now. sampler.bo is
always set even if the sampler state is a part of the dynamic state buffer, hence we
can use the corresponding settings no matter sampler state is a part of the dynamic
state buffer or not.
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
structure in i965_gpe_context
This patch delete idrt_size and use (idrt.max_entries * idrt.entry_size) instead.
idrt.bo is always set even if the interface descriptor remapping table is a part of
the dynamic state buffer, hence we can use the corresponding settings no matter this
table is a part of the dynamic state buffer or not.
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|