Граф коммитов

142 Коммитов

Автор SHA1 Сообщение Дата
John Koleszar ef86bad0d1 Merge "Stereo 3D format support for vpxenc" 2011-04-25 10:48:44 -07:00
John Koleszar aa926fbd27 Add rc_max_intra_bitrate_pct control
Adds a control to limit the maximum size of a keyframe, as a function of
the per-frame bitrate. See this thread[1] for more detailed discussion:

[1]: http://groups.google.com/a/webmproject.org/group/codec-devel/browse_thread/thread/271b944a5e47ca38

Change-Id: I7337707642eb8041d1e593efc2edfdf66db02a94
2011-04-25 13:47:14 -04:00
Alok Ahuja 72c76ca256 Stereo 3D format support for vpxenc
Create a new input parameter to allow specifying
the packed frame stereo 3d format. A default value
of mono will be written in the absence of user
specified input

Change-Id: I576d9952ab5d7e2076fbf1b282016a9a1baaa103
2011-04-25 07:21:51 -07:00
John Koleszar 9d75a502c4 Merge remote branch 'internal/upstream' into HEAD 2011-04-16 00:05:07 -04:00
Johann f64f425a50 remove executable bit
source files are not executable

Change-Id: Id2c7294695a22217468426423979f68f02d82340
2011-04-15 13:43:24 -04:00
John Koleszar b3b2657f21 Merge remote branch 'internal/upstream' into HEAD 2011-04-02 00:05:11 -04:00
John Koleszar 26b6a3b088 vpxenc: die on realloc failures
Identified as a possible cause of issue #308, the code was silently
ignoring realloc failures, which would lead to corruption, memory
leaks, and likely a crash. The best we can do in this case is die
gracefully.

Change-Id: Ie5f6a853d367015be5b9712bd742778f3baeefd9
2011-03-30 06:37:02 -04:00
John Koleszar 51bcf621c1 Merge remote branch 'internal/upstream' into HEAD
Conflicts:
	vp8/decoder/decodemv.c
	vp8/decoder/onyxd_if.c
	vp8/encoder/ratectrl.c
	vp8/encoder/rdopt.c

Change-Id: Ia1c1c5e589f4200822d12378c7749ba62bd17ae2
2011-03-23 00:27:52 -04:00
John Koleszar 500fec2d5f Allow specifying --end-usage by enum name
Map an enum to the --end-usage values, so you can specify
--end-usage=cq instead of --end-usage=2. The numerical values still
work for historical scripts, etc, but this is more user friendly.

Change-Id: I445ecd9638f801f5924a71eabf449bee293cdd34
2011-03-21 07:50:42 -04:00
John Koleszar 5e9e17dff7 Merge remote branch 'internal/upstream' into HEAD 2011-03-08 00:05:05 -05:00
Ralph Giles fe9a604b1e Fix format-string warning
Cast size_t to (unsigned long) and print it with the %lu format
string, which is more portable than C99's explict %zu for size_t.

This truncates on Windows x64 but otherwise works on 32 and 64 bit
platforms. In practice the stats file is unlikely to be so large.

Change-Id: I0432b3acf85fc6ba4ad50640942e1ca4614b21cb
2011-03-07 13:21:39 -08:00
John Koleszar de4b3352b8 Merge remote branch 'internal/upstream' into HEAD
Conflicts:
	configure

Change-Id: I74063d859de31a62285c8908bcb1821e050b9f3c
2011-01-31 09:11:52 -05:00
Tero Rintaluoma 11a222f5d9 Adds "armvX-none-rvct" targets
Adds following targets to configure script to support RVCT compilation
without operating system support (for Profiler or bare metal images).
 - armv5te-none-rvct
 - armv6-none-rvct
 - armv7-none-rvct

To strip OS specific parts from the code "os_support"-config was added
to script and CONFIG_OS_SUPPORT flag is used in the code to exclude OS
specific parts such as OS specific includes and function calls for
timers and threads etc. This was done to enable RVCT compilation for
profiling purposes or running the image on bare metal target with
Lauterbach.

