Commit Graph

1678 Commits

Author SHA1 Message Date
Johann
080919b3c2 Merge "Avoid heap allocation of firstpass stats" 2011-12-19 10:11:23 -08:00
John Koleszar
c75f0ec379 Merge "fix: make sure ss_err is large enough" 2011-12-19 09:50:12 -08:00
Yunqing Wang
fd294c553a Merge "Merge mr_pick_inter_mode and pick_inter_mode" 2011-12-19 08:42:20 -08:00
Yunqing Wang
c647ec4462 Merge mr_pick_inter_mode and pick_inter_mode
Merged multi-resolution motion estimation with regular motion
estimation function in order to remove duplicated part. This
caused slight changes in multi-resulotion encoder quality &
performance.

Change-Id: Ib4ecc7acfebfe5eea959b5b91febae6db7b95fd1
2011-12-16 18:02:29 -05:00
James Berry
24196dd987 fix: make sure ss_err is large enough
increase size of ss_err by one to make
sure there is room for 64 elements.

Change-Id: I355cb8c499aa7da3b9675f2326a8d25a74bb88d2
2011-12-16 17:43:55 -05:00
John Koleszar
26c6a44c66 Avoid heap allocation of firstpass stats
The total_stats, this_frame_stats, and total_left_stats structures
were previously create by a heap allocation, despite being of fixed
size. These structures were allocated and deallocated during
{de,}allocate_compressor_data, which is reinvoked whenever the frame
size changes. Unfortunately, this clobbers the total_stats and
total_left_stats data.

Historically, these were variable size at one time, due to the first
pass motion map, which necessitated their being created by a unique
heap allocation. However, this bug with the total_stats being
clobbered has probably been present since that initial implementation.

These structures are instead moved to be stored within the struct
twopass_rc directly, rather than being heap allocated separately.

Change-Id: I7f9e519e25c58b92969071f0e99fa80307e0682b
2011-12-16 11:40:23 -08:00
Scott LaVarnway
0ccefd2c8f Fixed mb_skip_coeff bug
When mb_skip_coeff is set, the idct is not necessary.  Prior
to this patch, the code would call idcts based on leftover
eob information.  This patch will now skip the idct for
SPLIT_MV and clear out the eobs for B_PRED, forcing the idct
to be skipped.

Change-Id: If5b0d2ed3ebd07789d30ec5160df927485fcaa17
2011-12-16 13:48:01 -05:00
Scott LaVarnway
a53d5a4c44 Moved dequant idct into common
These functions are now used by the encoder.
This is WIP with the goal of creating a common idct/add for
the encoder and decoder.  A boost of 1.8% was seen for
the HD rt test clip used.

[Tero] Added needed changes to ARM side.

Change-Id: Ibbb8000be09034203d7adffc457d3c3f8b06a5bf
2011-12-15 14:23:41 -05:00
Yunqing Wang
c8df1656bd Merge "Only call vp8_find_near_mvs() once for each macroblock" 2011-12-15 09:53:25 -08:00
Yunqing Wang
e06c242baa Only call vp8_find_near_mvs() once for each macroblock
While doing motion search on a macroblock, we usually call
vp8_find_near_mvs once per reference frame. Actually, for
different reference frames, the only difference in calculating
these near_mvs is they may have different sign_bias, which
causes a sign change in resulting near_mvs. In this change, we
only do find_near_mvs for the first reference frame. For other
reference frames, only need to adjust the near_mvs according to
that reference frame's sign_bias value.

Change-Id: I661394b49c6ad79fed7d0f2eb2be239b9c56f149
2011-12-15 11:19:18 -05:00
Yunqing Wang
d7e09b6ada Merge "Force realtime version 1 streams to only use simple loopfilter" 2011-12-15 05:38:57 -08:00
John Koleszar
72f459c77f Merge "Avoid multiple test for same lvl in auto filter lvl pick" 2011-12-14 16:28:13 -08:00
John Koleszar
4f8f360098 Merge "add check to ensure that cq_level falls within min and max q" 2011-12-14 12:10:06 -08:00
Johann
7d54dfc6e4 Merge "Use xcode 4.2" 2011-12-14 11:54:22 -08:00
Johann
24beb58dd5 Merge "Fix iOS conversion script" 2011-12-14 11:44:21 -08:00
John Koleszar
e542627b0c Merge "fix: active_worst_quality could be set above 127" 2011-12-14 11:22:00 -08:00
Johann
247e7343d5 Use xcode 4.2
Allow targeting darwin11 / 10.7

Update arm paths for iPhoneOS 5.0

Change-Id: I057156349311ec66a163c4c1cea60dc5aeaaa492
2011-12-14 11:16:38 -08:00
James Berry
c1c47e83b0 add check to ensure that cq_level falls within min and max q
Add the notion of deferred validation of parameters. We don't want to
validate the cq_level at initialization time, because it won't have
been set via set_param() yet.

