summaryrefslogtreecommitdiff
path: root/vpx/internal/vpx_codec_internal.h
diff options
context:
space:
mode:
authorDmitry Kovalev <dkovalev@google.com>2014-08-20 17:02:10 -0700
committerDmitry Kovalev <dkovalev@google.com>2014-08-28 13:51:37 -0700
commit73edeb03ea1730d3a602a888fc9beb2141d951d4 (patch)
treeaba54022795b04f5773c3cbc6c50b88fed11012d /vpx/internal/vpx_codec_internal.h
parente9d106bd4571010c2224b2fcfdb69e50aa888494 (diff)
downloadlibvpx-73edeb03ea1730d3a602a888fc9beb2141d951d4.tar
libvpx-73edeb03ea1730d3a602a888fc9beb2141d951d4.tar.gz
libvpx-73edeb03ea1730d3a602a888fc9beb2141d951d4.tar.bz2
libvpx-73edeb03ea1730d3a602a888fc9beb2141d951d4.zip
Removing alg_priv from vpx_codec_priv struct.
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
Diffstat (limited to 'vpx/internal/vpx_codec_internal.h')
-rw-r--r--vpx/internal/vpx_codec_internal.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/vpx/internal/vpx_codec_internal.h b/vpx/internal/vpx_codec_internal.h
index d7c580060..02f20791a 100644
--- a/vpx/internal/vpx_codec_internal.h
+++ b/vpx/internal/vpx_codec_internal.h
@@ -336,7 +336,6 @@ typedef struct vpx_codec_priv_cb_pair {
*/
struct vpx_codec_priv {
unsigned int sz;
- struct vpx_codec_alg_priv *alg_priv;
const char *err_detail;
vpx_codec_flags_t init_flags;
struct {