From patchwork Thu Oct 5 06:31:39 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carl Eugen Hoyos X-Patchwork-Id: 5421 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.2.161.76 with SMTP id m12csp1691142jah; Wed, 4 Oct 2017 23:32:12 -0700 (PDT) X-Received: by 10.28.238.193 with SMTP id j62mr17257208wmi.44.1507185132814; Wed, 04 Oct 2017 23:32:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1507185132; cv=none; d=google.com; s=arc-20160816; b=px9Zm4mNkfja1wEdQIotGNXGaLkH0Ar4ViwZIOdTX3nQh/CdLGzuzcTAvC1SdFgoA1 HL3pMk4ogIn5hBCDpThbztES+7M2LYHJ2nmLWoeLsVUua0EPFvXXJbG5nlaam0X+pZlb dLx/cPoeZld5UimcRsAY2rn8yzfD8UmZdCxMpsNVspfek7boOLrnRL7cY7xE1ippRPWG 2v16BiD0ClvE8382ypE5NGuJtNc609UyV1M1pKmbDYwqplL2kVeUjOh4HmgAcKg2Qp1E VZmCG+1cm9lZz2N0GLfG4BxTpfMWkYAKxbxiamqB3gzrJhJpuKf5/+JoWTZxFOf62P6F znXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=sender:errors-to:reply-to:list-subscribe:list-help:list-post :list-archive:list-unsubscribe:list-id:precedence:subject:to :message-id:date:from:mime-version:dkim-signature:delivered-to :arc-authentication-results; bh=FICJ5Wj5B4tRk+i00NrIBM0SFHi93twgeXEwrgJFMas=; b=zXfoXMUkE0Vwvp7+qjlVrJDcMf2WSTpyGhOCzD/JWMwllalw1Tl1WHXpCdwWo0rX4p Ysm0mb53Bc1CPMUphjR6wT0gt1gEucyOvFtd+85Jg85B985nMHraSMtgIGbdMeJyUC0C ekWRU0x1qFbE5+jsRV/wSvkeoc07dzUAv3pkH2xlMwu2KjjzgiCRaL2YATv4BM2HQgSX Je9GTPzTyjDFUb02mxXave9JNcPqZsKg2UOLwge7Qs57losHJkDSUB7tR2qNYe0ZriYU ZPknz4UmobZR7Xh9Wnia82whBwlYJwdNoK8WGWibrNLHOut/kKyFO5oTADwcADWLTrgr Kc3w== ARC-Authentication-Results: i=1; mx.google.com; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=AbEkOWZV; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org. [79.124.17.100]) by mx.google.com with ESMTP id n125si8267247wma.21.2017.10.04.23.32.11; Wed, 04 Oct 2017 23:32:12 -0700 (PDT) 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; dkim=neutral (body hash did not verify) header.i=@gmail.com header.s=20161025 header.b=AbEkOWZV; 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; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 66DB568A3FC; Thu, 5 Oct 2017 09:31:53 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from mail-it0-f45.google.com (mail-it0-f45.google.com [209.85.214.45]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 6C92468A328 for ; Thu, 5 Oct 2017 09:31:46 +0300 (EEST) Received: by mail-it0-f45.google.com with SMTP id p185so28338itc.4 for ; Wed, 04 Oct 2017 23:32:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=oG6pFTQlECaN5EWcuNu0nxxGlEkGE+RHHMTj14sBCAU=; b=AbEkOWZVEHUHyUNvpun5dypXPlk96GUIFEAlmGAs5YOMOBLcKGUSuYbnoFi0gCfeP6 l6kejFfq1kRJjSI5gPSTdMbV9+eZCGnf+r24qry0Hzr6iyizaw/Zh/wWZf01UAQdMtHs Gr0cBvAfBBCVCODDQfzGGVpOdgBcnrLUNQw3W4j/jv6dtWSyYiBRd0aT511CPVY4LjnL U9/X+Ke6XjiRmLyDlW2rObg3TK0LgUc5l+4Uss7pBEP/WPr0hnnwwtWJUPRU4GZExVs/ Ccf4+4GSJ9wxk4UkhkmqV1ton6N/SotwiIX2wquU3h734GOV6iv3yKeI+xe9eFMWfSHE 7PHg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=oG6pFTQlECaN5EWcuNu0nxxGlEkGE+RHHMTj14sBCAU=; b=SmC9CU5JukjS0D8TBY9W9Zhfvr1X8C1iTAkQywk8FxQRrxF2AZ9/U4tzh1zkWLzkdE MSp3d3A2kvt/sLU8URr9Sxi7xiUWE3lHK4s1JJj0wDlAm+2P5QisJpBHBmL1YhyplWTk 1zfWorMQmZDUNccx0eVNOsz4qTebZ3SCQwPzJhiK95IG9VNIx3YbMFq98vxy0642h57Y PXJ3eAYjzgB5GCSHF0QvQ1z8BlD6uVikyqX0JxJl5WfLCDAzEc8k+iGp6j3hLnpWd7fm lvdw1KmTJIqfakyQ2Vn/TewsbkylTai1Vdb+iLWwxFtcgjH1C+7wVeSN3+PGYOhRlAs6 B/Qg== X-Gm-Message-State: AHPjjUgMvj+xJNK41zJeBoxnnyVz8slgm/OWB/KzSYPGT3h+DradaVoN knmM2+1kFCZX9WZq2IsqmAfzOJPDm0GK7McnfU4= X-Google-Smtp-Source: AOwi7QAT9HaDch9GV5ZnTWS98Lhe3qV6QrbtECvzSb7DzZ+Yhpy9LbBF76K2+zZbrKorpCVacUUlWXNnAf+DIAy4Z1M= X-Received: by 10.36.215.195 with SMTP id y186mr31888780itg.3.1507185120321; Wed, 04 Oct 2017 23:32:00 -0700 (PDT) MIME-Version: 1.0 Received: by 10.2.134.74 with HTTP; Wed, 4 Oct 2017 23:31:39 -0700 (PDT) From: Carl Eugen Hoyos Date: Thu, 5 Oct 2017 08:31:39 +0200 Message-ID: To: FFmpeg development discussions and patches Subject: [FFmpeg-devel] [PATCH]lavc/h264:Only check x264_build if it was set 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" Hi! Attached patch fixes ticket #6717. Please comment, Carl Eugen From 3315fa024958246685b2431c2605e867f651ad5b Mon Sep 17 00:00:00 2001 From: Carl Eugen Hoyos Date: Thu, 5 Oct 2017 08:29:27 +0200 Subject: [PATCH] lavc/h264: Only check x264_build if it was set. Fixes ticket #6718. --- libavcodec/h264_cabac.c | 2 +- libavcodec/h264_mb.c | 2 +- libavcodec/h264_slice.c | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/libavcodec/h264_cabac.c b/libavcodec/h264_cabac.c index 3458346..7d9a7e9 100644 --- a/libavcodec/h264_cabac.c +++ b/libavcodec/h264_cabac.c @@ -2347,7 +2347,7 @@ decode_intra_mb: if (CHROMA444(h) && IS_8x8DCT(mb_type)){ int i; uint8_t *nnz_cache = sl->non_zero_count_cache; - if (h->sei.unregistered.x264_build < 151U) { + if (h->sei.unregistered.x264_build > 0 && h->sei.unregistered.x264_build < 151U) { for (i = 0; i < 2; i++){ if (sl->left_type[LEFT(i)] && !IS_8x8DCT(sl->left_type[LEFT(i)])) { nnz_cache[3+8* 1 + 2*8*i]= diff --git a/libavcodec/h264_mb.c b/libavcodec/h264_mb.c index cb9fe85..55a8d85 100644 --- a/libavcodec/h264_mb.c +++ b/libavcodec/h264_mb.c @@ -637,7 +637,7 @@ static av_always_inline void hl_decode_mb_predict_luma(const H264Context *h, uint8_t *const ptr = dest_y + block_offset[i]; const int dir = sl->intra4x4_pred_mode_cache[scan8[i]]; if (transform_bypass && h->ps.sps->profile_idc == 244 && dir <= 1) { - if (h->sei.unregistered.x264_build < 151U) { + if (h->sei.unregistered.x264_build > 0 && h->sei.unregistered.x264_build < 151U) { h->hpc.pred8x8l_add[dir](ptr, sl->mb + (i * 16 + p * 256 << pixel_shift), linesize); } else h->hpc.pred8x8l_filter_add[dir](ptr, sl->mb + (i * 16 + p * 256 << pixel_shift), diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c index 2577edd..e69c2a0 100644 --- a/libavcodec/h264_slice.c +++ b/libavcodec/h264_slice.c @@ -921,7 +921,7 @@ static int h264_slice_header_init(H264Context *h) if (sps->timing_info_present_flag) { int64_t den = sps->time_scale; - if (h->sei.unregistered.x264_build < 44U) + if (h->sei.unregistered.x264_build > 0 && h->sei.unregistered.x264_build < 44U) den *= 2; av_reduce(&h->avctx->framerate.den, &h->avctx->framerate.num, sps->num_units_in_tick * h->avctx->ticks_per_frame, den, 1 << 30); -- 1.7.10.4