Change-Id: Ia1308395e8c10e0b1dc4e9af3a09b2bd6744cc30
2011-12-14 10:39:06 -08:00
Attila Nagy
51c4f9e6b1 Avoid multiple test for same lvl in auto filter lvl pick
Sometimes same level is tested 2-3 times; store and reuse the
calculated error value.

Change-Id: Ia1c04a2568232edf9a5a62c4e2d8e8a50d85e00e
2011-12-14 15:56:29 +02:00
Attila Nagy
55fbdd58ac Force realtime version 1 streams to only use simple loopfilter
...regardless of the speed settings.

Change-Id: I4b91ac7a7208efd690dfc69e175f8eb769b6ce03
2011-12-14 12:57:49 +02:00
John Koleszar
c4aeff94b1 Merge "vpx_integer.h: fix incorrect type emulation" 2011-12-13 12:55:46 -08:00
James Berry
f8b431c334 fix: active_worst_quality could be set above 127
add check to set active_worst_quality to 127 if it
is set above 127

Change-Id: I7db353d5c1b1c8516a116542b6ed21c0110bb512
2011-12-13 14:58:59 -05:00
John Koleszar
d6020f9d52 tokenizer: use correct block type context in stuff1st_order_b
The fast-path for skipped MBs was not correctly respecting the
block type during update of the coefficient counts. Extracted
this from part of change I365cfb6ac636f19c545f682e3aeac185253abaef

Change-Id: I53d8cf0a00a98034b97b0ed3414b703bae74a739
2011-12-13 11:58:56 -08:00
Johann
20573f0640 Merge "Fix incorrect PROC/ENDP match" 2011-12-13 10:42:02 -08:00
Johann
41e3da3a8c Fix incorrect PROC/ENDP match
The conversion script was incorrectly matching
CONFIG_POSTPROC[_VISUALIZER] and generating an
incorrect vpx_config.asm

Match both PROC and ENDP on word boundaries

Change-Id: Ic2788c3b522d4ee0afc5223b72e1b09fb52645be
2011-12-13 10:40:34 -08:00
Yunqing Wang
72af533f79 Merge "Align image buffer in multiple-resolution encoder" 2011-12-13 10:39:44 -08:00
Yunqing Wang
153eec46e0 Align image buffer in multiple-resolution encoder
Aligned the image buffer and stride to 32 bytes. This enables
calling of optimized scaler function in libyuv, and improves
the performance.

Tested libyuv scaler(x86 optimization) on Linux and Windows,
including: Linux 32/64bit, visual studio 32/64bit, Cygwin, and
MinGW32.

Also, fixed a wrong pointer in vpx_codec_encode().

Change-Id: Ibe97d7a0a745f82c43852fa4ed719be5a4db6abc
2011-12-13 09:25:30 -05:00
Johann
8bc60e4749 Fix iOS conversion script
Mach-O prefixes function calls with _

Change-Id: I778c2ab91266887731a6a0316b42af7641826da4
2011-12-12 17:14:03 -08:00
Jim Bankoski
6b2792b0e0 Merge "vp8e - entropy stats per frame type" 2011-12-12 09:08:34 -08:00
Scott LaVarnway
c4aa1d508e Removed unused diff buffer
Change-Id: I9211358cca89b1c4f84b53a202a63ecf9e79ae4c
2011-12-12 11:06:55 -05:00
Scott LaVarnway
afa1b66108 Merge "Improved mmx/sse2 versions of iwalsh" 2011-12-12 06:40:28 -08:00
Jim Bankoski
6de67cd6e8 vp8e - entropy stats per frame type
Change-Id: I4168eb6ea22ae541471738a7a3453e7d52059275
2011-12-09 16:56:18 -08:00
John Koleszar
a4e410a3ca vpx_integer.h: fix incorrect type emulation
The previous definition of uintptr_t was incorrect on x64 with MSVC.
Also, the ARMV6 version of int_fast16_t was defined as unsigned for
some reason. Since the fast types are currently unused, just remove
them.

Change-Id: Idd73f77a989c77feedcb4a6802ae6bd37324ed40
2011-12-09 11:54:40 -08:00
Scott LaVarnway
9fa6132fc5 Improved mmx/sse2 versions of iwalsh
Removed unnecessary transposes.

Change-Id: I029fbaf8afafee34d54a4f3333c22023c15003c3
2011-12-08 14:37:59 -05:00
Johann
a69810b893 Merge "Reduce mem copies in encoder loopfilter level picking" 2011-12-07 10:41:00 -08:00
Attila Nagy
e570b0406d Reduce mem copies in encoder loopfilter level picking
Do the test filtering in the existing backup frame buffer instead of
the original. Copy the original data into extra buffer before doing
the  filtering. This way there is no need to restore the original
unfiltered  frame at the end of level picking process.

This came up in some discussions with Johann. Thanks!

