Commit Graph

277 Commits

Author SHA1 Message Date
Yaowu Xu
03a60b78db Add a new control of golden frame boost in CBR mode
0 means that golden boost is off, and uses average frame target rate,
a non-zero number means the percentage of boost over average frame
bitrate is given initially to golden frames in CBR mode.

Change-Id: If4334fe2cc424b65ae0cce27f71b5561bf1e577d
2014-10-27 13:55:18 -07:00
Yaowu Xu
636099f7b6 Add a new control of max bitrate for inter frame
Change-Id: I205de3611622cff7f751ea8baf9f82784581730a
2014-10-24 10:19:28 -07:00
Deb Mukherjee
a349ee3bf5 Resolves some lint errors
And also fixes some style consistency issues.

Change-Id: I3dc6d44e17d2d6075dc9b02c4255a7395046c5e0
2014-10-13 16:05:44 -07:00
Deb Mukherjee
ab35f9817e Fixes naming bug from previous highbitdepth patch
Change-Id: Ife939930309ceea730dd5df594b8f36e6644bf36
2014-10-08 12:46:37 -07:00
Deb Mukherjee
7a2a611667 Refactoring of highbitdepth bitshift operations
Moves the high bitdepth bit-shift operations to tools_common.c

Change-Id: Ifab91574362609cd224d2d6bae5fde00652eb3e4
2014-10-08 10:44:45 -07:00
Deb Mukherjee
2e9c1dc10c Remove experimental-bitstream flag for profiles>0
Profiles 1-3 are stable enough that we can remove the
experimental bitstream commandline option.

Change-Id: Id2a64a08192d7eac6c45384ee34196330351c6d8
2014-10-03 15:48:29 -07:00
Deb Mukherjee
a30774c50d Adds support of 440 content.
Adds enums and corresponding vpx level code.

Change-Id: Ia402d47490a4466988d7edc6b7e3e5163f20a381
2014-10-01 16:51:48 -07:00
Deb Mukherjee
a160d72522 High-bitdepth bugfixes
Miscellaneous bug-fixes for high bitdepth functionality.
With this patch, high bit-depth profiles become mostly functional,
except for an intermittent assert failure issue that is being
tracked.

Change-Id: I6a7fcbdcf1e5b09842e88535f8442d2e1230748c
2014-10-01 14:18:11 -07:00
JackyChen
bb1a23656c Change the control function of VP9 denoiser.
Change from VP8E_SET_NOISE_SENSITIVITY to VP9E_SET_NOISE_SENSITIVITY

Change-Id: Ia210a7029b26924e30973f0f9798a338e0412407
2014-09-12 16:34:22 -07:00
Yaowu Xu
dbdb87b72f Fix a visual studio warning
Change-Id: I7f935e61c8c0ade7893a5212701f07bb346d78cb
2014-09-04 17:00:32 -07:00
Deb Mukherjee
5acfafb18e Adds config opt for highbitdepth + misc. vpx
Adds config parameter vp9_highbitdepth, to support highbitdepth profiles.
Also includes most vpx level high bit-depth functions. However
encode/decode in the highbitdepth profiles will not work until
the rest of the code is in place.

Change-Id: I34c53b253c38873611057a6cbc89a1361b8985a6
2014-09-02 14:37:10 -07:00
Dmitry Kovalev
1b0870233f Merge "Renaming vpxenc option from frame_boost to frame-boost." 2014-08-28 11:42:23 -07:00
Dmitry Kovalev
f4eb3a2bae Adding several vpxenc parameter ranges to help output.
Change-Id: Iec1a00203930a539ed584961aed4b2bfd7488255
2014-08-28 10:25:40 -07:00
Dmitry Kovalev
4eb6763b65 Renaming vpxenc option from frame_boost to frame-boost.
We use dashes, no underscores. 

