class VideoInputWriteRangeHorizontal

Defined at line 575 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

VDIN0_WR_H_START_END, VDIN1_WR_H_START_END.

A311D Datasheet, Section 10.2.3.42 VDIN, Pages 1094, 1116.

S905D2 Datasheet, Section 7.2.3.41 VDIN, Pages 785, 809.

S905D3 Datasheet, Section 8.2.3.42 VDIN, Pages 721, 743.

Display Write Back App-Note, Amlogic (Google internal), Page 4.

Public Members

 field_endianness_128_bit_608
 field_horizontally_flipped_616
 field_left_px_inclusive_629
 field_right_px_inclusive_642

Public Methods

hwreg::RegisterAddr<VideoInputWriteRangeHorizontal> Get (VideoInputModuleId video_input)

Defined at line 593 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
Endianness endianness_128_bit ()

Byte ordering ("endianness") for every 128-bit (16-byte) chunk.

This bit is not documented in any datasheet. Experiments on Khadas

VIM3 (A311D), Astro (S905D2) and Nelson (S905D3) all confirm that

this bit is available and functions as described above for both VDINs.

Defined at line 608 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
SelfType & set_endianness_128_bit (Endianness val)

Byte ordering ("endianness") for every 128-bit (16-byte) chunk.

This bit is not documented in any datasheet. Experiments on Khadas

VIM3 (A311D), Astro (S905D2) and Nelson (S905D3) all confirm that

this bit is available and functions as described above for both VDINs.

Defined at line 608 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
typename SelfType::ValueType horizontally_flipped ()

If true, the captured contents are flipped horizontally.

This bit is documented for VDIN0 but not for VDIN1 in Amlogic datasheets.

Both "Display Write Back App-Note" and experiments on Khadas VIM3

(A311D) confirm that this bit is available and functions as described

above for both VDINs.

Defined at line 616 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
SelfType & set_horizontally_flipped (typename SelfType::ValueType val)

If true, the captured contents are flipped horizontally.

This bit is documented for VDIN0 but not for VDIN1 in Amlogic datasheets.

Both "Display Write Back App-Note" and experiments on Khadas VIM3

(A311D) confirm that this bit is available and functions as described

above for both VDINs.

Defined at line 616 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
typename SelfType::ValueType left_px_inclusive ()

The leftmost column (inclusive) to write on the write image buffer, in

pixels.

Must be less than or equal to `right_px_inclusive`.

The Amlogic datasheets specify that this field uses bits 28-16 for VDIN0

bits 27-16 for VDIN1. However, both the "Display Write Back App-Note"

and experiments on Khadas VIM3 (A311D) confirm that it actually uses

bits 28-16 for both VDINs.

It's preferred to use the `SetHorizontalRange()` helper method.

Defined at line 629 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
SelfType & set_left_px_inclusive (typename SelfType::ValueType val)

The leftmost column (inclusive) to write on the write image buffer, in

pixels.

Must be less than or equal to `right_px_inclusive`.

The Amlogic datasheets specify that this field uses bits 28-16 for VDIN0

bits 27-16 for VDIN1. However, both the "Display Write Back App-Note"

and experiments on Khadas VIM3 (A311D) confirm that it actually uses

bits 28-16 for both VDINs.

It's preferred to use the `SetHorizontalRange()` helper method.

Defined at line 629 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
typename SelfType::ValueType right_px_inclusive ()

The rightmost column (inclusive) to write on the write image buffer, in

pixels.

Must be greater than or equal to `left_px_inclusive`.

The Amlogic datasheets specify that this field uses bits 12-0 for VDIN0

bits 11-0 for VDIN1. However, both the "Display Write Back App-Note"

and experiments on Khadas VIM3 (A311D) confirm that it actually uses

bits 12-0 for both VDINs.

It's preferred to use the `SetHorizontalRange()` helper method.

Defined at line 642 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

template <, >
SelfType & set_right_px_inclusive (typename SelfType::ValueType val)

The rightmost column (inclusive) to write on the write image buffer, in

pixels.

Must be greater than or equal to `left_px_inclusive`.

The Amlogic datasheets specify that this field uses bits 12-0 for VDIN0

bits 11-0 for VDIN1. However, both the "Display Write Back App-Note"

and experiments on Khadas VIM3 (A311D) confirm that it actually uses

bits 12-0 for both VDINs.

It's preferred to use the `SetHorizontalRange()` helper method.

Defined at line 642 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

VideoInputWriteRangeHorizontal & SetHorizontalRange (int left_px_inclusive, int right_px_inclusive)

Sets the horizontal range of the write image buffer to

`[left_px_inclusive, right_px_inclusive]`.

`left_px_inclusive` must be less than or equal to `right_px_inclusive`.

Both `left_px_inclusive` and `right_px_inclusive` must be non-negative and

less than 2^13 (8192).

Defined at line 651 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

Enumerations

enum class Endianness : uint8_t
Name Value Comments
kBig 0

In big-endian mode, the memory interface writes 8-bit YUV444 capture
images in the following byte order (without 64-bit pair swaps):
Y5 V4 U4 Y4 V3 U3 Y3 V2 U2 Y2 V1 U1 Y1 V0 U0 Y0
U10 Y10 V9 U9 Y9 V8 U8 Y8 V7 U7 Y7 V6 U6 Y6 V5 U5
V15 U15 Y15 V14 U14 Y14 V13 U13 Y13 V12 U12 Y12 V11 U11 Y11 V10 ...

kLittle 1

In little-endian mode, the memory interface writes 8-bit YUV444 capture
images in the following byte order (without 64-bit pair swaps):
V0 U0 Y0 V1 U1 Y1 V2 U2 Y2 V3 U3 Y3 V4 U4 Y4 V5
U5 Y5 V6 U6 Y6 V7 U7 Y7 V8 U8 Y8 V9 U9 Y9 V10 U10
Y10 V11 U11 Y11 V12 U12 Y12 V13 U13 Y13 V14 U14 Y14 V15 U15 Y15

Defined at line 578 of file ../../src/graphics/display/drivers/amlogic-display/video-input-regs.h

Records