Re: [Mesa-dev] [PATCH 1/5] st/va: Return more useful config attributes

2016-10-14 Thread Andy Furniss

Andy Furniss wrote:

Mark Thompson wrote:

On 13/10/16 08:20, Christian König wrote:

Am 13.10.2016 um 00:52 schrieb Mark Thompson:

The encoder attributes are needed for a user of the encoder to be
able to configure it sensibly without internal knowledge.


Reviewed-by: Christian König  for the whole
series.

Do you have commit access?


I do not.  Please do push this for me once all appropriate people are
happy with it.


Seems not to regress anything, but there are still differences vs
gstreamer.

I guess the poc fix now allows JM decoder not to bail, but that allows
me to see some other issue around I frames. I haven't had time too look
properly why, but guessing it could be that avconv sends
desc.h264enc.gop_size
every I frame, but gst just once.


Looking more it seems to be because avconv is using pic number 0 to 30
gst 0 to 29 and libx264 0 to 15 then 0 to 13 so avconv doesn't reset to
0 on an IDR frame for gop 30.




I don't know if you'll even see this on bonaire as my tonga possibly
hits different code - I mean in src/gallium/drivers/radeon/ there is
radeon_vce_40_2_2.c
radeon_vce_50.c
radeon_vce_52.c
and maybe these are used depending on vce firmware version and do
different things for different h/w.

The issue I see with JM is shown below - the file seems to play OK.
There may be another (I guess pre-existing) issue around 1080/1088
affecting transcoding with both avconv and gst, but one thing at a
time.

This is with -g 30 and doesn't happen with gstreamer.

--
   Frame  POC  Pic#   QPSnrY SnrU SnrV   Y:U:V Time(ms)
--
0(IDR)0 033 4:2:0  90
0( P )1 129 4:2:0  57
1( P )2 229 4:2:0  55
1( P )3 328 4:2:0  57
2( P )4 428 4:2:0  59
2( P )5 528 4:2:0  57

snip

00014( P )   292923 4:2:0  70
00015( P )   303024 4:2:0  66
0(IDR)   -1 023 4:2:0 129
0( P )0 124 4:2:0  59
0( P )1 225 4:2:0  56
1( P )2 325 4:2:0  58
1( P )3 425 4:2:0  57

snip
00014( P )   282926 4:2:0  59
00014( P )   293024 4:2:0  65
-0001(IDR)   -2 024 4:2:0 129
0( P )   -1 125 4:2:0  59
0( P )0 225 4:2:0  58
0( P )1 325 4:2:0  59

snip
00013( P )   272924 4:2:0  65
00014( P )   283024 4:2:0  67
-0001(IDR)   -3 024 4:2:0 130
-0001( P )   -2 125 4:2:0  59
0( P )   -1 225 4:2:0  58
0( P )0 325 4:2:0  58
0( P )1 425 4:2:0  57






___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/5] st/va: Return more useful config attributes

2016-10-14 Thread Christian König

Am 13.10.2016 um 11:06 schrieb Mark Thompson:

On 13/10/16 08:20, Christian König wrote:

Am 13.10.2016 um 00:52 schrieb Mark Thompson:

The encoder attributes are needed for a user of the encoder to be
able to configure it sensibly without internal knowledge.

Reviewed-by: Christian König  for the whole series.

Do you have commit access?

I do not.  Please do push this for me once all appropriate people are happy 
with it.


I'm happy with it, so that should be enough. I've just pushed the 
patches upstream.


Thanks for the help,
Christian.



Thanks,

- Mark



___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/5] st/va: Return more useful config attributes

2016-10-13 Thread Andy Furniss

Mark Thompson wrote:

On 13/10/16 08:20, Christian König wrote:

Am 13.10.2016 um 00:52 schrieb Mark Thompson:

The encoder attributes are needed for a user of the encoder to be
able to configure it sensibly without internal knowledge.


Reviewed-by: Christian König  for the whole series.

Do you have commit access?


I do not.  Please do push this for me once all appropriate people are happy 
with it.


Seems not to regress anything, but there are still differences vs gstreamer.

I guess the poc fix now allows JM decoder not to bail, but that allows
me to see some other issue around I frames. I haven't had time too look
properly why, but guessing it could be that avconv sends 
desc.h264enc.gop_size

every I frame, but gst just once.

I don't know if you'll even see this on bonaire as my tonga possibly
hits different code - I mean in src/gallium/drivers/radeon/ there is
radeon_vce_40_2_2.c
radeon_vce_50.c
radeon_vce_52.c
and maybe these are used depending on vce firmware version and do
different things for different h/w.

