daala.git
3 years agoencode: skip include if intra paint is disabled exp_intra_paint
Tristan Matthews [Mon, 25 Aug 2014 00:33:36 +0000 (20:33 -0400)]
encode: skip include if intra paint is disabled

3 years agoAdd Viterbi trellis optimization to intra paint.
Nathan E. Egge [Fri, 22 Aug 2014 06:04:38 +0000 (02:04 -0400)]
Add Viterbi trellis optimization to intra paint.

Added a dynamic programming search for the optimal set of intra paint
 mode decisions that minimize MSE.
This is currently disabled by default because the current implementation
 does not cache mode costs and can take significant time on large images.

3 years agood_adapt_ctx_reset() has to be called with and without paint
Jean-Marc Valin [Wed, 20 Aug 2014 22:24:04 +0000 (18:24 -0400)]
od_adapt_ctx_reset() has to be called with and without paint

3 years agoReenabling PVQ for intra paint
Jean-Marc Valin [Wed, 20 Aug 2014 19:37:56 +0000 (15:37 -0400)]
Reenabling PVQ for intra paint

3 years agoQuick and dirty fix for negative indices in edge accumulators
Jean-Marc Valin [Wed, 20 Aug 2014 00:59:16 +0000 (20:59 -0400)]
Quick and dirty fix for negative indices in edge accumulators

3 years agoFixing pure horizontal and pure vertical through the interp weights
Jean-Marc Valin [Wed, 20 Aug 2014 00:53:40 +0000 (20:53 -0400)]
Fixing pure horizontal and pure vertical through the interp weights

Also changes the coding order for modes that are more horiz than vertical

3 years agoFixes top row and left column
Jean-Marc Valin [Tue, 19 Aug 2014 22:37:14 +0000 (18:37 -0400)]
Fixes top row and left column

3 years agofixing edge prediction
Jean-Marc Valin [Tue, 19 Aug 2014 22:26:14 +0000 (18:26 -0400)]
fixing edge prediction

3 years agofixing edge quantization, but not prediction
Jean-Marc Valin [Tue, 19 Aug 2014 22:23:15 +0000 (18:23 -0400)]
fixing edge quantization, but not prediction

3 years agofixing DC quantization
Jean-Marc Valin [Tue, 19 Aug 2014 22:17:59 +0000 (18:17 -0400)]
fixing DC quantization

3 years agooops, WTF
Jean-Marc Valin [Tue, 19 Aug 2014 22:09:33 +0000 (18:09 -0400)]
oops, WTF

3 years agoSeems to work with quantization disabled
Jean-Marc Valin [Tue, 19 Aug 2014 22:07:02 +0000 (18:07 -0400)]
Seems to work with quantization disabled

3 years agoGot similar modes as output
Jean-Marc Valin [Tue, 19 Aug 2014 21:37:56 +0000 (17:37 -0400)]
Got similar modes as output

3 years agoRefinement step to pick DC more often
Jean-Marc Valin [Tue, 19 Aug 2014 19:52:13 +0000 (15:52 -0400)]
Refinement step to pick DC more often

3 years agocompute edges separately from quantization
Jean-Marc Valin [Tue, 19 Aug 2014 19:49:47 +0000 (15:49 -0400)]
compute edges separately from quantization

3 years agoAvoid valgrind complaining about uninitialized values in the mode search
Jean-Marc Valin [Tue, 19 Aug 2014 17:59:42 +0000 (13:59 -0400)]
Avoid valgrind complaining about uninitialized values in the mode search

3 years agoPrevents mode probabilities from being zero.
Jean-Marc Valin [Tue, 19 Aug 2014 17:18:18 +0000 (13:18 -0400)]
Prevents mode probabilities from being zero.

3 years agoFix chroma clear bug on 00000000paint.png.
Nathan E. Egge [Tue, 19 Aug 2014 05:06:52 +0000 (01:06 -0400)]
Fix chroma clear bug on 00000000paint.png.

3 years agoSimplify mode_select() code by reusing interp_block()
Jean-Marc Valin [Tue, 19 Aug 2014 04:49:53 +0000 (00:49 -0400)]
Simplify mode_select() code by reusing interp_block()