Removed separate AREA directives for READONLY data in armv6 and neon
assembly files to fix the RVCT compilation. Otherwise
"ldr <reg>, =label" syntax would have been needed to prevent linker
errors. This syntax is not supported by older gnu assemblers.

Change-Id: I14f4c68529e8c27397502fbc3010a54e505ddb43
2011-01-28 12:47:39 +02:00
John Koleszar f3aa1515f3 Merge remote branch 'internal/upstream-experimental' into HEAD 2011-01-10 08:29:26 -05:00
Paul Wilkins e0846c9c8c CQ Mode
The merge includes hooks to for CQ mode and other code
changes merged from the test branch.

CQ mode attempts to maintain a more stable quantizer within a clip
whilst also trying to adhere to a guidline maximum bitrate.

The existing target data rate parameter is used to specify the
guideline maximum bitrate.

A new parameter allows the user to specify a target CQ level.

For normal (non kf/gf/arf) frames, the quantizer will not drop BELOW the
user specified value (0-63). However, in some cases the encoder may
choose to impose a target CQ that is above that specified by the user,
if it estimates that consistent use of the target value is not compatible
with guideline maximum bitrate.

Change-Id: I2221f9eecae8cc3c431d36caf83503941b25e4c1
2011-01-07 18:46:29 +00:00
John Koleszar 93536be4b9 Merge remote branch 'internal/upstream' into HEAD 2010-12-24 00:05:10 -05:00
James Berry 74e8446e58 vpxenc stats_close() memleak fix
stats_close() was not freeing memory for
single pass runs.  It now takes in arg_passes
to determine when it should free memory.

Change-Id: I6623b7e30b76f9bf2e16008490f9b20484d03f31
2010-12-23 14:47:56 -05:00
John Koleszar c99c0e1798 Merge remote branch 'internal/upstream' into HEAD
Conflicts:
	vp8/vp8_cx_iface.c

Change-Id: Id670128595d04d6a61ec811b2ad896b138acded8
2010-12-21 07:56:46 -05:00
John Koleszar b0da9b399d Add psnr/ssim tuning option
Add a new encoder control, VP8E_SET_TUNING, to allow the application
to inform the encoder that the material will benefit from certain
tuning. Expose this control as the --tune option to vpxenc. The args
helper is expanded to support enumerated arguments by name or value.

Two tunings are provided by this patch, PSNR (default) and SSIM.
Activity masking is made dependent on setting --tune=ssim, as the
current implementation hurts speed (10%) and PSNR (2.7% avg,
10% peak) too much for it to be a default yet.

Change-Id: I110d969381c4805347ff5a0ffaf1a14ca1965257
2010-12-17 10:01:05 -05:00
John Koleszar 7211ac407b Merge remote branch 'internal/upstream' into HEAD 2010-12-14 00:05:07 -05:00
James Berry 136bd2455e fixed vpxenc bug where ivf files would be read incorrectly
read_frame would incorrectly insert detect->buf into img
for ivf files.  detect->position now set to 4 if input file is
detected to be ivf in file_is_ivf to keep this from occuring.

Change-Id: I5e235dd3033985bc62707a35c13af5984620208e
2010-12-13 14:40:18 -05:00
John Koleszar f99e91b65b Merge remote branch 'internal/upstream' into HEAD 2010-11-30 00:05:07 -05:00
Pascal Massimino fd9f9dc054 allow dimensions as low as 1 pixel
remove warning comment in vpxenc.c: in case of 1x1 picture,
detect_bytes will be equal to '3' and we'll fall back to
RAW_TYPE.
fix read_frame() by tracking the pre-read buffer length
in the struct detect

