トップ 検索 一覧 差分 ソース ヘルプ RSS ログイン

x264-changelog-jp r1200-r1299

このページの全ては誤っているかもしれません。x264関連の記事に関してを読んでください。

x264-changelog-jp r1200-r1299

r1200-r1299のchangelogの日本語訳。その他のリビジョンと注意事項についてはx264-changelog-jpへどうぞ。

前:x264-changelog-jp r1100-r1199 - 次:x264-changelog-jp r1300-r1399

x264r1299

git-id : 2eb0458ed6302e082ffe206d325d03d6c75d6d47

Author : Jason Garrett-Glaser

Date: Sat Oct 17 03:04:56 2009 -0700

Improve CRF initial QP selection, fix get_qscale bug

If qcomp=1 (as in mb-tree), we don't need ABR_INIT_QP.

get_qscale could give slightly weird results with still images

CRFの初期QP選択を改善、get_qscaleのバグを修正。

qcomp=1(mb-tree等で)の場合に、AVR_INIT_QPは必要ではない。

get_qscaleは静止画(訳注:静止画状態の動画ということだろう)で変な結果を出していたかもしれない。

x264r1298

git-id : 513abc7b0584b5ea6dcea4ebd731824ef74ef1a1

Author : Jason Garrett-Glaser

Date: Wed Oct 14 11:32:27 2009 -0700

Print more accurate error message if dump_yuv fails

dump_yuvが失敗した際により正しいメッセージを出力。

x264r1297

git-id : cdf623f285073c084631263fd95a753bf25be3bd

Author : Steven Walters

Date: Tue Oct 13 09:56:04 2009 -0700

Reduce memory usage of b-adapt 2 trellis

Also fix a minor bug where the algorithm ignored the last frame in the trellis.

b-adapt 2 trellisのメモリ使用量を削減。

また、trellis内でアルゴリズムが最終フレームを無視する小さなバグを修正。

x264r1296

git-id : e2659dbdc0aed2d2cd4f6538faddf370e7740ada

Author : Lamont Alston

Date: Mon Oct 12 23:32:16 2009 -0700

Make B-pyramid spec-compliant

The rules of the specification with regard to picture buffering for pyramid coding are widely ignored.

x264's b-pyramid implementation, despite being practically identical to that proposed by the original paper, was technically not compliant.

Now it is.

Two modes are now available:

1) strict b-pyramid, while worse for compression, follows the rule mandated by Blu-ray (no P-frames can reference B-frames)

2) normal b-pyramid, which is like the old mode except fully compliant.

This patch also adds MMCO support (necessary for compliant pyramid in some cases).

MB-tree still doesn't support b-pyramid (but will soon).

B-pyramidを規格に適合するようにした。

pyramid符号化に対するピクチャのバッファリングに関しての仕様の規定が広範に無視されていた。

x264のb-pyramidの実装は、オリジナルの文書(訳注:H.264規格の草案のこと)で提案されていたものと実質的に同一であったが、厳密には規格に適合していなかった。

それが適合するようになった。

2つのモードが選択可能:

1)厳密なb-pyramid、圧縮率は悪化するが、Blu-rayで必須の規定(PフレームはBフレームを参照しない)に従う。

2)通常のb-pyramid、規格に適合することを除けば従来のモードに近いもの。

また、このパッチはMMCO(いくつかのケースで規格に適合するpyramidに必要)のサポートを追加する。

MB-treeはまだb-pyramidをサポートしない(が、間もなくするだろう)。

X264_BUILD 78。

b-pyramidにnone, strict, normalのいずれかのパラメータが必須になった。libx264に直接与える場合はnone=0, strict=1, normal=2。

MMCO(Memory Management Control Operation)はスライスヘッダに追加するフラグのことで、デコード時にDPB(Decoded Picture Buffer)内でピクチャをどう扱うべきか(被参照の有無やバッファからの削除)を判断する機能を持っている。

H.264の規格書では7.4.3 Slice header semanticsの7.4.3.3 Decoded reference picture marking semanticsあたりで規定されており、P/Bというスライスタイプではなく、short/long term reference pictureという表現がされている。あくまでメモリ管理の視点で書かれていることが良く分かる。

このchangelogの書き方からは、H.264規格ではPがBを参照するのはOKだが、Blu-rayでは不可というように読める。しかし、PがBを参照するというのは何か違和感を感じる…。某巨大掲示板によればstrictがBlu-rayで必須と言うよりも、normalではBlu-rayに適さないという事らしい。が、実質的にstrictはBlu-ray用のpyramidと思ってよいだろう。

x264r1295

git-id : b826fd5475a5e883f85e26cbf9d2c0acf5efcbd6

Author : Jason Garrett-Glaser

Date: Mon Oct 12 23:28:26 2009 -0700

Add missing free for nal_buffer

Fixes a memory leak.

nal_bufferに欠けていたfreeを追加。

メモリリークを修正。

x264r1294

git-id : 813fe72062362a9ee7733fa160e14f5c27ae5fef

Author : Loren Merritt

Date: Sun Oct 18 21:47:18 2009 +0000

sync yasm macros to ffmpeg

yasmのマクロをffmpegと同期。

x264r1293

git-id : 7ae3ed992b70d1f8e806b6eece0b8fc88f8c3fab

Author : Loren Merritt

Date: Sat Oct 17 14:54:49 2009 +0000

eliminate some divisions

いくつかの除算を除去。

高速化の基本中の基本である、除算(割り算)の除去。

オペランド(計算対象:メモリやレジスタ)の種類や実行ユニットなどの諸条件で異なるが、殆どのCPUでは加減算(足し算・引き算)を最短1クロックで実行できる。これに対して乗算(掛け算)は重く、数クロック〜数十クロック程度かかる場合が多い。そして除算はさらに重く、数十〜数百クロックになることもある。単純な実行クロック数以外にも、実行ユニットの制限や必要なレジスタ数など根拠を挙げれば色々あるが、兎に角、除算1つは小さなサブルーチン1つに相当するほど速度的にクリティカルだ。

このため、プログラマは様々な手段で除算を避ける。除数(割る数)がリテラル数値である場合、シフト演算への置き換え(除数が2の累乗の場合)、乗算への置き換え(浮動小数点の場合)などがメジャーだ。今回は1度計算した結果のキャッシュによって再計算を回避して、除算回数を減らしている。ただし、今回の変更箇所は速度的にクリティカルな部分ではないので、それほどの高速化は望めない。なお、C言語の表記上では、減らされているのは除算そのものではなく剰余算(割り算の余りを求める計算)だが、x86の機械語レベルでは除算と剰余算はセットで行われる。

蛇足だが、ハードウェア的にも時々工夫はされている。例えば、i486までの除算はベタに計算していたが、Pentium以降ではあらかじめ計算してある表(テーブル)を引く方式により高速化を図った。しかし初代Pentiumではこの表にミスがあり(有名なFDIVバグ)、当時はリコール騒ぎにまでなった。その後PenrynではSuper Shuffle Engine等と共にRadix-16 Dividerが導入された。Radix-16は4bit分を一度に計算できるもので、Pentiumの方式は2bit分を一度に計算できる方式(Radix-4に相当)だ。つまり、Penrynの前後で約2倍の高速化が行われていると言える。

x264r1292

git-id : e381f6d0093504a545fe4d90e3a6f178c6877cc7

Author : Jason Garrett-Glaser

Date: Mon Oct 12 18:40:28 2009 -0700

Fix glitches with slow-firstpass + weightb + multiref + 2pass

Bug in r1277

slow-firstpass + weightb + 複数ref + 2passでの誤動作を修正。

r1277のバグ。

x264r1291

git-id : 9045fbed2d696e04d402fc8b545d761ec6c41d34

Author : Henrik Gramner

Date: Mon Oct 12 15:44:13 2009 -0700

Simplify some code in b-adapt 2's trellis

b-adapt 2のtrellisのコードを少々シンプル化。

x264r1290

git-id : b47aca5ed2797b8b46a0bd83d58ffdb60dffc1ef

Author : Jason Garrett-Glaser

Date: Mon Oct 12 15:38:51 2009 -0700

Fix a very rare integer overflow in slicetype analysis

Caused an assert failure when it occurred.

Bug is as old as adaptive B-frames.

スライスタイプ解析の非常にまれな整数のオーバーフローを修正。

発生時にはアサートの失敗を引き起こしていた。

バグは適応的Bフレーム(訳注:b-adapt)と同じだけ古い。

x264r1289

git-id : 2ceb2cc6e6753328d959e42823b2e6059ed007a7

Author : Jason Garrett-Glaser

Date: Mon Oct 12 13:14:19 2009 -0700

Reduce the aggressiveness of 2-pass VBV

Now that B-frames are properly covered, we don't have to be as aggressive.

This eliminates some issues with skyrocketing QPs in B-frames in 2-pass VBV.

2-pass VBVの積極性を低減。

Bフレームが相応にカバーされたので、積極的である必要がない。

これは2-pass VBVでBフレームのQPが鰻登りになる問題をいくらか除去する。

x264r1288

git-id : a65d36142b765516dd80a6bed5bff7444b24f4aa

Author : Jason Garrett-Glaser

Date: Mon Oct 12 11:29:23 2009 -0700

