]> git.baikalelectronics.ru Git - kernel.git/commit
[media] media: ti-vpe: sc: Fix incorrect optimization
authorNikhil Devshatwar <nikhil.nd@ti.com>
Fri, 18 Nov 2016 23:20:33 +0000 (21:20 -0200)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Tue, 22 Nov 2016 10:06:27 +0000 (08:06 -0200)
commit5d0494c51a0e088941579dd315cfea0c68f05e3d
tree36e75773cac75a99663870ca0669a7166c169656
parent2fed044bfb3c33afceb95a82ab84d21a077b130d
[media] media: ti-vpe: sc: Fix incorrect optimization

Current scaler library implementation of sc_set_hs_coeffs and
sc_set_vs_coeffs tries to return immediately if the calculated
coefficient index is already being used.

As the same scaler block is going to be used for all the VPE contexts,
even if the calculated index is same, the parameters have to be
reconfigured for each of the context.

Because of this, when multiple contexts use the same coefficients,
all other contexts would have zero scaling coefficients.
Fix this and also remove the unnecessary hs_index and vs_index fields.

Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
Signed-off-by: Benoit Parrot <bparrot@ti.com>
Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/platform/ti-vpe/sc.c
drivers/media/platform/ti-vpe/sc.h