Change-Id: If1ed86ee5260dcdbc8f9d10da6cbb84a4cc2f151
2010-11-24 16:44:33 -08:00
Suman Sunkara 4b3f72001d Merge branch 'experimental' of ssh://on2-git.corp.google.com:29418/libvpx into test
Conflicts:
	vp8/common/blockd.h
	vp8/decoder/decodemv.c
	vp8/decoder/decodframe.c
	vp8/decoder/demode.c
	vp8/decoder/onyxd_if.c
	vp8/decoder/onyxd_int.h
	vp8/encoder/encodeframe.c

Change-Id: Ic379f4dffaded9796dc19d56be304d3f8527c61f
2010-11-16 16:30:59 -05:00
John Koleszar 9b5cd1c3ff Merge remote branch 'internal/upstream' into HEAD 2010-11-13 00:05:05 -05:00
Frank Galligan 8c2dfde3ed Fixed bug first cluster timecode of webm file is wrong.
When the first pts equaled 0 ivfenc was incorrectly increasing the
pts by 1. I changed the pts and last pts to be signed. I also set
the default value of last pts to -1.

Change-Id: I30bcec5af9b16d93fa9e3abbea7764b133e9cd73
2010-11-12 11:48:17 -05:00
John Koleszar cac05c832e Merge remote branch 'internal/upstream' into HEAD 2010-11-10 00:05:05 -05:00
John Koleszar f7e187d362 improve average framerate calculation
Change Ice204e86 identified a problem with bitrate undershoot due to
low precision in the timestamps passed to the library. This patch
takes a different approach by calculating the duration of this frame
and passing it to the library, rather than using a fixed duration
and letting the library average it out with higher precision
timestamps. This part of the fix only applies to vpxenc.

This patch also attempts to fix the problem for generic applications
that may have made the same mistake vpxenc did. Instead of
calculating this frame's duration by the difference of this frame's
and the last frame's start time, we use the end times instead. This
allows the framerate calculation to scavenge "unclaimed" time from
the last frame. For instance:

  start |  end  | calculated duration
  ======+=======+====================
    0ms    33ms   33ms
   33ms    66ms   33ms
   66ms    99ms   33ms
  100ms   133ms   34ms

Change-Id: I92be4b3518e0bd530e97f90e69e75330a4c413fc
2010-11-05 08:42:46 -04:00
John Koleszar 362f763cfe Merge remote branch 'internal/upstream' into HEAD
Conflicts:
	vp8/common/alloccommon.c
	vp8/common/onyxc_int.h
	vp8/vp8_cx_iface.c
	vpxenc.c
2010-11-04 21:50:37 -04:00
Yaowu Xu a5397dbaf1 Increase the resolution of default timebase
The old value 1000 was too low, which caused the effective duration and
frame rate calculation to have an 1% error for typical 30 frame/second
inputs. Symptom of the issue has been that most 2 pass encodings were
undershooting target bit rate by 1% or so for 30 fps input.

Change-Id: Ice204e86f844ceb9ce973456f2b995cc095283cf
2010-11-04 09:26:47 +00:00
John Koleszar 77e6b4504b vpxenc: require width and height for raw streams
Defaulting to 320x240 for raw streams is arbitrary and error-prone.
Instead, require that the width and height be set manually if they
can't be parsed from the input file.

Change-Id: Ic61979857e372eed0779c2677247e894f9fd6160
2010-11-03 13:58:44 -04:00
John Koleszar c377bf0eec fix pipe support on windows
STDIO streams are opened in text mode by default on Windows. This patch
changes the stdin/stdout streams to be in binary mode if they are being
used for I/O from the vpxenc or vpxdec tools.

Fixes issue #216. Thanks to mw AT hesotech.de for the fix.

Change-Id: I34525b3ce2a4a031d5a48d36df4667589372225b
2010-11-02 09:14:24 -04:00
John Koleszar 0684c647ef cosmetic: remove alt_ref from vpxenc usage message
Undo an automatic transform.