Fix regression: disable flash detection without B-frames

レグレッション修正:Bフレームなしの場合フラッシュの検出を無効に。

regressionの直訳は「退行・退化」。開発用語として、元々正常に動作していたものがしなくなってしまったことを指す。エンバグと似た用語だが、エンバグしたことによってレグレッションが発生するので原因と結果の関係になる。風邪を引いたので頭が痛い、のような。

x264r1287

git-id : 287641a7c54d525e0eb74925431541ffb5f9471d

Author : Loren Merritt

Date: Sat Oct 10 04:43:00 2009 +0000

change all dct arrays to 1d.

the C standard doesn't allow you to iterate 1-dimensionally over 2d arrays, and nothing other than the dsp functions themselves cares about the 2dness of dct.

this fixes a miscompilation in x264_mb_optimize_chroma_dc.

全てのdct配列を1次元に変更。

標準Cは2次元配列を1次元的にイテレートすることを許可しておらず、dctの2次元性を気にするのはdsp関数それ自体でしかない。

これはx264_mb_optimize_chroma_dcのコンパイルミスを修正する。

標準CとはC言語の規格のこと。この仕様は筆者も知らなかったが、確かに2次元配列を1次元的にアクセスするのがよいこととは思えない。実装によって、2次元配列のサイズ次第では構造体のようにパディングを入れられるよう、規格がこのように取り決めているのではないかと思う。

イテレート(iterate)は直訳では「反復する」という意味。若干不正確になるが、コンピュータ用語としては「走査する」と解釈するとわかりやすい。

x264r1286

git-id : bcc9a4b2e520263b0ba85b61dd7dde78b35160e8

Author : Jason Garrett-Glaser

Date: Sun Oct 11 20:17:50 2009 -0700

Add row-based VBV for B-frames

While B-frames still aren't explicitly covered by ratecontrol, this should resolve issues of VBV underflows due to larger-than-expected B-frames.

Bフレームに対してrowベースのVBVを追加。

Bフレームは未だ明示的にレートコントロールにカバーされていないが、これは想定されるよりも大きなBフレームに起因するVBVのアンダーフローの問題を解決するだろう。

ここでのrowは「行」を意味していると思う、多分…。正直、訳に困るのでもうrowという用語を使用しないでほしい。

x264r1285

git-id : 7182ae8d08acef6153cad9b9c27efb4fa985a657

Author : Jason Garrett-Glaser

Date: Sat Oct 10 17:35:03 2009 -0700

Improve VBV, fix bug in 2-pass VBV introduced in MB-tree

Bug caused AQ'd row/frame costs to not be calculated (and thus caused underflows).

Also make VBV more aggressive with more threads in 2-pass mode.

Finally, --ratetol now affects VBV aggressiveness (higher is less aggressive).

VBVを改善、MB-treeで持ち込まれた2-pass VBVのバグを修正。

バグはAQの適用された行/フレームのコストを計算されなくして(そしてその為にアンダーフローを引き起こして)いた。

また、2-passモードに於いてより多いスレッドではVBVをより積極的にした。

ついに、--ratetolはVBVの積極性に影響する(高いほど非積極的)ように。

ここでのrowは「行」を意味していると思う、多分…。

x264r1284

git-id : 60c630c01dd4cb125a2bcc08da88873ce3a41dbc

Author : Anton Mitrofanov

Date: Thu Oct 8 14:55:26 2009 -0700

Optimize exp2fix8

Slightly faster and more accurate rounding.

exp2fixを最適化。

僅かに速く、より精密な丸め処理。

x264r1283

git-id : e8b83b788ffe9af4b48b049450c387069fda1266

Author : Jason Garrett-Glaser

Date: Thu Oct 8 04:27:11 2009 -0700

Avoid scenecuts in flashes and similar situations

"Flashes" are defined as any scene which lasts a very short period before a previous scene returns.

A common example of this is of course a camera flash.

Accordingly, look ahead during scenecut analysis and rule out the possibility of certain frames being scenecuts.

Also handles cases of tons of short scenes in sequence and avoids making those scenecuts as well.

Can only catch flashes of 1 frame in length with b-adapt 1.

With b-adapt 2, can catch flashes of length --bframes.

Speed cost should be negligible.

フラッシュやそれと似たシチュエーションのscenecutを回避。

「フラッシュ」とは以前のシーンが復帰する前の非常に短い時間存続するようなシーンのこと。

これの一般的な例はもちろんカメラのフラッシュである。

従って、シーンカット解析中の先読みを行い、特定のフレームがシーンカットされる可能性を排除。

また、順々に大量の短いシーンを処理し、それらをシーンカットにすることを回避。

b-adapt 1では長さが1フレームのフラッシュのみを捕捉可能。

b-adapt 2では--bframesの長さのフラッシュを捕捉可能。

速度の代償はごく僅か。

ビットレートに余裕があれば、カットバック・フラッシュバックをシーンカットにしたい場面もあるような気がするが…。カメラのフラッシュに関しては、シーンカットにしないのであればweightp/bが欲しいところ。

x264r1282

git-id : fc4926a2d9a4e355ea6a24c962731f5f8c6bd83a

Author : Jason Garrett-Glaser

Date: Tue Oct 6 22:15:10 2009 -0700

Fix bug where x264 generated non-compliant bitstreams with insane SAR values

x264がSAR値の狂った非コンプライアントな(規格に適合しない)ビットストリームを生成するバグを修正。

x264r1281

git-id : 383621879573013bf5f85ce8d6eeefb18d9625c0

Author : Loren Merritt

Date: Wed Sep 30 22:39:13 2009 +0000

rm msvc project files and related ifdefs

msvcのプロジェクトファイルと関連するifdefを削除。

コスメティックス(コードの整理)でバイナリに影響しない。

x264r1280

git-id : 5cda2cf81a75bfd70a5529d3b6fb01b0a7897a5e

Author : Holger Lubitz

Date: Tue Oct 6 15:17:34 2009 -0700

SSE4 version of 4x4 idct

27->24 clocks on Nehalem.

This is really just an excuse to use "movsd" in a real function.

Add some comments to subsum-related macros in x86util.

4x4 idctのSSE4バージョン。

Nehalemで27→24クロック。

これは実は、"movsd"を実関数で使用する言い訳でしかないが。

いくつかのコメントをx86util中のsubsum関連のマクロに追加。

つまり、「やってみたかった」的なアセンブラコード。

x264r1279

git-id : d971ace393dc49b09b930aa22e8b0c70f8a6f386

Author : Jason Garrett-Glaser

Date: Sun Oct 4 19:15:28 2009 -0700

Constrained intra prediction support

Enable with --constrained-intra. Significantly reduces compression, but required for the base layer of SVC encodes and maybe some other use-cases.

Commit sponsored by a media streaming company that wishes to remain anonymous.

Constrained(制約された)イントラ予測のサポート。

--constrained-intraで有効。顕著に圧縮率を悪化させるが、SVCエンコーダのベースレイヤー、そして恐らくその他幾つかのユースケースで要求される。

コミットは匿名希望のメディアストリーミング会社によるスポンサード(提供)。

X264_BUILD 77。

若干バグがあるように見えなくもないのだが…果たして。それとも元のコードがバグなのだろうか。

x264r1278

git-id : a88f2d78533af5ff38c01054cf336bdd7f2cf27c

Author : Jason Garrett-Glaser

Date: Sun Oct 4 00:48:27 2009 -0700

Slightly improve non-RD p8x8 mode decision

Subpartition costs are effectively zero in CABAC if sub-8x8 search is off.

非RDのp8x8のモード決定を僅かに改善。

sub-8x8の検索がオフの場合にサブパーティションコストはCABACで事実上ゼロに。

x264r1277

git-id : c318d8fa1e83b8807b66d45b225c905f480703ce

Author : Jason Garrett-Glaser

Date: Sat Oct 3 00:59:02 2009 -0700

Reorder reference frames optimally on second pass

About +0.1-0.2% compression at normal bitrates, up to +1% at very low bitrates.

Only works if the first pass uses the same number of refs as the second (i.e. not with fast first pass).

Thus, only worthwhile at insanely slow speeds: as such, enable slow-firstpass by default with preset placebo.

Note that this changes the stats file format!

2nd-passで参照フレームを最適に再整列。

通常のビットレートで+0.1〜0.2%の圧縮、とても低いビットレートで最大+1%。

1st-passが2ndと同じ数のrefを使う場合にのみ働く(つまり高速な1st-passでは働かない)。

従って、とてつもなく遅い速度でのみ価値がある:そういうものだから、placeboプリセットのデフォルトでslow-firstpassを有効に。

これはstatsファイルのフォーマットを変更することに注意。

x264r1276

git-id : 4f3ad6a28e1ac017103a77d135a48aaad114d262

Author : Jason Garrett-Glaser

Date: Wed Sep 30 12:13:16 2009 -0700

Fix typo in ratecontrol_summary

ratecontrol_summaryのタイポ(誤植)を修正。

タイポと言っても計算中のリテラル数値のミスであり、mbtreeとqcompressのバランスに関わるので出力は変わるはず。

x264r1275

git-id : 8be3935a8cef95fe94e0b054f3b6cb904a1f363a