3 years agoUsing more reasonable intra paint quantization
Jean-Marc Valin [Mon, 18 Aug 2014 23:59:48 +0000 (19:59 -0400)]
Using more reasonable intra paint quantization

3 years agoEnabling pvq skip for intra paint
Jean-Marc Valin [Mon, 18 Aug 2014 23:55:15 +0000 (19:55 -0400)]
Enabling pvq skip for intra paint

3 years agoFixing more disable paint logic.
Nathan E. Egge [Mon, 18 Aug 2014 23:30:14 +0000 (19:30 -0400)]
Fixing more disable paint logic.

3 years agoFix paint disable logic
Thomas Daede [Mon, 18 Aug 2014 22:55:38 +0000 (15:55 -0700)]
Fix paint disable logic

3 years agoClear on a line by line basis
Thomas Daede [Mon, 18 Aug 2014 20:58:11 +0000 (13:58 -0700)]
Clear on a line by line basis

3 years agoClear intra paint accumulators
Thomas Daede [Mon, 18 Aug 2014 18:24:51 +0000 (11:24 -0700)]
Clear intra paint accumulators

3 years agoDon't reference the MC buffer if paint is disabled.
Thomas Daede [Mon, 18 Aug 2014 18:18:05 +0000 (11:18 -0700)]
Don't reference the MC buffer if paint is disabled.

Fixes using OD_DISABLE_PAINT (1)

3 years agointra_paint: fix missing include exp_intra_paint2
Tristan Matthews [Sun, 17 Aug 2014 17:43:14 +0000 (13:43 -0400)]
intra_paint: fix missing include

Signed-off-by: Jean-Marc Valin <jmvalin@jmvalin.ca>
3 years agoMoves the generic encoder models to od_adapt_ctx
Jean-Marc Valin [Fri, 15 Aug 2014 17:29:14 +0000 (13:29 -0400)]
Moves the generic encoder models to od_adapt_ctx

Plus some renaming

3 years agoManual rebase of "Split encoder and common parts of intra paint"
Jean-Marc Valin [Thu, 14 Aug 2014 22:01:35 +0000 (18:01 -0400)]
Manual rebase of "Split encoder and common parts of intra paint"

3 years agoFixups for paint
Thomas Daede [Wed, 13 Aug 2014 18:05:20 +0000 (11:05 -0700)]
Fixups for paint

3 years agoFix issues with intra paint integration
Thomas Daede [Tue, 12 Aug 2014 23:15:56 +0000 (16:15 -0700)]
Fix issues with intra paint integration

3 years agoInitial attempt at integrating intra paint into the encoder
Thomas Daede [Tue, 12 Aug 2014 21:16:31 +0000 (14:16 -0700)]
Initial attempt at integrating intra paint into the encoder

3 years agoActually encode the "other" modes
Jean-Marc Valin [Tue, 12 Aug 2014 21:10:01 +0000 (17:10 -0400)]
Actually encode the "other" modes

3 years agoQuantize the first row and column of pixels
Jean-Marc Valin [Tue, 12 Aug 2014 21:01:40 +0000 (17:01 -0400)]
Quantize the first row and column of pixels

3 years agoEncoding mode for first row/column
Jean-Marc Valin [Tue, 12 Aug 2014 19:53:21 +0000 (15:53 -0400)]
Encoding mode for first row/column

3 years agoNow encoding the paint mode -- well almost
Jean-Marc Valin [Mon, 11 Aug 2014 21:56:51 +0000 (17:56 -0400)]
Now encoding the paint mode -- well almost

3 years agooops
Jean-Marc Valin [Sat, 9 Aug 2014 06:53:48 +0000 (02:53 -0400)]
oops

3 years agoEncoding the quantized right/bottom edge information
Jean-Marc Valin [Fri, 8 Aug 2014 21:06:03 +0000 (17:06 -0400)]
Encoding the quantized right/bottom edge information

3 years agoStarting to actually encode bits
Jean-Marc Valin [Fri, 8 Aug 2014 20:29:52 +0000 (16:29 -0400)]
Starting to actually encode bits

3 years agoFixes an issue with DC quantization. Now only enabled when neighbours are DC
Jean-Marc Valin [Fri, 8 Aug 2014 05:15:47 +0000 (01:15 -0400)]
Fixes an issue with DC quantization. Now only enabled when neighbours are DC

