このページの全ては誤っているかもしれません。[[x264関連の記事に関して]]を読んでください。
!!!x264-changelog-jp r1400-r1499
r1400-r1499のchangelogの日本語訳。その他のリビジョンと注意事項については[[x264-changelog-jp]]へどうぞ。
前:[[x264-changelog-jp r1300-r1399]] - 次:[[x264-changelog-jp r1500-r1599]]
!x264r1499
{{bq
git-id : 8a919f81065cccb65ff7c989fffec9258362900b
Author : Henrik Gramner
Date: Tue Mar 16 01:46:00 2010 +0100
Cosmetics: use sizeof() where appropriate
}}
{{bq
コスメティックス:適切な場所でsizeof()を使用。
}}
!x264r1498
{{bq
git-id : ae92e7f589f5832078cf6ecfa510d41b1f6b3301
Author : Jason Garrett-Glaser
Date: Mon Mar 15 00:01:57 2010 -0700
Split up analyse_init
Save some time by avoiding some unnecessary inits and moving other parts to per-thread init.
}}
{{bq
analyse_initを分割。
いくつかの不要な初期化を避け、その他をスレッドごとの初期化に移動することで時間を節約。
}}
!x264r1497
{{bq
git-id : 5d767b111b505edd63dfcff51bd9de839df09f7b
Author : Henrik Gramner
Date: Mon Mar 15 01:19:45 2010 +0100
Reduce stack usage of b-adapt 2's trellis
Also remove some redundant code.
}}
{{bq
b-adapt 2のtrellisのスタック使用量を削減。
また、いくつかの冗長なコードを削除。
}}
スタックとはメモリの一種だが、これでプログラムが使用する総メモリ使用量が削減されているとは限らない。
ただし、一般的に言ってメインメモリへのアクセスが減って高速化することは期待できる。
「スタック」とは、より一般的にはLIFOの''データ構造''を指す言葉だが、''スタックフレーム''を指すことも非常に多く、ここではそちらの意味になる。
スタックフレームとは、簡単に言えばC言語の関数の引数やローカル自動変数等に使用されるメモリ領域の事だ。
これは「コンパイラがどのようにして現実のプログラムでC言語の仕様を実現するか」という命題に対する''実装上の用語''なので、C言語の初級的な教科書では教えないことも多い。
スタックフレームが理解できているかどうかで、C言語の初級者と中級者の区別が付くことも非常に多い。
スタックフレームは関数が呼ばれる時に確保され、関数から戻ると解放される。
関数が呼ばれる度に積まれるので、データ構造としてのスタックと無関係な用語というわけでもない。
スタックフレームの積み重なりによるスタックデータ構造全体(変な言い回しだが)を''コールスタック''と呼ぶ。
main()関数を頂点とした関数呼び出しチェーンの木構造の中で、
''最もコールスタックが大きくなる経路でのサイズが、プログラムのスタック使用量''となる。
つまり、例え「b-adapt 2のtrellisのスタック使用量」が減っても、他の経路でコールスタックがより大きくなるのであれば、プログラム全体のスタック使用量は減らない。
これを手作業で調べるのは現実的ではないため、世の中にはソースコードを解析して調べるツールもあるが、x264も多用している''アセンブラや関数ポインタが使用されると解析できない''ケースも多い。
結局のところ絶対的なスタック使用量は、関数呼び出しチェーンの木構造をすべて実行してみて、デバッガやOS側のメモリ管理機構(にそんな機能が用意されているかも謎だが)で調べるくらいしか手がない。
しかし一方で、「b-adapt 2のtrellisが''アクセスするメモリの範囲が小さくなった''」ということは確実に言える。
すると、少なくともCPUのキャッシュメモリがより効率的に動作することは期待できるし、通常で言えば、アルゴリズム(処理手順)自体の改善でメモリアクセスが減っている傾向も期待できるので、高速化しているんじゃないかとは期待できる。もちろん、使用メモリの減少分をアクセス回数や命令数で補うような「苦しい」変更の場合はこの限りではない。
あぁ、勢いで書いたけど細かく突っ込もうと思えばいくらでも突っ込める説明だなぁ。
あくまで、スタックをよく知らない初級者向けの概念的説明ということでご勘弁を。
!x264r1496
{{bq
git-id : 081b90d9b39eb273f16dd4fe75020048e91cbfcb
Author : Jason Garrett-Glaser
Date: Sun Mar 14 00:25:02 2010 -0800
Various motion estimation optimizations
Faster method of checking MV range.
Predict MVs and cache MVs/MVDs for bidir qpel-RD.
A whole bunch of other minor optimizations.
Slightly better performance and compression.
}}
{{bq
動き見積もりの様々な最適化。
MV rangeをチェックする手法を高速化。
bidir qpel-RDに対しMVの予測とMV/MVDのキャッシュ。
その他小さな最適化を多数。
僅かに高速化・圧縮率向上。
}}
!x264r1495
{{bq
git-id : e73a769dec58d69860998706b4f99808e18a376d
Author : Jason Garrett-Glaser
Date: Sun Mar 14 00:19:59 2010 -0800
Overhaul macroblock_cache_rect
Unify the rectangle functions into a single one similar to ffmpeg's fill_rectangle.
Remove all cases of variable-size cache_rect calls; create a function-pointer-based system for handling such cases.
Should greatly decrease code size required for such calls.
}}
{{bq
macroblock_cache_rectのオーバーホール。
矩形(訳注:四角形のこと)関数群をffmpegのfill_rectangleと同様の一つの関数に統合。
可変サイズであるcache_rectの呼び出しケースを全て除去;そのようなケースの処理のために関数ポインタベースのシステムを作成。
そのような呼び出しに必要なコードサイズを劇的に減少するはず。
}}
common/rectangle.cとcommon/rectangle.hが追加。
!x264r1494
{{bq
git-id : 4f42c3c55ff802c5b212b75317e332ce00cc4a90
Author : Jason Garrett-Glaser
Date: Sun Mar 14 16:48:22 2010 -0700
Make a bunch of small functions ALWAYS_INLINE
Probably no real effect for now, but needed for the next patch.
}}
{{bq
小さい関数群をALWAYS_INLINEに。
恐らく今現在は現実的な効果はないが、次のパッチに必要。
}}
!x264r1493
{{bq
git-id : 6b585097ec92eb40e5785d8beee8b236781d5d86
Author : Loic Minier
Date: Wed Mar 10 05:26:46 2010 -0800
Two compatibility fixes
Add IA64 support in configure.
}}
{{bq
互換性の修正を2つ。
configureにIA64のサポートを追加。
}}
ビルドにのみ影響。
!x264r1492
{{bq
git-id : 49eb50c11ca281146cebea36c7a39d12fa589d51
Author : Henrik Gramner
Date: Fri Mar 5 03:19:47 2010 +0100
Faster x264_macroblock_encode_pskip
GCC is apparently unable to optimize out the calculation of a variable when it isn't used.
}}
{{bq
x264_macroblock_encode_pskipを高速化。
GCCはどうやら変数が使用されていない場合にその計算を最適化することができないようだ。
}}
ソースコードを確認したが、2行目の意味するところがよく分からなかった。
GCCが出力したアセンブリまでは確認していない。
!x264r1491
{{bq
git-id : 513e9b95e81054606d505a7da7734b20ad628ba9
Author : Jason Garrett-Glaser
Date: Sun Mar 7 04:10:30 2010 -0800
Much more accurate B-skip detection at 2 < subme < 7
Use the same method that x264 uses for P-skip detection.
This significantly improves quality (1-6%), but at a significant speed cost as well (5-20%).
It also may have a very positive visual effect in cases where the inaccurate skip detection resulted in slightly-off vectors in B-frames.
This could cause slight blurring or non-smooth motion in low-complexity frames at high quantizers.
Not all instances of this problem are solved: the only universal solution is non-locally-optimal mode decision, which x264 does not currently have.
subme >= 7 or <= 2 are unaffected.
}}
{{bq
2 < subme < 7においてより精密なB-skip検出。
x264がP-skipの検出に使用するのと同様の手法を使用。
画質を有意に(1-6%)向上、ただし同様に優位な速度コスト(5-20%)による。
またこれは、Bフレームにおける精密でないスキップ検出が僅かに外れたベクタを生じていたケースで、大変プラスの視覚効果を生む。
高quantizerにおける低複雑度のフレームにおいて、僅かにボケたりスムーズでない動きを引き起こすかも知れない。
この問題のすべての例は解決されていない:唯一の普遍的な解決方法は、x264が現在持っていない、non-locally-optimal(非局所的最適)モード決定である。
subme >= 7または<= 2は影響を受けない。
}}
「non-locally-optimal(非局所的最適)モード決定」は、ストレートに言い換えれば「大域的モード決定」という意味になる。
つまり周りのMB(時間軸でも空間軸でも)との相関的な影響を考えてのモード決定、ということだろう。
と書いていたら、[x264の2010年のGoogle Summer of Code|http://wiki.videolan.org/SoC_x264_2010#Non-local_RD_optimization]にNon-local RD optimizationという項目があった。
ここでは主に「現在のMBへの決定が将来に及ぼす影響を考える場合の最適化」、つまり時間軸の意味で語られているようだ。
!x264r1490
{{bq
git-id : ec39f7b4566e768c7bad3023c00f9d130efae5bc
Author : Alexander Strange
Date: Sun Mar 7 02:57:04 2010 -0500
Reformat profile restrictions in --fullhelp.
Put "no interlaced", "no lossless" on their own line to avoid them
running into the default options list.
}}
{{bq
--fullhelpにおけるプロファイル制約を再整形。
"no interlaced", "no lossless"がデフォルトオプションリストに出るのを避けるためこれらをその各ラインに配置。
}}
ヘルプの表示にのみ影響。
"no interlaced"や"no lossless"はオプションそのものではないので改行して表示したということだろう。
!x264r1489
{{bq
git-id : 632af6683de604141c636d659a2d229b61ba5ecb
Author : James Darnley
Date: Sat Mar 6 18:28:07 2010 -0800
Fix typo in configure
}}
{{bq
configureのタイポ(誤植)を修正。
}}
FFMS2関連。
!x264r1488
{{bq
git-id : ea93d786162b7cd77a3254cf48dba356be74cf76
Author : David Conrad
Date: Sat Mar 6 10:29:57 2010 -0800
Add support for spaces to iPhone GAS preprocessor script
}}
{{bq
iPhone GASプリプロセッサスクリプトにスペースのサポートを追加。
}}
GASプリプロセッサスクリプトとはr1439のPerlスクリプト。
!x264r1487
{{bq
git-id : d84a1a95f4db132a374d550c98fa85e00075e7a8
Author : Yusuke Nakamura
Date: Sat Mar 6 19:25:30 2010 +0900
Fix slightly wrong mp4 duration.
}}
{{bq
僅かに誤っていたmp4のdurationを修正。
}}
!x264r1486
{{bq
git-id : d0c898a7a737c9a87cefc14b21bc6cfd44cc6b16
Author : Yusuke Nakamura
Date: Sat Mar 6 19:24:32 2010 +0900
Fix link errors with newest gpac cvs
gpac decided to randomly break API and require us to use their own custom malloc and free.
}}
{{bq
最新のgpacのcvsとのリンクエラーを修正。
gpacは勝手にAPIを破壊し、我々に彼ら独自のmallocとfreeを使うよう要求することを決めた。
}}
ビルドにのみ影響。
!x264r1485
{{bq
git-id : db2bae305ef658d053c7c174703c4631a2534b1a
Author : Kieran Kunhya
Date: Fri Mar 5 20:43:02 2010 +0000
Save a few bits in slice headers
Don't override the maximum ref index in the slice header if it's the same as the default.
Also update the naming of the relevant variables in the PPS.
}}
{{bq
スライスヘッダで数ビットを節約。
最大参照インデックスがデフォルトと同じならば、スライスヘッダ内でこれをオーバーライドしない。
また、PPS内の関連する変数の名前を更新。
}}
!x264r1484
{{bq
git-id : e19bef27581dcba813a20d37005ccdf4c285be69
Author : Jason Garrett-Glaser
Date: Thu Mar 4 09:59:09 2010 -0800
Shrink some arrays in x264_t
Also remove an unnecessary assignment from cache_load.
}}
{{bq
x264_t内のいくつかの配列を縮小。
また、cache_loadから不要な代入を削除。
}}
!x264r1483
{{bq
git-id : f36b1e49b3c4cd992080c13ff346f4846f8541b8
Author : Jason Garrett-Glaser
Date: Wed Mar 3 11:22:29 2010 -0800
Use x264_log in more places instead of fprintf
}}
{{bq
fprintfの代わりにx264_logをより多くの箇所で使用。
}}
出力データに影響なし。
!x264r1482
{{bq
git-id : 6951964c87029b4786ccbd558dfa4d3c5be353ae
Author : Anton Mitrofanov
Date: Wed Mar 3 10:14:20 2010 -0800
Fix two nondeterminisms
Move noise reduction data into thread-specific data.
Use correct reference list for L1 temporal predictors.
}}
{{bq
非決定性を2つ修正。
ノイズリダクションデータをスレッド固有のデータに移動。
L1のtemporal(時間軸)予測器に正しい参照リストを使用。
}}
以前にも書いたけれど、決定性とは、再現性とも言い換えられる。
何回エンコードを行っても同じ出力が再現されるように修正したということ。
!x264r1481
{{bq
git-id : 81eee062a4ce9aae1eceb3befcae855c25e5ec52
Author : Jason Garrett-Glaser
Date: Fri Mar 19 14:44:10 2010 -0700
"CRF-max" support with VBV
This is a rather curious feature that may have more use than is initially obvious.
In CRF mode with VBV enabled, CRF-max allows the user to specify a quality level which the encoder will never go below, even due to the effects of VBV.
This is not the same as qpmax, which is not aware of issues like scene complexity.
Setting this WILL cause VBV underflows in any situation where the encoder would have needed to exceed the relevant CRF to avoid underflow.
Why might one want to do this even if it would cause VBV underflows?
In the case of streaming, particularly ultra-low-latency streaming, it may be preferable to drop frames than to display frames that are of too low a quality.
Thus, in extremely complex scenes, rather than display completely awful video, the streaming server could simply drop to a lower framerate.
Scenecuts, which normally look terrible under situations like single-frame VBV, could be handled by just displaying them a bit later and dropping frames to compensate.
In other words, it's better to see the scenecut 150ms delayed than for it to look like a blocky mess for 150ms.
On the caller-side, this would be handled by detecting the output size of x264's frames and dropping future frames to compensate if necessary.
This can also be used in normal encoding simply to ensure that VBV does not hurt quality too much (at the cost of potentially causing underflows).
This can help quite a lot when using single-frame VBV and sliced threads, where VBV can often be somewhat unstable.
}}
{{bq
VBVで"CRF-max"をサポート。
これは一見するよりも使い勝手のあるかもしれない、やや面白い機能だ。
CRF-maxは、VBVが有効なCRFモードにおいて、VBVの作用によってさえエンコーダがそれ以下にはしない品質レベルをユーザが指定することを可能にする。
これはシーンの複雑性のような課題を意識しないqpmaxとは異なる。
これを設定することは、エンコーダがアンダーフローを避けるために対応するCRFを超えねばならない任意の状況において、VBVアンダーフローを引き起こしうる。
なぜ、VBVアンダーフローを引き起こしてでもこれを行いたいか?
ストリーミング、特に超低レイテンシ(超低遅延)ストリーミングの場合、あまりに低画質なフレームを表示するよりも、フレームをドロップする方が好ましいことがありうる。
そのため、極度に複雑なシーンにおいては、ストリーミングサーバは全くひどい映像を表示するよりも、単に低フレームレートにドロップをしうる。
単一フレームVBVのような状況下では通常厳しい見た目であるシーンカットは、若干遅れて表示し、その分フレームをドロップするように処理されることが可能。
言い換えれば、scenecutが、150msの間ブロック状のゴミのように見えているよりも、150ms遅延したように見えるほうがよい。
呼び出し側では、x264のフレームの出力サイズを検出し、必要であれば将来のフレームをドロップすることで、これは取り扱われる。
これは通常のエンコード時にも、単に(潜在的にアンダーフローを引き起こすというコストの元で)VBVが画質をあまりに害することがないことを確かにするために使うことができる。
これはVBVがしばしば不安定になるsliced threadsと単一フレームVBVを使用する際にも大変有用である。
}}
X264_BUILD 90。
--crf-maxが追加。要は、MPEG-4の特徴として当初謳われていた、フレームの画質と引き換えにフレームレートを落とすVFRを適応的に利用できるという話。
個人的には全く興味が湧かない。ストリーミングに使うにしても、x264cliではそのまま使えない。
libx264を使うようなアプリケーションを書いて、適切な処置を入れ、動的にVFR出力にする必要がある。
!x264r1480
{{bq
git-id : c6de86497cdd7b7f3cce7d8a95d723c7d0c9f505
Author : Kieran Kunhya
Date: Tue Mar 2 00:57:10 2010 -0800
Blu-ray support: NAL-HRD, VFR ratecontrol, filler, pulldown
x264 can now generate Blu-ray-compliant streams for authoring Blu-ray Discs!
Compliance tested using Sony BD-ROM Verifier 1.21.
Thanks to The Criterion Collection for sponsoring compliance testing!
An example command, using constant quality mode, for 1080p24 content:
x264 --crf 16 --preset veryslow --tune film --weightp 0 --bframes 3 --nal-hrd vbr --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 24 --b-pyramid strict --slices 4 --aud --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 -o
This command is much more complicated than usual due to the very complicated restrictions the Blu-ray spec has.
Most options after "tune" are required by the spec.
--weightp 0 is not, but there are known bugged Blu-ray player chipsets (Mediatek, notably) that will decode video with --weightp 1 or 2 incorrectly.
Furthermore, note the Blu-ray spec has very strict limitations on allowed resolution/fps combinations.
Examples include 1080p @ 24000/1001fps (NTSC FILM) and 720p @ 60000/1001fps.
Detailed features introduced in this patch:
Full NAL-HRD compliance, with both VBR (no filler) and CBR (filler) modes.
Can be enabled with --nal-hrd vbr/cbr.
libx264 now returns HRD timing information to the caller in the form of an x264_hrd_t.
x264cli doesn't currently use it, but this information is critical for compliant TS muxing.
Full VFR ratecontrol support: VBV, 1-pass ABR, and 2-pass modes.
This means that, even without knowing the average framerate, x264 can achieve a correct bitrate in target bitrate modes.
Note that this changes the statsfile format; first pass encodes make before this patch will have to be re-run.
Pulldown support: libx264 allows the calling application to specify a pulldown mode for each frame.
This is similar to the way that RFFs (Repeat Field Flags) work in MPEG-2.
Note that libx264 does not modify timestamps: it assumes the calling application has set timestamps correctly for pulldown!
x264cli contains an example implementation of caller-side pulldown code.
Pic_struct support: necessary for pulldown and allows interlaced signalling.
Also signal TFF vs BFF with delta_poc_bottom: should significantly improve interlaced compression.
--tff and --bff should be preferred to the old --interlaced in order to tell x264 what field order to use.
Huge thanks to Alex Giladi and Lamont Alston for their work on code that eventually became part of this patch.
}}
{{bq
Blu-rayのサポート:NAL-HRD, VFRのレートコントロール, filler, pulldown
x264はBlu-rayディスクのオーサリングのためにBlu-ray規格に適合するストリームを生成できるようになった!
規格適合性はSony BD-ROM Verifier 1.21を使用してテストされた。
規格適合性テストのスポンサーとしてCriterion Collectionに感謝する!
1080p24のコンテンツに対して固定品質モードを使用するコマンド例:
x264 --crf 16 --preset veryslow --tune film --weightp 0 --bframes 3 --nal-hrd vbr --vbv-maxrate 40000 --vbv-bufsize 30000 --level 4.1 --keyint 24 --b-pyramid strict --slices 4 --aud --colorprim "bt709" --transfer "bt709" --colormatrix "bt709" --sar 1:1 -o