Author : Jason Garrett-Glaser

Date: Tue Sep 29 23:32:07 2009 -0700

Clip log2_max_frame_num

It's still much higher than it needs to be, but that will be fixed with the upcoming MMCO patch.

Also make sure we don't write too large a frame_num or poc in slice header.

log2_max_frame_numをクリップ。

あるべき値よりまだ随分高いが、それは来るMMCOパッチで修正されるだろう。

また、スライスヘッダに大きすぎるframe_numやpocを書き込まないようにした。

x264r1274

git-id : 83ca0f2cec3909b38d55e664bcd3f5c4b1546de8

Author : Anton Mitrofanov

Date: Sat Sep 26 12:44:53 2009 -0700

Fix some issues with 3-pass statsfile handling

The value of i_frame during encoder_close was incorrect.

3-passでのstatsファイルの取り扱いの問題を幾つか修正。

encoder_closeの間のi_frameの値が不正だった。

x264r1273

git-id : a4334d41ea61b70fcff308ba988193309bb5608a

Author : Anton Mitrofanov

Date: Sat Sep 26 12:42:46 2009 -0700

Fix ctrl-C termation message with few frames encoded

数フレームがエンコードされた状態でのCtrl-Cによる終了メッセージを修正。

termationはterminationなのだろう。最近changelogのコメントは粗いような気がするが気のせいだろうか。

x264r1272

git-id : db518eae22e57b37c806625685faba2f2a857f88

Author : Jason Garrett-Glaser

Date: Fri Sep 25 16:23:52 2009 -0700

Add support for single-frame VBV, improve compliance

This allows both constant-framesize and capped-framesize encoding.

Literal constant framesize isn't actually supported yet due to the lack of

filler support.

Example with 30fps video: --vbv-bufsize 200 --vbv-maxrate 6000 will ensure that

no frame is ever larger than 200 kilobits.

One example use-case of this is for zero-delay streaming where bandwidth costs

need to be minimized. If every frame is smaller than 200 kilobits and the

client has a 6 megabit connection, every single frame can be instantly sent

to the client and handled without any decoder-side buffer.

Fix a mistake in VBV calculation--this may have caused the VBV to be slightly

non-compliant in some situations without x264 realizing it.

Add primitive prediction handling for rows with quantizers lower than their

reference. This slightly improves VBV in CBR mode.

Various other minor improvements to VBV, mostly to make single-frame VBV work.

Commit sponsored by a media streaming company that wishes to remain anonymous.

単一フレームのVBVのサポートを追加、規格適合性向上。

これはconstantフレームサイズまたはcappedフレームサイズでのエンコーディングを可能にする。

fillerのサポートが欠けているため、リテラルなconstフレームサイズは実際にはまだサポートされていない。

30fpsビデオでの例:--vbv-bufsize 200 --vbv-maxrate 6000はいかなるフレームも200キロビットを超えないことを保証する。

これの想定用途の一例は、帯域コストの最小化が要求される、ゼロ遅延(ディレイ)ストリーミングである。すべてのフレームが200キロビットより小さく、クライアントが6メガビットの接続を有していれば、各フレームは即座にクライアントへ送信、そしてデコーダ側のバッファなしで取り扱うことが可能である。

VBV計算のミスを修正--これは、x264が認識しなかった幾つかの状況で、VBVが僅かに規格に適合しない状況を引き起こしていた可能性がある。

参照よりも量子化値が低い行に対する原始的な予測処理を追加。これはCBRモードでのVBVを僅かに改善する。

その他VBVに対する様々な小さい改善。殆どは単一フレームVBVを機能させるためのもの。

コミットは匿名希望のメディアストリーミング会社によるスポンサード(提供)。

若干用語のレベルが高いので以下にまとめて訳注する。

  • constantフレームサイズ:(指定方法として)固定フレームサイズ
  • cappedフレームサイズ:(指定方法として)最大フレームサイズ
  • リテラル:コンピュータ用語のリテラルというより「文字通りの」という意味と思われる
  • filler:いわゆるパディング
  • 参照よりも低い量子化値の行:inter MBで被参照MBよりQPが低く恐らく非効率的であるMBの行
  • スポンサード(提供):produceではないので間接的(恐らく金銭的)な支援と思われる

以前にも書いたが、rowsの意味するところが何であるかは判断が難しい。「データ構造上の、または幾何学的・行列論的な、あるいはもっと一般的な観念としての(または列)」なのか、「エンコード上の価値観をぶつけ合わせて考慮する処理部分」(辞書に忠実な意味では「激しい議論」)なのか、いつも迷う。大意は変わらないものの、恐らく後者は英語的にも訳的にも一般的ではないと思うので、殆どの場合は「行」なのだろうが。

x264r1271

git-id : 496d79dfcb90066f0254e07d593471f2c885a153

Author : Jason Garrett-Glaser

Date: Thu Sep 24 08:40:45 2009 -0700

Fix 10l in API change

frame_num was set to 1, not 0, for the first frame. This broke spec compliance.

Didn't actually seem to cause any problems though except for breaking decoding on Quicktime.

API変更の10Lを修正。

最初のフレームに対するframe_numが0でなく1に設定されていた。これは仕様のコンプライアンス(訳注:規格適合性)を破っていた。

Quicktimeでのデコードが壊れる事を除き、実質的には問題を起こさなかったようだが。

x264r1270

git-id : 2b4e823809617d605bc058acba681c37e14e0ed0

Author : Steven Walters

Date: Wed Sep 23 15:04:02 2009 -0700

Allow user-set FPS for inputs other than YUV

YUV以外の入力に対してFPSのユーザ設定を可能に。

x264r1269

git-id : e8b9dfe479a6a945d9cd91b4aae8a3cba06b9db9

Author : Anton Mitrofanov

Date: Wed Sep 23 12:31:53 2009 -0700

Improve threaded frame handling

Avoid unnecessary cond_wait

スレッドによるフレームの取り扱いを改善。

不要なcond_wait(条件待ち)を回避。

x264r1268

git-id : d5429261cc2a2205d225b0f0c0802d3b565eb7bd

Author : Jason Garrett-Glaser

Date: Tue Sep 22 17:30:19 2009 -0700

Attempt to detect miscompilation due to bug in gcc 4.2

I don't know if this bug still affects latest x264, but it can't hurt to try to detect it.

Accordingly refuse to open the encoder if detected.

Apparently VLC (on Windows) has been distributed for some time with a completely

broken x264 due to the use of a completely broken compiler (gcc 4.2). In

particular, the MV costs seem to be calculated incorrectly on win32 when linking

from an application compiled without -ffast-math to an application with

-ffast-math.

I am not entirely certain why this occurs, but the result is, unsurprisingly,

encoding quality that makes MPEG-2 look good, due to the motion search being

completely broken.

gcc 4.2のバグに起因するコンパイルミスの検出を試行。

このバグが最新のx264に影響するか私は知らないが、検出しようとすることに害はない。

検出された場合には適宜エンコーダのオープンを拒否する。

(Windows上の)VLCは時々、完全に壊れたコンパイラ(gcc 4.2)の使用に起因する、完全に壊れたx264と共に配布されているようだ。特に、-ffast-mathなしでコンパイルされたアプリケーションから-ffast-math付きのアプリケーションにリンクした場合、win32上ではMVコストが不正に計算されているように見える。

私はこれが何故発生するかを把握していないが、結果は、驚くにも値しないが、動き検索が完全に壊れているのだから、MPEG-2を作成する方がエンコードの質が良いように見える。

最近この手の外部的な関係の修正が多い。外部起因のバグレポートに辟易しているのだろうか。説明は長いがコードは短く、内容としてはmvコストの初期化後の値が正しいかを確認している。

x264r1267

git-id : c62060d242879d8271c22a486b286b91147d2ebf

Author : Steven Walters

Date: Tue Sep 22 12:14:23 2009 -0700

Really fix encoder_close crash this time

Not-entirely-fixed in r1253.

encoder_closeのクラッシュを今度こそ本当に修正。

r1253では完全に修正されていなかった。

x264r1266

git-id : d166e7f3f8f68a768cf60cb4512f9efe8623b5cb

Author : Jason Garrett-Glaser

Date: Sun Sep 20 21:58:08 2009 -0700

Check for 16x16 partitions masquerading as smaller ones

Saves a few bits when using qpel-RD.

より小さなパーティションであると偽装する16x16パーティションのチェック。

qpel-RD使用時にいくらかビットを節約する。

x264r1265

git-id : c49e14f21c7fd9f7b5d1a82f29cb3b6a1c8ecb70

Author : David Conrad

Date: Sun Sep 20 01:16:51 2009 -0700

Update config.guess/sub; add Snow Leopard support

config.guess/subを更新;Snow Leopardのサポートを追加。

ビルドにのみ影響。

x86を含む様々なアーキテクチャ・システム向けの設定が変更されているので注意。

x264r1264

git-id : d52d2db898fa4e7790964cd656a1da3a0c005881

Author : Jason Garrett-Glaser

Date: Sat Sep 19 09:50:59 2009 -0700

Fix integer overflow in 2-pass VBV

Bug caused slight undersizing in 2-pass mode in some cases.

2-pass VBVでのinteger(整数)オーバーフローを修正。

