Xpra: Ticket #2060: html5 h264 broadway decoder picture dimension is rounded up

Here's a log sample recorded for a 1520x920 window downscaled to 1012x612 for h264, then refreshed using webp.

05,262 damage(0, 0, 1520, 920, {}) wid=2
05,263 do_damage(0, 0, 1520, 920, {})    wid=2, scheduling batching expiry for sequence 317 in 21 ms
05,293 compress:   7.1ms for 1520x920  pixels at    0,0    for wid=2     using      h264 with ratio   0.0%  ( 5462KB to     1KB), sequence   187, client_options={u'type': u'P', u'frame': 5, u'pts': 25493, 'csc': u'YUV420P', 'scaled_size': (1012, 612)}
05,298 client draw may_paint_now() paint pending= 0 , paint queue length= 1
05,298 client draw do_paint( 1767  bytes of   h264  data  1520 x 920  at  0 , 0 ) focused= true
05,305 client draw broadway picture decoded:  2555904 bytes, size  1024 x 624, paint location:  0,0 with infos= undefined
05,308 client draw request_redraw for Window(2)
05,309 client draw decode time for  h264  sequence  187 :  10 , flush= 0
05,314 client draw animation frame: 1 windows to paint
05,425 damage(0, 0, 1520, 920, {}) wid=2
05,426 do_damage(0, 0, 1520, 920, {})    wid=2, scheduling batching expiry for sequence 319 in 21 ms
10,017 damage(0, 0, 1520, 920, {}) wid=2
10,018 do_damage(0, 0, 1520, 920, {})    wid=2, scheduling batching expiry for sequence 321 in 21 ms
10,056 compress:  12.4ms for 1520x566  pixels at    0,27   for wid=2     using      webp with ratio   1.6%  ( 3360KB to    55KB), sequence   189, client_options={'flush': 1, u'quality': 100, u'rgb_format': 'BGRX'}
10,058 compress:   1.1ms for 1520x26   pixels at    0,809  for wid=2     using      webp with ratio   6.1%  (  154KB to     9KB), sequence   190, client_options={u'quality': 100, u'rgb_format': 'BGRX'}
10,062 client draw may_paint_now() paint pending= 0 , paint queue length= 1
10,062 client draw do_paint( 56596  bytes of   webp  data  1520 x 566  at  0 , 27 ) focused= true
10,064 client draw may_paint_now() paint pending= 87296 , paint queue length= 1
10,071 client draw decode time for  webp  sequence  188 :  8 , flush= 1
10,071 client draw may_paint_now() paint pending= 0 , paint queue length= 1
10,072 client draw do_paint( 9590  bytes of   webp  data  1520 x 26  at  0 , 809 ) focused= true
10,076 client draw request_redraw for Window(2)
10,077 client draw decode time for  webp  sequence  189 :  12 , flush= 0
10,077 client draw may_paint_now() paint pending= 0 , paint queue length= 0
10,078 client draw animation frame: 1 windows to paint
10,090 damage(0, 0, 1520, 920, {}) wid=2
10,090 do_damage(0, 0, 1520, 920, {})    wid=2, scheduling batching expiry for sequence 323 in 21 ms
10,128 compress:  11.9ms for 1520x566  pixels at    0,27   for wid=2     using      webp with ratio   1.6%  ( 3360KB to    55KB), sequence   191, client_options={'flush': 1, u'quality': 100, u'rgb_format': 'BGRX'}
10,129 compress:   1.2ms for 1520x26   pixels at    0,809  for wid=2     using      webp with ratio   6.1%  (  154KB to     9KB), sequence   192, client_options={u'quality': 100, u'rgb_format': 'BGRX'}
10,134 client draw may_paint_now() paint pending= 0 , paint queue length= 1
10,134 client draw do_paint( 56596  bytes of   webp  data  1520 x 566  at  0 , 27 ) focused= true
10,136 client draw may_paint_now() paint pending= 87367 , paint queue length= 1
10,136 client draw decode time for  webp  sequence  190 :  2 , flush= 1
10,136 client draw may_paint_now() paint pending= 0 , paint queue length= 1
10,136 client draw do_paint( 9710  bytes of   webp  data  1520 x 26  at  0 , 809 ) focused= true
10,138 client draw request_redraw for Window(2)
10,138 client draw decode time for  webp  sequence  191 :  3 , flush= 0
10,139 client draw may_paint_now() paint pending= 0 , paint queue length= 0
10,141 client draw animation frame: 1 windows to paint

The broadway decoder reports client draw broadway picture decoded: 2555904 bytes, size 1024 x 624, paint location: 0,0 with infos= undefined despite the fact that the encoder reported different scaled dimensions: client_options={u'type': u'P', u'frame': 5, u'pts': 25493, 'csc': u'YUV420P', 'scaled_size': (1012, 612).

Looks like the image we get from broadway should be cropped before being upscaled.



Sat, 24 Nov 2018 09:51:42 GMT - Antoine Martin: status changed; resolution set

Fixed in r21093.


Sat, 23 Jan 2021 05:41:06 GMT - migration script:

this ticket has been moved to: https://github.com/Xpra-org/xpra/issues/2060