Commit b43c6fc2 authored by Daniel Kamil Kozar's avatar Daniel Kamil Kozar Committed by Jean-Paul Saman

use the new descriptor API in test_dr

(cherry picked from commit d1d2e934)
Signed-off-by: default avatarJean-Paul Saman <jpsaman@videolan.org>
parent b8e56f3d
...@@ -16,7 +16,6 @@ ...@@ -16,7 +16,6 @@
<!ATTLIST descriptor name CDATA #IMPLIED> <!ATTLIST descriptor name CDATA #IMPLIED>
<!ATTLIST descriptor sname CDATA #IMPLIED> <!ATTLIST descriptor sname CDATA #IMPLIED>
<!ATTLIST descriptor fname CDATA #IMPLIED>
<!ATTLIST descriptor msuffix CDATA #IMPLIED> <!ATTLIST descriptor msuffix CDATA #IMPLIED>
<!ATTLIST descriptor gen_args CDATA #IMPLIED> <!ATTLIST descriptor gen_args CDATA #IMPLIED>
......
This diff is collapsed.
...@@ -74,8 +74,8 @@ static int main_<xsl:value-of select="@sname" />_<xsl:value-of select="@msuffix" ...@@ -74,8 +74,8 @@ static int main_<xsl:value-of select="@sname" />_<xsl:value-of select="@msuffix"
<!-- declare a macro for calling the one-argument generate functions --> <!-- declare a macro for calling the one-argument generate functions -->
<xsl:if test="@gen_args = 1"> <xsl:if test="@gen_args = 1">
#define dvbpsi_Gen<xsl:value-of select="@fname"/>Dr(x,y) \ #define dvbpsi_gen_<xsl:value-of select="@sname"/>_dr(x,y) \
dvbpsi_Gen<xsl:value-of select="@fname"/>Dr(x) dvbpsi_gen_<xsl:value-of select="@sname"/>_dr(x)
</xsl:if> </xsl:if>
<xsl:apply-templates mode="check" /> <xsl:apply-templates mode="check" />
...@@ -117,7 +117,7 @@ static int main_<xsl:value-of select="@sname" />_<xsl:value-of select="@msuffix" ...@@ -117,7 +117,7 @@ static int main_<xsl:value-of select="@sname" />_<xsl:value-of select="@msuffix"
<xsl:template match="integer" mode="check"> <xsl:template match="integer" mode="check">
/* check <xsl:value-of select="@name" /> */<xsl:apply-templates select=".." mode="init" /> /* check <xsl:value-of select="@name" /> */<xsl:apply-templates select=".." mode="init" />
BOZO_begin_integer(<xsl:value-of select="@name" />, <xsl:value-of select="@bitcount" />) BOZO_begin_integer(<xsl:value-of select="@name" />, <xsl:value-of select="@bitcount" />)
BOZO_DOJOB(<xsl:value-of select="../@fname" />); BOZO_DOJOB(<xsl:value-of select="../@sname" />);
BOZO_check_integer(<xsl:value-of select="@name" />, <xsl:value-of select="@bitcount" />) BOZO_check_integer(<xsl:value-of select="@name" />, <xsl:value-of select="@bitcount" />)
BOZO_CLEAN(); BOZO_CLEAN();
BOZO_end_integer(<xsl:value-of select="@name" />, <xsl:value-of select="@bitcount" />) BOZO_end_integer(<xsl:value-of select="@name" />, <xsl:value-of select="@bitcount" />)
...@@ -126,7 +126,7 @@ static int main_<xsl:value-of select="@sname" />_<xsl:value-of select="@msuffix" ...@@ -126,7 +126,7 @@ static int main_<xsl:value-of select="@sname" />_<xsl:value-of select="@msuffix"
<xsl:template match="boolean" mode="check"> <xsl:template match="boolean" mode="check">
/* check <xsl:value-of select="@name" /> */<xsl:apply-templates select=".." mode="init" /> /* check <xsl:value-of select="@name" /> */<xsl:apply-templates select=".." mode="init" />
BOZO_begin_boolean(<xsl:value-of select="@name" />) BOZO_begin_boolean(<xsl:value-of select="@name" />)
BOZO_DOJOB(<xsl:value-of select="../@fname" />); BOZO_DOJOB(<xsl:value-of select="../@sname" />);
BOZO_check_boolean(<xsl:value-of select="@name" />) BOZO_check_boolean(<xsl:value-of select="@name" />)
BOZO_CLEAN(); BOZO_CLEAN();
BOZO_end_boolean(<xsl:value-of select="@name" />) BOZO_end_boolean(<xsl:value-of select="@name" />)
...@@ -136,7 +136,7 @@ static int main_<xsl:value-of select="@sname" />_<xsl:value-of select="@msuffix" ...@@ -136,7 +136,7 @@ static int main_<xsl:value-of select="@sname" />_<xsl:value-of select="@msuffix"
/* check <xsl:value-of select="@name" /> */<xsl:apply-templates select=".." mode="init" /> /* check <xsl:value-of select="@name" /> */<xsl:apply-templates select=".." mode="init" />
BOZO_begin_array(<xsl:value-of select="@name" />) BOZO_begin_array(<xsl:value-of select="@name" />)
BOZO_loop_array_begin(<xsl:value-of select="@name" />, <xsl:value-of select="@len_name" />, <xsl:value-of select="@min_size" />) BOZO_loop_array_begin(<xsl:value-of select="@name" />, <xsl:value-of select="@len_name" />, <xsl:value-of select="@min_size" />)
BOZO_DOJOB(<xsl:value-of select="../@fname" />); BOZO_DOJOB(<xsl:value-of select="../@sname" />);
BOZO_check_array_begin(<xsl:value-of select="@name" />, <xsl:value-of select="@len_name" />) BOZO_check_array_begin(<xsl:value-of select="@name" />, <xsl:value-of select="@len_name" />)
<xsl:choose> <xsl:choose>
<xsl:when test="@type"> <xsl:when test="@type">
...@@ -173,7 +173,7 @@ static int main_<xsl:value-of select="@sname" />_<xsl:value-of select="@msuffix" ...@@ -173,7 +173,7 @@ static int main_<xsl:value-of select="@sname" />_<xsl:value-of select="@msuffix"
/* check <xsl:value-of select="@name" /> */<xsl:apply-templates select=".." mode="init" /> /* check <xsl:value-of select="@name" /> */<xsl:apply-templates select=".." mode="init" />
i_loop_count = 0; i_loop_count = 0;
BOZO_begin_array(<xsl:value-of select="@name" />) BOZO_begin_array(<xsl:value-of select="@name" />)
BOZO_DOJOB(<xsl:value-of select="../@fname" />); BOZO_DOJOB(<xsl:value-of select="../@sname" />);
BOZO_check_carray(<xsl:value-of select="@name" />) BOZO_check_carray(<xsl:value-of select="@name" />)
BOZO_end_array BOZO_end_array
</xsl:template> </xsl:template>
......
This diff is collapsed.
...@@ -37,12 +37,12 @@ ...@@ -37,12 +37,12 @@
#define BOZO_CLEAN() \ #define BOZO_CLEAN() \
dvbpsi_DeleteDescriptors(p_descriptor); dvbpsi_DeleteDescriptors(p_descriptor);
#define BOZO_DOJOB(fname) \ #define BOZO_DOJOB(sname) \
if(!(i_loop_count & 0xffff)) \ if(!(i_loop_count & 0xffff)) \
fprintf(stdout, "\r iteration count: %22"PRI64d, i_loop_count); \ fprintf(stdout, "\r iteration count: %22"PRI64d, i_loop_count); \
i_loop_count++; \ i_loop_count++; \
p_descriptor = dvbpsi_Gen##fname##Dr(&s_decoded, 0); \ p_descriptor = dvbpsi_gen_##sname##_dr(&s_decoded, 0); \
p_new_decoded = dvbpsi_Decode##fname##Dr(p_descriptor); p_new_decoded = dvbpsi_decode_##sname##_dr(p_descriptor);
#define BOZO_START(name) \ #define BOZO_START(name) \
fprintf(stdout, "\"%s\" descriptor check:\n", #name); fprintf(stdout, "\"%s\" descriptor check:\n", #name);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment