| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Signed-off-by: Mark Thompson <sw@jkqxz.net>
|
|
|
|
|
|
|
| |
The VAConfigAttribEncROI attribute is read-only, so a user should not need
to write it to enable encoding with ROI.
Signed-off-by: Mark Thompson <sw@jkqxz.net>
|
|
|
|
|
|
|
|
|
|
|
| |
The motion vector length is constrained by the level but not set by it -
we should instead use the f_code values to set the max MV length.
This fixes encoding when the f_code values are not set to the highest
allowed for the level, and also adds support for intermediate levels such
as High 1440 which were not previously handled here.
Signed-off-by: Mark Thompson <sw@jkqxz.net>
|
|
|
|
|
|
| |
Use correct variable for ROI indexing.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Introduced in:
commit 972e6f2b36499389bc7cb7bb34414423b5525143
Author: Xiang, Haihao <haihao.xiang@intel.com>
Date: Wed Jan 4 09:40:47 2017 +0800
AVC encoder: use generic ROI parameters
num_roi setting was lost and thus always 0, which essentially
disabled the "for (j = num_roi; j ; j--)" loop in the
VA_RC_CQP case.
Fix this by ensuring num_roi is set to the correct value stored
in the common structure.
Signed-off-by: U. Artie Eoff <ullysses.a.eoff@intel.com>
|
|
|
|
|
|
| |
The last reference to it was removed in c408627e.
Signed-off-by: Mark Thompson <sw@jkqxz.net>
|
|
|
|
|
|
|
|
| |
Instead the application should provide a right packed SEI buffer if
SEI is required because it is hard to know the value for each SEI
element in the driver.
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
|
|
|
|
|
|
|
|
|
| |
If find the AUD NAL in raw data list, it will insert AUD first in
the bitstream.
Fix #155
Signed-off-by: Jun Zhao <jun.zhao@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
previous SKL
RC logic initialize the big QP at the first GOP, this cause the low quality.
Fixes #147
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
To avoid the error:
src/gen6_mfc_common.c:487:1: error: control may reach end of non-void function [-Werror,-Wreturn-type]
}
^
Signed-off-by: Chih-Wei Huang <cwhuang@linux.org.tw>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Linux coding style is used in the driver source code. Use the command
below to format/indent .c/.h files
$> astyle --style=linux -cnpUH -s4 -M120 <file>
A script of style_unify is added in the top-level directory to
handle all .c/.h files in the driver. There is no change to any
functionality
This fixes https://github.com/01org/intel-vaapi-driver/issues/99
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
| |
Hence we can use separate parameters to estimate QP per layer and get more
accurate QP for next frame in the same layer.
Tested-by: Wang, Fei W <fei.w.wang@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
|
|
|
| |
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
|
|
|
|
|
| |
Use the right frame numbers in a GOP to estimate a QP for next frame
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
|
|
|
|
|
|
| |
Use the right previous slice type to estimate a QP for next frame
in the same layer
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
|
|
|
|
|
|
| |
Use the the right previous frame size to estimate a QP for next frame in the
same layer
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
|
|
|
|
|
| |
We can do QP compensation per layer.
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
|
|
|
|
|
|
| |
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
|
|
|
|
|
|
| |
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
Currently only the first element is used
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
In addition, change the two caller functions as well.
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
Currently only the first element is used
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This patch allows multiple misc parameter buffers for the same type
within the same Begin/Render/End sequence in the future. Currently
only the first element for each misc type is used, so it doesn't
change any functionality yet.
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
It doesn't cause functionality change
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
H.264 and VP8 share some data structures
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The corresponding paramters are saved in the context
v2: use frame_width_in_pixel and frame_height_in_pixel instead of
frame_width_in_mbs and frame_height_in_mbs
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
|
|
|
|
|
|
| |
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
|
|
|
|
|
|
| |
v2: rebased
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Luo, Focus <focus.luo@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
|
|
|
|
|
|
|
| |
1.add p010->nv12 before VME
2.add CBR support
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
Reviewed-by: Xiang, Haihao <haihao.xiang@intel.com>
|
|
|
|
|
|
|
|
|
| |
Commit 1cd6795 causes quality drop for U/V plane.
Reported-by: Wang, Fei W <fei.w.wang@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Wang, Fei W <fei.w.wang@intel.com>
Reviewed-by: Seaan V Kelley <seanvk@posteo.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
v2:
use ASSERT_RET to check the ROI flag setted by user. instead of assert.
v1:
ROI enable on gen8 and gen9
Enable GPU to construct GPU command under ROI scenario
fix roi attrib config incorrectly
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
v2:
remove unused variable
set max ROI number to 3 according low power mode or 8
v1:
merge 3 ROI patches together
Encoding: Add the support of ROI under CQP on Haswell/Ivybridge
Encoding: Add the support of ROI for CBR
Currently it will allocate the different qp for the ROI and non_ROI region
based on the ROI ratio. The qp delta is related with the ratio of ROI region.
Encoding: Expand to support multiple ROI regions.
Encoding: bits.roi_rc_qp_delat_support
user guide:
The first is that the driver should expose the feature of qp_delta in
VAConfigAttribValEncROI.
The second is that the user-app can pass the qp_delta flag in
VAEncMiscParameterBufferROI and then the driver will use the qp_delta to
calculate the corresponding qp for ROI region. For the non-ROI region: I
think that currently we can use the following model to predicate the qp.
(qp_value = intel_qpvalue_from_qp(qp))
Qp_value_roi * ROI_area + qp_value_nonroi * area_nonroi = base_qp *
total_area.
Signed-off-by: ceciliapeng <cecilia.peng@intel.com>
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
|
|
|
|
|
|
|
|
|
|
| |
v1:
combine the patch together for Ivy and haswell
use-CPU-to-construct-the-MFC-pak-command
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: ceciliapeng <cecilia.peng@intel.com>
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
v3:
free the qp_per_mb for vme context
v2:
remove unused variable to avoid warning when compiling.
v1:
Add one flag to indicate whether ROI is supported in one encode context
Allocate one ROI buffer to hold qp per mb dynamically
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: pjl <cecilia.peng@intel.com>
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
v3:remove the warning according to haihao's comments
v2: merge three mbmv cost table related patches together.
Encoding:Abstract the calculation of mbmv cost for qp as one function.
Encoding:Add one function that initialize mbmv cost table for supported Qp range.
Encoding:Setup one cost_table surface state for VME shader
According haihao's comments, free pointer directly.
v1:
format/style aligment accordingly to avoid the warning.
Currently the length of VME MEDIA_OBJECT command on Ivy can't exceed 8 dwords. If more parameter needs to be passed, the buffer length should be enlarged.
Pass the Qp parameter into VME shader
Signed-off-by: Zhao Yakui <yakui.zhao@intel.com>
Signed-off-by: pjl <cecilia.peng@intel.com>
Signed-off-by: Pengfei Qu <Pengfei.Qu@intel.com>
|
|
|
|
|
|
|
|
| |
This is similar to what commit 1cd6795 does
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Tested-by: Wang, Fei W <fei.w.wang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This fixes the remaining issues mentioned in https://bugs.freedesktop.org/show_bug.cgi?id=96703
after applying commit 3699c14
On GEN75+, driver copies vme_context->vme_state_message to VME kernel curbe buffer and
VME kernel uses the data in curbe buffer to initialize VME message payload.
vme_context->vme_state_message is set up in intel_vme_update_mbmv_cost(), which doesn't
set all costs for used modes in VME kernels. The uninitialized mode cost will result in
difference in VME output. Thanks for Elaine's finding that the issue disappears after
initializing VME state message buffer with zeros.
Signed-off-by: Elaine Wang <elaine.wang@intel.com>
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-by: Sean V Kelley <seanvk@posteo.de>
Tested-by: Mingruo Sun <mingruo.sun@intel.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
The warning "Input ref list is Wrong" is generating
based on assumption that reference frames provided in
VAEncPictureParameterBuffer are in align with
ref_pic_list included in VAEncSliceParameterBuffer.
There shoudn't be such constraints, as per VA specification
pic_param->reference_frames can have any order based on
dpb manipulation.
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
|
|
|
|
|
|
|
| |
In addition, move intel_avc_find_skipemulcnt() to i965_encoder_utils.c
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
Reviewed-By: Sean V Kelley <sean.v.kelley@intel.com>
|
|
|
|
|
|
| |
Signed-off-by: Pengfei Qu <pengfei.qu@intel.com>
[Haihao: Fix build warning]
Signed-off-by: Xiang, Haihao <haihao.xiang@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
The calloc function maybe return NULL, it will causing
memory access violation if continue using NULL C structure.
Add assert function to do checking on its.
bugzilla:
https://bugs.freedesktop.org/show_bug.cgi?id=91699
Signed-off-by: Lim Siew Hoon <siew.hoon.lim@intel.com>
|
|
|
|
|
|
|
| |
The patch is helpful to improve quality when qp is lower than the
threshold value.
Signed-off-by: Zhong Li <zhong.li@intel.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Don't mix the slice_type values of h264 and h265.
The SLICE_TYPE values of H264 and HEVC are different.
H264: Bslice_type = 1, Pslice_type = 0
HEVC: Bslice_type = 0, Pslice_type = 1
Signed-off-by: Sreerenj Balachandran <sreerenj.balachandran@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
|
|
|
|
|
|
|
| |
1. The q_index range of vp8 is different from h264, it's need to be
mapped to avc qp range.
2. For CBR case, qp should be set to CBR calculated value.
Signed-off-by: Zhong Li <zhong.li@intel.com>
Reviewed-by: Zhao Yakui <yakui.zhao@intel.com>
|
|
|
|
|
|
|
|
| |
Add bit rate control (CBR) for vp8 hw encoding
v1->v2: follow haihao's comment to update this patch
Signed-off-by: Zhong Li <zhong.li@intel.com>
|