Change-Id: I423eee946d10731856e15591eb6e9e4628e3ee6c
2014-08-25 18:34:20 -07:00
Jim Bankoski
c901a4f041 vpxenc.c : static warnings cleanout
Change-Id: Ia55317606c78a9d984db0321ef142548d20b64bc
1: dereference of global->codec checked
2: warning fails to recognize fatal(xxx) as exit or return
3: ctrl_args_map can be null
4: streams can be null
2014-08-21 17:28:48 -07:00
James Zern
5805881825 vpxenc: fix compile with --disable-libyuv
Change-Id: I13d975d1f0e598e498798e4f33b06483f3a41130
2014-08-15 21:00:31 -07:00
Alex Converse
219f645b2d Add tune-content command line option
Change-Id: I3793b54ad432e46bcdb2dcc7adc0e15fa6deec47
2014-08-06 11:01:18 -07:00
Deb Mukherjee
090f4d4b5a Adds support for raw yuv files for 422/444
Adds support for raw yuv inputs in 422/444 sampling for use
in profiles 1 and 3.
New options added to vpxenc are:
--i422 and --i444, which are to be used in conjunction with
--width, --height, and --fps for proper raw yuv handling.
A new option is added to vpxdec:
--rawvideo, which enforces raw yuv video output for the
bit-stream decoded irrespective of 420, 422 or 444 sampling.
The existing options --i420 and --yv12
are specialized for use only for 420 content.

Change-Id: I2e3028380709afa673bf2e2c25ad5e271a626055
2014-07-16 09:44:30 -07:00
Deb Mukherjee
f332c6305e Renames interface field in VpxInterface
Renames interface to codec_interface since it is a reserved
word on windows.

Change-Id: I84f2cbf257a4c44f16dc2464127e35ee405c2c3e
2014-07-15 16:55:12 -07:00
Pengchong Jin
f349b071c6 Rewrite functions related to first pass block stats
Change-Id: I28679f88e2911b06eef5cbc83ecb62b8c69e4c53
2014-07-14 17:45:27 -07:00
Yaowu Xu
832e4f3c6d Merge "Silent -wextra warnings" 2014-07-14 14:03:39 -07:00
Yaowu Xu
618e7ef00e Silent -wextra warnings
1. vpxenc.c
2. y4minput.c

Change-Id: I1cfe1ef84a3eec11376976c09947fe6178ee039f
2014-07-11 16:28:12 -07:00
James Zern
aa70712e4e vpxenc: fix per-frame psnr/size output on a terminal
was previously being wiped out by the ctrl-K escape

Change-Id: I87d0de255a174f19e8912a65e519dad99d54a530
2014-07-09 11:38:00 -07:00
Deb Mukherjee
5820c5d614 Adds support for reading and writing 10/12-bit y4m
The y4m extension used is the same as the one used in ffmpeg/x264.
The patch is adapted from the highbitdepth branch.

Also adds unit tests for y4m header parsing and md5 check
of the raw frame data, as well as y4m writing.

[build fix for Mac/VS by not using tuples with strings]

Change-Id: I40897ee37d289e4b6cea6fedc67047d692b8cb46
2014-07-05 16:00:54 -07:00
Dmitry Kovalev
79199e465a Reverting "Adds support for reading and writing 10/12-bit y4m" for now because of Mac Build Failure.
This reverts commit 82dc1332af

Change-Id: I824bf42bf47c7df6985c79e451d6af913030d374
2014-07-02 22:23:38 -07:00
Deb Mukherjee
82dc1332af Adds support for reading and writing 10/12-bit y4m
The y4m extension used is the same as the one used in ffmpeg/x264.
The patch is adapted from the highbitdepth branch.

Also adds unit tests for y4m header parsing and md5 check
of the raw frame data, as well as y4m writing.

Change-Id: Ie2794daf6dbafd2f128464f9b9da520fc54c0dd6
2014-07-02 05:41:14 -07:00
Deb Mukherjee
47031c0a54 Updates libyuv to version 1005
Also adds compile check and a libyuv configure flag

