Commit Graph

1609 Commits

Author SHA1 Message Date
Scott LaVarnway
bcba86e2e9 Eliminated reconintra_mt.c
Reworked the code to use vp8_build_intra_predictors_mby_s,
vp8_intra_prediction_down_copy, and vp8_intra4x4_predict_d_c
functions instead.  vp8_intra4x4_predict_d_c is a decoder-only
version of vp8_intra4x4_predict.  Future commits will fix this
code duplication.

Change-Id: Ifb4507103b7c83f8b94a872345191c49240154f5
2012-02-28 14:12:30 -05:00
Scott LaVarnway
f2bd11faa4 Eliminated vp8mt_build_intra_predictors_mbuv_s
Reworked the code to use vp8_build_intra_predictors_mbuv_s
instead.  This is WIP with the goal of eliminating all
functions in reconintra_mt.h

Change-Id: I61c4a132684544b24a38c4a90044597c6ec0dd52
2012-02-21 14:59:05 -05:00
Johann
b0a12a2880 Refine offset pattern
When compiling with -ggdb3 the output includes an extraneous EQU from
vpx_ports/asm_offsets.h

https://trac.macports.org/ticket/33285

Change-Id: Iba93ddafec414c152b87001a7542e7a894781231
2012-02-17 12:28:13 -08:00
John Koleszar
b5ce9456db Merge changes Idf1a05f3,If227b29b,Iac784d39
* changes:
  vpxenc: factor out input open/close
  vpxenc: add warning()/fatal() helpers
  vpxenc: factor out global config options
2012-02-17 11:14:17 -08:00
Johann
e6047a17a9 Merge "OS X shell is incompatible with echo -n" 2012-02-17 10:53:19 -08:00
Yunqing Wang
f93b1e7be1 Merge "Fix incorrect use of uv eobs in intra modes" 2012-02-17 10:43:05 -08:00
Yunqing Wang
04b9e0d787 Fix incorrect use of uv eobs in intra modes
In vp8_rd_pick_inter_mode(), if total of eobs is zero, rate needs
to be adjusted since there are no non-zero coefficients for
transmission. The uv intra eobs calculated in
rd_pick_intra_mbuv_mode() need to be saved before they are
overwritten by inter-mode eobs.

Change-Id: I41dd04fba912e8122ef95793d4d98a251bc60e58
2012-02-17 09:15:08 -05:00
Johann
6b151d436d Clarify 'max_sad' usage
Depending on implementation the optimized SAD functions may return early
when the calculated SAD exceeds max_sad.

Change-Id: I05ce5b2d34e6d45fb3ec2a450aa99c4f3343bf3a
2012-02-16 15:17:44 -08:00
Johann
5f0b303c28 OS X shell is incompatible with echo -n
Built in echo in 'sh' on OS X does not support -n (exclude trailing
newline). It's not necessary so just leave it off. Fixes issue 390.

Build include guard using 'symbol' so that it is more likely to be
unique.

Change-Id: I4bc6aa1fc5e02228f71c200214b5ee4a16d56b83
2012-02-16 14:20:44 -08:00
Fritz Koenig
3653fb473a Include path fix for building against Android NDK.
cpu-features.h is not in the common paths, add
to the cflags for Android.

Change-Id: Icbafc7600d72f6b59ffb030f6ab80ee6860332bb
2012-02-16 12:38:17 -08:00
John Koleszar
732cb9a643 vpxenc: factor out input open/close
Simplify some of the file I/O for later commits which will add multistream
support

Change-Id: Idf1a05f3a29c95331d0c4a6ea5960904e4897fd4
2012-02-16 12:30:00 -08:00
John Koleszar
c535025c12 vpxenc: add warning()/fatal() helpers
Cosmetic. Allows exiting with an error message without opening a new
scope.

