]> git.kernelconcepts.de Git - karo-tx-linux.git/commit
[media] tw686x: use a formula instead of two tables for div
authorMauro Carvalho Chehab <mchehab@osg.samsung.com>
Wed, 29 Jun 2016 02:17:34 +0000 (23:17 -0300)
committerMauro Carvalho Chehab <mchehab@s-opensource.com>
Wed, 13 Jul 2016 16:34:11 +0000 (13:34 -0300)
commitfb66852d4c693d5159724aef2b0c5e956206940d
treeb074921d2a2c55da3f539a79dea5458c565a39a2
parentf91e5c0c5f39b2a5c0f1a66462665eddd7021d83
[media] tw686x: use a formula instead of two tables for div

Instead of using two tables to estimate the temporal decimation
factor, use a formula. This allows to get the closest fps, which
sounds better than the current tables.

Also, the current code doesn't store the real framerate.

This patch fixes the above issues.

[Ezequiel:
  - introduce a TW686X_MAX_FPS macro for max_fps.
  - use hweight_long instead of open coding the set bits count.]

Signed-off-by: Mauro Carvalho Chehab <mchehab@osg.samsung.com>
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
Signed-off-by: Mauro Carvalho Chehab <mchehab@s-opensource.com>
drivers/media/pci/tw686x/tw686x-video.c