On 12/03/2018 11:27, Diego Biurrun wrote:
On Thu, Mar 08, 2018 at 09:50:40PM +0100, Luca Barbato wrote:
---
  configure              |   1 +
  libavcodec/Makefile    |   1 +
  libavcodec/allcodecs.c |   2 +-
  libavcodec/avcodec.h   |   4 +
  libavcodec/libaomenc.c | 584 +++++++++++++++++++++++++++++++++++++++++++++++++
  5 files changed, 591 insertions(+), 1 deletion(-)
  create mode 100644 libavcodec/libaomenc.c

missing docs update and changelog entry

Patch 2/3 contains both already.


--- a/libavcodec/avcodec.h
+++ b/libavcodec/avcodec.h
@@ -2551,6 +2551,10 @@ typedef struct AVCodecContext {
  #define FF_PROFILE_HEVC_MAIN_STILL_PICTURE          3
  #define FF_PROFILE_HEVC_REXT                        4
+#define FF_PROFILE_AV1_0 0
+#define FF_PROFILE_AV1_1                            1
+#define FF_PROFILE_AV1_2                            2

I think it's a mistake to add more FF_-prefixed stuff into avcodec.h
and I don't see why these defines have to be in a public header. They
are only used in libaomenc.c, I don't see a reason to place them
outside of that file.

I'd move them all to AV_PROFILE in another patch.

--- /dev/null
+++ b/libavcodec/libaomenc.c
@@ -0,0 +1,584 @@
+static int storeframe(AVCodecContext *avctx, struct FrameListData *cx_frame,
+                      AVPacket *pkt)
+{
+    int ret = ff_alloc_packet(pkt, cx_frame->sz);
+    if (ret >= 0) {
+        memcpy(pkt->data, cx_frame->buf, pkt->size);
+        pkt->pts = pkt->dts = cx_frame->pts;
+
+        if (!!(cx_frame->flags & AOM_FRAME_IS_KEY)) {
+            pkt->flags |= AV_PKT_FLAG_KEY;
+        }
+    } else {
+        av_log(avctx, AV_LOG_ERROR,
+               "Error getting output packet of size %zu.\n", cx_frame->sz);
+        return ret;
+    }
+    return pkt->size;
+}

simpler logic:


Updated


to look ahead at for

+    { "error-resilient", "Error resilience configuration", OFFSET(error_resilient), 
AV_OPT_TYPE_FLAGS, {.i64 = 0}, INT_MIN, INT_MAX, VE, "er"},

I think this should be named error-resilience.

Amended

Sending the resulting file now.
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to