3 years agoFixes image corner
Jean-Marc Valin [Thu, 7 Aug 2014 18:14:02 +0000 (14:14 -0400)]
Fixes image corner

3 years agoInitial support for multiple block sizes in mode encoding simulation
Jean-Marc Valin [Thu, 7 Aug 2014 16:20:00 +0000 (12:20 -0400)]
Initial support for multiple block sizes in mode encoding simulation

3 years agoAdds code to simulate mode encoding at various resolutions
Jean-Marc Valin [Wed, 6 Aug 2014 21:01:24 +0000 (17:01 -0400)]
Adds code to simulate mode encoding at various resolutions

3 years agoremapping DC to mode 4*N
Jean-Marc Valin [Wed, 6 Aug 2014 18:22:51 +0000 (14:22 -0400)]
remapping DC to mode 4*N

3 years agoallocate enough memory for paint
Jean-Marc Valin [Tue, 5 Aug 2014 03:32:16 +0000 (23:32 -0400)]
allocate enough memory for paint

3 years agointra paint analysis also based on superblocks
Jean-Marc Valin [Tue, 5 Aug 2014 02:39:19 +0000 (22:39 -0400)]
intra paint analysis also based on superblocks

3 years agosuperblock ordering for intra paint
Jean-Marc Valin [Mon, 4 Aug 2014 23:13:33 +0000 (19:13 -0400)]
superblock ordering for intra paint

3 years agodifferent quantization for DC, plus wip
Jean-Marc Valin [Mon, 4 Aug 2014 16:37:17 +0000 (12:37 -0400)]
different quantization for DC, plus wip

3 years agoFixes DC mode
Jean-Marc Valin [Fri, 1 Aug 2014 21:24:59 +0000 (17:24 -0400)]
Fixes DC mode

3 years agoFixing a few issues with the bottom edge predictor
Jean-Marc Valin [Fri, 1 Aug 2014 19:37:51 +0000 (15:37 -0400)]
Fixing a few issues with the bottom edge predictor

3 years agoAll arrays allocated dynamically
Jean-Marc Valin [Fri, 1 Aug 2014 15:13:27 +0000 (11:13 -0400)]
All arrays allocated dynamically

3 years agoAllocating paint_out and mode dynamically
Jean-Marc Valin [Fri, 1 Aug 2014 14:53:17 +0000 (10:53 -0400)]
Allocating paint_out and mode dynamically

3 years agoblock size decision allocated dynamically
Jean-Marc Valin [Fri, 1 Aug 2014 14:31:15 +0000 (10:31 -0400)]
block size decision allocated dynamically

3 years agowip2
Jean-Marc Valin [Thu, 31 Jul 2014 21:39:10 +0000 (17:39 -0400)]
wip2

3 years agowip
Jean-Marc Valin [Thu, 31 Jul 2014 21:36:21 +0000 (17:36 -0400)]
wip

3 years agoAdds block size decision to intra paint
Jean-Marc Valin [Thu, 31 Jul 2014 17:42:37 +0000 (13:42 -0400)]
Adds block size decision to intra paint

3 years agoMaking the code a bit faster by only using half the directions
Jean-Marc Valin [Wed, 30 Jul 2014 21:36:14 +0000 (17:36 -0400)]
Making the code a bit faster by only using half the directions

3 years agood_intra_paint_encode() no longer overwrites the input
Jean-Marc Valin [Wed, 30 Jul 2014 19:48:36 +0000 (15:48 -0400)]
od_intra_paint_encode() no longer overwrites the input

3 years agoFixes a rare overflow on black and white images
Jean-Marc Valin [Wed, 30 Jul 2014 16:53:38 +0000 (12:53 -0400)]
Fixes a rare overflow on black and white images

3 years agoAdding some comments
Jean-Marc Valin [Wed, 30 Jul 2014 04:29:58 +0000 (00:29 -0400)]
Adding some comments

3 years agoFirst version of the intra paint code (not used by anything)
Jean-Marc Valin [Wed, 30 Jul 2014 04:04:05 +0000 (00:04 -0400)]
First version of the intra paint code (not used by anything)

