From c90a2538a0bb4937cdecb852fadc3f98899624a9 Mon Sep 17 00:00:00 2001 From: "Ronald S. Bultje" Date: Tue, 12 Jul 2011 08:15:55 -0700 Subject: h264: move h264_mvpred.h include. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes the following compile error with darwin/gcc-4.2.1: In file included from libavcodec/error_resilience.c:33: libavcodec/h264.h: In function ‘decode_mb_skip’: libavcodec/h264.h:773: error: ‘always_inline’ function could not be inlined in call to ‘pred_pskip_motion’: the function body must appear before caller libavcodec/h264.h:1334: error: called from here --- libavcodec/h264.h | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'libavcodec') diff --git a/libavcodec/h264.h b/libavcodec/h264.h index f5bdb667b9..9d46ab479a 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -770,7 +770,7 @@ static av_always_inline int get_chroma_qp(H264Context *h, int t, int qscale){ return h->pps.chroma_qp_table[t][qscale]; } -static av_always_inline void pred_pskip_motion(H264Context * const h); +#include "h264_mvpred.h" //For pred_pskip_motion() static void fill_decode_neighbors(H264Context *h, int mb_type){ MpegEncContext * const s = &h->s; @@ -1341,6 +1341,4 @@ static void av_unused decode_mb_skip(H264Context *h){ h->prev_mb_skipped= 1; } -#include "h264_mvpred.h" //For pred_pskip_motion() - #endif /* AVCODEC_H264_H */ -- cgit v1.2.3 From 828e20733726e8e4fcf70a19d51652948d9436b6 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Fri, 8 Jul 2011 15:29:57 +0200 Subject: dnxhdenc: Replace a forward declaration by the proper #include. --- libavcodec/dnxhdenc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'libavcodec') diff --git a/libavcodec/dnxhdenc.c b/libavcodec/dnxhdenc.c index 78da1c15e2..85832a1dc3 100644 --- a/libavcodec/dnxhdenc.c +++ b/libavcodec/dnxhdenc.c @@ -28,6 +28,7 @@ #include "avcodec.h" #include "dsputil.h" #include "mpegvideo.h" +#include "mpegvideo_common.h" #include "dnxhdenc.h" #define VE AV_OPT_FLAG_VIDEO_PARAM | AV_OPT_FLAG_ENCODING_PARAM @@ -38,8 +39,6 @@ static const AVOption options[]={ }; static const AVClass class = { "dnxhd", av_default_item_name, options, LIBAVUTIL_VERSION_INT }; -int dct_quantize_c(MpegEncContext *s, DCTELEM *block, int n, int qscale, int *overflow); - #define LAMBDA_FRAC_BITS 10 static av_always_inline void dnxhd_get_pixels_8x4(DCTELEM *restrict block, const uint8_t *pixels, int line_size) -- cgit v1.2.3 From 028216b2c2d81f7fe918163c74b0a59cd327f2f7 Mon Sep 17 00:00:00 2001 From: Diego Biurrun Date: Tue, 12 Jul 2011 20:36:50 +0200 Subject: h264: move decode_mb_skip() from h264.h to h.264_mvpred.h This resolves a circular dependency between the headers. --- libavcodec/h264.h | 41 ----------------------------------------- libavcodec/h264_mvpred.h | 39 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 39 insertions(+), 41 deletions(-) (limited to 'libavcodec') diff --git a/libavcodec/h264.h b/libavcodec/h264.h index 9d46ab479a..95b471539d 100644 --- a/libavcodec/h264.h +++ b/libavcodec/h264.h @@ -770,8 +770,6 @@ static av_always_inline int get_chroma_qp(H264Context *h, int t, int qscale){ return h->pps.chroma_qp_table[t][qscale]; } -#include "h264_mvpred.h" //For pred_pskip_motion() - static void fill_decode_neighbors(H264Context *h, int mb_type){ MpegEncContext * const s = &h->s; const int mb_xy= h->mb_xy; @@ -1302,43 +1300,4 @@ static av_always_inline int get_dct8x8_allowed(H264Context *h){ return !(AV_RN64A(h->sub_mb_type) & ((MB_TYPE_16x8|MB_TYPE_8x16|MB_TYPE_8x8|MB_TYPE_DIRECT2)*0x0001000100010001ULL)); } -/** - * decodes a P_SKIP or B_SKIP macroblock - */ -static void av_unused decode_mb_skip(H264Context *h){ - MpegEncContext * const s = &h->s; - const int mb_xy= h->mb_xy; - int mb_type=0; - - memset(h->non_zero_count[mb_xy], 0, 48); - - if(MB_FIELD) - mb_type|= MB_TYPE_INTERLACED; - - if( h->slice_type_nos == AV_PICTURE_TYPE_B ) - { - // just for fill_caches. pred_direct_motion will set the real mb_type - mb_type|= MB_TYPE_L0L1|MB_TYPE_DIRECT2|MB_TYPE_SKIP; - if(h->direct_spatial_mv_pred){ - fill_decode_neighbors(h, mb_type); - fill_decode_caches(h, mb_type); //FIXME check what is needed and what not ... - } - ff_h264_pred_direct_motion(h, &mb_type); - mb_type|= MB_TYPE_SKIP; - } - else - { - mb_type|= MB_TYPE_16x16|MB_TYPE_P0L0|MB_TYPE_P1L0|MB_TYPE_SKIP; - - fill_decode_neighbors(h, mb_type); - pred_pskip_motion(h); - } - - write_back_motion(h, mb_type); - s->current_picture.f.mb_type[mb_xy] = mb_type; - s->current_picture.f.qscale_table[mb_xy] = s->qscale; - h->slice_table[ mb_xy ]= h->slice_num; - h->prev_mb_skipped= 1; -} - #endif /* AVCODEC_H264_H */ diff --git a/libavcodec/h264_mvpred.h b/libavcodec/h264_mvpred.h index 1d40c0a2c5..52c032337a 100644 --- a/libavcodec/h264_mvpred.h +++ b/libavcodec/h264_mvpred.h @@ -327,4 +327,43 @@ zeromv: return; } +/** + * decodes a P_SKIP or B_SKIP macroblock + */ +static void av_unused decode_mb_skip(H264Context *h){ + MpegEncContext * const s = &h->s; + const int mb_xy= h->mb_xy; + int mb_type=0; + + memset(h->non_zero_count[mb_xy], 0, 48); + + if(MB_FIELD) + mb_type|= MB_TYPE_INTERLACED; + + if( h->slice_type_nos == AV_PICTURE_TYPE_B ) + { + // just for fill_caches. pred_direct_motion will set the real mb_type + mb_type|= MB_TYPE_L0L1|MB_TYPE_DIRECT2|MB_TYPE_SKIP; + if(h->direct_spatial_mv_pred){ + fill_decode_neighbors(h, mb_type); + fill_decode_caches(h, mb_type); //FIXME check what is needed and what not ... + } + ff_h264_pred_direct_motion(h, &mb_type); + mb_type|= MB_TYPE_SKIP; + } + else + { + mb_type|= MB_TYPE_16x16|MB_TYPE_P0L0|MB_TYPE_P1L0|MB_TYPE_SKIP; + + fill_decode_neighbors(h, mb_type); + pred_pskip_motion(h); + } + + write_back_motion(h, mb_type); + s->current_picture.f.mb_type[mb_xy] = mb_type; + s->current_picture.f.qscale_table[mb_xy] = s->qscale; + h->slice_table[ mb_xy ]= h->slice_num; + h->prev_mb_skipped= 1; +} + #endif /* AVCODEC_H264_MVPRED_H */ -- cgit v1.2.3