[x264-devel] Win32 large-address-aware?

Jason Garrett-Glaser darkshikari at gmail.com
Sat Sep 12 21:18:50 CEST 2009


On Sat, Sep 12, 2009 at 11:26 AM, Jeppe Øland <uxorious at acon.dezign.dk> wrote:
>>>>>>>>>> While testing the new mb-tree code, memory usage runs rather high
>>>>>>>>>> :-)
>>>>>>>>>> I found that even on a 64-bit Windows, x264 is only allowed to
>>>>>>>>>> allocate 2 GB memory.
>>>>>>>>>
>>>>>>>>> Try updating to the latest version; the memory usage has been
>>>>>>>>> greatly
>>>>>>>>> reduced with the "threaded lookahead" change.
>>>>>>>>
>>>>>>>> I believe I am already running the latest version.
>>>>>>>> Encoding 1080p content with --rc-lookahead 250 is a bit hungry.
>>>>>>>
>>>>>>> Then don't do that ;)
>>>>>>>
>>>>>>> Values over the default are mostly useless.
>>>>>>
>>>>>> I'm just running some tests on a short clip to see how things measure
>>>>>> out.
>>>>>> (Even going for --rc-lookahead 100 ran out of memory)
>>>>>>
>>>>>> Whether or not I should do that long-term is no reason to keep the exe
>>>>>> limited if it works fine otherwise.
>>>>>> Tomorrow I might be compressing a 4K video with shorter lookahead, and
>>>>>> who knows how that would go ;-)
>>>>>
>>>>> Wait a minute, I just looked again at your original email, which I
>>>>> obviously didn't read carefully enough...
>>>>>
>>>>>> While testing the new mb-tree code, memory usage runs rather high :-)
>>>>>> I found that even on a 64-bit Windows, x264 is only allowed to
>>>>>> allocate 2 GB memory.
>>>>>
>>>>> Er.... everyone I've talked to who uses 64-bit Windows has had no
>>>>> issues with memory allocations over 2 gigabytes.
>>>>
>>>> I guess I wasn't being specific enough either.
>>>> While the OS is 64-bit, I am actually running the 32-bit executeable.
>>>>
>>>> To make doubly sure, I just downloaded the latest 32-bit build from
>>>> http://x264.nl/, and it runs out of memory at 2 GiB.
>>>>
>>>> I'm sure the 64-bit version will work fine - but a lot of GUIs wrap
>>>> the 32-bit version regardless of OS.
>>>
>>> I just tried the 64-bit version, and of course it doesn't work with
>>> AviSynth :-(
>>> There are additional tools available to fix this, but it's still early
>>> days == pretty flaky.
>>> For the majority of users, a large-address-aware 32-bit version of
>>> x264 would go a long way towards solving any current memory issues.
>>
>> Using avs2yuv is a convenient way to use the 64-bit x264 and 32-bit
>> avisynth.
>
> As I already mentioned, there are numerous workarounds available.
> None are as easy or convenient as "Install MeGUI and AviSynth" (or
> whatever package set you happen to prefer).
>
> Adding the option LargeAddressAware="2" to the vcproj linker section
> would all but eliminate the problem for essentially all users.

Perhaps you haven't thought your cunning plan all the way through, but
x264 does not support any variants of the Microsoft VC series because
said compilers do not support the language that x264 is written in
(C99).  Additionally, practically all GUIs use an x264 build that is
compiled with gcc.

Dark Shikari


More information about the x264-devel mailing list