Change-Id: Ib9f0f4a71c4083e6f0aea7b5a5d175531ef0f66b
2014-05-20 17:19:57 -07:00
Alex Converse
2a3092f995 Exit with error when vpxenc cannot correctly scale the input.
Change-Id: I4713406b751da06c41962f444f8873accc4fa044
2014-05-16 18:49:04 -07:00
Alex Converse
6c2e88e932 Rewrite encoder input format handling.
The previous approach can't scale to all of or new formats. This also
fixes YV12 input.

Change-Id: Ic4ad333770bbbd0e921f519199b57862afcbe1ab
2014-05-16 12:31:34 -07:00
James Zern
dba7376a99 vpxenc: add some missing CONFIG_WEBM_IO checks
fixes build of this file in the dist directory when using
'--enable-install-srcs'

Change-Id: Idb8dd5f392509e6a6d8a83908e53d161d2036971
2014-05-12 22:43:11 -07:00
Adrian Grange
0a386b9234 Revert "Force ARNR filtering to be centered on the ARF frame"
This reverts commit 59e733ca81.

Hold off removing arnr_type to give users the opportunity
to change their script files to handle its deprecation. A
follow-up patch will mark the control for setting arnr_type
as deprecated and it will be removed completely in a later
revision of the code.

Change-Id: I8b817c744e144d3714234a4cd4309816d0c7e3e8
2014-04-29 11:04:01 -07:00
Adrian Grange
59e733ca81 Force ARNR filtering to be centered on the ARF frame
ARNR filtering is now forced to be centered on the ARF
frame and the other two options have been removed.

The other modes of constructing the ARNR frame were
not used and there does not seem to be any good
reason to maintain them.

This is purely an encoder-side change.

Change-Id: Ic772636d23f280752973852b9740083532a49de2
2014-04-22 08:03:25 -07:00
James Zern
e3578af32c examples: remove off_t overrides
this is error prone, int64 will suffice for all cases

Change-Id: I94883f93518cfc356ed57b14dc39d79aebccf47d
2014-04-17 10:47:08 -07:00
Dmitry Kovalev
99983859f9 Merge "More user friendly vpxenc help strings." 2014-04-15 12:00:23 -07:00
Dmitry Kovalev
c8c1b43c3b More user friendly vpxenc help strings.
Change-Id: I257fb32673c47848258dc7e6e22147d0beb49f86
2014-04-14 12:12:50 -07:00
Adrian Grange
f7bd1274e3 Enable vpxenc to specify internal coded frame size
Added command line flags "resize-width" & "resize-height"
to allow the user to specify the frame size to encode at.

These two flags are ignored if the "resize-allowed" switch
is not set to 1.

All frames in the clip are then encoded at this size, which
must be smaller than the raw frame size.

Change-Id: I3d64bd9303d5c0bd678461a866a1ea621700d744
2014-04-14 10:54:19 -07:00
Vignesh Venkatasubramanian
2dcbf8c9e6 Changing webmenc to use libwebm
Changing webmenc to use libwebm for WebM file muxing.

Change-Id: I38ccc74f35c6b9684a87d04d8f9354dbe9a3263b
2014-04-04 10:07:08 -07:00
Yaowu Xu
d9812431a4 Merge "Removed space in ETA printout" 2014-04-04 08:32:08 -07:00
Yaowu Xu
c154826961 Removed space in ETA printout
This is to fix issue#709

Change-Id: I537f1fb74252fef8a58e68b0960a36a9aada856e
2014-04-03 18:05:17 -07:00
Marco Paniconi
0eb88c9064 Add codec control function for enabling frame_periodic_boost.
Change-Id: I6371ef7301c6bc3138552bd349e9bd154dee3e08
2014-04-03 15:49:03 -07:00
Paul Wilkins
80577dff4b Revert "Changing webmenc to use libwebm"
Temporary revert.
Problems with conflicting definitions of type off_t
in MSVC builds that need resolving.

c:\Program Files (x86)\
  Microsoft Visual Studio 9.0\VC\include\wchar.h(479) :
  "error C2371: 'off_t' : redefinition; different basic types
c:\on2experimental\libvpx\tools_common.h(26) :
   see declaration of 'off_t'"