3 years agoFix a typo in the mesh decimation description.
Timothy B. Terriberry [Wed, 13 Aug 2014 23:03:46 +0000 (16:03 -0700)]
Fix a typo in the mesh decimation description.

v is only used in the sense of "for all v".
The specific v being operated on throughout step 2 is v^*.

Thanks to Guillame Martres for the report.

3 years agoRemove obsolete MC test code.
Timothy B. Terriberry [Tue, 12 Aug 2014 21:30:31 +0000 (14:30 -0700)]
Remove obsolete MC test code.

This was designed to test continuity between the various edge
 interpolation types.
Since we no longer support CGI, there is only one edge type.
Technically, we could still repurpose this test to check for
 continuity between OBMC blending when adjacent block sizes differ,
 but that would require redesigning the test, and would have to be
 reworked when support for adjacent blocks that differ by more than
 one size level is added.

3 years agoRemove edge labels from MV grid.
Timothy B. Terriberry [Tue, 12 Aug 2014 21:28:01 +0000 (14:28 -0700)]
Remove edge labels from MV grid.

Just continuing to remove code that is now unused since CGI was
 removed.

3 years agoClean up some MC logging issues.
Timothy B. Terriberry [Tue, 12 Aug 2014 21:09:22 +0000 (14:09 -0700)]
Clean up some MC logging issues.

Don't dump a log message for every SAD computation.
Make the buffer overflow check in od_mv_dp_get_rate_change() assert
 instead of logging at the OD_LOG_DEBUG level.
Print lambda instead of lambda*8 (the extra *8 was just there for
 comparison with the old lambda values before commit 713cde8f4fd3).

3 years agoClean-up some hard-coded constants.
Timothy B. Terriberry [Tue, 12 Aug 2014 21:02:26 +0000 (14:02 -0700)]
Clean-up some hard-coded constants.

Give names to various sizes so it's clear where they come from and
 when they might need to be changed.

3 years agoFix MV rate updates in the refinement DP.
Timothy B. Terriberry [Tue, 12 Aug 2014 02:37:08 +0000 (19:37 -0700)]
Fix MV rate updates in the refinement DP.

od_mv_dp_get_rate_change() was not following the path back through
 the trellis properly.
It was using the state of the last node in the trellis to look up
 the previous state at every node, rather than the actual state at
 that node.

Thanks to Guillaume Martres for the bug report.

3 years agoodintrin.h: fix comment
Tristan Matthews [Sun, 10 Aug 2014 18:55:19 +0000 (14:55 -0400)]
odintrin.h: fix comment

3 years agoFix quality parameter issue introduced in 361. Change -v to float.
Basar Koc [Fri, 8 Aug 2014 16:16:57 +0000 (09:16 -0700)]
Fix quality parameter issue introduced in 361. Change -v to float.

Signed-off-by: Nathan E. Egge <negge@dgql.org>
3 years agoFix rd-curve sort order for jpeg and theora.
Nathan E. Egge [Fri, 8 Aug 2014 14:34:58 +0000 (10:34 -0400)]
Fix rd-curve sort order for jpeg and theora.

Update the quality column to use negative numbers so that sorting by
 quality ascending goes from best quality to worst.

3 years agoyuvjpeg: fix trivial leak
Tristan Matthews [Wed, 6 Aug 2014 17:42:45 +0000 (13:42 -0400)]
yuvjpeg: fix trivial leak

3 years agoUse associative arrays in rd_average.sh.
Nathan E. Egge [Wed, 6 Aug 2014 19:40:41 +0000 (15:40 -0400)]
Use associative arrays in rd_average.sh.

This preserves the codec quality parameter used by the different codecs
 supported in rd_collect.sh.

3 years agoInclude unistd.h on POSIX. Fixes warning introduced in #364.
Thomas Daede [Wed, 6 Aug 2014 01:14:27 +0000 (18:14 -0700)]
Include unistd.h on POSIX. Fixes warning introduced in #364.

3 years agoOutput encoding status with a newline when not attached to a tty.
Thomas Daede [Mon, 4 Aug 2014 20:50:43 +0000 (13:50 -0700)]
Output encoding status with a newline when not attached to a tty.

