From patchwork Mon Jun 19 01:46:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Michael Niedermayer X-Patchwork-Id: 4033 Delivered-To: ffmpegpatchwork@gmail.com Received: by 10.103.22.4 with SMTP id 4csp698126vsw; Sun, 18 Jun 2017 18:46:39 -0700 (PDT) X-Received: by 10.28.215.3 with SMTP id o3mr14279997wmg.93.1497836799286; Sun, 18 Jun 2017 18:46:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1497836799; cv=none; d=google.com; s=arc-20160816; b=kHYHel55CGmbP4XdzNQMhdX7iL7tNfxWirGRBmkGm0z0IRpSgHCZOQnxLq+IkNj94d /kpTKlFRAb+4OaFUPYwO5rNS0ku8Jpz9AQ9XPSlq8/8/xrcRjU0lwPtp+l2hXtlyVwYR tjcZP1AX62qOALxu9FfWOdUpVOfPJiKFxXl0oYQeUJ07d8AN/Rh5W0qfRnk9q5edc6GP 0dXeYfV4eeEacebzZaqQxFLZMPhazKnVougSfCSgXpOnYjfSfpvAo5vhL2iSNCBr35ZA J9155At/u7FbFXZkYcfOKrLtCDGiitMFG0JfA0+4opKOzfNAzD9PeNrM5sWl2Rg7gsvq Q9qQ== 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: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=CQhDbrqfP7BQ+m6f8Ii7bL36oswKkssQPUevBp330bo=; b=AHA/rTmX2y3O+FwOf/VGjumwEmTZGL4VwAacjIRCdBMzvD8PxhdRGyUUF1GWZ+SU3z BajxYPs9q1L5RVvbta/dT+7zvs4hPn60CXvueUQto/ZlM/tGEbqiwcZMIpcYOLv/8wZn 4xWBUeUurclqwUzCwKpWGUEQ7yelDVBydy5HmCIyKA5i0VRimQgwKhq+TDIYOimEw0rF dVJ/aWraNlxntl0yI4HaG6owBp3+VvmBXW3EqYfs8fRKJJFxqbJb33776WVpr89AgoCf FS82vFizfmq0Ozs0bQnwRTJ7fhflBhfrPaFxklkiySXi1xmLj2tUpDC1EKPJE3CIECbV LzGw== 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 n13si5234650wmi.169.2017.06.18.18.46.38; Sun, 18 Jun 2017 18:46:39 -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; 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 55D0F68A1BF; Mon, 19 Jun 2017 04:46:31 +0300 (EEST) X-Original-To: ffmpeg-devel@ffmpeg.org Delivered-To: ffmpeg-devel@ffmpeg.org Received: from vie01a-qmta-pe02-2.mx.upcmail.net (vie01a-qmta-pe02-2.mx.upcmail.net [62.179.121.182]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id A136068A0B2 for ; Mon, 19 Jun 2017 04:46:25 +0300 (EEST) Received: from [172.31.218.43] (helo=vie01a-dmta-pe05-1.mx.upcmail.net) by vie01a-pqmta-pe02.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1dMllt-0000hB-Ed for ffmpeg-devel@ffmpeg.org; Mon, 19 Jun 2017 03:46:29 +0200 Received: from [172.31.216.43] (helo=vie01a-pemc-psmtp-pe01) by vie01a-dmta-pe05.mx.upcmail.net with esmtp (Exim 4.88) (envelope-from ) id 1dMlln-0004lN-El for ffmpeg-devel@ffmpeg.org; Mon, 19 Jun 2017 03:46:23 +0200 Received: from localhost ([213.47.41.20]) by vie01a-pemc-psmtp-pe01 with SMTP @ mailcloud.upcmail.net id aRmK1v00Q0S5wYM01RmLEM; Mon, 19 Jun 2017 03:46:20 +0200 X-SourceIP: 213.47.41.20 From: Michael Niedermayer To: FFmpeg development discussions and patches Date: Mon, 19 Jun 2017 03:46:18 +0200 Message-Id: <20170619014618.2107-1-michael@niedermayer.cc> X-Mailer: git-send-email 2.13.0 Subject: [FFmpeg-devel] [PATCH] avcodec: Rename ff_mpv_decode_mb() to ff_mpv_reconstruct_mb 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 MIME-Version: 1.0 Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" The new name more accuratly describes what the function does Signed-off-by: Michael Niedermayer --- libavcodec/avcodec.h | 2 +- libavcodec/h261dec.c | 4 ++-- libavcodec/h263dec.c | 4 ++-- libavcodec/mpeg12dec.c | 2 +- libavcodec/mpeg_er.c | 2 +- libavcodec/mpegvideo.c | 12 ++++++------ libavcodec/mpegvideo.h | 2 +- libavcodec/mpegvideo_enc.c | 6 +++--- libavcodec/mpegvideo_xvmc.c | 2 +- libavcodec/rv10.c | 2 +- 10 files changed, 19 insertions(+), 19 deletions(-) diff --git a/libavcodec/avcodec.h b/libavcodec/avcodec.h index 39be8cf717..b697afa0ae 100644 --- a/libavcodec/avcodec.h +++ b/libavcodec/avcodec.h @@ -3948,7 +3948,7 @@ typedef struct AVHWAccel { /** * Called for every Macroblock in a slice. * - * XvMC uses it to replace the ff_mpv_decode_mb(). + * XvMC uses it to replace the ff_mpv_reconstruct_mb(). * Instead of decoding to raw picture, MB parameters are * stored in an array provided by the video driver. * diff --git a/libavcodec/h261dec.c b/libavcodec/h261dec.c index 7f2fff8684..14a874c45d 100644 --- a/libavcodec/h261dec.c +++ b/libavcodec/h261dec.c @@ -223,7 +223,7 @@ static int h261_decode_mb_skipped(H261Context *h, int mba1, int mba2) s->current_picture.motion_val[0][b_xy][1] = s->mv[0][0][1]; } - ff_mpv_decode_mb(s, s->block); + ff_mpv_reconstruct_mb(s, s->block); } return 0; @@ -466,7 +466,7 @@ intra: s->block_last_index[i] = -1; } - ff_mpv_decode_mb(s, s->block); + ff_mpv_reconstruct_mb(s, s->block); return SLICE_OK; } diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c index 077666470d..bcb2b08bb0 100644 --- a/libavcodec/h263dec.c +++ b/libavcodec/h263dec.c @@ -261,7 +261,7 @@ static int decode_slice(MpegEncContext *s) if (ret < 0) { const int xy = s->mb_x + s->mb_y * s->mb_stride; if (ret == SLICE_END) { - ff_mpv_decode_mb(s, s->block); + ff_mpv_reconstruct_mb(s, s->block); if (s->loop_filter) ff_h263_loop_filter(s); @@ -294,7 +294,7 @@ static int decode_slice(MpegEncContext *s) return AVERROR_INVALIDDATA; } - ff_mpv_decode_mb(s, s->block); + ff_mpv_reconstruct_mb(s, s->block); if (s->loop_filter) ff_h263_loop_filter(s); } diff --git a/libavcodec/mpeg12dec.c b/libavcodec/mpeg12dec.c index 186fbd27b6..58a5a20864 100644 --- a/libavcodec/mpeg12dec.c +++ b/libavcodec/mpeg12dec.c @@ -1867,7 +1867,7 @@ static int mpeg_decode_slice(MpegEncContext *s, int mb_y, s->dest[1] +=(16 >> lowres) >> s->chroma_x_shift; s->dest[2] +=(16 >> lowres) >> s->chroma_x_shift; - ff_mpv_decode_mb(s, s->block); + ff_mpv_reconstruct_mb(s, s->block); if (++s->mb_x >= s->mb_width) { const int mb_size = 16 >> s->avctx->lowres; diff --git a/libavcodec/mpeg_er.c b/libavcodec/mpeg_er.c index ee8b2a5e7b..5eca834072 100644 --- a/libavcodec/mpeg_er.c +++ b/libavcodec/mpeg_er.c @@ -91,7 +91,7 @@ static void mpeg_er_decode_mb(void *opaque, int ref, int mv_dir, int mv_type, if (ref) av_log(s->avctx, AV_LOG_DEBUG, "Interlaced error concealment is not fully implemented\n"); - ff_mpv_decode_mb(s, s->block); + ff_mpv_reconstruct_mb(s, s->block); } int ff_mpeg_er_init(MpegEncContext *s) diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c index e5424cbacf..63a30b93ce 100644 --- a/libavcodec/mpegvideo.c +++ b/libavcodec/mpegvideo.c @@ -2471,7 +2471,7 @@ void ff_clean_intra_table_entries(MpegEncContext *s) s->interlaced_dct : true if interlaced dct used (mpeg2) */ static av_always_inline -void mpv_decode_mb_internal(MpegEncContext *s, int16_t block[12][64], +void mpv_reconstruct_mb_internal(MpegEncContext *s, int16_t block[12][64], int lowres_flag, int is_mpeg12) { const int mb_xy = s->mb_y * s->mb_stride + s->mb_x; @@ -2719,16 +2719,16 @@ skip_idct: } } -void ff_mpv_decode_mb(MpegEncContext *s, int16_t block[12][64]) +void ff_mpv_reconstruct_mb(MpegEncContext *s, int16_t block[12][64]) { #if !CONFIG_SMALL if(s->out_format == FMT_MPEG1) { - if(s->avctx->lowres) mpv_decode_mb_internal(s, block, 1, 1); - else mpv_decode_mb_internal(s, block, 0, 1); + if(s->avctx->lowres) mpv_reconstruct_mb_internal(s, block, 1, 1); + else mpv_reconstruct_mb_internal(s, block, 0, 1); } else #endif - if(s->avctx->lowres) mpv_decode_mb_internal(s, block, 1, 0); - else mpv_decode_mb_internal(s, block, 0, 0); + if(s->avctx->lowres) mpv_reconstruct_mb_internal(s, block, 1, 0); + else mpv_reconstruct_mb_internal(s, block, 0, 0); } void ff_mpeg_draw_horiz_band(MpegEncContext *s, int y, int h) diff --git a/libavcodec/mpegvideo.h b/libavcodec/mpegvideo.h index 85df19154f..e9eb633d1b 100644 --- a/libavcodec/mpegvideo.h +++ b/libavcodec/mpegvideo.h @@ -680,7 +680,7 @@ void ff_mpv_common_end(MpegEncContext *s); void ff_mpv_decode_defaults(MpegEncContext *s); void ff_mpv_decode_init(MpegEncContext *s, AVCodecContext *avctx); -void ff_mpv_decode_mb(MpegEncContext *s, int16_t block[12][64]); +void ff_mpv_reconstruct_mb(MpegEncContext *s, int16_t block[12][64]); void ff_mpv_report_decode_progress(MpegEncContext *s); int ff_mpv_frame_start(MpegEncContext *s, AVCodecContext *avctx); diff --git a/libavcodec/mpegvideo_enc.c b/libavcodec/mpegvideo_enc.c index 1003dea5b7..fffb113096 100644 --- a/libavcodec/mpegvideo_enc.c +++ b/libavcodec/mpegvideo_enc.c @@ -2774,7 +2774,7 @@ static inline void encode_mb_hq(MpegEncContext *s, MpegEncContext *backup, MpegE } if(s->avctx->mb_decision == FF_MB_DECISION_RD){ - ff_mpv_decode_mb(s, s->block); + ff_mpv_reconstruct_mb(s, s->block); score *= s->lambda2; score += sse_mb(s) << FF_LAMBDA_SHIFT; @@ -3479,7 +3479,7 @@ FF_ENABLE_DEPRECATION_WARNINGS } if(s->avctx->mb_decision == FF_MB_DECISION_BITS) - ff_mpv_decode_mb(s, s->block); + ff_mpv_reconstruct_mb(s, s->block); } else { int motion_x = 0, motion_y = 0; s->mv_type=MV_TYPE_16X16; @@ -3598,7 +3598,7 @@ FF_ENABLE_DEPRECATION_WARNINGS s->out_format == FMT_H263 && s->pict_type!=AV_PICTURE_TYPE_B) ff_h263_update_motion_val(s); - ff_mpv_decode_mb(s, s->block); + ff_mpv_reconstruct_mb(s, s->block); } /* clean the MV table in IPS frames for direct mode in B-frames */ diff --git a/libavcodec/mpegvideo_xvmc.c b/libavcodec/mpegvideo_xvmc.c index b469c4e26f..519a448161 100644 --- a/libavcodec/mpegvideo_xvmc.c +++ b/libavcodec/mpegvideo_xvmc.c @@ -182,7 +182,7 @@ static void ff_xvmc_decode_mb(struct MpegEncContext *s) return; } - // from ff_mpv_decode_mb(), update DC predictors for P macroblocks + // from ff_mpv_reconstruct_mb(), update DC predictors for P macroblocks if (!s->mb_intra) { s->last_dc[0] = s->last_dc[1] = diff --git a/libavcodec/rv10.c b/libavcodec/rv10.c index 81aa9ae587..595e217519 100644 --- a/libavcodec/rv10.c +++ b/libavcodec/rv10.c @@ -670,7 +670,7 @@ static int rv10_decode_packet(AVCodecContext *avctx, const uint8_t *buf, } if (s->pict_type != AV_PICTURE_TYPE_B) ff_h263_update_motion_val(s); - ff_mpv_decode_mb(s, s->block); + ff_mpv_reconstruct_mb(s, s->block); if (s->loop_filter) ff_h263_loop_filter(s);