This reverts commit 92a4c59112.

Change-Id: I535e40a18842a92e3e6e0b29e5fba66313010803
2014-04-02 13:29:25 +01:00
Vignesh Venkatasubramanian
92a4c59112 Changing webmenc to use libwebm
Changing webmenc to use libwebm for WebM file muxing.

Change-Id: I42eb688953865003214c05bdf2076ee00db28970
2014-03-28 07:39:05 -07:00
Vignesh Venkatasubramanian
0ffa3836f3 Adding a configure flag to control WebM container support
Adding a --(enable|disable)-webm-io flag to control WebM container input and
output support. For now, enabling WebM IO by default only when there is a C++
compiler. Doing so because eventually we will move WebM IO to libwebm and it
is built using C++.

Change-Id: I210ac36c23528e382ed41d3c4322291720481492
2014-03-14 14:44:47 -07:00
Dmitry Kovalev
2dad0e1238 Adding sse_to_psnr function to tools_common.{h, c}.
Change-Id: Id5f974172416499ff55b0929e315b12d16ff1b1b
2014-02-27 14:00:41 -08:00
Alex Converse
6e3cf6ec1d Stop gating non420 features with a configure flag.
Change-Id: I8cc38fdef6a2a0968af8dfe15e7c2b3c46c531ea
2014-02-21 12:05:29 -08:00
Alex Converse
d66bd22526 Require an --experimental-bitstream flag at runtime for encoding profile 1.
Change-Id: I73865bbbf6ea74434f15b73783ae97b4d273be80
2014-02-21 12:04:57 -08:00
Deb Mukherjee
25f22d2e0b In realtime mode enforce one pass with 0 lag
vpxenc level changes to enforce one pass encoding with 0
lag_in_frames when --rt mode is on.

Change-Id: I3e71719e87c9f66566cb4d944cf5705904f9a5b8
2014-02-13 16:37:05 -08:00
Dmitry Kovalev
70d9664fb2 Adding API to get vpx encoder/decoder interface.
Change-Id: I137e5e6585356792913e1e84da6c0a439c5153a5
2014-02-11 21:12:23 -08:00
Tom Finegan
7a691f17f2 vpxenc: Silence MSVC warnings.
Change-Id: I7dd8532052f0b2d4077f579e78db3987b58e3d2a
2014-02-11 09:33:24 -08:00
James Zern
ac94505ed7 Merge changes Ic362b088,I1c65c2aa
* changes:
  vpxenc: find_mismatch/compare_img: normalize types
  vpxenc: cosmetics
2014-02-03 23:07:35 -08:00
James Zern
4a703576f7 remove duplicate const from vpx_codec_iface_t use
the public typedef already includes a const, quiets
'same type qualifier used more than once' warnings

Change-Id: Ib118b3b116fba59d4c6ead84d85b26e5d3ed363d
2014-01-31 16:32:42 -08:00
James Zern
6253e8ed47 vpxenc: find_mismatch/compare_img: normalize types
use uint32_t where appropriate, silences a few warnings

Change-Id: Ic362b08868b00f4828982757a7bcee081d50308d
2014-01-31 16:14:03 -08:00
James Zern
d04112d27f vpxenc: cosmetics
find_mismatch() / compare_img(): const, whitespace

Change-Id: I1c65c2aac378535001720aca31e7437ee5492739
2014-01-31 16:11:58 -08:00
Dmitry Kovalev
373b0f9ae3 Changing ivf_write_frame_header() function signature.
Replacing vpx_codec_cx_pkt argument with two separate pts and frame_size.

Change-Id: I7b37e379ee71342520cf08f03acfb4b499b2cbe4
2014-01-29 17:57:21 -08:00
Dmitry Kovalev
f11da2b550 vpxenc: Relocate rate/quantizer histogram code.
Adding rate_hist.{h, c} files.

Change-Id: Iaa28af6b25ec8982966a7296a073d6017b3a7f96
2014-01-29 12:28:29 -08:00
hkuang
3671e629ad Fix the vpxenc mismatch problem due to seperate
the boarder size for encoder and decoder.

