Re: [Libva] [PATCH 1/3] jpeg_enc: Avoid integer overflow while doing quality factor scaling

2015-03-04 Thread Gwenole Beauchesne
Hi, 2015-03-04 19:09 GMT+01:00 : > From: Sreerenj Balachandran > > For eg: The uint8_t will simple overflow if submitted > quality factor is 1 (5000/1). And is the resulting value (5000) a valid one for the HW as well? The comments below say that it shall be clipped to [ 1 .. 255 ] range. So, a

[Libva] [PATCH 1/3] jpeg_enc: Avoid integer overflow while doing quality factor scaling

2015-03-04 Thread sreerenj . balachandran
From: Sreerenj Balachandran For eg: The uint8_t will simple overflow if submitted quality factor is 1 (5000/1). Note: Also removed a lot of whitespaces here and there. There are even more whitespaces all around the jpeg enc source code. --- src/gen8_mfc.c | 43 +++---

[Libva] [PATCH 2/3] jpeg_enc: Fix the quatisation matrix scaling.

2015-03-04 Thread sreerenj . balachandran
From: Sreerenj Balachandran The misplaced parentheses are causing wrong value assignment to the quatization matrix. This will allow the ecoding when quality > 50. Otherwise it will simply generate garbage in encoded video for any quality factor greater than 50 --- src/gen8_mfc.c | 4 ++-- 1 fil

[Libva] [PATCH 3/3] jpeg_enc: Fix the column raster conversion of quatization matrix.

2015-03-04 Thread sreerenj . balachandran
From: Sreerenj Balachandran Use temp array for the new raster order calculation, otherwise it simply generate wrong values. Note: There is opportunity for more optimization, for eg we can avoid the usage of mulitple for loops here and there. --- src/gen8_mfc.c | 10 +- 1 file changed, 5

[Libva] [PATCH] x11: dri2: fix double Unlocks/SyncHandle

2015-03-04 Thread Lionel Landwerlin
Signed-off-by: Lionel Landwerlin --- va/x11/va_dri2.c | 4 1 file changed, 4 deletions(-) diff --git a/va/x11/va_dri2.c b/va/x11/va_dri2.c index 1c91bca..2a00e86 100644 --- a/va/x11/va_dri2.c +++ b/va/x11/va_dri2.c @@ -269,8 +269,6 @@ VA_DRI2Buffer *VA_DRI2GetBuffers(Display *dpy, XID drawa