ws-h264: F.video.open end to end on MP4 / MKV / TS / AVI / raw H.264 (bit-exact vs ffmpeg), display-order pts from the sorted packet times; JVT conformance test (48 streams bit-exact vs JM yuv, 4 refused); video/mp4 writer: a video edit list plays every frame (the B-frame delay no longer cut 2 frames off the end); tests tune LuaJIT through host
This commit is contained in:
1 parent
84101d919e
commit
7271e6e3fa
9 files changed
+266
-3
No files matched your search
+19
-1
@@ -80,7 +80,7 @@ def encode(ctx, tmp, name, src, w, h, n, params, extra):
|
||||
with open(out, "rb") as f:
|
||||
data = f.read()
|
||||
ref = os.path.join(tmp, name + ".yuv")
|
||||
ffmpeg(ctx, ["-threads", "1", "-i", out, "-f", "rawvideo", "-pix_fmt", "yuv420p", ref])
|
||||
ffmpeg(ctx, ["-threads", "1", "-i", out, "-fps_mode", "passthrough", "-f", "rawvideo", "-pix_fmt", "yuv420p", ref])
|
||||
with open(ref, "rb") as f:
|
||||
raw = f.read()
|
||||
fs = w * h + 2 * ((w + 1) // 2) * ((h + 1) // 2)
|
||||
@@ -164,6 +164,24 @@ def generate(ctx):
|
||||
"-x264-params", "threads=1", "-f", "h264", out])
|
||||
bad.append({"name": "10bit", "data": open(out, "rb").read(), "code": "UNSUPPORTED"})
|
||||
ctx.emit("h264_bad", bad)
|
||||
# containers: the same encodes written by ffmpeg into MP4 / MKV (avcC) and TS / AVI (Annex B), referenced by ffmpeg's decode of each file
|
||||
cont = []
|
||||
for name, params, n in (("cabac_b", "cabac=1:bframes=3:ref=3:8x8dct=1", 20), ("baseline", "cabac=0:bframes=0:ref=2", 12)):
|
||||
raw = os.path.join(tmp, "c_" + name + ".h264")
|
||||
ffmpeg(ctx, ["-f", "lavfi", "-i", SRC["noise"].format(w=176, h=144), "-frames:v", str(n), "-pix_fmt", "yuv420p",
|
||||
"-c:v", "libx264", "-x264-params", params + ":threads=1", "-f", "h264", raw])
|
||||
for ext in ("h264", "mp4", "mkv", "ts", "avi"):
|
||||
path = raw if ext == "h264" else os.path.join(tmp, "c_%s.%s" % (name, ext))
|
||||
if ext != "h264":
|
||||
ffmpeg(ctx, ["-f", "lavfi", "-i", SRC["noise"].format(w=176, h=144), "-frames:v", str(n), "-pix_fmt", "yuv420p",
|
||||
"-c:v", "libx264", "-x264-params", params + ":threads=1", path])
|
||||
yuv = path + ".yuv"
|
||||
ffmpeg(ctx, ["-threads", "1", "-i", path, "-fps_mode", "passthrough", "-f", "rawvideo", "-pix_fmt", "yuv420p", yuv])
|
||||
rawyuv = open(yuv, "rb").read()
|
||||
fs = 176 * 144 * 3 // 2
|
||||
cont.append({"name": name + "." + ext, "ext": ext, "data": open(path, "rb").read(), "width": 176, "height": 144,
|
||||
"frames": [zlib.crc32(rawyuv[i:i + fs]) for i in range(0, len(rawyuv), fs)]})
|
||||
ctx.emit("h264_containers", cont)
|
||||
bench = []
|
||||
for name, src, w, h, n, params in BENCH:
|
||||
data, frames = encode(ctx, tmp, name, src, w, h, n, params, [])
|
||||
|
||||
Reference in new issue
Block a user