[Libva] encoding text image in h264 at QP 1--what quality can be expected?

Matt Pekar mpekar at raineyelectronics.com
Wed Oct 8 09:39:02 PDT 2014


OK this is apparently just a consequence of colorspace conversion--not a
libva thing.  Not sure if there is really a way to address it since going
from BGR to NV12 data is gonna be lost because there are fewer bits.

Just running this pipeline in gstreamer 1.2.2 shows a lot of change in the
image:

gst-launch-1.0 filesrc location=Howdy.png ! decodebin ! videoconvert !
video/x-raw,format=NV12 ! videoconvert ! imagefreeze ! ximagesink


On Wed, Oct 8, 2014 at 11:07 AM, Chris Healy <cphealy at gmail.com> wrote:

> I assume the black and white image is acceptable as it looks the same
> whereas the color one has some visual degradation, correct?
>
> The i3 is Haswell based whereas the i5 is an older SandyBridge.  I know
> the Haswell is faster encode and decode wise, but I don't know about
> quality.  Is there a difference visually between the older i5 and newer i3
> quality wise?
>
> What are you using to do your color space conversion?  I've been using one
> of the VPPs but was previously using libyuv on the CPU.
>
> On Wed, Oct 8, 2014 at 9:02 AM, Matt Pekar <mpekar at raineyelectronics.com>
> wrote:
>
>> I've examined the behavior on Intel(R) Core(TM) i3-4130 and Intel(R)
>> Core(TM) i5-2400.  We target resolutions as low as 224x64 and up to 720P.
>>
>> Another thing I'm noticing is that the colors used seem to matter.  I put
>> some white on black text up and it looks great.  Maybe there is an issue
>> with how I do my colorspace conversion from BGR to NV12...
>>
>> I'm going to attempt to attach two pictures of what I'm seeing.  They
>> show the original .png image and what the encoder delivers side by side.
>>
>> On Wed, Oct 8, 2014 at 10:41 AM, Chris Healy <cphealy at gmail.com> wrote:
>>
>>> Hi Matt,
>>>
>>> I've been using the libva with the Intel driver to encode and stream
>>> myself for quite some time now.  There are a number of visual artifacts
>>> that I have encountered along the way, though the fuzziness you describe is
>>> not one of them.  With the Intel driver, I would expect different visual
>>> behaviour depending on the particular HW you are using as each one is
>>> different.  I'm using an i7-3517U to encode 1280x720 H.264 at 4Mbps.  What
>>> are you working with?
>>>
>>> Chris
>>>
>>> On Wed, Oct 8, 2014 at 7:18 AM, Matt Pekar <mpekar at raineyelectronics.com
>>> > wrote:
>>>
>>>> We use libva with the Intel driver to do live video streaming.  In the
>>>> encoding process we dynamically ramp the QP up and down as different
>>>> content flows through.
>>>>
>>>> There are cases where we display simple text messages for many
>>>> seconds.  In these cases I'd like to send my QP down to 1--highest
>>>> quality--and get as close to a lossless encode as possible.
>>>>
>>>> What I'm seeing is that on fonts and sharp lines a little bit of
>>>> encoding will be done regardless, leaving the text slightly fuzzy.  I tried
>>>> the new VAEncMiscParameterTypeQualityLevel setting, but it only had two
>>>> levels (1 and 2) and they didn't seem to affect the picture at all.
>>>>
>>>> Are there any settings I might try to ramp the quality up even
>>>> further?  Is the fuzziness I'm seeing in the text inherent to the h264
>>>> standard, or is this just what Intel's implementation happens to do?
>>>>
>>>>
>>>> _______________________________________________
>>>> Libva mailing list
>>>> Libva at lists.freedesktop.org
>>>> http://lists.freedesktop.org/mailman/listinfo/libva
>>>>
>>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/libva/attachments/20141008/a098ef5d/attachment.html>


More information about the Libva mailing list