Change-Id: I7291a9e06035d1533202d7a75ab40abfc1131342
2014-01-22 14:58:59 -08:00
James Zern
2d8a954823 Merge "vpxenc: remove some warnings w/--disable-(vp8|vp9)" 2014-01-15 14:21:22 -08:00
James Zern
5248d7111e vpxenc: remove some warnings w/--disable-(vp8|vp9)
group vp8/vp9 only options under CONFIG_*_ENCODER

Change-Id: I331bb154df019b398780be6451355de50657a33e
2014-01-14 18:22:01 -08:00
Dmitry Kovalev
096ab11012 Removing pass number check from ivf_write_file_header().
Putting appropriate check to open_output_file() and close_output_file().
Before that the output file has been opened twice during two-pass encoding.

Change-Id: I290cecf00513d6a31ca3f45bc20fef7efcb10190
2014-01-13 15:21:48 -08:00
Alex Converse
64b89f1b4b Fix encoding Raw yv12 and i420 from a pipe.
rewind() does not work on pipes.

https://code.google.com/p/webm/issues/detail?id=678

Change-Id: I057f1e25c3f5662012d6e33ff4c97c88f50df357
2014-01-06 16:31:09 -08:00
Tom Finegan
249366b1ac vpxenc: Move config check code into its own source files.
- Add command line args that allow display of warnings without prompting
  for user input.
- Extend warning code to make it somewhat scalable.

Change-Id: I2bad8f9315f6eed120c2e1bbe0a2a5ede15fbf35
2013-11-25 12:05:45 -08:00
Paul Wilkins
644bd87e8e In frame Q adjustment experiment.
The idea here is to allow "in frame" adjustment of the final Q
value used to encode each SB64, using segmentation.

There is also adjustment of the rd mult in regions of overspend.

Activated using aq_mode=2

Change-Id: I2f140cd898c9f877c32cd6d2e667f5e11ada4b1c
2013-11-25 10:22:55 -08:00
Tom Finegan
49dc9cafa6 vpxenc: Add vpxenc.h and move/rename the global_config struct
- Rename the struct to VpxEncoderConfig.
- The idea behind this is to enable checking the global settings against
  stream specific settings in source files other than vpxenc.c.

Change-Id: Ic736cbb714845b9466acb34671780d65b83ad1a8
2013-11-21 16:46:40 -08:00
Tom Finegan
44dd3274da vpxenc: Warn users about incorrect quantizer settings.
Also, clean up stylistically questionable code near my changes.

Change-Id: I92c96a274cb339b7b74174a608f94ae86aba8354
2013-11-20 17:18:28 -08:00
Guillaume Martres
b00057c88a Merge "vpxenc: add --aq-mode flag to control adaptive quantization" 2013-11-20 08:13:28 -08:00
Guillaume Martres
17084657e6 vpxenc: add --aq-mode flag to control adaptive quantization
Change-Id: I57e1ad4bed3487df12893ced77c49093f8755706
2013-11-15 19:42:20 +01:00
Tom Finegan
00a35aab7c vpx[dec|enc]: Extract IVF support from the apps.
- Move IVF reading support into ivfdec.c and ivfdec.h
- Move IVF writing support into ivfenc.c and ivfenc.h
- Removed IVF writing code from the SVC example in favor of ivfenc.

Change-Id: I70adf6240d0320fdd232d8546ed573f0f68dd793
2013-11-15 08:33:24 -08:00
Tom Finegan
78cb2e6553 vpxenc: clean up; move stats code out of vpxenc.c
Change-Id: I6b245ef5017c49373ba33e30f8fbf3d1b97409b5
2013-11-11 16:30:18 -08:00
Tom Finegan
ab38f4f8fc Merge "vpx[dec|enc]: Clean up target OS based IO focused preproc abuse." 2013-11-11 11:53:33 -08:00
Tom Finegan
e657919ddf vpx[dec|enc]: Clean up target OS based IO focused preproc abuse.
Relocate it to tools_common.h so we can stop duping this code
everywhere.