Useful when dumping stderr to a file.

3 years agoIncrease bitrate precision in motion estimation.
Timothy B. Terriberry [Mon, 4 Aug 2014 17:37:15 +0000 (10:37 -0700)]
Increase bitrate precision in motion estimation.

We need this before we can start using more accurate rate estimates.
This merely adds 3 fractional bits to all rate estimates, but does
 not actually change how estimates are made (so they are all still
 whole-bit values, just 8 times bigger now).
We steal 3 bits from the lambda precision to compensate, so the
 total dynamic range should be the same.

3 years agoFiner (unscaled) quantizer patch
Monty Montgomery [Mon, 4 Aug 2014 19:14:14 +0000 (15:14 -0400)]
Finer (unscaled) quantizer patch

Allow quantizer (now quality) parameter to be fractional up to
OD_COEFF_SHIFT bits.  Quantizer is now mapped and scaled (if needed)
at setting time, rather than being blindly scaled up by OD_COEFF_SHIFT
when used.

3 years agoSimplify reversible Haar code.
Timothy B. Terriberry [Tue, 29 Jul 2014 22:36:00 +0000 (15:36 -0700)]
Simplify reversible Haar code.

Rather than have multiple independent implementations, use a common
 kernel.

3 years agoFix Haar multiresolution blending.
Timothy B. Terriberry [Tue, 29 Jul 2014 22:27:26 +0000 (15:27 -0700)]
Fix Haar multiresolution blending.

The blending weights were being setup incorrectly for blocks with
 unsplit edges (it was not properly accounting for the fact that the
 low-pass band is half the size of the block).

3 years agotools: Use progressive scan for yuvjpeg
Nathan E. Egge [Tue, 29 Jul 2014 17:56:33 +0000 (13:56 -0400)]
tools: Use progressive scan for yuvjpeg

3 years agoFix support for monochrome input
Guillaume Martres [Wed, 23 Jul 2014 22:27:52 +0000 (00:27 +0200)]
Fix support for monochrome input

3 years agoencoder_example: Add --limit to set the maximum number of frames to encode
Guillaume Martres [Thu, 24 Jul 2014 00:42:38 +0000 (02:42 +0200)]
encoder_example: Add --limit to set the maximum number of frames to encode

3 years agord_collect.sh: follow symlinks to find samples
Guillaume Martres [Thu, 24 Jul 2014 18:59:40 +0000 (20:59 +0200)]
rd_collect.sh: follow symlinks to find samples

3 years agoFixes for issues 351 and 352
Jean-Marc Valin [Fri, 25 Jul 2014 18:59:16 +0000 (14:59 -0400)]
Fixes for issues 351 and 352

3 years agoRate-adaptive lambda for intra mode selection
Jean-Marc Valin [Sat, 12 Jul 2014 02:02:11 +0000 (22:02 -0400)]
Rate-adaptive lambda for intra mode selection

Subset1 improvement (when re-enabling intra) is:
           RATE (%) DSNR (dB)
    PSNR -2.99314 0.175805
 PSNRHVS -3.54018 0.226506
    SSIM -1.95321 0.0837564
FASTSSIM -7.19934 0.216148

3 years agoChanges intra mode encoding to adapt the entire table instead of p0
Jean-Marc Valin [Sat, 12 Jul 2014 02:00:28 +0000 (22:00 -0400)]
Changes intra mode encoding to adapt the entire table instead of p0

When resnabling intra, fixing the mode encoding gives (on subset1):
           RATE (%) DSNR (dB)
    PSNR -1.93514 0.126041
 PSNRHVS -2.41487 0.186607
    SSIM -1.98817 0.105181
FASTSSIM -2.69753 0.101027

3 years agoFixes intra pred bug introduced in d6ebba54b
Jean-Marc Valin [Sat, 12 Jul 2014 00:25:52 +0000 (20:25 -0400)]
Fixes intra pred bug introduced in d6ebba54b

DC was assumed zero even when Haar was off.

3 years agoMake lambda used for motion estimation RD adaptive.
Timothy B. Terriberry [Tue, 15 Jul 2014 20:20:55 +0000 (13:20 -0700)]
Make lambda used for motion estimation RD adaptive.

