[Spice-devel] [PATCH spice-server 00/28] adaptive video streaming

Yonit Halperin yhalperi at redhat.com
Wed Feb 27 06:50:00 PST 2013


On 02/27/2013 09:30 AM, Hans de Goede wrote:
> Hi,
>
> On 02/27/2013 03:01 PM, Yonit Halperin wrote:
>> On 02/26/2013 02:49 PM, Marc-André Lureau wrote:
>>>
>>>
>>> ----- Mensaje original -----
>>>> Hi,
>>>>
>>>> On 02/26/2013 01:40 PM, Marc-André Lureau wrote:
>>>>> Hi
>>>>>
>>>>> ----- Mensaje original -----
>>>>>> The adaptive video streaming is implemented by the following
>>>>>> heuristic:
>>>>>> Given a bit rate, we calculate the best combination of mjpeg
>>>>>> quality
>>>>>> and frame rate (henceforth, the stream parameters) for this
>>>>>> bit rate. In order to decide this combination, we evaluate the
>>>>>> encoding size for different jpeg
>>>>>> qualities by applying them on successive frames.
>>>>>
>>>>> But no downscaling?
>>>> Good point. However, the default libjpeg sampling factors values are
>>>> already 2 for luminance components and 1 for chrominance components
>>>> (both horizontal and vertical), while 4 is the highest value, and
>>>> larger
>>>> factor means higher resolution. It is worth trying decreasing the
>>>> luminance to 1.
>>>
>>> According to wikipedia, the jpeg YUV downscaling is:
>>>
>>> "The ratios at which the downsampling is ordinarily done for JPEG
>>> images are 4:4:4 (no downsampling), 4:2:2 (reduction by a factor of 2
>>> in the horizontal direction), or (most commonly) 4:2:0"
>>>
>>> So luminance is not downsampled. Is that what you said? According to
>>> my experience with video codecs (not so much with jpeg itself),
>>> downsampling really makes a difference to most codecs, both in term
>>> of overally quality and cpu usage.
>> I understand from libjpeg documentation that by default the luminance
>> is downsampled by a factor of 2, and the chrominance by a factor of 4.
>> So we can try downsampling the luminance by a factor of 4.
>
> I think you're misreading the docs then. Standard jpeg's have there
> luminance
> data not downsampled *at all*, so the y channel is at full res of the
> original
> picture.
In any case, as I said, we can try it and add it to the quality+fps 
evaluation procedure. But it can be done as a future enhancement.
>
> Regards,
>
> Hans
> _______________________________________________
> Spice-devel mailing list
> Spice-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/spice-devel



More information about the Spice-devel mailing list