このバグは2-passモードの幾つかのケースで僅かにサイズ低下を引き起こしていた。

x264r1263

git-id : ca95d6198f5c21ff6904a842b52b893d0fee6aab

Author : Jason Garrett-Glaser

Date: Fri Sep 18 14:28:31 2009 -0700

Fix bug with various bizarre commandline combinations and mbtree

Second pass would have mbtree on even though the first pass didn't (and thus encoding would immediately fail).

変梃なコマンドラインの様々な組み合わせとmbtreeのバグを修正。

1パス目にmbtreeがOFFの場合でも2パス目はmbtreeがONになっていた(そのためエンコードが即座に失敗していた)。

x264r1262

git-id : 91f3e81cf9e030f860abdfe0e0c0a37c5e2a4ac2

Author : Jason Garrett-Glaser

Date: Thu Sep 17 13:02:02 2009 -0700

Add intra prediction modes to output stats

Also eliminate some NANs in stat output with intra-only encoding.

Marginal speedup: disable stat calculation if log level is below X264_LOG_INFO.

Various minor cosmetics.

intra予測モードを出力統計に追加。

intraのみのエンコーディングで統計出力中のNANを除去。

若干の高速化:ログレベルがX264_LOG_INFO未満の場合に統計の計算を無効化。

色々と小さなコスメティクス。

NANとはNot a Numberの略で、一般的には間のAが小文字のNaNと書かれることが多い。「数値ではないもの」という意味で、もう少し踏み込むと「計算できない値」という意味だが、ここでは無効値と訳した。

具体的なNaNになる計算は各処理系(ハード・ソフト共に)の定義に依存するが、負数の平方根(虚数)や対数計算のオペランドに0を取った場合(累乗して0になる値は存在しない・あらゆる数の0乗は1になる)、arcsin・arccosに1より大きな(または-1より小さな)値を与えた場合などが該当する。比較的高級なプログラミング言語ではInfinity(無限大)等と共に使用されることのある概念だが、一般には無効値と言ったほうが分かりよいだろう。

x264r1261

git-id : c91a3c98a72492a5e167cb6c98c1807fde76c528

Author : Jason Garrett-Glaser

Date: Wed Sep 16 21:34:48 2009 -0700

Overhaul syntax in muxers.c/matroska.c

The inconsistent syntax in these files has finally come to an end.

muxers.c/matroska.cのシンタックスをオーバーホール。

これらのファイル中の矛盾するシンタックスがやっと終焉を迎えた。

ここで言うシンタックスとは、いわゆるコーディング規約の模様。つまりソースコードの書き方を統一したというだけであり、全コードを綿密に確認したわけではないが、実際の出力に影響はなさそう。

x264r1260

git-id : 031e25d8cc909af2d138f9fedc8252961f34a6ac

Author : Jason Garrett-Glaser

Date: Wed Sep 16 20:00:00 2009 -0700

Major API change: encapsulate NALs within libx264

libx264 now returns NAL units instead of raw data. x264_nal_encode is no longer a public function.

See x264.h for full documentation of changes.

New parameter: b_annexb, on by default. If disabled, startcodes are replaced by sizes as in mp4.

x264's VBV now works on a NAL level, taking into account escape codes.

VBV will also take into account the bit cost of SPS/PPS, but only if b_repeat_headers is set.

Add an overhead tracking system to VBV to better predict the constant overhead of frames (headers, NALU overhead, etc).

APIの大変更:NALをlibx264内にカプセル化。

libx264はraw(生)データではなくNAL unitsを返すように。x264_nal_encodeは公開関数ではなくなった。

変更の全ドキュメントはx264.hを見よ。

新パラメータ:b_annexb、デフォルトでon。無効時はスタートコードがmp4内のサイズと置き換えられる。

x264のVBVはエスケープコードを考慮し、NALレベルで動作するように。

またVBVはSPS/PPSのビットコストを考慮するが、b_repeat_headersが設定されている場合に限る。

フレーム(ヘッダ、NALUオーバーヘッド、その他)の固定的なオーバーヘッドをより良く予測するため、オーバーヘッドの追跡システムをVBVに追加。

VOL ではなくNALレベルでの出力に変わったということ。MPEG-2で例えるなら生のESではなくPESパケットで返るようになったといったところか。 libx264の話なのでffmpegなどのlibx264を利用するものにとっては若干大きな変更。それ以外の場合でもVBVがNALレベルで動作するようになったため、多少影響してくる。ビットレート指定がNALレベルを指すようになり、同じ指定でも最終的なサイズが多少小さくなるのではないかと思われる。

b_annexbはH.264の規格書のAnnex Bを指しており、MPEG-2 Systems(ISO/IEC 13818-1またはH222.0)等にNAL unitを格納する際のシンタックスを規定している。

x264r1259

git-id : dd026f296748ef370f1651fdbddec6d9238c6cc0

Author : Jason Garrett-Glaser

Date: Mon Sep 14 12:30:38 2009 -0700

Add missing fclose for mbtree input statsfile on second pass

Bug report by VFRmaniac

2-pass目に於いてmbtree用の入力statsファイルのfcloseが抜けていたのを追加。

VFRmaniacによるバグ報告。

x264r1258

git-id : 8cbb85d7682f78af892ea2f5b0362cc1ef583c02

Author : Jason Garrett-Glaser

Date: Mon Sep 14 11:07:23 2009 -0700

Improve progress indicator behavior

Progress indicator will now indicate based on output frame, not input frame.

進捗状況表示の動作を改善。

入力フレームではなく出力フレームに基づいて進捗状況の表示を行うように。

x264r1257

git-id : b5770ea28a83141252be66870cfabc0ceae626b7

Author : Jason Garrett-Glaser

Date: Mon Sep 14 03:21:14 2009 -0700

Update yasm configure check

lzcnt apparently requires yasm 0.6.2.

yasmのconfigureチェックを更新。

lzcntには明らかにyasm 0.6.2を必要である。

x264r1256

git-id : 935488e22376c33fbdc38909d9a119ac092e8878

Author : Jason Garrett-Glaser

Date: Sun Sep 13 01:02:37 2009 -0700

Make MV costs global instead of static

Fixes some extremely rare threading race conditions and makes the code cleaner.

Downside: slightly higher memory usage when calling multiple encoders from the same application.

MVコストをstaticではなくグローバルにした。

幾つかの非常に希なスレッド競合条件を修正、コードをきれいにした。

マイナス面:同じアプリケーションから複数のエンコーダを呼ぶ場合に、わずかにメモリ使用が高い。

コード上で見る限り、メモリ使用量に関しては気にするほどの量とは思えないけれど。

x264r1255

git-id : 4f6a00704c3e36648a32404aa729a4beff438b38

Author : Jason Garrett-Glaser

Date: Fri Sep 11 17:30:14 2009 -0700

Don't print scenecut message multiple times in verbose mode

Occurred mostly with b-adapt 2.

verboseモードでscenecutメッセージを複数回表示しないようにした。

b-adapt 2でよく発生していた。

x264r1254

git-id : 411ee507328890fb1fde96b37b6eef854d27101a

Author : Jason Garrett-Glaser

Date: Thu Sep 10 02:55:21 2009 -0700

Optimize rounding of luma and chroma DC coefficients

Reduce bitrate mostly-losslessly at low quantizers.

In some rare cases, bitrate reduction may be as high as 10%.

Luma rounding optimization (helps much less than chroma) requires trellis.

lumaとchromaのDC係数の丸めを最適化。

低量子化値でほぼロスレスの場合のビットレートを削減する。

幾つかの希なケースでは、ビットレートの削減は10%ほどになる。

Lumaの丸め最適化(chromaよりは大分効果が薄い)にはtrellisが必要。

x264r1253

git-id : 08c83969dd45a6e550aaa3be11c69bb74d7a478c

Author : Steven Walters

Date: Wed Sep 9 12:19:40 2009 -0700

Fix crash if encoder_close is called before delayed frames are flushed

Also no longer flush frames when ctrl-Cing x264, so x264 will close faster.

ディレイ(遅延)フレームが出力され切る前にencoder_closeが呼び出された場合のクラッシュを修正。

また、x264にctrl-Cした場合にそれ以上フレームの出力を行わないようにし、x264が速く終了するように。

今時のWindowsユーザには馴染みが薄いかも知れないので注釈すると、Ctrl-Cはコマンドラインプログラムを(半)強制終了させるキーボードシーケンス(ショートカットキーのようなもの)。シグナルという古典的な仕組みでプログラムに終了を指示する。対応コードが組み込んであればプログラム側でも一応の終了処理が行えるので、タスクマネージャで本当に強制終了するよりは安全な場合がある。

x264r1252

git-id : b9b7c12eed6eb69b9df7ccd1289df5ce9c130a81

Author : Jason Garrett-Glaser

Date: Sun Sep 6 14:55:48 2009 -0700

Improve x264 help

Now has three help options: --help, --longhelp, and --fullhelp.

--help only shows the most basic options; most users should not need more than these.

Add usage examples.

Fix typo in a comment.

x264のヘルプを改善。

ヘルプオプションが3つに:--help, --longhelp, そして--fullhelp。

