From patchwork Sun Dec 10 23:28:50 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tristan Matthews X-Patchwork-Id: 6693 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.94 with SMTP id m30csp2133601jah; Sun, 10 Dec 2017 15:35:36 -0800 (PST) X-Google-Smtp-Source: AGs4zMYh4mrqJtUob2zTHfgwMiQHM8b2ob2SfnISLO44vf/kGykJD4U3DhnbpMd0LFCm98SYVcxw X-Received: by 10.223.135.77 with SMTP id 13mr23380636wrz.142.1512948936617; Sun, 10 Dec 2017 15:35:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1512948936; cv=none; d=google.com; s=arc-20160816; b=IFQYJ8G6vM6W8zFqxkSDBeY5uIHEgQskbneVLhqJ+U33W34tFArVktXlJIUoIvCVQc LLDXTh1d5NBPDQ/MI+U+dqD0dYnM7/XRROS8naJ3DtADH51JiY1PwdORK28AJ/fSPRE0 IajRThwANWoVnfeALwdTsqo+naivblMc/BOHJt81w3hOVhCQdC+IP2kNpIIfLpgYQIZ4 ge+IuK7f732TQ63ycLOiPShHbPknCdoZkX5LVqW3Q09y5I5tcXKenrqnNPiMyJk0DtcN udYYsIBM1A/NOLPFzN+J+LGKq3hanD1JttMFkGi4xH2asH9TqMUnjvASkcb3AF7MPrZd vWtA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:mime-version:cc:reply-to :list-subscribe:list-help:list-post:list-archive:list-unsubscribe :list-id:precedence:subject:message-id:date:to:from:delivered-to :arc-authentication-results; bh=GdcKGFZnTdq2Hh4HdZY4Sg5gE8wqjw4XWXSiln9W6Ho=; b=PNDcuo93qI/j6bYI3C+Fwpa2/8e/M+56rHuML91RRte0cvKyYYmOtroHfhME3i5m7y CtGw3fjB9Amaw3meMYrG51xuou72NskW3H65EFCwbhC7nZgIMAy6s+WEJaaooQBmA2ud MDiKJT2txohD5tzGvV4hPrQEGrv4A8uiZ6AG1uy7NKSju9sNCmPiXlXdRiCgND21SQsq HWWDyveGg4RTsD8dYO/TnnHgHmSWE774YP2YTl+doW+8ZDIhdEjLDHzzyuR5HlJMdX57 sT0yIs2+ZBiuiw8y9sp1k+sKQwpW/9zGSebtWYnLFr2JngdevoKAxDClIUnlTEGympn8 KKcQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id z72si4510150wmz.39.2017.12.10.15.35.36; Sun, 10 Dec 2017 15:35:36 -0800 (PST) Received-SPF: pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) client-ip=79.124.17.100; Authentication-Results: mx.google.com; spf=pass (google.com: domain of ffmpeg-devel-bounces@ffmpeg.org designates 79.124.17.100 as permitted sender) smtp.mailfrom=ffmpeg-devel-bounces@ffmpeg.org Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 013DB68A61F; Mon, 11 Dec 2017 01:35:28 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-qt0-f196.google.com (mail-qt0-f196.google.com [209.85.216.196]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id EAED468A557 for ; Mon, 11 Dec 2017 01:35:21 +0200 (EET) Received: by mail-qt0-f196.google.com with SMTP id u42so34115905qte.7 for ; Sun, 10 Dec 2017 15:35:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id; bh=MQokCn2HXWQ/Y9NLTJ2bBdS1Uh+Iz63jYRtwQCELzuE=; b=B+ur2hSlEb2CvVb8Oiu5xp6Sen5fYESkjXRap7g2T1/aZM9XHB3Z9rJVknuUSOB7AY G15Jd5DBuIFIG0STDTRorlYzqEsgY3vC5uY7UOGeUqxp5QIRj/gKIVel0Fb/96sLW9Gg o+GpUNA77ZeWpFe9E+smziCWe6sg4ZlwmhJWqe3xRUvO8p+Vfz4bHaHuyWjcBKIrFSlY IAbGGewK+fCwGaF6S7//H4B2vgbeuTUJEIJSdpGumRO9mijcJOpM9BqwDcb3cgDI3KDH aWODAZcEewPfsNcZ/pwRNR/QFHqZ1pU00JE5awv5BsJaA6eBsP/v1w8noS7qHdGHkh9V EfhQ== X-Gm-Message-State: AKGB3mJ6X/jkizGdLXYom/wXPAglxykGg98Dvl0VXG3VviGtxRs1zv3m +vC49JKdcQkRVNMfjupQ+ONIkg== X-Received: by 10.55.160.18 with SMTP id j18mr45173176qke.351.1512948547149; Sun, 10 Dec 2017 15:29:07 -0800 (PST) Received: from big-ed.lan ([173.246.3.65]) by smtp.gmail.com with ESMTPSA id i42sm3558163qtf.61.2017.12.10.15.29.05 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Dec 2017 15:29:06 -0800 (PST) From: Tristan Matthews To: ffmpeg-devel@ffmpeg.org Date: Sun, 10 Dec 2017 18:28:50 -0500 Message-Id: <20171210232850.23139-1-tmatth@videolan.org> X-Mailer: git-send-email 2.15.1 Subject: [FFmpeg-devel] [PATCH] ivfenc: add AV1 support X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Cc: Tristan Matthews MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" libaom tools work with ivf files. --- libavformat/ivfenc.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/libavformat/ivfenc.c b/libavformat/ivfenc.c index fdc0ee03e1..2d1f9aeef6 100644 --- a/libavformat/ivfenc.c +++ b/libavformat/ivfenc.c @@ -37,14 +37,16 @@ static int ivf_write_header(AVFormatContext *s) } par = s->streams[0]->codecpar; if (par->codec_type != AVMEDIA_TYPE_VIDEO || - !(par->codec_id == AV_CODEC_ID_VP8 || par->codec_id == AV_CODEC_ID_VP9)) { - av_log(s, AV_LOG_ERROR, "Currently only VP8 and VP9 are supported!\n"); + !(par->codec_id == AV_CODEC_ID_VP8 || par->codec_id == AV_CODEC_ID_VP9 || + par->codec_id == AV_CODEC_ID_AV1)) { + av_log(s, AV_LOG_ERROR, "Currently only VP8, VP9 and AV1 are supported!\n"); return AVERROR(EINVAL); } avio_write(pb, "DKIF", 4); avio_wl16(pb, 0); // version avio_wl16(pb, 32); // header length - avio_wl32(pb, par->codec_tag ? par->codec_tag : par->codec_id == AV_CODEC_ID_VP9 ? AV_RL32("VP90") : AV_RL32("VP80")); + avio_wl32(pb, par->codec_tag ? par->codec_tag : par->codec_id == AV_CODEC_ID_VP9 ? AV_RL32("VP90") : + par->codec_id == AV_CODEC_ID_VP8 ? AV_RL32("VP80") : AV_RL32("AV01")); avio_wl16(pb, par->width); avio_wl16(pb, par->height); avio_wl32(pb, s->streams[0]->time_base.den); @@ -100,6 +102,7 @@ static int ivf_check_bitstream(struct AVFormatContext *s, const AVPacket *pkt) static const AVCodecTag codec_ivf_tags[] = { { AV_CODEC_ID_VP8, MKTAG('V', 'P', '8', '0') }, { AV_CODEC_ID_VP9, MKTAG('V', 'P', '9', '0') }, + { AV_CODEC_ID_AV1, MKTAG('A', 'V', '0', '1') }, { AV_CODEC_ID_NONE, 0 } };