diff --git a/drivers/media/platform/apple/prores/apple-prores-desc.c b/drivers/media/platform/apple/prores/apple-prores-desc.c index f73923e584806..69e3d8ed93d91 100644 --- a/drivers/media/platform/apple/prores/apple-prores-desc.c +++ b/drivers/media/platform/apple/prores/apple-prores-desc.c @@ -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 */ diff --git a/drivers/media/platform/apple/prores/apple-prores-test.c b/drivers/media/platform/apple/prores/apple-prores-test.c index b2f1f22c75d82..952d074e0b0be 100644 --- a/drivers/media/platform/apple/prores/apple-prores-test.c +++ b/drivers/media/platform/apple/prores/apple-prores-test.c @@ -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, }; } @@ -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);