BUG=https://code.google.com/p/webm/issues/detail?id=660

Change-Id: If8aa49b74d297273cd9fd7006b2767837055a359
2013-11-11 11:23:09 -08:00
Tom Finegan
6c270ed087 vpxenc: Remove support for IVF input.
Change-Id: Ida0e1b2df89e992b8140672b70517d8623cf9ede
2013-11-08 14:07:11 -08:00
Tom Finegan
03848f5ca7 Move WebM writing support out of vpxenc.c.
This is mainly a clean up patchset. It moves the WebM writing support
out of vpxenc and into its own source file. Changes to tools_common and
vpxdec result from relocation of shared bits of code.

Change-Id: Iee55d3285f56e0a548f791094fb14c5ac5346a26
2013-11-06 06:49:55 -08:00
Yaowu Xu
47e784eab6 Prevent first pass from outputing invalid info
First pass does not produce compressed data, therefore encode/decode
match check is not initialized.

Change-Id: I1971a6747337872a850987cc70ba267bd0f1d564
2013-10-16 16:29:28 -07:00
Dmitry Kovalev
86f4681450 Moving libmkv library to third_party folder.
Change-Id: Id0bfaedf54ff3f59d4cf361c170a0b5a5711e5f2
2013-10-07 13:06:53 -07:00
Tom Finegan
9ba08208d3 vpxenc: Stop writing the WebM FrameRate element.
The FrameRate element has been deprecated.

Change-Id: I68ac496e7b33685a100a45d2772e0ff30eb6a811
2013-09-24 09:18:54 -07:00
Yaowu Xu
b0211e7edf Merge "fix vp8-only build" 2013-09-19 09:27:59 -07:00
Yaowu Xu
014acfa2af fix integer overflow errors
Change-Id: I76f440a917832c02d7a727697b225bac66b99f56
2013-09-19 08:14:26 -07:00
James Zern
a0fcbcfa5f fix vp8-only build
Change-Id: Id9ce44f3364dd57b30ea491d956a2a0d6186be05
2013-09-17 18:47:25 -07:00
Deb Mukherjee
e378a89bd6 Support a constant quality mode in VP9
Adds a new end-usage option for constant quality encoding in vpx. This
first version implemented for VP9, encodes all regular inter frames
using the quality specified in the --cq-level= option, while encoding
all key frames and golden/altref frames at a quality better than that.

The current performance on derfraw300 is +0.910% up from bitrate control,
but achieved without multiple recode loops per frame.

The decision for qp for each altref/golden/key frame will be improved
in subsequent patches based on better use of stats from the first pass.
Further, the qp for regular inter frames may also be varied around the
provided cq-level.

Change-Id: I6c4a2a68563679d60e0616ebcb11698578615fb3
2013-09-06 10:30:53 -07:00
Deb Mukherjee
0d8723f8d5 Make "good" quality 2-pass vpxenc encoding default
Currently, the best quality mode in VP9 is not very well developed,
and unnecessarily makes the encode too slow. Hence the command line
default is changed to "good" quality. Also, the number of passes
default is changed to 2 passes as well, since 1-pass encoding is
not very efficient in VP9.

Besides, a number of VP9 defaults are set to the currently
recommended settings. With these changes, vpxenc
run with --codec=vp9 --kf-max-dist=9999 --cpu-used=0 should
work about the same as our borg results.
Note when the --cpu-used=0 option is dropped there will be a slight
difference in the output, because of a difference in the cpu-used
value for the first pass. Specifically, the default when unspecified
is to use cpu_used=1 for the first pass and cpu_used=0 for the
second pass. But when specified, both passes will use the cpu-used
value specified.

Note that this also changes the default for VP8 as being "good"
but other options stay unchanged.

Change-Id: Ib23c1a05ae2f36ee076c0e34403efbda518c5066
2013-08-21 12:41:26 -07:00
James Zern
8cb09719a3 vpxenc: open output file after setting pass #
write_ivf_file_header would incorrectly skip writing the file header in
the 2nd pass, causing the initial frame header to be overwritten on
close potential causing an overly large frame header to be read and a
crash.

