[FFmpeg-devel] pre discussion around Blackfin dct_quantize_bfin routine

Marc Hoffman mmh
Tue Jun 12 12:25:02 CEST 2007


>> [...]
>>>    /*  for(i=start_i; i<64; i++) {                           */
>>>    /*      sign     = (block[i]>>15)|1;                      */
>>>    /*      level    = ((abs(block[i])+bias[0])*qmat[i])>>16; */
>>>    /*      if (level < 0) level = 0;                         */
>>>    /*      max     |= level;                                 */
>>>    /*      level    = level * sign;                          */
>>>    /*      block[i] = level;                                 */
>>>    /*  } */
>>
>> below you put the C code to the right of the asm. I'd say make it
>> consistent (possibly just remove it, but if not C is not  
>> necessarily the
>> best way to annotate it).
>>
>> Unfortunately I don't know what it does so I'm not sure it really  
>> makes
>> sense, but I'd suggest splitting the long asm lines, e.g.:
>>>                  "     r1=abs r1  
>>> (v)                                    || r2=[%2++];\n\t"
>>
>> vs.
>>>                   "     r1=abs r1 (v)"
>>>                   "       || r2=[%2++];\n\t"
>>
>> or
>>
>>>                  "     r1.h=(a1 =r1.h*r2.h), r1.l=(a0 =r1.l*r2.l)  
>>> (tfu);             \n\t"
>> vs.
>>>                  "     r1.h=(a1 =r1.h*r2.h),
>>>                  "     r1.l=(a0 =r1.l*r2.l)
>>>                  "(tfu);             \n\t"
>>
>> The best way of doing this of course depends on the actual meaning of
>> this, and my suggestions might be rather stupid thus ;-)
>
> Not stupid at all Reimar, actually its my personal taste to keep  
> the instruction stream on a single line.  This has been a point of  
> argument in the past.  My only reason for liking the spliting as  
> you suggested is to keep things with in 80 char lines.  But to me  
> the body seems so simple to read this way.  Lets look at your way.
>
>
> <reimar.txt>
>
> I kind of like your idea here, looks real nice with the commentary  
> integrated into the body.

Argh the assembler is broken each of those lines need to be  
concatenated.

Marc




More information about the ffmpeg-devel mailing list