Discussion:
[PATCH intel-driver] jpeg/dec: gen8+ set correct fourcc for monochrome decode
(too old to reply)
U. Artie Eoff
2016-09-28 20:22:37 UTC
Permalink
When the jpeg picture params have 1 component the
fourcc needs to be set to VA_FOURCC_Y800.

Signed-off-by: U. Artie Eoff <***@intel.com>
---
src/gen8_mfd.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/gen8_mfd.c b/src/gen8_mfd.c
index 23eaca31a22a..98526644758b 100644
--- a/src/gen8_mfd.c
+++ b/src/gen8_mfd.c
@@ -1880,9 +1880,10 @@ gen8_mfd_jpeg_decode_init(VADriverContextP ctx,

pic_param = (VAPictureParameterBufferJPEGBaseline *)decode_state->pic_param->buffer;

- if (pic_param->num_components == 1)
+ if (pic_param->num_components == 1) {
subsampling = SUBSAMPLE_YUV400;
- else if (pic_param->num_components == 3) {
+ fourcc = VA_FOURCC_Y800;
+ } else if (pic_param->num_components == 3) {
int h1 = pic_param->components[0].h_sampling_factor;
int h2 = pic_param->components[1].h_sampling_factor;
int h3 = pic_param->components[2].h_sampling_factor;
--
2.4.11
Sean V Kelley
2016-10-03 18:46:27 UTC
Permalink
Post by U. Artie Eoff
When the jpeg picture params have 1 component the
fourcc needs to be set to VA_FOURCC_Y800.
lgtm, verified, applied.

Thanks,

Sean
Post by U. Artie Eoff
---
 src/gen8_mfd.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/src/gen8_mfd.c b/src/gen8_mfd.c
index 23eaca31a22a..98526644758b 100644
--- a/src/gen8_mfd.c
+++ b/src/gen8_mfd.c
@@ -1880,9 +1880,10 @@ gen8_mfd_jpeg_decode_init(VADriverContextP ctx,
 
     pic_param = (VAPictureParameterBufferJPEGBaseline
*)decode_state->pic_param->buffer;
 
-    if (pic_param->num_components == 1)
+    if (pic_param->num_components == 1) {
         subsampling = SUBSAMPLE_YUV400;
-    else if (pic_param->num_components == 3) {
+        fourcc = VA_FOURCC_Y800;
+    } else if (pic_param->num_components == 3) {
         int h1 = pic_param->components[0].h_sampling_factor;
         int h2 = pic_param->components[1].h_sampling_factor;
         int h3 = pic_param->components[2].h_sampling_factor;
Loading...