Change-Id: I495f4301d983854673276c34ec0ddf9a9d622122
2011-12-07 09:59:50 +02:00
Yunqing Wang
254889cdfc Merge "Allow aligning the raw image buffer" 2011-12-06 10:21:28 -08:00
Yunqing Wang
be5bbc96e8 Allow aligning the raw image buffer
Added code to allocate aligned image buffer in vpx_img_alloc(). The
alignment of the buffer and stride is determined by the parameter
align.

Change-Id: Idc866978484be3558551c56df39130ab7f74ddd4
2011-12-06 13:19:59 -05:00
Yunqing Wang
aa7335e610 Multiple-resolution encoder
The example encoder down-samples the input video frames a number of
times with a down-sampling factor, and then encodes and outputs
bitstreams with different resolutions.

Support arbitrary down-sampling factor, and down-sampling factor
can be different for each encoding level.

For example, the encoder can be tested as follows.
1. Configure with multi-resolution encoding enabled:
../libvpx/configure --target=x86-linux-gcc --disable-codecs
--enable-vp8 --enable-runtime_cpu_detect --enable-debug
--disable-install-docs --enable-error-concealment
--enable-multi-res-encoding
2. Run make
3. Encode:
If input video is 1280x720, run:
./vp8_multi_resolution_encoder 1280 720 input.yuv 1.ivf 2.ivf 3.ivf 1
(output: 1.ivf(1280x720); 2.ivf(640x360); 3.ivf(320x180).
The last parameter is set to 1/0 to show/not show PSNR.)
4. Decode:
./simple_decoder 1.ivf 1.yuv
./simple_decoder 2.ivf 2.yuv
./simple_decoder 3.ivf 3.yuv
5. View video:
mplayer 1.yuv -demuxer rawvideo -rawvideo w=1280:h=720 -loop 0 -fps 30
mplayer 2.yuv -demuxer rawvideo -rawvideo w=640:h=360 -loop 0 -fps 30
mplayer 3.yuv -demuxer rawvideo -rawvideo w=320:h=180 -loop 0 -fps 30

The encoding parameters can be modified in vp8_multi_resolution_encoder.c,
for example, target bitrate, frame rate...

Modified API. John helped a lot with that. Thanks!

Change-Id: I03be9a51167eddf94399f92d269599fb3f3d54f5
2011-12-05 17:59:42 -05:00
John Koleszar
6127af60c1 Merge "Speed selection support for disabled reference frames" 2011-12-05 14:36:54 -08:00
John Koleszar
bdd60a7be7 Merge "bugfix: all vpxenc arguments were not parsed under all conditions" 2011-11-29 08:54:31 -08:00
James Berry
16e101ba54 bugfix: all vpxenc arguments were not parsed under all conditions
dynamicly assign ARG_CTRL_CNT_MAX and
add check to make sure argument instance
doesnt already exist before creating a duplicate

Change-Id: I4f78a9c5346cda8e812cd89c077afe8996493508
2011-11-28 15:58:50 -05:00
Yunqing Wang
06fc0f83b6 Populate q_index in multi-thread encoding
This value needs to be copied to each thread's data structure.
This fixed artifact problem in multi-thread encoder.

Change-Id: Iab6d9745a1d44846aa503184705376f63a505597
2011-11-28 15:58:28 -05:00
Scott LaVarnway
34d7c8b3d4 Added vp8_dequant_idct_add_y_block_sse2 setup
In Change I83202ffd, I deleted one too many lines.

Change-Id: If05d7c8988eb5c00898dc7c833ad7d99b5eb23e7
2011-11-28 13:06:13 -05:00
Scott LaVarnway
f46e17fd6f Merge "Modified the inverse walsh to output directly" 2011-11-28 07:26:07 -08:00
Scott LaVarnway
4a91541c94 Modified the inverse walsh to output directly
to the dqcoeff or qcoeff buffer.  The encoder would
populate the dc coeffs of the y blocks as a separate
stage (recon_dcblock) and the decoder would use a special
version of the idct.  This change eliminates the extra copy
and reduces the code footprint.

[Tero] Added needed changes to armv6 and NEON assembly.

Change-Id: I83202ffdbaf83f6e5dd69f4ba2519fcf0b13b3ba
2011-11-25 09:24:04 +02:00
Johann
e2bacd581a Merge "Move shared data to shared location" 2011-11-23 11:20:54 -08:00
Johann
15ea268d62 Merge "Fix encoder partitioned output on ARM" 2011-11-23 08:44:21 -08:00
Attila Nagy
97259b460c Fix encoder partitioned output on ARM
API was not returning correct partition sizes on arm targets.
The armv5 token packing functions were not storing the information to the
partition size table.
As a fix, have one boolcoder instance allocated for each partition so
that partition sizes are internally available after all partitions
were encoded. This will also allow more flexibility in producing
several partitions in parallel.

Use buffer validation (overflow check) in all ARM bitpacking
functions.

Change-Id: I31c8a11d8a7613676f0ff50928cb2a2ab14fd169
2011-11-23 12:29:43 +02:00
John Koleszar
b79879c2e3 Merge "Decoder fixes to better support reference picture selection." 2011-11-22 17:12:06 -08:00