Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 330904
b: refs/heads/master
c: a70a6c4
h: refs/heads/master
v: v3
  • Loading branch information
Albert Wang authored and Mauro Carvalho Chehab committed Aug 15, 2012
1 parent cd1d85f commit de0f82b
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: c4ede4cedad1163345a2c2b4abc7e2208034190e
refs/heads/master: a70a6c4330e552b829eb1aecb390fef5841e0918
3 changes: 2 additions & 1 deletion trunk/drivers/media/platform/soc_camera.c
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,8 @@ static int soc_camera_try_fmt(struct soc_camera_device *icd,
dev_dbg(icd->pdev, "TRY_FMT(%c%c%c%c, %ux%u)\n",
pixfmtstr(pix->pixelformat), pix->width, pix->height);

if (!(ici->capabilities & SOCAM_HOST_CAP_STRIDE)) {
if (pix->pixelformat != V4L2_PIX_FMT_JPEG &&
!(ici->capabilities & SOCAM_HOST_CAP_STRIDE)) {
pix->bytesperline = 0;
pix->sizeimage = 0;
}
Expand Down
6 changes: 6 additions & 0 deletions trunk/drivers/media/platform/soc_mediabus.c
Original file line number Diff line number Diff line change
Expand Up @@ -378,6 +378,9 @@ EXPORT_SYMBOL(soc_mbus_samples_per_pixel);

s32 soc_mbus_bytes_per_line(u32 width, const struct soc_mbus_pixelfmt *mf)
{
if (mf->fourcc == V4L2_PIX_FMT_JPEG)
return 0;

if (mf->layout != SOC_MBUS_LAYOUT_PACKED)
return width * mf->bits_per_sample / 8;

Expand All @@ -400,6 +403,9 @@ EXPORT_SYMBOL(soc_mbus_bytes_per_line);
s32 soc_mbus_image_size(const struct soc_mbus_pixelfmt *mf,
u32 bytes_per_line, u32 height)
{
if (mf->fourcc == V4L2_PIX_FMT_JPEG)
return 0;

if (mf->layout == SOC_MBUS_LAYOUT_PACKED)
return bytes_per_line * height;

Expand Down

0 comments on commit de0f82b

Please sign in to comment.