Previously this was a hard-coded constant (chosen just to get
 something working).
This uses the "theoretically optimal" value (with a cap), which may
 not actually be very good, especially since the rate model we use
 in mcenc.c is highly inaccurate and we don't consider during the
 motion search whether or not PVQ's noref flags will throw away our
 prediction.

3 years agoRemove need for --enable-logging in rd_collect.sh.
Nathan E. Egge [Tue, 15 Jul 2014 21:45:16 +0000 (17:45 -0400)]
Remove need for --enable-logging in rd_collect.sh.

3 years agoAdd configure flag to only dump reconstructed video.
Basar Koc [Tue, 15 Jul 2014 19:32:03 +0000 (12:32 -0700)]
Add configure flag to only dump reconstructed video.

Signed-off-by: Nathan E. Egge <negge@dgql.org>
3 years agoFixes build warnings in jpegyuv.c and vq_train.c.
Basar [Tue, 15 Jul 2014 18:52:35 +0000 (11:52 -0700)]
Fixes build warnings in jpegyuv.c and vq_train.c.

Signed-off-by: Nathan E. Egge <negge@dgql.org>
3 years agoFixes -Wmaybe-uninitialized warning.
Basar Koc [Tue, 15 Jul 2014 18:25:01 +0000 (11:25 -0700)]
Fixes -Wmaybe-uninitialized warning.

Signed-off-by: Nathan E. Egge <negge@dgql.org>
3 years agoAddresses comments from issues 346, 347, 349.
Jean-Marc Valin [Sat, 12 Jul 2014 02:25:47 +0000 (22:25 -0400)]
Addresses comments from issues 346, 347, 349.

Except initialization of the probs to increment >> 2 which I'll look into
separately.

3 years agoJointly codes the noref flags on 8x8 and 16x16
Jean-Marc Valin [Fri, 11 Jul 2014 18:40:33 +0000 (14:40 -0400)]
Jointly codes the noref flags on 8x8 and 16x16

Saves ~2% on the first P-frames of parkjoy, little impact on akiyo

3 years agoPer-plane context for the skip flags
Jean-Marc Valin [Thu, 10 Jul 2014 20:46:03 +0000 (16:46 -0400)]
Per-plane context for the skip flags

Saves ~2% on the first frames of park_joy. Not much difference on akiyo

3 years agoAdds some context to the block size range symbol
Jean-Marc Valin [Thu, 10 Jul 2014 14:22:19 +0000 (10:22 -0400)]
Adds some context to the block size range symbol

Probability depends on the size of the smallest neighbouring block

3 years agoFixing shebang statements in ab_compare scripts
Thomas Szymczak [Fri, 11 Jul 2014 12:55:47 +0000 (08:55 -0400)]
Fixing shebang statements in ab_compare scripts

Signed-off-by: Nathan E. Egge <negge@dgql.org>
3 years agoAdds better initial conditions for block size encoding CDFs
Jean-Marc Valin [Mon, 7 Jul 2014 17:32:58 +0000 (13:32 -0400)]
Adds better initial conditions for block size encoding CDFs

Also, makes the split16 CDF dependent on whether 4x4 is present.

3 years agodct: use OD_MOVE
Tristan Matthews [Wed, 9 Jul 2014 21:10:34 +0000 (17:10 -0400)]
dct: use OD_MOVE

This avoids a bug when building with clang-3.4

3 years agoAdds per-plane context for the PVQ gain.
Jean-Marc Valin [Tue, 8 Jul 2014 14:22:07 +0000 (10:22 -0400)]
Adds per-plane context for the PVQ gain.

subset1:
           RATE (%) DSNR (dB)
    PSNR -0.905569 0.0510298
 PSNRHVS -1.00289 0.0719411
    SSIM -0.898377 0.0399292
FASTSSIM -0.931303 0.0302713

Helps a bit on parkjoy, hurts a bit on akiyo (because it's small)

3 years agoUsing od_encode_cdf_adapt() for the 4x4 vs 8x8 decision too
Jean-Marc Valin [Sat, 5 Jul 2014 03:04:48 +0000 (23:04 -0400)]
Using od_encode_cdf_adapt() for the 4x4 vs 8x8 decision too

Removes useless training code