[MPlayer-dev-eng] [PATCH] CQMs in x264

Robert Swain robert.swain at gmail.com
Fri Sep 2 17:51:06 CEST 2005


Hello,
On 9/2/05, Guillaume POIRIER <poirierg at gmail.com> wrote:
> 
> + if( (cqm4iy && parse_cqm(cqm4iy, mod->param.cqm_4iy, 16, mod,
> "4iy") < 0) || \
> + (cqm4ic && parse_cqm(cqm4ic, mod->param.cqm_4ic, 16, mod,
> "4ic") < 0) || \
> + (cqm4py && parse_cqm(cqm4py, mod->param.cqm_4py, 16, mod,
> "4py") < 0) || \
> + (cqm4pc && parse_cqm(cqm4pc, mod->param.cqm_4pc, 16, mod,
> "4pc") < 0) || \
> + (cqm8iy && parse_cqm(cqm8iy, mod->param.cqm_8iy, 64, mod,
> "8iy") < 0) || \
> + (cqm8py && parse_cqm(cqm8py, mod->param.cqm_8py, 64, mod, "8py") < 0) )
> + return 0;
> 
> If I'm not mistaken, this makes sure all the CQM are valid, and cries
> if it doesn't.


This version basically checks for existence of each of the cqm lists and in 
the true case enforces that the return value of parse_cqm be greater than or 
equal to 0. (It would be 0 in a 'good' case. This was just how Loren 
suggested he preferred code to be. :)) So if the former case is true for any 
one list and the latter case for that list is also true we obtain an error.

Anyway, this is irrelevant if looking at Reimar's version which is probably 
better. That block of code now just tests if the return value of any of the 
parse calls is < 0 and if that is the case, 'bomb out'. </Atari>

Robert, if you could run as much test as possible with that code, that
> would be just fantastic.


I ran my patch through a few different tests, valid ones and invalid ones 
and the output was as intended. I'll test Reimar's now with the extra 
invalid ones he suggested. (Spaces and letters etc.)

Guillaume: I'll drop you a message on IRC in a bit if all was well with my 
tests.
Reimar: Thank you for reviewing the code and thanks for making it more 
robust. :)
Diego: Thank you again for all your help with the documentation.

Regards,
Robert Swain (superdump)



More information about the MPlayer-dev-eng mailing list