In article <[EMAIL PROTECTED]>,
        Francesco Romani <[EMAIL PROTECTED]> writes:
> On Mon, 5 Jun 2006 03:32:04 +0000 (UTC)
> [EMAIL PROTECTED] (Frederick Bruckman) wrote:
> 
>> diff
>> -ru /m/source/misc/transcode/export/export_xvid4.c 
>> /var/tmp/transcode/export/export_xvid4.c
>> --- /m/source/misc/transcode/export/export_xvid4.c   2006-06-04
>> 21:08:41.000000000 -0500
>> +++ /var/tmp/transcode/export/export_xvid4.c 2006-06-04
>> 21:31:33.000000000 -0500 @@ -61,6 +61,7 @@ #include "aud_aux.h" #include
>> "libtc/libtc.h" #include "libtcvideo/tcvideo.h"
>> +#include "tc_defaults.h"
>>  
>>  #include "libtc/cfgfile.h"
>>  
>> @@ -1056,15 +1057,16 @@
>>      x->quant_intra_matrix = xcfg->quant_intra_matrix;
>>      x->quant_inter_matrix = xcfg->quant_inter_matrix;
>>  
>> -    /* pixel aspect ratio
>> -     * transcode.c uses 0 for EXT instead of 15 */
>> -    if ((vob->ex_par==0) &&
>> -        (vob->ex_par_width==1) && (vob->ex_par_height==1))
>> -        vob->ex_par = 1;
>> -
>> -    x->par = (vob->ex_par==0)? XVID_PAR_EXT: vob->ex_par;
>> -    x->par_width = vob->ex_par_width;
>> -    x->par_height = vob->ex_par_height;
>> +    /* pixel aspect ratio */
>> +    if (vob->export_attributes & TC_EXPORT_ATTRIBUTE_PAR) {
>> +            if (vob->ex_par == 0) {
>> +                    x->par = XVID_PAR_EXT;
>> +                    x->par_width = vob->ex_par_width;
>> +                    x->par_height = vob->ex_par_height;
>> +            } else {
>> +                    x->par = vob->ex_par;
>> +            }
>> +    }
>>  
>>      return;
>>  }
> 
> That's almost fine except for the EXPORT_ATTRIBUTE check.
> The meaning of EXPORT_ATTRIBUTE is: "user selected export profile FOOBAR
> but it has also provided an explicit value for a given encoding parameter
> (say, keyframe interval). So, don't overwrite this parameter internally."
> 
> The whole EXPORT_ATTRIBUTE thing it's supposed to go away with Old Module
> Style export modules when new one are ready, since new export profile code
> uses a brand new, (hopefully!) better and smarter approach.

Still, user supplied "--export_par" will have to set some flag,
right?  With no flag, you could still check that "ex_par_width",
"ex_par_height", and "ex_par" are all three zero, but I fear that
might be fragile. Some check like that has evidently broken once.

>> I also have a longer patch against 1.0.2 to use the Xvid 1.1 rate
>> controls.  I won't post it here because it's not very interesting:
>> besides being out-of-date against CVS, it doesn't have the profile
>> support (yet), but I'd be happy to send it to anyone who wants to
>> work on it.
> 
> I'm interested to this patch, but unfortunately I'm facing an issue on import
> layer (the infamous directory mode thing), so I can't work on this quickly.
> Feel free to post the patch above on this thread if you like.

OK. I'll do that in a seperate email, trimming the update for the
xvid4 import module, as that's now gone in CVS. <sniff>

> Just a more word regarding profile support for xvid: if you mean transcode's
> export_prof(ile) support, don't worry about it since profile handling is going
> to change deeply in (hopefully) near future.

I'll wait for that, then.

> Thanks for your contribute! :)

You're welcome, and thanks for the quick response!

-- 
Frederick

Reply via email to