[FFmpeg-devel] [PATCH] Fix de/selection of libx264 I-partitions

Panagiotis Issaris takis.issaris
Fri Jul 27 11:32:44 CEST 2007


Panagiotis Issaris schreef:
> Hi,
> 
> Loren Merritt wrote:
>> On Thu, 26 Jul 2007, Panagiotis Issaris wrote:
>>
>>   
>>> I've noticed that when using ffmpeg, using -partitions -parti4x4 doesn't
>>> work as I had expected. Although I was trying to disable the generations
>>> of 4x4 blocks, the output of ffmpeg would still contain:
>>> ...
>>> mb I  I16..4: 59.1%  0.0% 40.9%
>>> ...
>>>
>>> The attached patch fixes the selection and deselection of the usage of
>>> certain blocksizes when using libx264.
>>>     
>> ffmpeg is currently consistent with mencoder and x264cli: the "partitions" 
>> option affects only P- and B-frames, while I-frames always use all 
>> available partitions. Because the only reason for disabling partitions is 
>> speed, and intra partitions in I-frames gain much more compression per 
>> cpu-time than in P- and B-frames.
>>
>> If you want some way to disable partitions in I-frames, that's another 
>> question. But don't change the meaning of an existing option.
>>
>>   
> Ah, I see. Well, from a user point of view, it seemed logical to me that
> disabling I4x4 blocks would do so in both I and P frames, but I also
> think my patch was wrong in that sense too. It should have also kept
> OR-ing analyse.inter with the I4x4's and I8x8's as I now always entirely
> disabled them for P frames, right?
> 
> I'll try to prepare a different patch, introducing a way to disable them
> for I frames, without changing existing options.

Attached a patch introducing new parameters for -partitions, being
"parti4x4i" and "parti8x8i". The patch does alter the current behavior
as with this patch 4x4 and 8x8 partitions for I frames aren't used
anymore by default. Any thoughts on that?

 avcodec.h |    2 ++
 libx264.c |    8 ++++++++
 utils.c   |    2 ++
 3 files changed, 12 insertions(+)


With friendly regards,
Takis
--
vCard: http://issaris.org/pi.vcf
PGP key: http://issaris.org/pi.key
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pi-20070727T112318-ffmpeg-allow_disabling_i4x4_in_iframes.diff
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20070727/3efd4105/attachment.asc>



More information about the ffmpeg-devel mailing list