Change-Id: If227b29b825f0241acea79dd38f19e524552ee18
2012-02-16 12:26:58 -08:00
Makoto Kato
7989bb7fe7 Support Android x86 NDK build
On Android NDK, rand() is inlined function.  But, on our SSE optimization,
we need symbol for rand()

Change-Id: I42ab00e3255208ba95d7f9b9a8a3605ff58da8e1
2012-02-16 12:03:30 -08:00
Scott LaVarnway
6776bd62b5 Simplify mb_to_x_edge calculation during mode decoding
Change-Id: Ibcb35c32bf24c1d241090e24c5e2320e4d3ba901
2012-02-16 13:36:46 -05:00
Scott LaVarnway
a5879f7c81 Merge "decodemv cleanup/improvements" 2012-02-16 09:33:59 -08:00
Scott LaVarnway
12ee845ee7 decodemv cleanup/improvements
Removed unnecessary variables, unrolled functions, eliminated
unnecessary mv bounds checks and branches.

Change-Id: I02d034c70cd97b65025d59dd67c695e1db529f0b
2012-02-16 11:38:33 -05:00
John Koleszar
efd54f8f41 vpxenc: factor out global config options
This is a first step towards specifying multiple output streams
with one command line.

Change-Id: Iac784d3911bf553694d024bbd0c3d547261e914b
2012-02-15 16:11:35 -08:00
Fritz Koenig
8144132866 Fix rtcd build process for Android.mk
Add a dependency so ndk-build will
generate the needed vpx_rtcd.h file.

Change-Id: I92c82e0996943dd0403c9956e1ba60e92e2837a9
2012-02-15 15:23:04 -08:00
John Koleszar
e6df50031e Merge "support changing resolution with vpx_codec_enc_config_set" 2012-02-10 16:18:00 -08:00
Johann
169823428f Missed some variance casts
Change-Id: I9fb510f9421fb3c317a8e32e3058cee977ddf9fa
2012-02-10 11:07:33 -08:00
Johann
12d45f62f6 Merge "max_sad check is not always implemented" 2012-02-10 10:28:00 -08:00
Johann
8c50a70a95 max_sad check is not always implemented
As an optimization some architectures use the max_sad argument to break
out early from the SAD. Pass in INT_MAX instead of 0 to prevent this.

Change-Id: I653c476834b97771578d63f231233d445388629d
2012-02-09 16:19:10 -08:00
Johann
fea3556e20 Fix variance overflow
In the variance calculations the difference is summed and later squared.
When the sum exceeds sqrt(2^31) the value is treated as a negative when
it is shifted which gives incorrect results.

To fix this we cast the result of the multiplication as unsigned.

The alternative fix is to shift sum down by 4 before multiplying.
However that will reduce precision.

For 16x16 blocks the maximum sum is 65280 and sqrt(2^31) is 46340 (and
change).

PPC change is untested.

Change-Id: I1bad27ea0720067def6d71a6da5f789508cec265
2012-02-09 12:38:31 -08:00
John Koleszar
2e0d55314c Merge "Add OS/2 supports" 2012-02-08 11:00:55 -08:00
KO Myung-Hun
2dad8d65d9 Add OS/2 supports
Change-Id: I792d5236451905eb20a8ebe444ef5b2274e4f7a4
2012-02-08 09:44:42 -08:00
John Koleszar
51acb01167 support changing resolution with vpx_codec_enc_config_set
Allow the application to change the frame size during encoding. This
is only supported when not using lagged compress.

Change-Id: I89b585d703d5fd728a9e3dedf997f1b595d0db0f
2012-02-07 17:09:40 -08:00
John Koleszar
417b852967 Align internal mfqe framebuffer dimensions
MFQE postproc crashed with stream dimensions not a multiple of 16.
The buffer was memset unconditionally, so if the buffer allocation
fails we end up trying to write to NULL.

This patch traps an allocation failure with vpx_internal_error(),
and aligns the buffer dimensions to what vp8_yv12_alloc_frame_buffer()
expects.