most likely broken since:
9e50ed7 vpxenc: initial implementation of multistream support

fixes issue #585

Change-Id: I7e863e295dd6344c33b3e9c07f9f0394ec496e7b
2013-08-14 18:34:44 -07:00
John Koleszar
b9e2761019 vpxenc: send usage to stderr
Thanks to hiiragikei AT gmail.com for the fix.

Change-Id: Iab6c0822593fc5557d86efbb014ff6409ff05b35
2013-06-25 09:17:41 -07:00
Scott LaVarnway
0450a8891a Removed hardcoded global->limit
Looks like test code.

Change-Id: I5deae2bf14ea6fdcbb9b9d993966c9abef95eb2e
2013-06-17 15:28:45 -04:00
John Koleszar
119c9812a5 Add vp9 test vectors unit test
These files can stand in until we get proper syntax vectors. They
should provide some additional assurance against inadvertant
bitstream changes.

Change-Id: I12f6c9a5f054e30df40a7ff1f33145abf7e1d59d
2013-06-13 12:54:01 -07:00
John Koleszar
cc0eeda6dd Fix mismatch check output
Fixes a condition where the address of the mismatching pixels was not
being found/printed.

Change-Id: Ifac5cd3471bc2437448128591eea7c7b87e2d8fe
2013-06-11 11:28:38 -07:00
John Koleszar
beae501e96 vpxenc: fix mismatch check for non-4:2:0
Change-Id: Iffe7c2e6c6cb14b637420ffc368a5003f5db42fa
2013-05-09 20:14:31 -07:00
John Koleszar
8dd8287e16 Y4M input support for 4:2:2, 4:4:4, 4:4:4:4
Adds a new experiment CONFIG_NON420 that allows other chroma subsamplings
to be passed to the codec. This commit allows the data to be passed from
a y4m input file through vpxenc to the codec, where they're currently
rejected. Later commits will finish support for this inside the codec.

Change-Id: Ib3aac604d8cad9e24cef395fa1067f16ba7e8e43
2013-05-06 14:35:19 -07:00
Jingning Han
12bf0796e6 Clamp inferred motion vectors only
Clamp only the motion vectors inferred from neighboring reference
macroblocks. The motion vectors obtained through motion search in
NEWMV mode are constrained during the search process, which allows
a relatively larger referencing region than the inferred mvs.
Hence further clamping the best mv provided by the motion search may
affect the efficacy of NEWMV mode.

Synchronized the decoding process. The decoded mvs in NEWMV modes
should be guaranteed to fit in the effective range. Put a mv range
clamping function there for security purpose.

This improves the coding performance of high motion sequences, e.g.,
derf set:
foreman 0.233%
husky   0.175%
icd     0.135%
mother_daughter 0.337%
pamphlet        0.561%

stdhd set:
blue_sky 0.408%
city     0.455%
also saw sunflower goes down by -0.469%.

Change-Id: I3fcbba669e56dab779857a8126a91b926e899cb5
2013-04-08 11:37:03 -07:00
John Koleszar
81708cc326 Convert g_frame_parallel_decoding to control interface
Restore ABI compatibility with the master branch.

Change-Id: Ic57e7e1de09ab33bd37990e52a63ba7c8f1432a4
2013-03-27 11:07:26 -07:00
John Koleszar
771fc832f3 Merge branch 'master' into experimental
Pick up VP8 encryption, quantization changes, and some fixes to vpxenc

Conflicts:
	test/decode_test_driver.cc
	test/decode_test_driver.h
	test/encode_test_driver.cc
	vp8/vp8cx.mk
	vpxdec.c
	vpxenc.c

Change-Id: I9fbcc64808ead47e22f1f22501965cc7f0c4791c
2013-03-27 10:46:19 -07:00
Deb Mukherjee
23144d2345 Implicit weighted prediction experiment
Adds an experiment to use a weighted prediction of two INTER
predictors, where the weight is one of (1/4, 3/4), (3/8, 5/8),
(1/2, 1/2), (5/8, 3/8) or (3/4, 1/4), and is chosen implicitly
based on consistency of the predictors to the already
reconstructed pixels to the top and left of the current macroblock
or superblock.

