Re: [Libva] [PATCH 2/4] Set the pipeline to use the new VP8 encoding shaders on BSW

2017-01-22 Thread Mark Thompson
rt/libva/vp8/sys_class_drm_card0_error_yami>. Thanks, - Mark >> -Original Message- >> From: Mark Thompson [mailto:s...@jkqxz.net] >> Sent: Friday, January 13, 2017 6:11 AM >> To: libva@lists.freedesktop.org; Xiang, Haihao >> Subject: Re: [Libva] [PATCH 2/4] Set the pipel

Re: [Libva] [PATCH v1 0/9]Encoder Architecture Changes (Primarily AVC)

2017-01-21 Thread Mark Thompson
On 20/01/17 10:31, Qu, Pengfei wrote: > > > From: Qu, Pengfei > Sent: Friday, January 20, 2017 10:07 AM > To: Mark Thompson ; libva@lists.freedesktop.org > Subject: RE: [Libva] [PATCH v1 0/9]Encoder Architecture Changes (Primarily > AVC) > > > Update again. &g

Re: [Libva] [PATCH v1 7/9] ENC: add VME pipeline for AVC encoder

2017-01-21 Thread Mark Thompson
On 13/01/17 09:24, Pengfei Qu wrote: > VME pipeline: > add resource and surface allocation and free function > add init table for frame mbbrc update > add scaling kernel for AVC encoder > add BRC init reset kernel for AVC RC logic > add BRC frame update-kernel for AVC RC logic > add BRC MB level up

Re: [Libva] [PATCH v1 2/9] ENC: add common structure for AVC/HEVC encoder

2017-01-21 Thread Mark Thompson
Two minor cosmetic issues: On 13/01/17 09:24, Pengfei Qu wrote: > add context init function for AVC encoder > > Signed-off-by: Pengfei Qu > Reviewed-by: Sean V Kelley > --- > src/i965_encoder_api.h| 47 > src/i965_encoder_common.c | 124 +++ > src/i965_encoder_common.h | 533

Re: [Libva] [PATCH v1 0/9]Encoder Architecture Changes (Primarily AVC)

2017-01-18 Thread Mark Thompson
On 13/01/17 09:24, Pengfei Qu wrote: > Encoder architecture restructuring for H.264 (with some impact to HEVC now) > on HSW+ > * Improvements to the shaders > * Improvements to the B frame efficiency > * Improvements to the low bit rate mode > * Improved features in two stage VME/PAK pipeline > >

Re: [Libva] [PATCH v1 7/9] ENC: add VME pipeline for AVC encoder

2017-01-18 Thread Mark Thompson
On 13/01/17 09:24, Pengfei Qu wrote: > VME pipeline: > add resource and surface allocation and free function > add init table for frame mbbrc update > add scaling kernel for AVC encoder > add BRC init reset kernel for AVC RC logic > add BRC frame update-kernel for AVC RC logic > add BRC MB level up

Re: [Libva] [PATCH 2/4] Set the pipeline to use the new VP8 encoding shaders on BSW

2017-01-12 Thread Mark Thompson
ode as well as CBR (pass "-qindex N" for N between 0 and 127 instead of the "-b:v M" above): this is always fine for me. Can you reproduce a hang with that? Is there any other information I can provide to help? Thanks, - Mark >>> On Tue, Jan 10, 2017 at 4:21 PM, Mark T

Re: [Libva] [PATCH 00/31] Encoder Architecture Changes (Primarily AVC)

2017-01-11 Thread Mark Thompson
On 10/01/17 23:37, Sean V Kelley wrote: > Encoder architecture restructuring for H.264 (with some impact to HEVC now) > on HSW+ > * Improvements to the shaders > * Improvements to the B frame efficiency > * Improvements to the low bit rate mode > * Improved features in two stage VME/PAK pipeline >

Re: [Libva] [PATCH 2/4] Set the pipeline to use the new VP8 encoding shaders on BSW

