Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 241900
b: refs/heads/master
c: 48a3c77
h: refs/heads/master
v: v3
  • Loading branch information
Alberto Panizzo authored and Mauro Carvalho Chehab committed Mar 21, 2011
1 parent 4b6f632 commit 288d173
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 7fdbd85bce033e2d0f74e5d326ab43906653cb81
refs/heads/master: 48a3c77338d725d4976fa792d822eb940ce5c296
14 changes: 14 additions & 0 deletions trunk/drivers/media/video/soc_mediabus.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,20 @@ static const struct soc_mbus_pixelfmt mbus_fmt[] = {
},
};

int soc_mbus_samples_per_pixel(const struct soc_mbus_pixelfmt *mf)
{
switch (mf->packing) {
case SOC_MBUS_PACKING_NONE:
case SOC_MBUS_PACKING_EXTEND16:
return 1;
case SOC_MBUS_PACKING_2X8_PADHI:
case SOC_MBUS_PACKING_2X8_PADLO:
return 2;
}
return -EINVAL;
}
EXPORT_SYMBOL(soc_mbus_samples_per_pixel);

s32 soc_mbus_bytes_per_line(u32 width, const struct soc_mbus_pixelfmt *mf)
{
switch (mf->packing) {
Expand Down
1 change: 1 addition & 0 deletions trunk/include/media/soc_mediabus.h
Original file line number Diff line number Diff line change
Expand Up @@ -61,5 +61,6 @@ struct soc_mbus_pixelfmt {
const struct soc_mbus_pixelfmt *soc_mbus_get_fmtdesc(
enum v4l2_mbus_pixelcode code);
s32 soc_mbus_bytes_per_line(u32 width, const struct soc_mbus_pixelfmt *mf);
int soc_mbus_samples_per_pixel(const struct soc_mbus_pixelfmt *mf);

#endif

0 comments on commit 288d173

Please sign in to comment.