discuss-gnuradio
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Discuss-gnuradio] qa_atsc.py type question


From: Jonathan
Subject: Re: [Discuss-gnuradio] qa_atsc.py type question
Date: Mon, 2 Aug 2010 17:44:20 -0400 (EDT)
User-agent: SquirrelMail/1.4.16

> The runtime only checks that the datatypes have the same size.  Since
> the blocks' work methods cast their input and output buffers from (void *)
> to the type that they require, everything works out OK.
>
> Eric
>

Eric, and others,

All the below refers to qa_atsc.py, function test_loopback_000.
I realized casting is involved. I do believe we are walking on a very
dangerous and tight rope because we are casting from an unsigned char
array to a *class* containing unsigned char array and other datatypes. It
just so happens that the unsigned char array overlaps - this might not
always happen.

Finally, at the end of test_loopback_000, another casting is involved,
this one is even riskier than the first. It casts from a *class* to a
unsigned char array.

What I'm trying to say is perhaps qa_atsc.py should use atsc.pad and
atsc.depad, which are blocks specifically designed to convert unsigned
char arrays (from vector_source/sink) to and fro mpeg_atsc class objects.

Jonathan Shan



reply via email to

[Prev in Thread] Current Thread [Next in Thread]