linux/drivers/media
Archit Taneja 0df20f9657 [media] v4l: ti-vpe: support loading of scaler coefficients
The SC block in VPE/VIP contains a SRAM within it. This internal memory
requires to be loaded with appropriate scaler coefficients from a contiguous
block of memory through VPDMA.

The horizontal and vertical scaler each require 2 sets of scaler coefficients
for luma and chroma scaling. The horizontal polyphase scaler requires
coefficients for a 32 phase and 8 tap filter. Similarly, the vertical scaler
requires coefficients for a 5 tap filter.

The choice of the scaler coefficients depends on the scaling ratio. Add
coefficient tables for different scaling ratios in sc_coeffs.h. In the case of
horizontal downscaling, we need to consider the change in ratio caused by
decimation performed by the horizontal scaler.

In order to load the scaler coefficients via VPDMA, a configuration descriptor
is used in block mode. The payload for the descriptor is the scaler coefficients
copied to memory. Coefficients for each phase have to be placed in memory in a
particular order understood by the scaler hardware.

The choice of the scaler coefficients, and the loading of the coefficients from
our tables to a contiguous buffer is managed by the functions
sc_set_hs_coefficients and sc_set_vs_coefficients.

The sc_data handle is now added with some parameters to describe the state of
the coefficients loaded in the SC block. 'loaded_coeff_h' and 'loaded_coeff_v'
hold the address of the last dma buffer which was used by VPDMA to copy
coefficients. This information can be used by a vpe mem-to-mem context to decide
whether it should load coefficients or not. 'hs_index' and 'vs_index' provide
some optimization by preventing loading of coefficients if the scaling ratio
didn't change between 2 contexts. 'load_coeff_h' and 'load_coeff_v' tell the
vpe/vip driver whether we need to load the coefficients through VPDMA or not.

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>
2014-01-07 06:54:48 -02:00
..
common [media] media_tree: Fix spelling errors 2013-12-09 14:50:50 -02:00
dvb-core [media] Add USB IDs for Winfast DTV Dongle Mini-D 2013-12-19 09:26:15 -02:00
dvb-frontends [media] dib8000: fix compilation error 2013-12-20 08:12:39 -02:00
firewire firewire: introduce fw_driver.probe and .remove methods 2013-06-09 18:15:00 +02:00
i2c [media] adv7842: add drive strength enum and sync names with adv7604 2014-01-07 06:47:46 -02:00
mmc [media] siano: get rid of CammelCase from smscoreapi.h 2013-03-21 10:03:16 -03:00
parport [media] bw-qcam: fix timestamp handling 2013-05-27 09:30:19 -03:00
pci Merge branch 'upstream-fixes' into patchwork 2013-12-13 05:04:00 -02:00
platform [media] v4l: ti-vpe: support loading of scaler coefficients 2014-01-07 06:54:48 -02:00
radio [media] radio-raremono: add support for 'Thanko's Raremono' AM/FM/SW USB device 2013-12-18 11:30:32 -02:00
rc [media] mceusb: Add Hauppauge WinTV-HVR-930C HD 2013-12-10 15:33:52 -02:00
tuners [media] tuner-xc2028: remove unused code 2014-01-05 08:30:14 -02:00
usb [media] cx231xx: fix i2c debug prints 2014-01-07 06:50:26 -02:00
v4l2-core [media] v4l2: move tracepoints to video_usercopy 2014-01-07 06:51:41 -02:00
Kconfig [media] subdev autoselect only works if I2C and I2C_MUX is selected 2013-12-21 06:03:06 -02:00
Makefile
media-device.c [media] media: info leak in __media_device_enum_links() 2013-06-12 18:52:45 -03:00
media-devnode.c [media] media: Add 64--32 bit compat ioctl handler 2013-03-18 20:44:36 -03:00
media-entity.c [media] media: Check for active links on pads with MEDIA_PAD_FL_MUST_CONNECT flag 2013-12-04 15:03:45 -02:00