summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlfred E. Heggestad <aeh@db.org>2016-05-18 19:46:00 +0200
committerAlfred E. Heggestad <aeh@db.org>2016-05-18 19:46:00 +0200
commit3ebdfd3eed6604843887257661fc7281aa75c821 (patch)
tree5f84f1824dc259e18949561632889da8b47544b7
parent94da0678391e34626b38d1567069f4cf9a63f967 (diff)
daala: upgrade to daala 0.0-1564-g79787c7
-rw-r--r--modules/daala/daala.c3
-rw-r--r--modules/daala/decode.c2
-rw-r--r--modules/daala/encode.c17
3 files changed, 17 insertions, 5 deletions
diff --git a/modules/daala/daala.c b/modules/daala/daala.c
index 130ca59..b5790fa 100644
--- a/modules/daala/daala.c
+++ b/modules/daala/daala.c
@@ -20,6 +20,9 @@
* - Define and implement fragmentation of large packets
* - Define an IETF RTP Payload type
*
+ * External libraries:
+ *
+ * daala version 0.0-1564-g79787c7 (or later)
*
* References:
*
diff --git a/modules/daala/decode.c b/modules/daala/decode.c
index e2217c8..cacd8b5 100644
--- a/modules/daala/decode.c
+++ b/modules/daala/decode.c
@@ -143,7 +143,7 @@ int daala_decode(struct viddec_state *vds, struct vidframe *frame,
}
}
else {
- od_img img;
+ daala_image img;
if (!vds->got_headers) {
warning("daala: decode: still waiting for headers\n");
diff --git a/modules/daala/encode.c b/modules/daala/encode.c
index 7770bd6..d8abe4d 100644
--- a/modules/daala/encode.c
+++ b/modules/daala/encode.c
@@ -130,10 +130,12 @@ static int open_encoder(struct videnc_state *ves, const struct vidsz *size)
daala_comment dc;
daala_packet dp;
int err = 0;
- int complexity = 0;
- int video_q = 10;
+ int complexity = 7;
+ int video_q = 30;
+ int bitrate = ves->bitrate;
- info("daala: open encoder (%d x %d)\n", size->w, size->h);
+ info("daala: open encoder (%d x %d, %d bps)\n",
+ size->w, size->h, bitrate);
if (ves->enc) {
debug("daala: re-opening encoder\n");
@@ -175,6 +177,9 @@ static int open_encoder(struct videnc_state *ves, const struct vidsz *size)
daala_encode_ctl(ves->enc, OD_SET_COMPLEXITY,
&complexity, sizeof(complexity));
+ daala_encode_ctl(ves->enc, OD_SET_BITRATE,
+ &bitrate, sizeof(bitrate));
+
for (;;) {
int r;
@@ -215,7 +220,8 @@ int daala_encode(struct videnc_state *ves, bool update,
const struct vidframe *frame)
{
int r, err = 0;
- od_img img;
+ daala_image img;
+ unsigned i;
(void)update; /* XXX: how to force a KEY-frame? */
if (!ves || !frame || frame->fmt != VID_FMT_YUV420P)
@@ -250,6 +256,9 @@ int daala_encode(struct videnc_state *ves, bool update,
img.planes[2].xstride = 1;
img.planes[2].ystride = frame->linesize[2];
+ for (i=0; i<3; i++)
+ img.planes[i].bitdepth = 8;
+
img.nplanes = 3;
img.width = frame->size.w;