Currently the weighting is not applied to SPLITMV modes, which
default to the usual (1/2, 1/2) weighting. However the code is in
place controlled by a macro. The same weighting is used for Y and
UV components, where the weight is derived from analyzing the Y
component only.

Results (over compound inter-intra experiment)
derf: +0.18%
yt: +0.34%
hd: +0.49%
stdhd: +0.23%

The experiment suggests bigger benefit for explicitly signaled weights.

Change-Id: I5438539ff4485c5752874cd1eb078ff14bf5235a
2013-03-26 16:58:56 -07:00
Dmitry Kovalev
8015a9aedc Fixing fourcc for VP8 and VP9.
Changing 0x00 ('') fourcc byte to 0x30 ('0'). For VP8 from
0x00385056 to 0x30385056, for VP9 from 0x00395056 to 0x30395056.

Change-Id: I26b1b603c20dd41f7aeabf8cd7893dfd5b1c8b59
2013-03-22 11:56:02 -07:00
John Koleszar
b3c350a1a9 Add VP9_GET_REFERENCE control
This is like VP8_COPY_REFERENCE, but returns a pointer to the reference
frame rather than a copy of it. This is useful when the application
doesn't know what the size of the reference is, as is the case when
scaling is in effect.

Change-Id: I63667109f65510364d0e397ebe56217140772085
2013-03-13 19:08:06 -07:00
John Koleszar
2bf563c335 vpxenc: improve progress indicators with --skip
Account for skipped input frames when calculating frame rates, ETA.

Fixes https://code.google.com/p/webm/issues/detail?id=556

Change-Id: I9c8b51e02e9ff0ab2cf6f16fc9382fc7f6c77b80
2013-03-11 15:03:00 -07:00
Ronald S. Bultje
97dd7342b8 vpxenc: actually report mismatch on stderr.
Because ctx->err is not set in that case, it will not report the error
on stderr.

Change-Id: Ifacbf5a03e676fd56522b03c0281d6c723c563ee
2013-03-04 16:49:00 -08:00
John Koleszar
406ec6b62e Fix rollover and pass 1 time estimate
Fixes a rollover of the cx_time variable for encodes that take
over ~4200 seconds. Also enable the time estimate in first pass.

Change-Id: Ib5a98ee71bccd79a804d709cec7260651d0b7141
2013-03-04 13:21:54 -08:00
John Koleszar
7dfec96059 vpxenc: support scaling prior to encoding
Scales the input of the encoder using libyuv's "box filter". Each stream
may have a different width and height specified. If the width (or
height) parameter is missing (or is explicitly set to 0) then the value
will be calculated based on the specified height (or width) and the
input file's dimensions, preserving its aspect ratio. Leaving the height
unspecified behaves similarly.

Change-Id: I700ef89ce54fb87588420a71c39c0e3e73b1a40e
2013-03-04 13:21:47 -08:00
Ronald S. Bultje
2d13e7b33e Don't exit on decode errors in vpxenc.
Allows the user to specify whether decode errors should be fatal or not.
Also makes mismatches optionally fatal.

Change-Id: I58cff4a82f3d42f5653b91cf348a7f669377e632
2013-03-04 13:19:09 -08:00
John Koleszar
60d8c50514 Add estimated completion time to vpxenc
Make the progress line more useful by providing per-frame updates of
processing frame rate and estimated time remaining.

Fixes issue #534.

Change-Id: Ic91551878ff4b2f5db1cedaafb588add220cfa52
2013-03-04 13:18:55 -08:00
John Koleszar
69c67c9531 Merge master branch into experimental
Picks up some build system changes, compiler warning fixes, etc.

Change-Id: I2712f99e653502818a101a72696ad54018152d4e
2013-03-01 11:06:05 -08:00