The issue I see with JM is shown below - the file seems to play OK.
There may be another (I guess pre-existing) issue around 1080/1088
affecting transcoding with both avconv and gst, but one thing at a
time.

This is with -g 30 and doesn't happen with gstreamer.

--
  Frame  POC  Pic#   QPSnrY SnrU SnrV   Y:U:V Time(ms)
--
0(IDR)0 033 4:2:0  90
0( P )1 129 4:2:0  57
1( P )2 229 4:2:0  55
1( P )3 328 4:2:0  57
2( P )4 428 4:2:0  59
2( P )5 528 4:2:0  57

snip

00014( P )   292923 4:2:0  70
00015( P )   303024 4:2:0  66
0(IDR)   -1 023 4:2:0 129
0( P )0 124 4:2:0  59
0( P )1 225 4:2:0  56
1( P )2 325 4:2:0  58
1( P )3 425 4:2:0  57

snip
00014( P )   282926 4:2:0  59
00014( P )   293024 4:2:0  65
-0001(IDR)   -2 024 4:2:0 129
0( P )   -1 125 4:2:0  59
0( P )0 225 4:2:0  58
0( P )1 325 4:2:0  59

snip
00013( P )   272924 4:2:0  65
00014( P )   283024 4:2:0  67
-0001(IDR)   -3 024 4:2:0 130
-0001( P )   -2 125 4:2:0  59
0( P )   -1 225 4:2:0  58
0( P )0 325 4:2:0  58
0( P )1 425 4:2:0  57




___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/5] st/va: Return more useful config attributes

2016-10-13 Thread Mark Thompson
On 13/10/16 08:20, Christian König wrote:
> Am 13.10.2016 um 00:52 schrieb Mark Thompson:
>> The encoder attributes are needed for a user of the encoder to be
>> able to configure it sensibly without internal knowledge.
> 
> Reviewed-by: Christian König  for the whole series.
> 
> Do you have commit access?

I do not.  Please do push this for me once all appropriate people are happy 
with it.

Thanks,

- Mark

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] [PATCH 1/5] st/va: Return more useful config attributes

2016-10-13 Thread Christian König

Am 13.10.2016 um 00:52 schrieb Mark Thompson:

The encoder attributes are needed for a user of the encoder to be
able to configure it sensibly without internal knowledge.


Reviewed-by: Christian König  for the whole 
series.


Do you have commit access?

Regards,
Christian.


---
  src/gallium/state_trackers/va/config.c | 47 +++---
  1 file changed, 38 insertions(+), 9 deletions(-)

diff --git a/src/gallium/state_trackers/va/config.c 
b/src/gallium/state_trackers/va/config.c
index 4052316..72f68ba 100644
--- a/src/gallium/state_trackers/va/config.c
+++ b/src/gallium/state_trackers/va/config.c
@@ -115,16 +115,45 @@ vlVaGetConfigAttributes(VADriverContextP ctx, VAProfile 
profile, VAEntrypoint en

 for (i = 0; i < num_attribs; ++i) {
unsigned int value;
-  switch (attrib_list[i].type) {
-  case VAConfigAttribRTFormat:
- value = VA_RT_FORMAT_YUV420;
- break;
-  case VAConfigAttribRateControl:
- value = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR;
- break;
-  default:
+  if (entrypoint == VAEntrypointVLD) {
+ switch (attrib_list[i].type) {
+ case VAConfigAttribRTFormat:
+value = VA_RT_FORMAT_YUV420;
+break;
+ default:
+value = VA_ATTRIB_NOT_SUPPORTED;
+break;
+ }
+  } else if (entrypoint == VAEntrypointEncSlice) {
+ switch (attrib_list[i].type) {
+ case VAConfigAttribRTFormat:
+value = VA_RT_FORMAT_YUV420;
+break;
+ case VAConfigAttribRateControl:
+value = VA_RC_CQP | VA_RC_CBR | VA_RC_VBR;
+break;
+ case VAConfigAttribEncPackedHeaders:
+value = 0;
+break;
+ case VAConfigAttribEncMaxRefFrames:
+value = 1;
+break;
+ default:
+value = VA_ATTRIB_NOT_SUPPORTED;
+break;
+ }
+  } else if (entrypoint == VAEntrypointVideoProc) {
+ switch (attrib_list[i].type) {
+ case VAConfigAttribRTFormat:
+value = (VA_RT_FORMAT_YUV420 |
+ VA_RT_FORMAT_RGB32);
+break;
+ default:
+value = VA_ATTRIB_NOT_SUPPORTED;
+break;
+ }
+  } else {
   value = VA_ATTRIB_NOT_SUPPORTED;
- break;
}
attrib_list[i].value = value;
 }



___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-dev