|
In color mode, the “RAM_READY” signal will be deasserted after the second row but the mono chrome mode works well. The “JPEG_ENABLE” input is always asserted.
This Error occurs, when the color mode is selected and the number of pixel in a row is not a multiple of 16. The LSB of “LAST_BLOCK_IDX_X” must be always zero (in color mode).
The (re-) decoding of the previous compressed image is done without errors, but the image looks something strange:
bright zones turns to black or the colors are wrong.
If the level shifting is not done or if the level shifting is done on already signed values, then dark zones are brighter and
bright zones are “wrap around” to black. Another often mistake, is to exchange the two color components. In this case,
the brightness is ok, but no color is right. The following images demonstrate some cases with wrong level shifting and exchanged color components:
The color image like it shall be.
The mono chrome image like it shall be.
The mono chrome image with wrong level shifting.
The color image with a wrong level shifting on the luminance component (Y).
The color image with a wrong level shifting on the chrominance component (Cb/Cr).
The color image with a wrong level shifting on all components.
The color image with exchanged chrominance components (Cb/Cr).
Click on the icons to enlarge the images.
The Encoder outputs bytes of the compressed image, but “JPEG_READY” will never be asserted. The
“LAST_BLOCK” signal is asserted at the last sample of the last block (on the JE1xx Encoder). The “LAST_ROW” signal is asserted at the last sample of the last row (on the JE2xx and JE 3xx Encoder).
To understand this problem, the internal proceed must be explained: The Encoder samples the “LAST_BLOCK” signal at the last sample of every 8x8 block, on the JE1xx Encoder, or the
“LAST_ROW” signal at the last sample of every 8th row on the JE2xx and JE 3xx Encoder. The Encoder uses this
information to finish the compression and asserting “JPEG_READY” when the last byte of the compressed bit stream is on the output.
So if the “LAST_BLOCK” or the “LAST_ROW” signal is asserted with the wrong sample (even only one sample earlier or later) then asserting is never detected by the core and so the image never ends.
Some reasons for a wrong “LAST_BLOCK” or “LAST_ROW” timing are:
- Wrong count of samples or rows (In this case the Encoder will never work correct)
- The (external) sync unit resynchronizes to a new video source
- An unstable video source like a video recorder
To avoid this problem, it is a good practice to assert the “LAST_BLOCK” at the entire block or “LAST_ROW” at the
entire last 8 rows. In the error case is the image still corrupt, but the core doesn’t hang. A further good practice is, to
assert the “RESET” input for one clock cycle, after the image is compressed. This will guarantee that the encoder resynchronize right to the new image.
|