Change-Id: Ie730a6a31b4680b34e54b61691d67c4b3ed2f2aa
2010-10-29 11:07:31 -04:00
Timothy B. Terriberry c4d7e5e67e Eliminate more warnings.
This eliminates a large set of warnings exposed by the Mozilla build
 system (Use of C++ comments in ISO C90 source, commas at the end of
 enum lists, a couple incomplete initializers, and signed/unsigned
 comparisons).
It also eliminates many (but not all) of the warnings expose by newer
 GCC versions and _FORTIFY_SOURCE (e.g., calling fread and fwrite
 without checking the return values).
There are a few spurious warnings left on my system:

../vp8/encoder/encodemb.c:274:9: warning: 'sz' may be used
 uninitialized in this function
gcc seems to be unable to figure out that the value shortcut doesn't
 change between the two if blocks that test it here.

../vp8/encoder/onyx_if.c:5314:5: warning: comparison of unsigned
 expression >= 0 is always true
../vp8/encoder/onyx_if.c:5319:5: warning: comparison of unsigned
 expression >= 0 is always true
This is true, so far as it goes, but it's comparing against an enum, and the C
 standard does not mandate that enums be unsigned, so the checks can't be
 removed.

Change-Id: Iaf689ae3e3d0ddc5ade00faa474debe73b8d3395
2010-10-27 18:08:04 -07:00
Frank Galligan 3d84da6b8d Output the PSNR for the entire file.
If --psnr option is enabled vpxenc will output PSNR values for the
entire file. Added a \n before final output to make sure the output
is on its own line. Overall and Avg psnr matches the values written
to opsnr.stt file.

Change-Id: I869268b704fe8b0c8389d318cceb6072fea102f8
2010-10-27 14:31:07 -04:00
John Koleszar c7c0c05608 vpxenc: add unique track id
MKV requires a unique(ish) TrackID element in the track info header.
Instead of the current hard-coded ID, take a hash of the video track
and use that. This value is not written in the deterministic output
mode, despite being a deterministic value itself, to give flexibility
to change the hash algorithm and not affect bisecting across the
change.

Change-Id: I807fc3ea6d1427a151c3ef703269b67e80aef860
2010-10-27 13:00:29 -04:00
John Koleszar 75afcee962 vpxenc: add deterministic output option
By baking the version number into the output file, a hash of the file
will vary from commit to commit, even if the output is otherwise bit
exact. Add a -D option to suppress this behavior, for use when
bisecting or other debugging.

Change-Id: I5089a8ce5719920ffaf47620fa9069b81fa15673
2010-10-26 16:22:22 -04:00
John Koleszar 0a6bf29eb9 vpxenc: warn against webm output to pipes
The WebM writer requires a seekable stream.

Change-Id: I192e00706a0685362d41b8d2faf80add63d564b9
2010-10-25 22:35:22 -04:00
John Koleszar 5329189a33 vpxenc: specify output file with -o
Requiring the output file to be specified with the -o option opens up
the possibility of supporting multiple input files in the future.

Change-Id: I14c9b75e9b21184b47081e1ccf30cf4c91315964
2010-10-25 22:32:23 -04:00
John Koleszar 28f177cd3a vpxenc: change --framerate to --fps
Saves a little typing. FPS is a well known abbreviation.

Change-Id: I53730ea36afb9309732eb1c72c52d824d5365fec
2010-10-25 22:18:13 -04:00
John Koleszar 456bfb196b vpxenc: output webm by default
WebM should be preferred to IVF output, since it has wider tool support.

Change-Id: I5ac3d5cb68722e6c8af917cdba32ac01dd5e0ea2
2010-10-25 22:16:02 -04:00
John Koleszar ea68ee0458 rename ivf{enc,dec} to vpx{enc,dec}
The new WebM output support should be preferred to IVF, but we can't
change the default behavior of the ivf* tools. There are a few other
default behaviors for these tools that are counterintuitive for
historical reasons, and changing the binary name provides the
opportunity to clean those up as well. This patch takes the first
step by renaming the binaries.

Change-Id: I647008ae37cc352dd27ec1da7ed13489e0609b24
2010-10-25 22:12:44 -04:00