--helpは最も基本的なオプションを表示する;殆どのユーザはこれ以上必要ないだろう。

使い方の例を追加。

コメントのタイポ(誤植)を修正。

ヘルプのみの変更で出力や実際の使用方法には影響なし。

x264r1251

git-id : e553a4cc858649b951e9dee456c717f5f5dcd3e9

Author : Jason Garrett-Glaser

Date: Sat Sep 5 19:22:21 2009 -0700

Factor out a redundant RD call in qpel-RD

Fixes a problem that was supposed to be, but didn't, get fully fixed in r1238.

qpel-RDの冗長なRD呼び出しを除去。

r1238で修正されたと思われたが、完全には修正されていなかった問題を修正。

x264r1250

git-id : 643cef5ea8a089a986e1fe17238ce28b1931ea22

Author : Jason Garrett-Glaser

Date: Sat Sep 5 18:56:18 2009 -0700

Fix RD early-skip

Small quality improvement and speedup, was broken by r1214.

RD早期スキップを修正。

小さな質の改善とスピードアップ。r1214で壊していた。

x264r1249

git-id : 83a033e15d14fcf954c4cdfa3c7c6cd64808c1f9

Author : Jason Garrett-Glaser

Date: Sat Sep 5 18:55:46 2009 -0700

Faster CAVLC mb header writing for B macroblocks

BマクロブロックのCAVLC MBヘッダ書き込みを高速化。

x264r1248

git-id : e390cbf993d180b1db413746272e232ac3068dad

Author : David Conrad

Date: Wed Sep 2 16:14:59 2009 -0700

Compile fixes for pre-ARMv6T2 and/or PIC

PICとARMv6T2以前向けのコンパイルを修正。

x264r1247

git-id : b3efbe51032a0e953140f86423b533b2b6f7101c

Author : Steven Walters

Date: Wed Sep 2 12:33:50 2009 -0700

Change priority handling on some OSs

Instead of setting the lookahead thread to max priority, lower all the other threads' priorities instead.

This is particularly useful when the "max priority" is "realtime", as in Windows, which can cause some problems.

優先度の取り扱いを幾つかのOSで変更。

lookaheadスレッドを最高優先度にする変わりに、全ての他のスレッドの優先度を下げる。

Windowsのように、"最高優先度"が"リアルタイム"であり、何某かの問題を引き起こしかねない場合にこれは特に有用である。

すごく細かいことだけれど、文中のinsteadがダブっている。

あと、今回の変更点ではないけれど

#define x264_lower_thread_priority(p) { UNUSED int nice_ret = nice(p); }

という書き方は、nice()の戻り値を使わないという意図なら((void)nice(p))とか(void(nice(p)))じゃダメなのだろうか。それに、他にも戻り値を使ってない部分はあるような気がするのだが、ここだけこういう書き方なのも気になる。

x264はスゴいプログラマ達が作っているのに、時々(r1245とか)腑に落ちないコードが入ると思う。ちなみにnice(p)はp分だけ優先度を下げる(nice値を上げる)というunix系(POSIX)の関数だ。

x264r1246

git-id : 5b3c89c592e412fc02fd8001ee361ea50c249153

Author : Steven Walters

Date: Tue Sep 1 18:46:51 2009 -0700

Threaded lookahead

Move lookahead into a separate thread, set to higher priority than the other threads, for optimal performance.

Reduces the amount that lookahead bottlenecks encoding, greatly increasing performance with lookahead-intensive settings (e.g. b-adapt 2) on many-core CPUs.

Buffer size can be controlled with --sync-lookahead, which defaults to auto (threads+bframes buffer size).

Note that this buffer is separate from the rc-lookahead value.

Note also that this does not split lookahead itself into multiple threads yet; this may be added in the future.

Additionally, split frames into "fdec" and "fenc" frame types and keep the two separate.

This split greatly reduces memory usage, which helps compensate for the larger lookahead size.

Extremely special thanks to Michael Kazmier and Alex Giladi of Avail Media, the original authors of this patch.

スレッド化lookahead。

lookaheadを別のスレッドに移動し、最適なパフォーマンスのため他のスレッドよりも高い優先度を設定。

lookaheadがエンコーディングのボトルネックとなる事を減らし、多コアのCPU上でlookaheadが強く影響する設定(例えばb-adapt 2)でのパフォーマンスを素晴らしく向上。

バッファサイズは--sync-lookaheadで操作可能で、デフォルトでは自動(threads+bframesバッファサイズ)である。

このバッファはrc-lookaheadの値とは別であることに注意。

また、これはまだlookaheadそのものをマルチスレッドに分割しない事にも注意;これは将来的に追加されるかもしれない。

加えて、フレームを"fdec"と"fenc"のフレームタイプに分割し、分けた状態に保つ。

この分割はメモリ使用量を素晴らしく減少させ、より大きなlookaheadサイズ(訳注:非常にメモリを食う)の補償になる。

このパッチのオリジナルの著者であるAvail MediaのMichaelKazmierとAlexGiladiに非常に感謝する。

どうやら噂のthreaded slicetypeがコミットされた模様。正式名称はsync-lookaheadになったと思って良いのだろうか。

専用のスレッドで先読みし、スライスタイプを先に決定しておくようになると思われる。優先度が高く設定されているのは、このsync-lookaheadのスレッド1つに対し複数のエンコードスレッドが対応するので、エンコードスレッドを待たせないための処置だろう。sync-lookaheadの値は、threads+bframesがデフォルトであり、かつ0以外の最低値。2pass目やthreads=1の場合は sync-lookahead=0(無効)になる。最大値はrc-lookaheadと同じなはず。

効能は、とにかく高速化。コア数の少ないCPUでは恩恵も少ないと思われる。

コード的には、encoder/lookahead.cが追加。またもやx264_slicetype_*()の関数が大きく変更されており、全体でもあきれるほどdiffが大きく、もう追従する気にもなれないので色々な意味でギブアップ。本当はrc-lookaheadとの関係とか、 fdec/fencの意味とか追いかけたいけど、無理。

x264r1245

git-id : 326113b4f57de6c5a2599c047ab5c7762b1a4b13

Author : Jason Garrett-Glaser

Date: Tue Sep 1 11:36:54 2009 -0700

Force a link error in case of incompatible API

This is because the number of bug reports due to miscompiled ffmpeg builds is reaching critical mass.

The name of x264_encoder_open is now #defined based on the current X264_BUILD.

Note that this changes the calling convention required for dlopen, but not for ordinary calls to x264_encoder_open.

非互換のAPIの場合にリンクエラーを強制。

これはコンパイルミスしているffmpegビルドに起因するバグレポートの数が限界量に達したことによる。

x264_encoder_openの名前は現在のX264_BUILDベースの#defineになった。

この変更はdlopenで要求される呼び出し規約を変更し、通常のx264_encoder_openの呼び出しは変更しない事に注意。

あるバージョン(X264_BUILD)のlibx264に対しビルドされたffmpeg等がダイナミックリンク(Windowsで言えばDLL呼び出し)で異なるバージョンのlibx264を使用することを抑制する処置。

X264_BUILDが変更された場合、基本的にlibx264を使用する側(この場合ffmpeg)は再ビルドする必要があるが、それを認識しない人々の無駄なバグレポートにうんざりしたのだろう。ただ、この方法では「libx264を新しくしたらffmpegが動かない」というバグレポートが増えそうな気がする。x264_encoder_openにX264_BUILDを渡すようにインターフェースを変更し、エラーメッセージを出力した方がよいのではないかと思われるが…。

x264r1244

git-id : 775a12cdec150e00813d6df5dbec17c5da385549

Author : Jason Garrett-Glaser

Date: Mon Aug 31 22:44:45 2009 -0700

Get rid of "CBR" descriptor from qcomp

Though technically accurate in some vague way, I have never actually seen this

option used correctly, rather it has been used by hundreds of people who can't

read the documentation and believe that qcomp=0 is what should be used for CBR

encoding.

"CBR"の説明をqcompから除去。

幾つかの点で曖昧ではあっても技術的には正しいのだが、実際にはこのオプションが正しく使われているのを見たことがなく、むしろドキュメントを読めずにqcomp=0はCBRエンコードに使用するべきものだと信じる何百人という人々に使用されて来た。

AQや最近のrc-lookahead, mbtreeなどの変更でドキュメント(doc/ratecontrol.txt)も正しいとは言えない状態だと思うけれども。

触発されてCBRの幻想という記事を書いた。

x264r1243

git-id : 2cd00546cdae867265fbbb58304087f776160102

Author : Loren Merritt

Date: Sun Aug 30 20:49:07 2009 +0000

Faster me=tesa

But it still spends all too much time in me_search_ref rather than asm.

me=tesaの高速化。

しかしそれでもアセンブラよりme_search_refに非常に大きな時間を費やしてしまう。

x264r1242

git-id : 4d553edf178bf0ae01547731a48e1fb08c5cc1f4

Author : Jason Garrett-Glaser

Date: Mon Aug 31 06:36:41 2009 -0700

Multi-slice encoding support

Slicing support is available through three methods (which can be mixed):

--slices sets a number of slices per frame and ensures rectangular slices (required for Blu-ray). Overridden by either of the following options:

--slice-max-mbs sets a maximum number of macroblocks per slice.