2017-01-10 Thread Mark Thompson
On 10/01/17 22:02, Sean V Kelley wrote: > From: "Xiang, Haihao" > > Currently only one temporal layer is supported > > Signed-off-by: Xiang, Haihao > Reviewed-by: Sean V Kelley > --- > src/Makefile.am|3 + > src/gen8_encoder_vp8.c | 140 + > src/gen8_mfc.c |8 +- > sr

[Libva] [PATCH v3] H.264 encoder: add a simple reactive VBR rate control mode

2017-01-09 Thread Mark Thompson
stream decreases. Signed-off-by: Mark Thompson --- On 09/01/17 05:23, Xiang, Haihao wrote: >> +BRC_CLIP(mfc_context->brc.qp_prime_y[0][SLICE_TYPE_I], >> (int)encoder_context->brc.min_qp, 51); >> +BRC_CLIP(mfc_context->brc.qp_prime_y[0][SLICE_TYPE_P], >> (in

[Libva] [PATCH v2] H.264 encoder: add a simple reactive VBR rate control mode

2017-01-08 Thread Mark Thompson
stream decreases. Signed-off-by: Mark Thompson --- On 06/01/17 07:09, Xiang, Haihao wrote: > >> ... > > Could you add the above message in your commit log? I don't see the message > after applying this patch to my local branch. It was more meant as a general explanation rathe

Re: [Libva] [Libva-intel-driver][PATCH 2/2] Encoder: release all misc parameter buffers

2017-01-04 Thread Mark Thompson
On 04/01/17 01:40, Xiang, Haihao wrote: > User can still use the old setting if needed because the setting is > stored in a common structure now. > > Signed-off-by: Xiang, Haihao > --- > src/i965_drv_video.c | 15 +-- > 1 file changed, 5 insertions(+), 10 deletions(-) > > diff --git

[Libva] [PATCH v2] H.264 encoder: respect initial QP setting

2017-01-04 Thread Mark Thompson
Signed-off-by: Mark Thompson --- On 04/01/17 08:50, Xiang, Haihao wrote: > Could you send your new revision in a separate email with a version number in > the future? I thought this email was just a reply > to the previous email. Ok, will do. > BTW I failed to apply the 2nd patch

Re: [Libva] [Libva-intel-driver][PATCH] Needn't reset brc if the bitrate setting isn't changed in the Begin/Render/End sequence

2017-01-03 Thread Mark Thompson
On 03/01/17 06:42, Xiang, Haihao wrote: > On Fri, 2016-12-30 at 17:44 +0000, Mark Thompson wrote: >> On 30/12/16 00:51, Xiang, Haihao wrote: >>> On Thu, 2016-12-29 at 18:52 +0000, Mark Thompson wrote: >>>> On 29/12/16 07:09, Zhao Yakui wrote: >>>>>

[Libva] [PATCH] H.264 encoder: respect min QP setting

2017-01-03 Thread Mark Thompson
Signed-off-by: Mark Thompson --- On 03/01/17 07:54, Xiang, Haihao wrote: > On Fri, 2016-12-30 at 16:15 +0000, Mark Thompson wrote: >> Signed-off-by: Mark Thompson >> --- >> This is helpful to avoid some extremes of the CBR rate control (the QP can >> easily get

[Libva] [PATCH] H.264 encoder: add a simple VBR rate control mode

2017-01-01 Thread Mark Thompson
Signed-off-by: Mark Thompson --- From the comment in the code: // This implements a simple reactive VBR rate controller for single-layer H.264. // The main idea here is to try to keep the HRD buffer above the target level most of the time, // so that when a large frame is generated (on a scene

Re: [Libva] [Libva-intel-driver][PATCH] Needn't reset brc if the bitrate setting isn't changed in the Begin/Render/End sequence

2016-12-30 Thread Mark Thompson
On 30/12/16 00:14, Zhao Yakui wrote: > On 12/30/2016 02:52 AM, Mark Thompson wrote: >> On 29/12/16 07:09, Zhao Yakui wrote: >>> On 12/29/2016 03:08 PM, Xiang, Haihao wrote: >>>> >>>>> On 12/29/2016 01:22 PM, Xiang, Haihao wrote: >>>>>&g

Re: [Libva] [Libva-intel-driver][PATCH] Needn't reset brc if the bitrate setting isn't changed in the Begin/Render/End sequence

2016-12-30 Thread Mark Thompson
On 30/12/16 00:51, Xiang, Haihao wrote: > On Thu, 2016-12-29 at 18:52 +0000, Mark Thompson wrote: >> On 29/12/16 07:09, Zhao Yakui wrote: >>> On 12/29/2016 03:08 PM, Xiang, Haihao wrote: >>>> >>>>> On 12/29/2016 01:22 PM, Xiang, Haihao wrote: >>

[Libva] [PATCH 2/2] H.264 encoder: respect initial QP setting

2016-12-30 Thread Mark Thompson
Signed-off-by: Mark Thompson --- This can be set by the user to ensure that the first frame of a stream is encoded at with a good QP (often it starts too high and takes a few frames to get down to the right range). The current code continues to be used if the value is not set (is zero

[Libva] [PATCH 1/2] H.264 encoder: respect min QP setting

2016-12-30 Thread Mark Thompson
Signed-off-by: Mark Thompson --- This is helpful to avoid some extremes of the CBR rate control (the QP can easily get down to 1 on a static image, which then consumes the entire HRD buffer encoding the next non-static frame with far more detail that is wanted). The ROI code is not affected by

Re: [Libva] [Libva-intel-driver][PATCH] Needn't reset brc if the bitrate setting isn't changed in the Begin/Render/End sequence

2016-12-29 Thread Mark Thompson
On 29/12/16 07:09, Zhao Yakui wrote: > On 12/29/2016 03:08 PM, Xiang, Haihao wrote: >> >>> On 12/29/2016 01:22 PM, Xiang, Haihao wrote: User can use VAEncMiscParameterRateControl to update bitrate, so we should ignore the bitrate in the sequence parameter if VAEncMiscParameterRa

[Libva] [PATCH 4/4] VP9 encoder: use generic rate control parameters

2016-12-22 Thread Mark Thompson
Also adds support for fractional framerate. Signed-off-by: Mark Thompson --- src/gen9_vp9_encoder.c | 232 +++-- src/gen9_vp9_encoder.h | 12 +-- src/i965_drv_video.c | 10 +-- src/i965_encoder.c | 36 src/i965_encoder.h | 1

[Libva] [PATCH 3/4] VP8 encoder: use generic rate control parameters

2016-12-22 Thread Mark Thompson
Signed-off-by: Mark Thompson --- src/gen6_mfc.h | 6 - src/gen8_mfc.c | 73 ++ 2 files changed, 17 insertions(+), 62 deletions(-) diff --git a/src/gen6_mfc.h b/src/gen6_mfc.h index 290922b..7a5d940 100644 --- a/src/gen6_mfc.h +++ b

[Libva] [PATCH 2/4] HEVC encoder: use generic rate control parameters

2016-12-22 Thread Mark Thompson
Signed-off-by: Mark Thompson --- src/gen9_mfc.h | 6 src/gen9_mfc_hevc.c | 83 ++--- src/i965_encoder.c | 74 +++ 3 files changed, 84 insertions(+), 79 deletions(-) diff --git a/src

[Libva] [PATCH 1/4] i965_encoder: consistently represent framerate as a fraction

2016-12-22 Thread Mark Thompson
Update references in both H.264 encoders (gen6_mfc and gen9_vdenc). Signed-off-by: Mark Thompson --- Changes for the series: * Derive numerator and denominator from the correct parts of the framerate parameter (see also earlier patch fixing the comment in va.h). * Make VP8 HRD buffer size

[Libva] [PATCH] va.h: Improve the comment on the encode framerate parameter

2016-12-22 Thread Mark Thompson
Signed-off-by: Mark Thompson --- On 22/12/16 01:32, Xiang, Haihao wrote: > >> Hmm. Reading the comment in va/va.h again: >> >> /* >> * fps = numerator / denominator >> * The high 2 bytes (bits 16 to 31) of framerate specifies the >> numerator

Re: [Libva] [PATCH 4/4] VP9 encoder: use generic rate control parameters

2016-12-21 Thread Mark Thompson
On 21/12/16 04:46, Xiang, Haihao wrote: > On Mon, 2016-12-19 at 23:01 +0000, Mark Thompson wrote: >> Also adds support for fractional framerate. >> >> Signed-off-by: Mark Thompson >> --- >> src/gen9_vp9_encoder.c | 240 >> --

Re: [Libva] [PATCH 1/4] i965_encoder: consistently represent framerate as a fraction

2016-12-21 Thread Mark Thompson
On 21/12/16 04:21, Xiang, Haihao wrote: > >> Update references in both H.264 encoders (gen6_mfc and gen9_vdenc). >> >> Signed-off-by: Mark Thompson >> --- >> New version. >> >> Changes for the whole series: >> * Use a single field for fra

[Libva] [PATCH 3/4] VP8 encoder: use generic rate control parameters

2016-12-19 Thread Mark Thompson
Signed-off-by: Mark Thompson --- src/gen6_mfc.h | 6 -- src/gen8_mfc.c | 68 +- 2 files changed, 15 insertions(+), 59 deletions(-) diff --git a/src/gen6_mfc.h b/src/gen6_mfc.h index 290922b..7a5d940 100644 --- a/src/gen6_mfc.h +++ b

[Libva] [PATCH 4/4] VP9 encoder: use generic rate control parameters

2016-12-19 Thread Mark Thompson
Also adds support for fractional framerate. Signed-off-by: Mark Thompson --- src/gen9_vp9_encoder.c | 240 - src/gen9_vp9_encoder.h | 10 +-- src/i965_drv_video.c | 10 +-- src/i965_encoder.c | 36 src/i965_encoder.h | 1

[Libva] [PATCH 2/4] HEVC encoder: use generic rate control parameters

2016-12-19 Thread Mark Thompson
Signed-off-by: Mark Thompson --- src/gen9_mfc.h | 6 src/gen9_mfc_hevc.c | 83 ++--- src/i965_encoder.c | 74 +++ 3 files changed, 84 insertions(+), 79 deletions(-) diff --git a/src

[Libva] [PATCH 1/4] i965_encoder: consistently represent framerate as a fraction

2016-12-19 Thread Mark Thompson
Update references in both H.264 encoders (gen6_mfc and gen9_vdenc). Signed-off-by: Mark Thompson --- New version. Changes for the whole series: * Use a single field for framerate (adding a new struct to represent it), as recommended by Haihao. * Fix some missed cases where bitrate was read

Re: [Libva] [PATCH 2/3] H.265 main 10 encoder supports only 10bpp render targets

2016-12-15 Thread Mark Thompson
On 05/12/16 17:54, Mark Thompson wrote: > Signed-off-by: Mark Thompson > --- > The supported surface formats are already correct (i.e. only P010); this > makes the render target format right as well (before this, it declares that > it supports only YUV 4:2:0 8-bit). > >

Re: [Libva] [PATCH 1/4] i965_encoder: consistently represent framerate as a fraction

2016-12-15 Thread Mark Thompson
On 15/12/16 08:54, Xiang, Haihao wrote: > > Hi Mark, > > Thanks for your patch, is there any benefit to use a fraction? using > 100 as framerate_den works well in the driver. Everything the driver interacts with directly, on both sides, uses a fraction: * In VAAPI, VAEncMiscParameterFrameRate c

[Libva] [PATCH 4/4] VP9 encoder: use generic rate control parameters

2016-12-08 Thread Mark Thompson
Also adds support for fractional framerate. Signed-off-by: Mark Thompson --- src/gen9_vp9_encoder.c | 240 + src/gen9_vp9_encoder.h | 11 +-- src/i965_drv_video.c | 10 +-- src/i965_encoder.c | 36 src/i965_encoder.h | 1

[Libva] [PATCH 3/4] VP8 encoder: use generic rate control parameters

2016-12-08 Thread Mark Thompson
Signed-off-by: Mark Thompson --- src/gen6_mfc.h | 6 -- src/gen8_mfc.c | 64 -- 2 files changed, 13 insertions(+), 57 deletions(-) diff --git a/src/gen6_mfc.h b/src/gen6_mfc.h index 290922b..7a5d940 100644 --- a/src/gen6_mfc.h +++ b

[Libva] [PATCH 2/4] HEVC encoder: use generic rate control parameters

2016-12-08 Thread Mark Thompson
Signed-off-by: Mark Thompson --- src/gen9_mfc.h | 6 - src/gen9_mfc_hevc.c | 67 + src/i965_encoder.c | 78 + 3 files changed, 80 insertions(+), 71 deletions(-) diff --git a/src/gen9_mfc.h

[Libva] [PATCH 1/4] i965_encoder: consistently represent framerate as a fraction

2016-12-08 Thread Mark Thompson
Update references in both H.264 encoders (gen6_mfc and gen9_vdenc). Signed-off-by: Mark Thompson --- src/gen6_mfc_common.c | 11 ++ src/gen9_vdenc.c | 29 ++-- src/gen9_vdenc.h | 3 ++- src/i965_encoder.c| 61

Re: [Libva] [PATCH 3/3] VP9 encode: support fractional framerate

2016-12-08 Thread Mark Thompson
On 08/12/16 01:13, Zhao Yakui wrote: > On 12/07/2016 01:48 PM, Xiang, Haihao wrote: >> Now we have the same way for frame rate for each codec in i965_encoder.c, it >> would be better to use the result directly > > Hi, Mark > > Can you refresh your patch based on Haihao's suggestion? > No

Re: [Libva] [PATCH 1/3] Declare I010 support for QueryImageFormats

2016-12-06 Thread Mark Thompson
On 06/12/16 01:37, Zhao Yakui wrote: > On 12/06/2016 01:49 AM, Mark Thompson wrote: >> Signed-off-by: Mark Thompson >> --- >> It's already returned as a usable surface format for the video processor, >> but is missing from the list returned by vaQueryImageFormats

Re: [Libva] [PATCH] Don't automatically destroy the buffer(s) passed to vaRenderPicture

2016-12-05 Thread Mark Thompson
On 01/12/16 08:55, Xiang, Haihao wrote: > Instead the user must call vaDestroyBuffer() to destroy a buffer explicitly. > > If following the previous API specification, > 1. Violate "who allocate who release" principle > 2. The user cannot re-use VA buffer flexibly > 3. The user still has to call v

[Libva] [PATCH 3/3] VP9 encode: support fractional framerate

2016-12-05 Thread Mark Thompson
Signed-off-by: Mark Thompson --- Tested on Kaby Lake. Someone who has access to the manuals should make sure that the framerate numerator/denominator actually works there as I am guessing it does. Removes the frame_rate field in struct gen9_vp9_brc_curbe_param, because there is no longer a

[Libva] [PATCH 2/3] H.265 main 10 encoder supports only 10bpp render targets

2016-12-05 Thread Mark Thompson
Signed-off-by: Mark Thompson --- The supported surface formats are already correct (i.e. only P010); this makes the render target format right as well (before this, it declares that it supports only YUV 4:2:0 8-bit). src/i965_drv_video.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a

[Libva] [PATCH 1/3] Declare I010 support for QueryImageFormats

2016-12-05 Thread Mark Thompson
Signed-off-by: Mark Thompson --- It's already returned as a usable surface format for the video processor, but is missing from the list returned by vaQueryImageFormats(). src/i965_drv_video.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/i965_drv_video.c b/src/i965_drv_vi