ws-video2-flv: H263 slice structure (Annex K, ffmpeg h263p with slice threads), MV prediction across slice starts as ffmpeg
This commit is contained in:
1 parent
625c1fade2
commit
2a5da31c80
3 files changed
+119
-47
No files matched your search
@@ -1,6 +1,6 @@
|
||||
-- codecs/video/H263 tests. Against `ffmpeg -idct int` (tools/fixtures/h263.py): H.263 streams (sub-QCIF .. 4CIF, GOB
|
||||
-- headers, DQUANT, q 1 .. high quantisers), H.263+ PLUSPTYPE streams (custom sizes, sizes that are not a multiple of
|
||||
-- 16, the rounding type, unrestricted vectors with reversible codes) and Sorenson Spark streams (standard, 8-bit and
|
||||
-- 16, the rounding type, unrestricted vectors with reversible codes, slice structure) and Sorenson Spark streams (standard, 8-bit and
|
||||
-- 16-bit custom sizes, 11-bit escapes, high motion, disposable inter pictures) decode one picture at a time to exactly
|
||||
-- ffmpeg's planes, every frame; header info; frameImage; the registry's decoders (h263, flv1); unsupported options are
|
||||
-- UNSUPPORTED; truncated and corrupted pictures never throw; the fuzz no-throw pass.
|
||||
@@ -23,6 +23,8 @@ local STREAMS = {
|
||||
require("@tests/gen/h263_plus_custom"),
|
||||
require("@tests/gen/h263_plus_odd"),
|
||||
require("@tests/gen/h263_plus_umv"),
|
||||
require("@tests/gen/h263_plus_slices"),
|
||||
require("@tests/gen/h263_plus_slices_umv"),
|
||||
require("@tests/gen/h263_flv_320"),
|
||||
require("@tests/gen/h263_flv_odd"),
|
||||
require("@tests/gen/h263_flv_wide"),
|
||||
@@ -123,7 +125,7 @@ do
|
||||
t:check(h.plus and h.width == 320 and h.height == 240 and h.ptype == 1, "plus_custom: PLUSPTYPE custom size, I picture")
|
||||
local h2 = assert(H263.header(file, fx.units[2][1], fx.units[2][2]))
|
||||
t:check(h2.ptype == 2, "plus_custom: second picture P")
|
||||
fx = STREAMS[12] -- flv_odd
|
||||
fx = STREAMS[14] -- flv_odd
|
||||
file = b64(fx.file)
|
||||
h = assert(H263.header(file, fx.units[1][1], fx.units[1][2], true))
|
||||
t:check(h.flv and h.width == 100 and h.height == 75 and h.version == 1, "flv_odd: Sorenson 8-bit custom size, version 1")
|
||||
@@ -143,7 +145,7 @@ end
|
||||
|
||||
-- 4. frameImage
|
||||
do
|
||||
local fx = STREAMS[12]
|
||||
local fx = STREAMS[14]
|
||||
local dec = H263.new({ flv = true })
|
||||
local file = b64(fx.file)
|
||||
local f = assert(dec:decode(file, fx.units[1][1], fx.units[1][2]))
|
||||
@@ -161,7 +163,7 @@ end
|
||||
do
|
||||
t:check(Video.fromFourcc("H263") == "h263" and Video.fromFourcc("s263") == "h263" and Video.fromFourcc("FLV1") == "flv1", "registry names")
|
||||
t:check(Video.canDecode("h263") and Video.canDecode("flv1"), "registry decoders")
|
||||
for _, idx in { 2, 13 } do
|
||||
for _, idx in { 2, 15 } do
|
||||
local fx = STREAMS[idx]
|
||||
local file = b64(fx.file)
|
||||
local dec = assert(Video.decoder({ id = 1, kind = "video", codec = if fx.flv then "flv1" else "h263", timescale = 25, width = fx.width, height = fx.height } :: any))
|
||||
@@ -192,7 +194,7 @@ end
|
||||
-- 6. robustness: truncated and corrupted pictures, garbage (never throws), the fuzz pass
|
||||
do
|
||||
local samples = {}
|
||||
for _, idx in { 1, 6, 8, 10, 11, 14 } do
|
||||
for _, idx in { 1, 6, 8, 10, 11, 13, 16 } do
|
||||
local fx = STREAMS[idx]
|
||||
local file = b64(fx.file)
|
||||
for k = 1, 2 do
|
||||
|
||||
Reference in new issue
Block a user