Skip to content

Commit

Permalink
media: add v4l2 JPEG helpers
Browse files Browse the repository at this point in the history
Add helpers for JPEG header parsing. They allow both scanning for marker
segment positions and later parsing the segments individually, as
required by s5p-jpeg, as well as parsing all headers in one go, as
required by coda-vpu. The frame header is always parsed, as basically
all decoders are interested in width, height, and number of components.
For convenience, the JPEG chroma subsampling factors are decoded into a
v4l2_jpeg_chroma_subsampling enum.

Only baseline and extended sequential DCT encoded JPEGs with 8-bit or
12-bit precision with up to four components are supported.

Signed-off-by: Philipp Zabel <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
pH5 authored and mchehab committed Apr 14, 2020
1 parent dbe9398 commit 50733b5
Show file tree
Hide file tree
Showing 4 changed files with 773 additions and 0 deletions.
4 changes: 4 additions & 0 deletions drivers/media/v4l2-core/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,10 @@ config VIDEO_FIXED_MINOR_RANGES
config VIDEO_TUNER
tristate

# Used by drivers that need v4l2-jpeg.ko
config V4L2_JPEG_HELPER
tristate

# Used by drivers that need v4l2-mem2mem.ko
config V4L2_MEM2MEM_DEV
tristate
Expand Down
2 changes: 2 additions & 0 deletions drivers/media/v4l2-core/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@ obj-$(CONFIG_V4L2_MEM2MEM_DEV) += v4l2-mem2mem.o

obj-$(CONFIG_V4L2_FLASH_LED_CLASS) += v4l2-flash-led-class.o

obj-$(CONFIG_V4L2_JPEG_HELPER) += v4l2-jpeg.o

obj-$(CONFIG_VIDEOBUF_GEN) += videobuf-core.o
obj-$(CONFIG_VIDEOBUF_DMA_SG) += videobuf-dma-sg.o
obj-$(CONFIG_VIDEOBUF_DMA_CONTIG) += videobuf-dma-contig.o
Expand Down
Loading

0 comments on commit 50733b5

Please sign in to comment.