summaryrefslogtreecommitdiff
path: root/drivers/media/platform/ti-vpe/sc.h
diff options
context:
space:
mode:
authorArchit Taneja <archit@ti.com>2013-12-12 05:36:00 -0300
committerMauro Carvalho Chehab <m.chehab@samsung.com>2014-01-07 06:55:35 -0200
commitbbee8b3933f5ddff85904aed9190eaca52c54d13 (patch)
treeb641f89c02f719e2d8bb3c5c4b0c615cca0e36d0 /drivers/media/platform/ti-vpe/sc.h
parent773f06577b35f84f84de980e1be3eead8342b5e5 (diff)
[media] v4l: ti-vpe: enable basic scaler support
Add the required SC register configurations which lets us perform linear scaling for the supported range of horizontal and vertical scaling ratios. The horizontal scaler performs polyphase scaling using it's 8 tap 32 phase filter, decimation is performed when downscaling passes beyond 2x or 4x. The vertical scaler performs polyphase scaling using it's 5 tap 32 phase filter, it switches to a simpler form of scaling using the running average filter when the downscale ratio is more than 4x. Many of the SC features like peaking, trimming and non-linear scaling aren't implemented for now. Only the minimal register fields required for basic scaling operation are configured. The function to configure SC registers takes the sc_data handle, the source and destination widths and heights, and the scaler address data block offsets for the current context so that they can be configured. Signed-off-by: Archit Taneja <archit@ti.com> Signed-off-by: Hans Verkuil <hans.verkuil@cisco.com> Signed-off-by: Mauro Carvalho Chehab <m.chehab@samsung.com>
Diffstat (limited to 'drivers/media/platform/ti-vpe/sc.h')
-rw-r--r--drivers/media/platform/ti-vpe/sc.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/media/platform/ti-vpe/sc.h b/drivers/media/platform/ti-vpe/sc.h
index c89f3d1a3bad..60e411e05c30 100644
--- a/drivers/media/platform/ti-vpe/sc.h
+++ b/drivers/media/platform/ti-vpe/sc.h
@@ -195,12 +195,14 @@ struct sc_data {
struct platform_device *pdev;
};
-void sc_set_regs_bypass(struct sc_data *sc, u32 *sc_reg0);
void sc_dump_regs(struct sc_data *sc);
void sc_set_hs_coeffs(struct sc_data *sc, void *addr, unsigned int src_w,
unsigned int dst_w);
void sc_set_vs_coeffs(struct sc_data *sc, void *addr, unsigned int src_h,
unsigned int dst_h);
+void sc_config_scaler(struct sc_data *sc, u32 *sc_reg0, u32 *sc_reg8,
+ u32 *sc_reg17, unsigned int src_w, unsigned int src_h,
+ unsigned int dst_w, unsigned int dst_h);
struct sc_data *sc_create(struct platform_device *pdev);
#endif