From patchwork Thu Nov 16 16:54:59 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Rice X-Patchwork-Id: 6120 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.94 with SMTP id m30csp6043123jah; Thu, 16 Nov 2017 08:55:32 -0800 (PST) X-Google-Smtp-Source: AGs4zMZJWkAt2/IhFSMm2bb7Ms6c8DZ0M+ONiyUWkSMAKbCY9OSDbIy/QZUZwHdFdwp932R9AekB X-Received: by 10.223.171.91 with SMTP id r27mr1927179wrc.98.1510851332879; Thu, 16 Nov 2017 08:55:32 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1510851332; cv=none; d=google.com; s=arc-20160816; b=WSTcrAcmIWVUHDIRcbi4p5Aj0qT4ZmsvciQXzJtBd7fbu+tGfvnT3nEtasCvTVsecg 2yXLcmcYkQBgkNiorbR1Tu2xyEUkuCQOUKbGm4zcZYySltyWYsC6b6YBMOEx45z13cec mzBDEfBcQAXqg9t2IpaUGOS+TI4wmlB3H8+PVt7nJwEcqGW8Inb4sOknm+OpgBsZ3pcW AppmVo68FKYy9fXGFxvfHxRdtV5k04iYmbo7SMneGyw4L4yNydFaSnf503p3fr8e+TF2 IB2UABmZFq2T9ufCZkQG2kCv2QqynhhPy1KTMDWO5KB24vYzJKcnZ9BmBTzvu214PhBl 1jeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:content-transfer-encoding:reply-to:list-subscribe :list-help:list-post:list-archive:list-unsubscribe:list-id :precedence:subject:to:date:message-id:mime-version:from :delivered-to:arc-authentication-results; bh=kar0rPLsZ4Au7bo3BWc845jMJsWCsYE+WNhb8wqeJEI=; b=ArLyfkSJMth1IXtNwpYnDCoVHT3H/rgPB/6+R9jk6Df7Qg8GdsIsIAlGDYcaxWhqmK f+6+kBDovEqAgy8Z6nKXt49xN2I5NtzLCcjasKwcMlXc10zzhaqGkROWZFEmPgFxJ9WD ju0QQePVDVplb4yOfmRYgLqRl9eZ2QVFXaxrMSvBivkIQz7R36U5IwcdjCP2kAxaRRVO 90SQ+ynz/f3GnZehjfBgJ4IYhtXUpQu/v8q3whTGvcfjciqUoTHKcSIjVdLcntbraR71 3OlZH1lM7bba5tCQ4f1pkDbEkFkdWt9SoR6CAi9pOeb/z59x+Zm5pXUo4KufgY82+5Y7 vfHA== 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 p12si1381377wmg.5.2017.11.16.08.55.32; Thu, 16 Nov 2017 08:55:32 -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 7EF2B689D7A; Thu, 16 Nov 2017 18:55:15 +0200 (EET) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from server172-2.web-hosting.com (server172-2.web-hosting.com [68.65.122.110]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id B3E8B689B6A for ; Thu, 16 Nov 2017 18:55:08 +0200 (EET) Received: from cpe-104-162-94-162.nyc.res.rr.com ([104.162.94.162]:36729 helo=[10.0.1.9]) by server172.web-hosting.com with esmtpsa (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.89) (envelope-from ) id 1eFNRd-001xOg-LJ for ffmpeg-devel@ffmpeg.org; Thu, 16 Nov 2017 11:55:22 -0500 From: Dave Rice Mime-Version: 1.0 (Mac OS X Mail 11.0 \(3445.1.7\)) Message-Id: Date: Thu, 16 Nov 2017 11:54:59 -0500 To: FFmpeg development discussions and patches X-Mailer: Apple Mail (2.3445.1.7) X-OutGoing-Spam-Status: No, score=-2.9 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - server172.web-hosting.com X-AntiAbuse: Original Domain - ffmpeg.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - dericed.com X-Get-Message-Sender-Via: server172.web-hosting.com: authenticated_id: dave@dericed.com X-Authenticated-Sender: server172.web-hosting.com: dave@dericed.com X-Source: X-Source-Args: X-Source-Dir: X-From-Rewrite: unmodified, already matched X-Content-Filtered-By: Mailman/MimeDel 2.1.20 Subject: [FFmpeg-devel] [PATCH] avformat/movenc: correct ImageDescription depth for v210 v410 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 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" This corrects a few values in the Image Description for v210 and v410 in mov. Apple defines what the depth value for these uncompressed formats should be in https://developer.apple.com/library/content/technotes/tn2162/_index.html . From 47def189b270ac93245e002580463b254daf8484 Mon Sep 17 00:00:00 2001 From: Dave Rice Date: Thu, 16 Nov 2017 11:53:32 -0500 Subject: [PATCH] avformat/movenc: correct ImageDescription depth for v210 v410 Per https://developer.apple.com/library/content/technotes/tn2162/_index.html . --- libavformat/movenc.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/libavformat/movenc.c b/libavformat/movenc.c index 18232e8ba3..f7b08e2885 100644 --- a/libavformat/movenc.c +++ b/libavformat/movenc.c @@ -1885,7 +1885,11 @@ static int mov_write_video_tag(AVIOContext *pb, MOVMuxContext *mov, MOVTrack *tr avio_w8(pb, strlen(compressor_name)); avio_write(pb, compressor_name, 31); - if (track->mode == MODE_MOV && track->par->bits_per_coded_sample) + if (track->mode == MODE_MOV && track->par->codec_id == AV_CODEC_ID_V410) + avio_wb16(pb, 0x18); + else if (track->mode == MODE_MOV && track->par->codec_id == AV_CODEC_ID_V210) + avio_wb16(pb, 0x18); + else if (track->mode == MODE_MOV && track->par->bits_per_coded_sample) avio_wb16(pb, track->par->bits_per_coded_sample | (track->par->format == AV_PIX_FMT_GRAY8 ? 0x20 : 0)); else