In order to understand memory layout consider the declaration of the
following structs. The first one is a part of our API:
struct vpx_codec_ctx {
// ...
struct vpx_codec_priv *priv;
};
The second one is defined in vpx_codec_internal.h:
struct vpx_codec_priv {
// ...
};
The following struct is defined 4 times for encoder/decoder VP8/VP9:
struct vpx_codec_alg_priv {
struct vpx_codec_priv base;
// ...
};
Private data allocation for the given ctx:
struct vpx_codec_ctx *ctx = <get>
struct vpx_codec_alg_priv *alg_priv = <allocate>
ctx->priv = (struct vpx_codec_priv *)alg_priv;
The cast works because vpx_codec_alg_priv has a
vpx_codec_priv instance as a first member 'base'.
Change-Id: I10d1afc8c9a7dfda50baade8c7b0296678bdb0d0
When configuring the buffer make sure to set all the (now) required
fields. Use the canonical variables and match the style from vpx_scale.
https://code.google.com/p/webm/issues/detail?id=841
Change-Id: I71b43d4a03756b8b2d6d60fdf8d7bf41b8041787
if the decode of the first frame fails, frame_to_show may not be set.
fixes a crash in vpxdec with corrupt data.
Change-Id: I5ab9476d005778a13fd42a39d05876bb6c90a93c
When no more data is available, vpx_codec_decode should
be called with NULL as data and 0 as data_sz.
vpx_codec_get_frame iterates over a list of the frames
available for display. The iterator storage should be initialized
to NULL to start the iteration. Iteration is complete when this
function returns NULL.
Also change the unit test to conform to the api spec.
Change-Id: I4b258b309f5df3d37d10c82f01492c0394181c2a
Sets the bit-depth field as default 8 in the image structure in vp8.
Generalizes yuv read in preparation for support for reading 422/444
for 8-bit and 10/12-bit.
Change-Id: I560c13c348b122fd028e408431156376b895058c
Fixes a bug introduced in
https://gerrit.chromium.org/gerrit/#/c/69779/13, where
uninitialized frame buffers due to corrupt and short
buffer sizes, may cause a crash.
This patch fixes the currently failing
video/processing/static_image/vp8_convert_test
Change-Id: I1b09e21482f292c11a2bfb4e570aef1d643410a7
Added support for external frame buffers to libvpx's VP9 decoder.
If the external frame buffer functions are set then libvpx will
call the get function whenever it needs a new frame buffer to
decode a frame into. And it will call the release function
whenever there are no more references to that buffer.
Change-Id: Id2934d005f606af6e052fb6db0d5b7c02f567522
this was never fleshed out in the context of VP8, for which it was
added. for VP9 it has no meaning.
Change-Id: Iba2ecc026d9e947067b96690245d337e51e26eff
This allows code calling the library can choose an arbitrary
encryption algorithm.
Decoder control parameter VP8_SET_DECRYPT_KEY is renamed to
VP8D_SET_DECRYPTOR, and now takes an small config struct instead
of just a byte array.
Change-Id: I0462b3388d8d45057e4f79a6b6777fe713dc546e
Started adding support for multiple internal decoder instances. Also added
code to limit the vp8 config options available when using frame-based
multithreading.
Change-Id: I0f1ee7abcfcff59204f50162e28254b8dd6972eb
This change is necessary for the frame-based multithreading
implementation.
Since the postproc occurs in this call, vpxdec was modified to time around
vpx_codec_get_frame()
Change-Id: I389acf78b6003cd35e41becc16c893f7d3028523
Avoid a pthreads dependency via pthread_once() when compiled with
--disable-multithread.
In addition, this synchronization is disabled for Win32 as well, even
though we can be sure that the required primatives exist, so that the
requirements on the application when built with --disable-multithread
are consistent across platforms.
Users using libvpx built with --disable-multithread in a multithreaded
context should provide their own synchronization. Updated the
documentation to vpx_codec_enc_init_ver() and vpx_codec_dec_init_ver()
to note this requirement. Moved the RTCD initialization call to match
this description, as previously it didn't happen until the first
frame.
Change-Id: Id576f6bce2758362188278d3085051c218a56d4a
Removes all runtime initialization of global data. This commit is a
squashed version of the following series cherry-picked from master.
This is necessary because of a change that was merged to the tester
that depends on the scaler being moved to the RTCD framework, which
is a worthwhile thing to include in Eider anyway.
- a91b42f02 Makes all global data in entropy.c const
- b35a0db0e Makes all global data in tokenize.c const
- 441cac8ea Makes all mode token tables const
- 5948a0210 Ports vpx_xcaler to new RTCD method
- 317d4244c Makes all mode token tables const part 2
Change-Id: Ifeaea24df2b731e7c509fa6c6ef6891a374afc26
Commit 892e23a5b introduced support for the VP8D_GET_LAST_REF_USED,
but missed the mapping of the control id to the underlying function,
so it was unavailable to applications.
In addition, the underlying function vp8_references_buffer() is
moved from common/postproc.c to decoder/onyxd_if.c as postproc.c is
not built in all configurations.
Change-Id: I426dd254e7e6c4c061b70d729b69a6c384ebbe44
Adds a multiframe postprocessing module to enhance the quality of
certain frames that are coded at lower quality than preceding frames.
The module can be invoked from the commandline by use of the --mfqe
option, and will be most beneficial for enhancing the quality of
frames decoded using scalable patterns.
Uses the vp8_variance_var16x16 and vp8_variance_sad16x16 function
pointers to compute SAD and Variance of blocks.
Change-Id: Id73d2a6e3572d07f9f8e36bbce00a4fc5ffd8961
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
Adding support for several partitions within one input fragment.
This is necessary to fully support all possible packetization
combinations in the VP8 RTP profile. Several partitions can
be transmitted in the same packet, and they can only be split
by reading the partition lengths from the bitstream.
Change-Id: If7d7ea331cc78cb7efd74c4a976b720c9a655463