--slice-max-size sets a maximum slice size, in bytes (includes NAL overhead).

Implement macroblock re-encoding support to allow highly accurate slice size limitation. Might be useful for other things in the future, too.

マルチスライスエンコードのサポート。

スライスのサポートは3つの方法(混在可能)で利用可能:

--slicesはフレームごとのスライスの数を設定し矩形のスライス(Blu-rayで要求される)を保証する。これは以下のオプションのいずれかでオーバーライド(上書き)される:

--slice-max-mbsはスライスごとのマクロブロックの最大数を設定する。

--slice-max-sizeは最大スライスサイズをbyte単位(NALのオーバーヘッドを含む)で設定する。

高度に精密なスライスサイズ制限を可能にするため、マクロブロック再エンコードのサポートを実装。将来的には他の用途にも便利だろう。

マルチスライスのサポートが復活。伝聞で申し訳ないが、Blu-rayではマルチスライスが必須という話があるらしく、その対応らしい。

Blu-ray関係や特定の機器での再生を目的としないならば、メリットはない。むしろデメリットが大きいので下手に使用しないこと。詳細はx264(slices,slice-max-mbs,slice-max-size)を参照。

x264r1241

git-id : bfcb4f6c1d49505146be77cf57dcb72f0534907d

Author : Jason Garrett-Glaser

Date: Sat Aug 29 17:09:55 2009 -0700

Fix a valgrind warning in b-adapt 2

b-adapt2でのvalgrindの警告を修正。

ユーザ側にはあまり関係ない修正。

x264r1240

git-id : 35627b63c31bcd143413c10dce1ead8015448f7b

Author : Loren Merritt

Date: Sat Aug 29 10:31:08 2009 +0000

fix asm symbols for oprofile (regression in r1221)

oprofile用のアセンブラシンボルを修正(r1221のレグレッション)

ユーザ側にはあまり関係ない修正。

x264r1239

git-id : 3db6c9da402858abfcbe4aaf676a1b1f89e7f093

Author : Anton Mitrofanov

Date: Fri Aug 28 15:07:12 2009 -0700

Fix bug in intra analysis in B-frames

i8x8/i4x4 never got analysed when fast_intra was toggled and RD was off; up to a 2-3% quality improvement in non-RD mode.

With this bug dating back to r369, this is probably the second-oldest bug ever fixed in x264.

Bフレームのintra解析のバグを修正。

fast_intraがトグルされておりRDがOFFの場合にi8x8/i4x4は解析されていなかった;非RDモードで2-3%の質の向上。

このバグはr369に遡り、恐らくx264で修正されたこれまでで2番目に古いバグである。

x264r1238

git-id : d551106235ce955697531df85aeebb996309ea81

Author : Anton Mitrofanov

Date: Fri Aug 28 14:56:44 2009 -0700

Fix bug in b16x16 qpel RD

Incorrect cost was used to initialize the search.

b16x16のqpel RDのバグを修正。

検索の初期化に不正なコストが使用されていた。

x264r1237

git-id : 1b2a1c699a0d5b93d13d9bb5b118b02d261ba193

Author : Jason Garrett-Glaser

Date: Thu Aug 27 15:21:22 2009 -0700

Check minimum chroma QP in addition to luma QP during CQM init

Correctly error out if the implied minimum chroma QP is too low.

Add missing emms to checkasm macroblock_tree_propagate test.

CQM初期化中にluma QPに加えてchroma QPの最小値をチェック。

暗黙的にchroma QPの最小値が低すぎる場合に適切にエラー出力する。

checkasmのmacroblock_tree_propagateテストに欠落していたemmsを追加。

x264r1236

git-id : e6c973ac5b46fc0d9843d1774b647c97c852c963

Author : Jason Garrett-Glaser

Date: Thu Aug 27 14:16:45 2009 -0700

Faster mbtree propagate and x264_log2, less memory usage

Avoid an int->float conversion with a small table.

Change lowres_inter_types to a bitfield; cut its size by 75%.

Somewhat lower memory usage with lots of bframes.

Make log2/exp2 tables global to avoid duplication.

mbtreeのpropagate(伝播)とx264_log2を高速化、メモリ使用量減少。

小さなテーブルでint→floatの変換を回避。

lowres_inter_typesをビットフィールドに変更;サイズを75%カット。

多数のBフレーム時に幾分メモリ使用量を低くする。

重複を避けるためlog2/exp2テーブルをグローバルに。

x264r1235

git-id : 448b1387254bbf186b83db0fd393477ea1d01a55

Author : Jason Garrett-Glaser

Date: Wed Aug 26 20:30:47 2009 -0700

Fix keyint=1 + VBV + rc-lookahead

keyint=1 + VBV + rc-lookahedを修正。

keyint=1の時はPもBもないのに設定しようとしてる部分の修正。

x264r1234

git-id : 0d8efaac52baab0bac67ed0daac07f80110883a4

Author : Jason Garrett-Glaser

Date: Wed Aug 26 20:16:10 2009 -0700

Faster x264_exp2fix8

22->13 cycles on Core 2 with mfpmath=sse

x264_exp2fix8を高速化

mfpmath=sseのCore 2上で22→13サイクル。

計算手順の変更による高速化を含む。

x264r1233

git-id : ee95ca7970140e8b99af233b03828feb250f0af0

Author : Loren Merritt

Date: Thu Aug 27 06:05:57 2009 +0000

compile x86 with fpmath=sse by default

x86ではデフォルトでfpmath=sseでコンパイル。

-msseを含む。fpmath=sseは浮動小数点にSIMD命令を使用する、という指定で-msseはSSE1の命令セットの使用許可。詳細はgcc optionに以前書いた記事があるのでそちらを参照。

x264r1232

git-id : c8edc12043086b8f52a3b6b2176b70e0d48ff271

Author : David Conrad

Date: Mon Aug 24 17:17:41 2009 -0700

ARM configure: enable NEON-related options by default

When compiling for ARM, x264 will compile by default for Cortex A8 unless specified otherwise.

To compile for pre-ARMv6, --disable-asm is required.

ARMのconfigure:NEON関係のオプションをデフォルトで有効に。

ARM向けにコンパイルする場合、x264は指定がなければデフォルトでCortex A8向けにコンパイルする。

ARMv6以前向けにコンパイルするには、--disable-asmが必要。

ARM向けのビルドにのみ影響。

x264r1231

git-id : 533b473f71f2ccd1f73e3d25cd57fca06ef553b5

Author : Jason Garrett-Glaser

Date: Mon Aug 24 03:28:11 2009 -0700

2-pass VBV fixes

Properly run slicetype frame cost with 2pass + MB-tree.

Slash the VBV rate tolerance in 2-pass mode; increasing it made sense for the highly reactive 1-pass VBV algorithm, but not for 2-pass.

2-pass's planned frame sizes are guaranteed to be reasonable, since they are based on a real first pass, while 1-pass's, based on lookahead SATD, cannot always be trusted.

2-passのVBVの修正。

2pass + MB-treeでのslicetypeフレームコストを適正に。

2-passモードでのVBVレートトレランスを大きく変更;大きく反応する1-pass VBVアルゴリズムに対しそれを増すのは妥当だが、2-passではそうではない。

2-passで計画されたフレームサイズは、実際の1st passに基づいており合理的に保証されたものだが、1-passではlookaheadのSATDに基づいており、必ずしも信用できない。

それでもrc-lookaheadが実装されたことで、かなり予測ができるようにはなったのだろうけれど。

x264r1230

git-id : 9754af3c04d2de7b2404132a2c533c9071b6257b

Author : David Conrad

Date: Mon Aug 24 01:38:42 2009 -0700

GSOC merge part 8: ARM NEON intra prediction assembly functions (partial)

4x4 dc/h/ddr/ddl, 8x8 dc/h, 8x8c h/v, 16x16 dc/h/v

GSOCのマージその8:ARMのNEON版intra予測アセンブリ関数群(一部)。

4x4 dc/h/ddr/ddl, 8x8 dc/h, 8x8c h/v, 16x16 dc/h/v。

ARMにのみ影響。

x264r1229

git-id : a81c398c8e7f9fea2c7848f866007bc6fbb74304

Author : David Conrad

Date: Mon Aug 24 01:10:30 2009 -0700

GSOC merge part 7: ARM NEON deblock assembly functions (partial)

Originally written for ffmpeg by Mans Rullgard; ported by David.

Luma and chroma inter deblocking; no intra yet.

GSOCのマージその7:ARMのNEON版デブロックアセンブリ関数群(一部)。

オリジナルはMsns Rullgardによってffmpeg向けに書かれたもの。Davidによるポーティング。

Lumaとchromaのinterデブロッキング;intraはまだ。

ARMにのみ影響。

x264r1228

git-id : dcd9ac9bae832a98d79bf5fc579c9f6c7bfd81a1

Author : David Conrad

Date: Mon Aug 24 00:58:42 2009 -0700

GSOC merge part 6: ARM NEON quant assembly functions (partial)

(de)quant 4x4, (de)quant 8x8, (de)quant DC, coeff_last

GSOCのマージその6:ARMのNEON版量子化アセンブリ関数群(一部)。

