On Thu, Aug 31, 2017 at 11:03 AM, tsoumplekas_giorgos <getsoubl(a)gmail.com>
wrote:
Dear Mr Charles Daniel
Thank you for the prompt answer .
We use the version 1.7.3. We have used as reference the gstreamer
implementation (gstvaapiencoder_vp8.c) and vaapi_encode_vp8.c that is
implemented by ffmpeg and is located in/ffmpeg/libavcodec/vaapi_enc
ode_vp8.c.
Hello George,
I'd suggest that you compare against 1.8.3 release. I know gst-vaapi works
with it. Let me insist that you use libyami/libyami-utils as well
github.com/01org/libyami,
github.com/01org/libyami-utils for example
references.
Regarding your question how we wire the encoder on Chromium , we have
patched chromium in order to enable HW accellarators and we have based on
H.264 implementation that is implemented in the
file vaapi_video_encode_accelerator.cc. We have gone throught the
implementation of H264 and the vp8 implementation in the ffmpeg and
gstreamer and create the coressponding configuration for the encoder.
Chromium use a general wrapper for all the type of encoders and this
responsible to call the driver .
Above this wrapper it is implemented only the H264 vaapi accelator. In
addition to this we implelemted the vp8 confiuration and we sucessfully
call the wrapper.
That's interesting that you had to implement h.264 since it has been
working on
Chromium for a long time, I guess your implementation goes
beyond by using gstreamer and ffmpeg?
We have put traces in the i965 driver and we have confirmed that the
driver is called for the vp8 and we passed the correct parameters.
But the parameters are not the optimal as we understand. This is the
reason that we ask for help.
You can always use LIBVA_TRACE as the default way to collect inputs to the
driver,
frame by frame.
However in ffmpeg wiki the following is refered "Hardware
encoders
typically generate output of significantly lower quality than good software
encoders like x264, but are generally faster and do not use much CPU
resource. (That is, they require a higher bitrate to make output with the
same perceptual quality, or they make output with a lower perceptual
quality at the same bitrate.)". Is this true?
release family 1.8.x has the following release notes:
https://github.com/01org/intel-vaapi-driver/blob/v1.8-branch/NEWS
You can find answers there for your specific hardware.
Thanks,
--
Daniel.
Thank you in advance
Georgios (George) Tsoumplekas
Software Engineer @ Unify S.A
M.Sc. Degree in Computer Systems Technology, Kapodistrian University of
Athens
5-year Diploma in Computer Engineering, University of Thessaly
email: getsoubl(a)gmail.com
On 31 August 2017 at 20:46, Charles, Daniel <daniel.charles(a)intel.com>
wrote:
>
>
> On Thu, Aug 31, 2017 at 10:04 AM, tsoumplekas_giorgos <getsoubl(a)gmail.com
> > wrote:
>
>> Dear all,
>> We are working on a Beebox board that runs a Debian 9 OS. We try to
>> encode a VP8 stream in Chromium during a webrtc video call.
>>
>> But the quality is not as good as the stream that is created by software
>> encoder.
>>
>> Specifically for a SD video stream and bit rate at 300 Kbs and frame
>> rate at 30 fps ,you can see waves in a frame. The problem is increased when
>> the motion between frames is increazed.
>>
>> We increase the bitrate at 2Mbs , it seems that the quality has a
>> rapidly improvment. Problem appears again when the motion is high in the
>> video frame. Increasing the bitrate at 4Mbs the image is perfect but there
>> is a little lag when the motion is high.
>>
>> We have tried different combination of settings but we cannot find a
>> perfect one.
>> Could you please give us a set of ideal of settings or some advice to
>> have real time encoding like software encoding?
>> Find below our settings
>> What is wrong or not optimal?
>>
>> Which libva/intel-vaapi-driver version are you using?
>
> Have you checked libyami/libyami-utils projects for examples on how to
> send parameters to the driver?
>
> How are you wiring the encoder on Chromium?
>
> --
> Daniel.
>
>
>> //Sequence Parameters
>> VAEncSequenceParameterBufferVP8 seq_param; memset(&seq_param, 0,
>> sizeof(seq_param)); seq_param.frame_width = 640 seq_param.frame_height =
>> 480 seq_param.frame_width_scale = 1; seq_param.frame_height_scale = 1;
>> seq_param.intra_period = 256; seq_param.bits_per_second = 2Mb;
>> seq_param.error_resilient = 0; seq_param.kf_auto = 0; seq_param.kf_min_dist
>> = 0; seq_param.kf_max_dist = seq_param.intra_period; //in reference frame
>> save the 4 latest decoded frames seq_param.reference_frames[i] =
>> (*iter)->id();
>> //Picture Parameters
>> VAEncPictureParameterBufferVP8 pic_param;
>> //Intra frame
>> pic_param.pic_flags.bits.refresh_entropy_probs = 0;
>> pic_param.pic_flags.bits.frame_type = 0; pic_param.ref_flags.bits.force_kf
>> = 1; pic_param.pic_flags.bits.refresh_last = 1;
>> pic_param.pic_flags.bits.refresh_golden_frame = 1;
>> pic_param.pic_flags.bits.refresh_alternate_frame = 1;
>> pic_param.pic_flags.bits.copy_buffer_to_alternate = 0;
>> pic_param.pic_flags.bits.copy_buffer_to_golden = 0;
>> pic_param.ref_last_frame = pic_param.ref_gf_frame = pic_param.ref_arf_frame
>> = VA_INVALID_SURFACE; //P frame pic_param.pic_flags.bits.frame_type =
>> 1; pic_param.ref_flags.bits.force_kf = 0; pic_param.pic_flags.bits.refresh_last
>> = 1; pic_param.pic_flags.bits.refresh_golden_frame = 0;
>> pic_param.pic_flags.bits.refresh_alternate_frame = 0;
>> pic_param.pic_flags.bits.copy_buffer_to_alternate = 2;
>> pic_param.pic_flags.bits.copy_buffer_to_golden = 1;
>> pic_param.ref_last_frame = pic_param.ref_gf_frame = pic_param.ref_arf_frame
>> = //Latest decoded frame //Common setting pic_param.pic_flags.bits.show_frame
>> = 1; pic_param.clamp_qindex_low = 0; pic_param.clamp_qindex_high = 127;
>> pic_param.pic_flags.bits.version = 1; pic_param.pic_flags.bits.loop_filter_type
>> = 1; pic_param.sharpness_level = 0; for (int i = 0; i < 4; i++) {
>> pic_param.loop_filter_level[i] = 16; }
>> //quantization parameters
>> For I frame
>> quant.quantization_index[i] = 4;
>> For B frame
>> quant.quantization_index[i] = 26;
>>
>> Misc Parameters
>> rate_control_param.bits_per_second = 2Mbs;
>> rate_control_param.target_percentage = 90;
>> rate_control_param.window_size = 1500;
>> rate_control_param.initial_qp = 26;
>> rate_control_param.rc_flags.bits.disable_frame_skip = true;
>>
>> framerate_param.framerate = 30;
>>
>> hrd_param.buffer_size = cpb_size_ = bitrate_ * kCPBWindowSizeMs / 1000;
>> hrd_param.initial_buffer_fullness = cpb_size_ / 2;
>>
>> Georgios (George) Tsoumplekas
>>
>> Software Engineer @ Unify S.A
>> M.Sc. Degree in Computer Systems Technology, Kapodistrian University of
>> Athens
>> 5-year Diploma in Computer Engineering, University of Thessaly
>> email: getsoubl(a)gmail.com
>>
>> _______________________________________________
>> intel-vaapi-media mailing list
>> intel-vaapi-media(a)lists.01.org
>>
https://lists.01.org/mailman/listinfo/intel-vaapi-media
>>
>>
>