Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 5 additions & 4 deletions drivers/media/platform/apple/prores/apple-prores-desc.c
Original file line number Diff line number Diff line change
Expand Up @@ -200,10 +200,11 @@ EXPORT_SYMBOL_IF_KUNIT(apr_dc_scale_reg);
#define D_FH_WIDTH 0x084
#define D_FH_HEIGHT 0x086
#define D_FH_FORMAT 0x088
#define D_FH_PRIMARIES 0x089
#define D_FH_TRANSFER 0x08a
#define D_FH_MATRIX 0x08b
#define D_FH_ALPHA 0x08c
/* 0x089: aspect and frame rate, both unspecified (zero). */
#define D_FH_PRIMARIES 0x08a
#define D_FH_TRANSFER 0x08b
#define D_FH_MATRIX 0x08c
#define D_FH_ALPHA 0x08d
#define D_FH_FLAGS 0x08f
#define D_FH_BYTES 0x94
/* Rate control: coefficient budgets in bytes per macroblock, Q3 */
Expand Down
10 changes: 7 additions & 3 deletions drivers/media/platform/apple/prores/apple-prores-test.c
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static struct apr_frame apr_test_frame(void)
.luma_stride = 640, .chroma_stride = 640,
.luma = 0x10000100000ULL, .chroma = 0x10000200000ULL,
.output = 0x10000400000ULL, .output_size = SZ_1M,
.primaries = 1, .transfer = 1, .matrix = 1,
.primaries = 1, .transfer = 16, .matrix = 9,
};
}

Expand Down Expand Up @@ -113,8 +113,12 @@ static void apr_test_desc_422(struct kunit *test)
KUNIT_EXPECT_EQ(test, get_unaligned_be16(d + 0x84), 320);
KUNIT_EXPECT_EQ(test, get_unaligned_be16(d + 0x86), 240);
KUNIT_EXPECT_EQ(test, d[0x88], 0x80);
KUNIT_EXPECT_EQ(test, d[0x89], 1);
KUNIT_EXPECT_EQ(test, d[0x8b], 1);
KUNIT_EXPECT_EQ(test, d[0x89], 0);
KUNIT_EXPECT_EQ(test, d[0x8a], f.primaries);
KUNIT_EXPECT_EQ(test, d[0x8b], f.transfer);
KUNIT_EXPECT_EQ(test, d[0x8c], f.matrix);
KUNIT_EXPECT_EQ(test, d[0x8d], 0);
KUNIT_EXPECT_EQ(test, d[0x8e], 0);
KUNIT_EXPECT_EQ(test, d[0x8f], 0x03);
/* 20 macroblocks per row: two 8-wide slices and one 4-wide. */
KUNIT_EXPECT_EQ(test, get_unaligned_be16(d + 0x78), 45);
Expand Down
Loading