(de)quant 4x4, (de)quant 8x8, (de)quant DC, coeff_last。

ARMにのみ影響。

x264r1227

git-id : e695eda3765caa2b4b9825aeffecdb13e107b3b4

Author : David Conrad

Date: Sun Aug 23 02:03:48 2009 -0700

GSOC merge part 5: ARM NEON dct assembly functions

(i)dct4x4dc, (i)dct4x4, (i)dct8x8, (i)dct_dc, zigzag_scan_frame_4x4

GSOCのマージその5:ARMのNEON版dctアセンブリ関数群。

(i)dct4x4dc, (i)dct4x4, (i)dct8x8, (i)dct_dc, zigzag_scan_frame_4x4。

ARMにのみ影響。

x264r1226

git-id : 2ac8b8deca4475200d279cf711060e7dfef7a252

Author : David Conrad

Date: Sun Aug 23 01:35:10 2009 -0700

GSOC merge part 4: ARM NEON mc assembly functions

prefetch, memcpy_aligned, memzero_aligned, avg, mc_luma, get_ref, mc_chroma, hpel_filter, frame_init_lowres

GSOCのマージその4:ARMのNEON版mcアセンブリ関数群。

prefetch, memcpy_aligned, memzero_aligned, avg, mc_luma, get_ref, mc_chroma, hpel_filter, frame_init_lowres。

ARMにのみ影響。

x264r1225

git-id : 8a84fd9d367b7660a34ba575eec17636b2b6a85a

Author : David Conrad

Date: Sat Aug 22 23:55:29 2009 -0700

GSOC merge part 3: ARM NEON pixel assembly functions

SAD, SADX3/X4, SSD, SATD, SA8D, Hadamard_AC, VAR, VAR2, SSIM

GSOCのマージその3:ARMのNEON版ピクセルアセンブリ関数群。

SAD, SADX3/X4, SSD, SATD, SA8D, Hadamard_AC, VAR, VAR2, SSIM。

ARMにのみ影響。

x264r1224

git-id : 00d9fb7d0643748a0f1de33ca15eb300172c07f7

Author : David Conrad

Date: Sat Aug 22 23:40:33 2009 -0700

GSOC merge part 2: ARM stack alignment

Neither GCC nor ARMCC support 16 byte stack alignment despite the fact that NEON loads require it.

These macros only work for arrays, but fortunately that covers almost all instances of stack alignment in x264.

GSOCのマージその2:ARMスタックアラインメント。

NEONのloadが16byteのスタックアラインメントを要求するにも関わらず、GCCもARMCCもこれをサポートしない。

これらのマクロは配列のみに働くが、上手いことにこれがx264のスタックアラインメントのインスタンスのほとんど全てをカバーする。

ARMにのみ影響。ただし全アーキテクチャ共通部分の変更なので注意。

x264r1223

git-id : 3b4ee7359abdeea0337ec76206518a9d8f8f2140

Author : David Conrad

Date: Thu Aug 20 20:44:09 2009 -0700

Fix unaligned accesses in bitstream writer

Fixes x264 on CPUs with no unaligned access support (e.g. SPARC).

Improves performance marginally on CPUs with penalties for unaligned stores (e.g. some x86).

ビットストリームライターの非アラインアクセスを修正。

非アラインアクセスをサポートしないCPU(例えばSPARC)でのx264を修正する。

非アラインのストアにペナルティのあるCPU(例えば幾つかのx86)での性能を僅かに改善。

changelogにはよくメモリアラインの話が上がる。組み込み系のエンジニアなら常識だが、x86以外の多くのCPUでは、例えば32bitの値は4byte境界に合わせて置かれていなければならない。もっと噛み砕いて言うと、メモリの番地が4で割り切れる位置に、32bitのデータを置かなければならない。これをアライン(整列)と呼び、違反すると例外が発生してアプリケーションがクラッシュする。

x86ではSIMD命令を除いて基本的にこの制約は強制されないが、読み込み・書き込み速度が遅くなる。SIMD命令も使いにくくなる(非アライン対応の命令もあるがやはり速度低下するので使いたくない)ので、x264に限らずこの手のソフトウェアではアラインには気を遣う。

x264r1222

git-id : d0ee6f8864c1066fb14672faeb738ff511abc261

Author : Jason Garrett-Glaser

Date: Thu Aug 20 13:08:25 2009 -0700

Fix bug in calculation of I-frame costs with AQ.

AQでのI-frameコスト計算のバグを修正。

x264r1221

git-id : f6bf719c67c109635eb001ff2b48c24d97ff5f0d

Author : David Conrad

Date: Wed Aug 19 17:03:02 2009 -0700

GSOC merge part 1: Framework for ARM assembly optimizations

x264 will detect which ARM core it's building for and only build NEON asm if the target is ARMv6 or above, then enable NEON at runtime.

GSOCのマージその1:ARMアセンブリ最適化のフレームワーク。

x264はどのARMのコアに対しビルドするのかを検出し、ターゲットがARMv6以上である場合にのみNEONアセンブラをビルドし、実行時にNEONを有効にする。

ARM、PowerPCにのみ影響。PowerPC側は一応変更がある程度の話だけれど。

NEONとはARM用のSIMD命令セット。

x264r1220

git-id : 333100756c0c27c5a71119a3f80abc80d439332a

Author : David Conrad

Date: Wed Aug 19 16:18:36 2009 -0700

Fix a bug in checkasm and two OSX fixes

MC chroma checkasm test could crash in some situations

Remove -lmx, as it's not needed and the iPhone doesn't have it.

Remove unused sqrtf emulation; it breaks if math.h is included.

checkasmのバグ修正と2つのOSXの修正。

MC chromaのcheckasmテストは幾つかのケースでクラッシュする可能性があった。

iPhoneには-lmxがなく、不要なので除去。

不使用のsqrtfエミュレーションを除去;math.hがincludeされる場合におかしくなる。

x264r1219

git-id : 441c36cbc814ac13cc565ce5e6566bcbf5f6d6e2

Author : Jason Garrett-Glaser

Date: Wed Aug 19 01:49:47 2009 -0700

Improve QPRD

Always check the last macroblock's QP, even if the normal search doesn't reach it.

Raise the failure threshold when moving towards the last macroblock's QP.

0.2-1% improved compression.

QPRDを改善。

通常の検索が到達しない場合であっても、最後のマクロブロックのQPを常にチェックするように。

最後のマクロブロックのQPに近づく場合の、失敗の閾値を上げた。

0.2-1%圧縮率を改善。

x264r1218

git-id : d345ab05391e2b32c0d567aaa9945f63ce892016

Author : Jason Garrett-Glaser

Date: Tue Aug 18 21:53:28 2009 -0700

Fix MB-tree with keyint<3

Also slightly improve VBV keyint handling.

keyint<3でのMB-treeを修正。

また、VBVのkeyintの取り扱いを若干改善。

keyint=1の場合MB-treeはOFFになる。

x264r1217

git-id : 5e9ae4cb8de4a95a567c6dbfdbaaf8138e695589

Author : Jason Garrett-Glaser

Date: Tue Aug 18 19:25:45 2009 -0700

Fix bug in VBV lookahead + no MB-tree

I-frames need to have VBV lookahead run on them as well.

VBV lookahead + 非MB-treeのバグを修正。

IフレームはVBV lookaheadをその上で同様に走らせる必要がある。

x264_slicetype_analyse()を実行する条件にVBV + lookaheadの条件が抜けていた。mbtreeがONの場合には実行されているパスなので非mbtreeの場合のみがバグケース。

x264r1216

git-id : d6846d3d17ac7289eb3d82f54d19459d3a1a5b21

Author : Jason Garrett-Glaser

Date: Tue Aug 18 18:37:26 2009 -0700

Add support for frame-accurate parameter changes

Parameter structs can now be passed with individual frames.

The previous method would only change the parameter of what was currently being encoded, which due to delay might be very far from an intended exact frame.

Also add support for changing aspect ratio. Only works in a stream with repeating headers and requires the caller to force an IDR to ensure instant effect.

フレーム精度のパラメータ変更のサポートを追加。

パラメータ構造体は個別のフレームに渡すことができるようになった。

以前の方法は現在エンコードされているフレームのパラメータのみ変更しており、これはdelayのために意図したフレームとはかけ離れるかもしれなかった。

また、アスペクト比の変更をサポートを追加。ヘッダをリピートするストリームでのみ動作し、呼び出し側は即時の効果を保証するためにIDRを強制する必要がある。

ffmpegでMP4にする場合は基本的にglobal_headerなのでアスペクト比変更は使用できないだろう。まぁ使う場面もあまりないが。

x264r1215

git-id : 9892984392cd550e65e3f2cd6fd08d6afb083472

Author : Jason Garrett-Glaser

Date: Tue Aug 18 15:46:26 2009 -0700

Fix x264_encoder_reconfig with multithreading

New behavior: reconfigging the encoder will result in changes being applied

to each of the encoding threads as they finish encoding the current frame.

マルチスレッド時のx264_encoder_reconfigを修正。

新動作:エンコーダのreconfig(再設定)は、各エンコーディングスレッドが現在のフレームのエンコードを終了したら変更が適用されるようになる。

x264r1214

