[Mesa-dev] [PATCH 06/11] vl/util: add copy func for yv12image to nv12surface

Andy Furniss adf.lists at gmail.com
Fri Jul 22 14:40:49 UTC 2016


Zhang, Boyuan wrote:
> Hi Andy,
>
> I just submitted another patch set.
>
> 1. Fixed previously reported regression when using ffmpeg to encode.
> 2. Fixed I420 "width=720,height=480" garbage output issue.
>
> Please give a try from your side.

Hi,

The width 720 is OK now. Colors are still wrong. It seems from more
testing that it's not just I420, inputting YV12 is also wrong, which
makes me think that the conversions could be producing nv21 rather
than nv12.

I updated my gstreamer to current git just in case it changed something
but it didn't, though they decided to make vaapi264enc default to high, 
so now I have to add ! video/x-h264,profile=baseline ! everywhere.

ffmepeg/avconv no longer hit the division by zero.

There is something a bit strange about their rate control though, it's
like there is a max bitrate per frame limit - maybe they are sending
a min qp as well as bitrate or something, but I think it may be more
complicated that that.

Below this limit bitrate control works as expected with varying 
framerates eg. 2560x1440 24mbit fps 50 and 25 = OK, start going higher
and things start getting limited for the lower fps. The source is not
limiting, qp is high 20s at this rate/fps.

Of course this may just be an ffmpeg/avconv issue when the patches go
in I will ask the author of the vaapi code (who IIRC has a bonaire) so
will be able to test.

Another ffmpeg specific feature is that though the files made play OK,
the JM ref decoder doesn't like them as below. It was always like this
though I can't recall the frame numbering being in 4s IIRC it used to
be paired like gstreamer.

gstreamer doesn't have the POC issue, example output below.

ffmpeg/avconv -

  ./ldecod.exe -i /mnt/ramdisk/av-2425.264 -o /dev/null
Setting Default Parameters...
Parsing Configfile decoder.cfg
...............

----------------------------- JM 19.0 (FRExt) -----------------------------
--------------------------------------------------------------------------
  Input H.264 bitstream                  : /mnt/ramdisk/av-2425.264
  Output decoded YUV                     : /dev/null
  Input reference file                   : test_rec.yuv
--------------------------------------------------------------------------
  Input reference file                   : test_rec.yuv does not exist
                                           SNR values are not available
Profile IDC  : 66
Image Format : 2560x1440 (2560x1440)
Color Format : 4:2:0 (8:8:8)
--------------------------------------------------------------------------
POC must = frame# or field# for SNRs to be correct
--------------------------------------------------------------------------
   Frame          POC  Pic#   QP    SnrY     SnrU     SnrV   Y:U:V Time(ms)
--------------------------------------------------------------------------
00000(IDR)        0     0    31                             4:2:0     238
00000( P )        0     1    31                             4:2:0      93
00000( P )        1     2    29                             4:2:0      84
00000( P )        1     3    29                             4:2:0      84
00001( P )        2     4    29                             4:2:0      86
00001( P )        2     5    29                             4:2:0      86
00001( P )        3     6    29                             4:2:0      88
00001( P )        3     7    29                             4:2:0      89
00002( P )        4     8    29                             4:2:0     165
00002( P )        4     9    29                             4:2:0      88
00002( P )        5    10    28                             4:2:0     189
00002( P )        5    11    28                             4:2:0     100
00003( P )        6    12    28                             4:2:0     189
00003( P )        6    13    28                             4:2:0     102
output POC must be in ascending order
output POC must be in ascending order
output POC must be in ascending order
output POC must be in ascending order
output POC must be in ascending order
output POC must be in ascending order
output POC must be in ascending order


Gstreamer -

./ldecod.exe -i /mnt/ramdisk/gs-2425.264 -o /dev/null
Setting Default Parameters...
Parsing Configfile decoder.cfg
...............

----------------------------- JM 19.0 (FRExt) -----------------------------
--------------------------------------------------------------------------
  Input H.264 bitstream                  : /mnt/ramdisk/gs-2425.264
  Output decoded YUV                     : /dev/null
  Input reference file                   : test_rec.yuv
--------------------------------------------------------------------------
  Input reference file                   : test_rec.yuv does not exist
                                           SNR values are not available
Profile IDC  : 66
Image Format : 2560x1440 (2560x1440)
Color Format : 4:2:0 (8:8:8)
--------------------------------------------------------------------------
POC must = frame# or field# for SNRs to be correct
--------------------------------------------------------------------------
   Frame          POC  Pic#   QP    SnrY     SnrU     SnrV   Y:U:V Time(ms)
--------------------------------------------------------------------------
00000(IDR)        0     0    31                             4:2:0     153
00000( P )        1     1    31                             4:2:0     130
00001( P )        2     2    28                             4:2:0     145
00001( P )        3     3    29                             4:2:0     132
00002( P )        4     4    27                             4:2:0     149
00002( P )        5     5    27                             4:2:0     144
00003( P )        6     6    26                             4:2:0     149
00003( P )        7     7    26                             4:2:0     147
00004( P )        8     8    26                             4:2:0     153
00004( P )        9     9    26                             4:2:0     146
00005( P )       10    10    25                             4:2:0     159
00005( P )       11    11    25                             4:2:0     151
00006( P )       12    12    25                             4:2:0     161
00006( P )       13    13    25                             4:2:0     149
00007( P )       14    14    25                             4:2:0     160
00007( P )       15    15    25                             4:2:0     150
00008( P )       16    16    25                             4:2:0     158
00008( P )       17    17    25                             4:2:0     152
00009( P )       18    18    25                             4:2:0     159
00009( P )       19    19    25                             4:2:0     153
00010( P )       20    20    24                             4:2:0     162
00010( P )       21    21    24                             4:2:0     159
00011( P )       22    22    24                             4:2:0     162
00011( P )       23    23    24                             4:2:0     162
00012( P )       24    24    24                             4:2:0     165
00012( P )       25    25    24                             4:2:0     164
00013( P )       26    26    24                             4:2:0     168
00013( P )       27    27    24                             4:2:0     170
00014( P )       28    28    24                             4:2:0     179
00014( P )       29    29    25                             4:2:0     179
00000(IDR)        0     0    26                             4:2:0     186
00000( P )        1     1    25                             4:2:0     159
00001( P )        2     2    25                             4:2:0     153
00001( P )        3     3    25                             4:2:0     147



More information about the mesa-dev mailing list