@@ -1429,7 +1429,7 @@ static void st20_digest_rx_field_check(void* args) {
14291429static void st20_rx_digest_test (enum st20_type tx_type[], enum st20_type rx_type[],
14301430 enum st20_packing packing[], enum st_fps fps[],
14311431 int width[], int height[], bool interlaced[],
1432- enum st20_fmt fmt, bool check_fps, int sessions = 1 ,
1432+ enum st20_fmt fmt[] , bool check_fps, int sessions = 1 ,
14331433 bool out_of_order = false ) {
14341434 auto ctx = (struct st_tests_context *)st_test_ctx ();
14351435 auto m_handle = ctx->handle ;
@@ -1487,7 +1487,7 @@ static void st20_rx_digest_test(enum st20_type tx_type[], enum st20_type rx_type
14871487 ops_tx.height = height[i];
14881488 ops_tx.interlaced = interlaced[i];
14891489 ops_tx.fps = fps[i];
1490- ops_tx.fmt = fmt;
1490+ ops_tx.fmt = fmt[i] ;
14911491 ops_tx.payload_type = ST20_TEST_PAYLOAD_TYPE;
14921492 ops_tx.framebuff_cnt = test_ctx_tx[i]->fb_cnt ;
14931493 ops_tx.get_next_frame = interlaced[i] ? tx_next_video_field : tx_next_video_frame;
@@ -1564,7 +1564,7 @@ static void st20_rx_digest_test(enum st20_type tx_type[], enum st20_type rx_type
15641564 ops_rx.width = width[i];
15651565 ops_rx.height = height[i];
15661566 ops_rx.fps = fps[i];
1567- ops_rx.fmt = fmt;
1567+ ops_rx.fmt = fmt[i] ;
15681568 ops_rx.payload_type = ST20_TEST_PAYLOAD_TYPE;
15691569 ops_rx.interlaced = interlaced[i];
15701570 ops_rx.framebuff_cnt = test_ctx_rx[i]->fb_cnt ;
@@ -1704,8 +1704,8 @@ TEST(St20_rx, digest_frame_1080p_fps59_94_s1) {
17041704 int width[1 ] = {1920 };
17051705 int height[1 ] = {1080 };
17061706 bool interlaced[1 ] = {false };
1707- st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced,
1708- ST20_FMT_YUV_422_10BIT , true );
1707+ enum st20_fmt fmt[ 1 ] = {ST20_FMT_YUV_422_10BIT};
1708+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt , true );
17091709}
17101710
17111711TEST (St20_rx, digest_field_1080p_fps59_94_s1) {
@@ -1716,8 +1716,8 @@ TEST(St20_rx, digest_field_1080p_fps59_94_s1) {
17161716 int width[1 ] = {1920 };
17171717 int height[1 ] = {1080 };
17181718 bool interlaced[1 ] = {true };
1719- st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced,
1720- ST20_FMT_YUV_422_10BIT , true );
1719+ enum st20_fmt fmt[ 1 ] = {ST20_FMT_YUV_422_10BIT};
1720+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt , true );
17211721}
17221722
17231723TEST (St20_rx, digest_frame_720p_fps59_94_s1_gpm) {
@@ -1728,8 +1728,8 @@ TEST(St20_rx, digest_frame_720p_fps59_94_s1_gpm) {
17281728 int width[1 ] = {1280 };
17291729 int height[1 ] = {720 };
17301730 bool interlaced[1 ] = {false };
1731- st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced,
1732- ST20_FMT_YUV_422_10BIT , true );
1731+ enum st20_fmt fmt[ 1 ] = {ST20_FMT_YUV_422_10BIT};
1732+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt , true );
17331733}
17341734
17351735TEST (St20_rx, digest_field_720p_fps59_94_s1_gpm) {
@@ -1740,8 +1740,8 @@ TEST(St20_rx, digest_field_720p_fps59_94_s1_gpm) {
17401740 int width[1 ] = {1280 };
17411741 int height[1 ] = {720 };
17421742 bool interlaced[1 ] = {true };
1743- st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced,
1744- ST20_FMT_YUV_422_10BIT , true );
1743+ enum st20_fmt fmt[ 1 ] = {ST20_FMT_YUV_422_10BIT};
1744+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt , true );
17451745}
17461746
17471747TEST (St20_rx, digest_frame_720p_fps29_97_s1_bpm) {
@@ -1752,8 +1752,8 @@ TEST(St20_rx, digest_frame_720p_fps29_97_s1_bpm) {
17521752 int width[1 ] = {1280 };
17531753 int height[1 ] = {720 };
17541754 bool interlaced[1 ] = {false };
1755- st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced,
1756- ST20_FMT_YUV_422_10BIT , true );
1755+ enum st20_fmt fmt[ 1 ] = {ST20_FMT_YUV_422_10BIT};
1756+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt , true );
17571757}
17581758
17591759TEST (St20_rx, digest_field_720p_fps29_97_s1_bpm) {
@@ -1764,8 +1764,8 @@ TEST(St20_rx, digest_field_720p_fps29_97_s1_bpm) {
17641764 int width[1 ] = {1280 };
17651765 int height[1 ] = {720 };
17661766 bool interlaced[1 ] = {true };
1767- st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced,
1768- ST20_FMT_YUV_422_10BIT , true );
1767+ enum st20_fmt fmt[ 1 ] = {ST20_FMT_YUV_422_10BIT};
1768+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt , true );
17691769}
17701770
17711771TEST (St20_rx, digest_rtp_1080p_fps59_94_s1) {
@@ -1776,8 +1776,8 @@ TEST(St20_rx, digest_rtp_1080p_fps59_94_s1) {
17761776 int width[1 ] = {1920 };
17771777 int height[1 ] = {1080 };
17781778 bool interlaced[1 ] = {false };
1779- st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced,
1780- ST20_FMT_YUV_422_10BIT , true );
1779+ enum st20_fmt fmt[ 1 ] = {ST20_FMT_YUV_422_10BIT};
1780+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt , true );
17811781}
17821782
17831783TEST (St20_rx, digest_frame_4320p_fps59_94_s1) {
@@ -1788,8 +1788,8 @@ TEST(St20_rx, digest_frame_4320p_fps59_94_s1) {
17881788 int width[1 ] = {1920 * 4 };
17891789 int height[1 ] = {1080 * 4 };
17901790 bool interlaced[1 ] = {false };
1791- st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced,
1792- ST20_FMT_YUV_422_10BIT , false );
1791+ enum st20_fmt fmt[ 1 ] = {ST20_FMT_YUV_422_10BIT};
1792+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt , false );
17931793}
17941794
17951795TEST (St20_rx, digest_field_4320p_fps59_94_s1) {
@@ -1800,8 +1800,8 @@ TEST(St20_rx, digest_field_4320p_fps59_94_s1) {
18001800 int width[1 ] = {1920 * 4 };
18011801 int height[1 ] = {1080 * 4 };
18021802 bool interlaced[1 ] = {true };
1803- st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced,
1804- ST20_FMT_YUV_422_10BIT , false );
1803+ enum st20_fmt fmt[ 1 ] = {ST20_FMT_YUV_422_10BIT};
1804+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt , false );
18051805}
18061806
18071807TEST (St20_rx, digest_frame_720p_fps59_94_s3) {
@@ -1815,8 +1815,10 @@ TEST(St20_rx, digest_frame_720p_fps59_94_s3) {
18151815 int width[3 ] = {1280 , 1280 , 1280 };
18161816 int height[3 ] = {720 , 720 , 720 };
18171817 bool interlaced[3 ] = {false , false , false };
1818- st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced,
1819- ST20_FMT_YUV_422_10BIT, false , 3 );
1818+ enum st20_fmt fmt[3 ] = {ST20_FMT_YUV_422_10BIT, ST20_FMT_YUV_422_10BIT,
1819+ ST20_FMT_YUV_422_10BIT};
1820+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt, false ,
1821+ 3 );
18201822}
18211823
18221824TEST (St20_rx, digest_field_720p_fps59_94_s3) {
@@ -1830,8 +1832,10 @@ TEST(St20_rx, digest_field_720p_fps59_94_s3) {
18301832 int width[3 ] = {1280 , 1280 , 1280 };
18311833 int height[3 ] = {720 , 720 , 720 };
18321834 bool interlaced[3 ] = {true , false , true };
1833- st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced,
1834- ST20_FMT_YUV_422_10BIT, false , 3 );
1835+ enum st20_fmt fmt[3 ] = {ST20_FMT_YUV_422_10BIT, ST20_FMT_YUV_422_10BIT,
1836+ ST20_FMT_YUV_422_10BIT};
1837+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt, false ,
1838+ 3 );
18351839}
18361840
18371841TEST (St20_rx, digest_frame_1080p_fps59_94_s3) {
@@ -1845,8 +1849,44 @@ TEST(St20_rx, digest_frame_1080p_fps59_94_s3) {
18451849 int width[3 ] = {1920 , 1920 , 1920 };
18461850 int height[3 ] = {1080 , 1080 , 1080 };
18471851 bool interlaced[3 ] = {false , false , false };
1848- st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced,
1849- ST20_FMT_YUV_422_10BIT, false , 3 );
1852+ enum st20_fmt fmt[3 ] = {ST20_FMT_YUV_422_10BIT, ST20_FMT_YUV_422_10BIT,
1853+ ST20_FMT_YUV_422_10BIT};
1854+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt, false ,
1855+ 3 );
1856+ }
1857+
1858+ TEST (St20_rx, digest_frame_1080p_fps59_94_s4_8bit) {
1859+ enum st20_type type[4 ] = {ST20_TYPE_FRAME_LEVEL, ST20_TYPE_FRAME_LEVEL,
1860+ ST20_TYPE_FRAME_LEVEL, ST20_TYPE_FRAME_LEVEL};
1861+ enum st20_type rx_type[4 ] = {ST20_TYPE_FRAME_LEVEL, ST20_TYPE_FRAME_LEVEL,
1862+ ST20_TYPE_FRAME_LEVEL, ST20_TYPE_FRAME_LEVEL};
1863+ enum st20_packing packing[4 ] = {ST20_PACKING_GPM_SL, ST20_PACKING_GPM_SL,
1864+ ST20_PACKING_BPM, ST20_PACKING_GPM};
1865+ enum st_fps fps[4 ] = {ST_FPS_P59_94, ST_FPS_P50, ST_FPS_P59_94, ST_FPS_P50};
1866+ int width[4 ] = {1920 , 1920 , 1920 , 1280 };
1867+ int height[4 ] = {1080 , 1080 , 1080 , 720 };
1868+ bool interlaced[4 ] = {false , false , false , false };
1869+ enum st20_fmt fmt[4 ] = {ST20_FMT_YUV_422_8BIT, ST20_FMT_YUV_420_8BIT,
1870+ ST20_FMT_YUV_444_8BIT, ST20_FMT_RGB_8BIT};
1871+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt, false ,
1872+ 4 );
1873+ }
1874+
1875+ TEST (St20_rx, digest_frame_1080p_fps59_94_s4_10bit) {
1876+ enum st20_type type[4 ] = {ST20_TYPE_FRAME_LEVEL, ST20_TYPE_FRAME_LEVEL,
1877+ ST20_TYPE_FRAME_LEVEL, ST20_TYPE_FRAME_LEVEL};
1878+ enum st20_type rx_type[4 ] = {ST20_TYPE_FRAME_LEVEL, ST20_TYPE_FRAME_LEVEL,
1879+ ST20_TYPE_FRAME_LEVEL, ST20_TYPE_FRAME_LEVEL};
1880+ enum st20_packing packing[4 ] = {ST20_PACKING_GPM_SL, ST20_PACKING_GPM, ST20_PACKING_BPM,
1881+ ST20_PACKING_BPM};
1882+ enum st_fps fps[4 ] = {ST_FPS_P59_94, ST_FPS_P50, ST_FPS_P59_94, ST_FPS_P50};
1883+ int width[4 ] = {1920 , 1920 , 1920 , 1280 };
1884+ int height[4 ] = {1080 , 1080 , 1080 , 720 };
1885+ bool interlaced[4 ] = {false , false , false , false };
1886+ enum st20_fmt fmt[4 ] = {ST20_FMT_YUV_422_10BIT, ST20_FMT_YUV_420_10BIT,
1887+ ST20_FMT_YUV_444_10BIT, ST20_FMT_RGB_10BIT};
1888+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt, false ,
1889+ 4 );
18501890}
18511891
18521892TEST (St20_rx, digest_field_1080p_fps59_94_s3) {
@@ -1860,8 +1900,10 @@ TEST(St20_rx, digest_field_1080p_fps59_94_s3) {
18601900 int width[3 ] = {1920 , 1920 , 1920 };
18611901 int height[3 ] = {1080 , 1080 , 1080 };
18621902 bool interlaced[3 ] = {true , true , true };
1863- st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced,
1864- ST20_FMT_YUV_422_10BIT, false , 3 );
1903+ enum st20_fmt fmt[3 ] = {ST20_FMT_YUV_422_10BIT, ST20_FMT_YUV_422_10BIT,
1904+ ST20_FMT_YUV_422_10BIT};
1905+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt, false ,
1906+ 3 );
18651907}
18661908
18671909TEST (St20_rx, digest_rtp_1080p_fps59_94_s3) {
@@ -1875,8 +1917,10 @@ TEST(St20_rx, digest_rtp_1080p_fps59_94_s3) {
18751917 int width[3 ] = {1920 , 1920 , 1920 };
18761918 int height[3 ] = {1080 , 1080 , 1080 };
18771919 bool interlaced[3 ] = {false , false , false };
1878- st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced,
1879- ST20_FMT_YUV_422_10BIT, false , 3 );
1920+ enum st20_fmt fmt[3 ] = {ST20_FMT_YUV_422_10BIT, ST20_FMT_YUV_422_10BIT,
1921+ ST20_FMT_YUV_422_10BIT};
1922+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt, false ,
1923+ 3 );
18801924}
18811925
18821926TEST (St20_rx, digest_ooo_frame_s3) {
@@ -1890,8 +1934,10 @@ TEST(St20_rx, digest_ooo_frame_s3) {
18901934 int width[3 ] = {1920 , 1280 , 1280 };
18911935 int height[3 ] = {1080 , 720 , 720 };
18921936 bool interlaced[3 ] = {false , false , false };
1893- st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced,
1894- ST20_FMT_YUV_422_10BIT, false , 3 , true );
1937+ enum st20_fmt fmt[3 ] = {ST20_FMT_YUV_422_10BIT, ST20_FMT_YUV_422_10BIT,
1938+ ST20_FMT_YUV_422_10BIT};
1939+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt, false ,
1940+ 3 , true );
18951941}
18961942
18971943TEST (St20_rx, digest_tx_slice_s3) {
@@ -1905,8 +1951,10 @@ TEST(St20_rx, digest_tx_slice_s3) {
19051951 int width[3 ] = {1920 , 1280 , 1280 };
19061952 int height[3 ] = {1080 , 720 , 720 };
19071953 bool interlaced[3 ] = {false , false , false };
1908- st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced,
1909- ST20_FMT_YUV_422_10BIT, false , 3 , false );
1954+ enum st20_fmt fmt[3 ] = {ST20_FMT_YUV_422_10BIT, ST20_FMT_YUV_422_10BIT,
1955+ ST20_FMT_YUV_422_10BIT};
1956+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt, false ,
1957+ 3 , false );
19101958}
19111959
19121960TEST (St20_rx, digest_slice_s3) {
@@ -1920,8 +1968,10 @@ TEST(St20_rx, digest_slice_s3) {
19201968 int width[3 ] = {1920 , 1280 , 1280 };
19211969 int height[3 ] = {1080 , 720 , 720 };
19221970 bool interlaced[3 ] = {false , false , false };
1923- st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced,
1924- ST20_FMT_YUV_422_10BIT, false , 3 , false );
1971+ enum st20_fmt fmt[3 ] = {ST20_FMT_YUV_422_10BIT, ST20_FMT_YUV_422_10BIT,
1972+ ST20_FMT_YUV_422_10BIT};
1973+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt, false ,
1974+ 3 , false );
19251975}
19261976
19271977TEST (St20_rx, digest_field_slice_s3) {
@@ -1935,8 +1985,10 @@ TEST(St20_rx, digest_field_slice_s3) {
19351985 int width[3 ] = {1920 , 1280 , 1280 };
19361986 int height[3 ] = {1080 , 720 , 720 };
19371987 bool interlaced[3 ] = {true , true , true };
1938- st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced,
1939- ST20_FMT_YUV_422_10BIT, false , 3 , false );
1988+ enum st20_fmt fmt[3 ] = {ST20_FMT_YUV_422_10BIT, ST20_FMT_YUV_422_10BIT,
1989+ ST20_FMT_YUV_422_10BIT};
1990+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt, false ,
1991+ 3 , false );
19401992}
19411993
19421994TEST (St20_rx, digest_ooo_slice_s3) {
@@ -1950,8 +2002,10 @@ TEST(St20_rx, digest_ooo_slice_s3) {
19502002 int width[3 ] = {1920 , 1280 , 1280 };
19512003 int height[3 ] = {1080 , 720 , 720 };
19522004 bool interlaced[3 ] = {false , false , false };
1953- st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced,
1954- ST20_FMT_YUV_422_10BIT, false , 3 , true );
2005+ enum st20_fmt fmt[3 ] = {ST20_FMT_YUV_422_10BIT, ST20_FMT_YUV_422_10BIT,
2006+ ST20_FMT_YUV_422_10BIT};
2007+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt, false ,
2008+ 3 , true );
19552009}
19562010
19572011TEST (St20_rx, digest_slice_4320p) {
@@ -1962,9 +2016,10 @@ TEST(St20_rx, digest_slice_4320p) {
19622016 int width[1 ] = {1920 * 4 };
19632017 int height[1 ] = {1080 * 4 };
19642018 bool interlaced[1 ] = {false };
2019+ enum st20_fmt fmt[1 ] = {ST20_FMT_YUV_422_10BIT};
19652020 if (st_test_dma_available (st_test_ctx ())) {
1966- st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced,
1967- ST20_FMT_YUV_422_10BIT, false , 1 , false );
2021+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt,
2022+ false , 1 , false );
19682023 } else {
19692024 info (" %s, skip as no dma available\n " , __func__);
19702025 }
@@ -1978,9 +2033,10 @@ TEST(St20_rx, digest_ooo_slice_4320p) {
19782033 int width[1 ] = {1920 * 4 };
19792034 int height[1 ] = {1080 * 4 };
19802035 bool interlaced[1 ] = {false };
2036+ enum st20_fmt fmt[1 ] = {ST20_FMT_YUV_422_10BIT};
19812037 if (st_test_dma_available (st_test_ctx ())) {
1982- st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced,
1983- ST20_FMT_YUV_422_10BIT, false , 1 , true );
2038+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt,
2039+ false , 1 , true );
19842040 } else {
19852041 info (" %s, skip as no dma available\n " , __func__);
19862042 }
@@ -1994,8 +2050,8 @@ TEST(St20_rx, digest_frame_4096_2160_fps59_94_12bit_yuv444_s1) {
19942050 int width[1 ] = {4096 };
19952051 int height[1 ] = {2160 };
19962052 bool interlaced[1 ] = {false };
1997- st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced,
1998- ST20_FMT_YUV_444_12BIT , true );
2053+ enum st20_fmt fmt[ 1 ] = {ST20_FMT_YUV_444_12BIT};
2054+ st20_rx_digest_test (type, rx_type, packing, fps, width, height, interlaced, fmt , true );
19992055}
20002056
20012057static int st20_tx_meta_build_rtp (tests_context* s, struct st20_rfc4175_rtp_hdr * rtp,
0 commit comments