Change-Id: I3915d597cd66886a24f4ef39752751ebe6425066
2012-02-07 10:40:26 -08:00
Adrian Grange
45f4b87e8e Fixed bug in 5-layer multi-layer encode
The 5-layer encode must have a keyframe every 16 frames.

The KF flag was being reset after the encode of the first
frame, which it should not do for the 5-layer case
(mode=6).

Change-Id: I207d6e689d347fe3fd1075b97a817e82f7ad53b9
2012-02-06 15:02:33 -08:00
Adrian Grange
9df0d29823 Merge "Added 2 temporal patterns with new parameters" 2012-02-06 14:45:33 -08:00
Yunqing Wang
a040eb37e4 Merge "Allow to skip highest-resolution encoding in multi-resolution encoder" 2012-02-06 13:58:11 -08:00
Yunqing Wang
fa1a9290e6 Allow to skip highest-resolution encoding in multi-resolution encoder
Sometimes, a user doesn't have enough bandwidth to send high-resolution
(i.e. HD) video even though the camera catches HD video. This change
allowed users to skip highest-resolution encoding by setting that level's
target bit rate to 0.

To test it, modify the following line in vp8_multi_resolution_encoder.c.
    unsigned int  target_bitrate[NUM_ENCODERS]={1400, 500, 100};
To skip the highest-resolution level, change it to
    unsigned int  target_bitrate[NUM_ENCODERS]={0, 500, 100};
To skip the first and second highest resolution levels, change it to
    unsigned int  target_bitrate[NUM_ENCODERS]={0, 0, 100};

This change also fixed a small problem in mapping, which slightly helped
quality and performance.

Change-Id: I977bae9a9fbfba85c8be4bd5af01539f2b84bc81
2012-02-03 13:39:05 -05:00
Scott LaVarnway
d8ebdcd89d Moved ref_frame_cost from MACROBLOCKD to MACROBLOCK
Change-Id: I05788522e9cde4322cfb12032483bdbf184bdf0b
2012-02-02 13:40:08 -05:00
Scott LaVarnway
11c706488b Removed frames_till_alt_ref_frame from MACROBLOCKD
Change-Id: Ieb05270ac332a4cc38ec4b7b995fc0150e0fffdf
2012-02-02 13:34:13 -05:00
Scott LaVarnway
e2000cc5ca Removed frames_since_golden from MACROBLOCKD
Change-Id: I10efa441d663fceb6bc97a3bfad518cd3d9a5128
2012-02-02 13:28:41 -05:00
Scott LaVarnway
07c6eb18ad Merge "Improved uv mv calculations in build inter predictor" 2012-01-31 10:43:49 -08:00
Scott LaVarnway
749bc98618 BLOCKD structure cleanup
Removed redundancies.  All of the information can be
found in the MACROBLOCKD structure.

Change-Id: I7556392c6f67b43bef2a5e9932180a737466ef93
2012-01-31 11:02:39 -05:00
John Koleszar
57d459ba82 RTCD: remove unimplemented vp8_short_walsh4x4_mmx
This function does not exist.

Change-Id: I84b72fb17d572d5cccee92220467b84c15842d4d
2012-01-30 12:55:45 -08:00
John Koleszar
8aae246089 RTCD: finalize removal of old RTCD system
This is the final commit in the series converting to the new RTCD
system. It removes the encoder csystemdependent files and the remaining
global function pointers that didn't conform to the old RTCD system.

Change-Id: I9649706f1bb89f0cbf431ab0e3e7552d37be4d8e
2012-01-30 12:10:48 -08:00
John Koleszar
109b69a706 RTCD: add arnr functions
This commit continues the process of converting to the new RTCD
system. It removes the last of the VP8_ENCODER_RTCD struct references.

Change-Id: I2a44f52d7cccf5177e1ca98a028ead570d045395
2012-01-30 12:10:48 -08:00
John Koleszar
0b0bc8d098 RTCD: add motion search functions
This commit continues the process of converting to the new RTCD
system.

