Skip to content

Hantro VPU JPEG encoder fixes

Andrzej Pietrasiewicz linux-media 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest4 patches 4 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4media: hantro: Read be32 words starting at every fourth bytedrivers/staging/media/hantro/hantro_h1_jpeg_enc.c drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c+14 -41 reply
2/4media: hantro: Use standard luma quantization tabledrivers/staging/media/hantro/hantro_jpeg.c+8 -81 reply
3/4media: hantro: Write the quantization tables in proper orderdrivers/staging/media/hantro/hantro_h1_jpeg_enc.c drivers/staging/media/hantro/hantro_jpeg.c drivers/staging/media/hantro/hantro_jpeg.h +1 more+55 -200 replies
4/4media: hantro: Write quantization table registers in increasing addresses orderdrivers/staging/media/hantro/hantro_h1_jpeg_enc.c drivers/staging/media/hantro/rk3399_vpu_hw_jpeg_enc.c+12 -00 replies

Reviews trailers per patch

1 of 4 patches has a Reviewed-by or Acked-by.

PatchEzequiel Garcia
SeriesT-b
1/4R-b
2/4
3/4
4/4

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH 0/4] Hantro VPU JPEG encoder fixes

This series addresses quality issues in encoded JPEG images.

The first patch actually restores the intention of the original submission of this driver: due to a typo the helper variables were unused and then have been removed in some cleanup done by Mauro.

The second patch aligns the driver's luma quantization table with the one in the ITU-T.81 standard.

The third patch changes the order in which quantization tables are written to the resulting file and to the hardware. The file expects a zig-zag order, while the hardware wants some special order, neither linear nor zig-zag. In other words, hardware-wise it rearranges which parts of quantization tables go into which 4-byte registers - in a hardware specific order rather than linear or zig-zag. It also affects rk3288 and hasn't been tested with it.

The fourth patch then rearranges the sequence of register writes. The whole luma quantization table must be written first, and then the chroma quantization is written. In other words, while patch 3/4 changes what goes into which register, this patch changes when each register is written to. It also affects rk3288 and hasn't been tested with it.

Andrzej Pietrasiewicz (4):
media: hantro: Read be32 words starting at every fourth byte
media: hantro: Use standard luma quantization table
media: hantro: Write the quantization tables in proper order
media: hantro: Write quantization table registers in increasing
addresses order

 .../staging/media/hantro/hantro_h1_jpeg_enc.c | 19 ++++-
 drivers/staging/media/hantro/hantro_jpeg.c    | 76 ++++++++++++++-----
 drivers/staging/media/hantro/hantro_jpeg.h    |  2 +-
 .../media/hantro/rk3399_vpu_hw_jpeg_enc.c     | 24 ++++--
 4 files changed, 89 insertions(+), 32 deletions(-)
Signature · 1 line
2.17.1