git-id : c07d292d7b5298327d835d0c458083de29c23204

Author : Jason Garrett-Glaser

Date: Sun Aug 16 03:29:49 2009 -0700

Fix two bugs in QPRD

QPRD could in some cases force blocks to skip when they shouldn't be ~(+0.01db)

Force QPRD to abide by qpmin/qpmax restrictions.

QPRDのバグを2つ修正。

QPRDは幾つかのケースで、〜+0.01dbにはなりそうにない場合に、ブロックに対しスキップを強制していたかも知れない。

QPRDにqpmin/qpmaxの制限を遵守させるようにした。

x264r1213

git-id : 1b6086ceb0c346c959a68478b9c36284fbdd5872

Author : Jason Garrett-Glaser

Date: Sat Aug 15 19:02:31 2009 -0700

Lookahead VBV

Use the large-scale lookahead capability introduced in MB-tree for ratecontrol purposes.

(Does not require MB-tree, however.)

Greatly improved quality and compliance in 1-pass VBV mode, especially in CBR; +2db OPSNR or more in some cases.

Fix some other bugs in VBV, which should improve non-lookahead mode as well.

Change the tolerance algorithm in row VBV to allow for more significant mispredictions when buffer is nearly full.

Note that due to the fixing of an extremely long-standing bug (>1 year), bitrates may change by nontrivial amounts in CRF without MB-tree.

Lookahead VBV。

MB-treeにおいてレートコントロールの目的で導入された、大規模なlookahead(先読み)機能を使用。

(ただし、MB-treeを必要とはしない。)

質と、1-pass VBVモードでのコンプライアンス(規格適合性)、特にCBRを素晴らしく向上する;OPSNRを+2db、幾つかのケースではそれ以上。その他幾つかのVBVのバグを修正、非lookaheadモードをも改善。

バッファがほぼ埋まっている場合にも更なる顕著な予測ミスを許容するようにVBV調停のトレランス(許容)アルゴリズムを変更。

非常に長く存在していた(1年以上)バグを修正したために、MB-treeなしのCRFでビットレートが僅かに変わりうる事に注意。

r1197のMB-treeの時に記載されていたlookaheadのVBV側での利用。

"row VBV"のrowは基本的に名詞または動詞であるが、文法的には形容詞の位置(語順)にある。上記の訳で正しいとは思うが、もしかしたらもしかしてデータ構造としての「"行"のVBV」を意味しているかも知れない。

x264r1212

git-id : 1febc6bd5dc4f625049273f4d86472ed770e3882

Author : Jason Garrett-Glaser

Date: Fri Aug 14 07:20:07 2009 -0700

Fix bug in b-adapt 1

B-adapt 1 didn't use more than MAX(1,bframes-1) B-frames when MB-tree was off.

b-adapt 1のバグを修正。

B-adapt 1は、MB-treeがOFFの場合にMAX(1,bframes-1)枚を超えるB-frameを使用しなかった。

b-adapt=1でbframesが2以上の時に、Bフレームが最大限に使われても指定した枚数より1枚少なくなっていたということ。MB-tree(r1197)でx264_slicetype_analyseが大きく変わったため混入したバグと思われる。

x264r1211

git-id : 8236cc979e1b4d8aae1aecbaae28c3017e375a6f

Author : Jason Garrett-Glaser

Date: Thu Aug 13 17:13:33 2009 -0700

Fix a potential failure in VBV

If VBV does underflow, ratecontrol could be permanently broken for the rest of the clip.

Revert part of the previous VBV changes to fix this.

VBVの潜在的なエラーを修正。

VBVがアンダーフローした場合、そのクリップの残りに対してはレートコントロールが永続的に壊れる。

これを修正するため以前のVBVの変更の一部を元に戻した。

x264r1210

git-id : 42d6b17b439fc90793d19788e7b314e2517c1fc2

Author : Anton Mitrofanov

Date: Thu Aug 13 21:40:21 2009 +0000

new API function x264_encoder_delayed_frames.

fix x264cli on streams whose total length is less than the encoder latency.

新API関数、x264_encoder_delayed_frames。

エンコーダレイテンシよりも長さの短いストリームにおけるx264cliの動作を修正。

x264r1209

git-id : 62df17ec0523474c8f03e28fb982de1722497288

Author : Jason Garrett-Glaser

Date: Thu Aug 13 14:12:26 2009 -0700

Add no-mbtree to fprofile (and fix pyramid in fprofile)

非mbtreeをfprofileに追加(そしてfprofileのpyramidを修正)。

テストに関する変更なので一般ユーザには関係ない。

時々出てくるfprofileというのがテスト用の設定のことと考えればよい。

x264r1208

git-id : 7f8aa6fa1819a62196c1953d85fa6e3d504e39b7

Author : Jason Garrett-Glaser

Date: Sun Aug 9 16:06:52 2009 -0700

Don't print a warning about direct=auto in 2pass when B-frames are off

B-framesがOFFの場合の2パスでのdirect=autoに関する警告を表示しないように。

x264r1207

git-id : 8eb6720e89f441056948818558113f29b3a282c6

Author : Loren Merritt

Date: Thu Aug 13 05:02:59 2009 +0000

fix lowres padding, which failed to extrapolate the right side for some resolutions.

fix a buffer overread in x264_mbtree_propagate_cost_sse2. no effect on actual behavior, only theoretical correctness.

fix x264_slicetype_frame_cost_recalculate on I-frames, which previously used all 0 mb costs.

shut up a valgrind warning in predict_8x8_filter_mmx.

lowresのパディング修正、幾つかの解像度で右サイドの補外に失敗していた。

x264_mbtree_propagate_cost_sse2でのバッファの読み込みすぎを修正。実際の動作には影響なく、単に論理的な修正。

I-frameでのx264_slicetype_frame_cost_recalculateの修正、以前は全てのMBコストを0としていた。

predict_8x8_filter_mmxでのvalgrindのエラーを黙らせた。

x264r1206

git-id : 01a693d0c9483e2589b34e7c2cf2b59dae5c1ec2

Author : Loren Merritt

Date: Sun Aug 9 04:00:36 2009 +0000

simd part of x264_macroblock_tree_propagate.

1.6x faster on conroe.

x264_macroblock_tree_propagateの一部SIMD化。

conroeで1.6倍高速。

SSE2版らしい。

x264r1205

git-id : 886d1e9878a6f2424bd005a9cb16843ca8e8d1df

Author : Loren Merritt

Date: Sat Aug 8 14:53:27 2009 +0000

MB-tree fixes:

AQ was applied inconsistently, with some AQed costs compared to other non-AQed costs. Strangely enough, fixing this increases SSIM on some sources but decreases it on others. More investigation needed.

Account for weighted bipred.

Reduce memory, increase precision, simplify, and early terminate.

MB-treeの修正:

他の非AQなコストと比較して、幾つかのAQされたコストにで、一貫性無くAQが適用されていた。不思議なことに、これを修正することで幾つかのソースでSSIMを増加させるが、その他では減少させる。更なる研究が必要。

weighted bipred(重み付き双予測)を考慮。

メモリ減少、精度向上、単純化、早期終了。

早速x264_macroblock_tree_propagateが作り直されている。

x264r1204

git-id : 3b047a2a7d55d613c6ae49da22c7f30d02a048dc

Author : Jason Garrett-Glaser

Date: Sat Aug 8 17:51:01 2009 -0700

Add missing free()s for new data allocated for MB-tree

Eliminates a memory leak.

MB-treeに対して確保された新しいデータのfree()を忘れていたので追加。

メモリリークを除去。

x264r1203

git-id : 6f4054f79d3ff1034d634aabb9f9d9c8eb261bad

Author : Jason Garrett-Glaser

Date: Sat Aug 8 12:53:06 2009 -0700

Fix keyframe insertion with MB-tree and no B-frames

MB-treeかつB-frames無しでのキーフレーム挿入を修正。

x264r1202

git-id : 21a38355ccd46d1dd928341f8b9f6dd69afd9cff

Author : Jason Garrett-Glaser

Date: Sat Aug 8 11:26:36 2009 -0700

Fix MP4 output (bug in malloc checking patch)

MP4出力を修正(mallocチェックパッチのバグ)

動かしてないので未確認だが恐らくMP4出力でエラー終了していたはず。

x264r1201

git-id : 7139b088129707b0daf3fd3bae9647f649deb1ba

Author : Steven Walters

Date: Fri Aug 7 16:18:01 2009 -0700

Gracefully terminate in the case of a malloc failure

Fuzz tests show that all mallocs appear to be checked correctly now.

mallocに失敗した場合にソツなく終了するようにした。

ファジーテストが全てのmallocは正しくチェックされたようだと示すようになった。

エラーチェックの強化。出力は変わらないはず。

x264r1200

git-id : 71506ae7a307545b530663ecab00b06fc424ca48

Author : Anton Mitrofanov

Date: Fri Aug 7 10:44:13 2009 -0700

Fix a potential infinite loop in QPfile parsing on Windows

ftell doesn't seem to work properly on Windows in text mode.

WindowsにおけるQPfileの解析中の潜在的な無限ループを修正。

Windowsのテキストモードではftellが正しく動作しないようだ。

最終更新時間:2009年10月24日 11時22分44秒