Change-Id: Ia5828b7ecc80db55b21916704aa3d54cbb98f625
2012-01-30 12:10:47 -08:00
John Koleszar
be8af188d0 RTCD: add block subtraction functions
This commit continues the process of converting to the new RTCD
system.

Change-Id: Id8a287fdd4bd050ea4452e1582ad85520f3081be
2012-01-30 12:10:47 -08:00
John Koleszar
61311e6103 RTCD: add quantizer functions
This commit continues the process of converting to the new RTCD
system.

Change-Id: Iba9df4c03a508e51c37201c621be43523fae87d9
2012-01-30 12:10:46 -08:00
John Koleszar
510e0ab467 RTCD: add FDCT functions
This commit continues the process of converting to the new RTCD
system.

Change-Id: I3f9c07db65eb206f6363d21bdb80e871570da767
2012-01-30 12:10:42 -08:00
John Koleszar
83a91e789c RTCD: add variance functions
This commit continues the process of converting to the new RTCD
system.

Change-Id: Ie5c1aa480637e98dc3918fb562ff45c37a66c538
2012-01-30 12:08:30 -08:00
John Koleszar
f103dcefaf RTCD: add subpixel functions
This commit continues the process of converting to the new RTCD
system.

Change-Id: I6c519ab61e4f4e0ebcc796f2df061f945c48cefe
2012-01-30 12:08:29 -08:00
John Koleszar
2a8f57f50d RTCD: add postproc functions
This commit continues the process of converting to the new RTCD
system.

Change-Id: If54eb5cb5d1b0cac6c4c0633a9e99c93ca860ba2
2012-01-30 12:08:29 -08:00
John Koleszar
fdb61a4531 RTCD: add recon functions
This commit continues the process of converting to the new RTCD
system.

Change-Id: I9bfcf9bef65c3d4ba0fb9a3e1532bad1463a10d6
2012-01-30 12:08:28 -08:00
John Koleszar
ab77b4e898 RTCD: add remaining IDCT functions
This commit continues the process of converting to the new RTCD
system.

Change-Id: I03c4dbf30dfd3558b0e256ff9d3ff4c012aadc80
2012-01-30 12:08:22 -08:00
John Koleszar
55f74c59c7 RTCD: add loopfilter functions
This commit continues the process of converting to the new RTCD
system.

Change-Id: Ic8a4047d72ff3a54ec98977dd90e70c13213db71
2012-01-30 12:06:31 -08:00
John Koleszar
a910049aea New RTCD implementation
This is a proof of concept RTCD implementation to replace the current
system of nested includes, prototypes, INVOKE macros, etc. Currently
only the decoder specific functions are implemented in the new system.
Additional functions will be added in subsequent commits.

Overview:
  RTCD "functions" are implemented as either a global function pointer
  or a macro (when only one eligible specialization available).
  Functions which have RTCD specializations are listed using a simple
  DSL identifying the function's base name, its prototype, and the
  architecture extensions that specializations are available for.

Advantages over the old system:
  - No INVOKE macros. A call to an RTCD function looks like an ordinary
    function call.
  - No need to pass vtables around.
  - If there is only one eligible function to call, the function is
    called directly, rather than indirecting through a function pointer.
  - Supports the notion of "required" extensions, so in combination with
    the above, on x86_64 if the best function available is sse2 or lower
    it will be called directly, since all x86_64 platforms implement
    sse2.
  - Elides all references to functions which will never be called, which
    could reduce binary size. For example if sse2 is required and there
    are both mmx and sse2 implementations of a certain function, the
    code will have no link time references to the mmx code.
  - Significantly easier to add a new function, just one file to edit.

Disadvantages:
  - Requires global writable data (though this is not a new requirement)
  - 1 new generated source file.

Change-Id: Iae6edab65315f79c168485c96872641c5aa09d55
2012-01-30 12:06:27 -08:00