[FFmpeg-cvslog] r21271 - in trunk/libavcodec: h264.c h264.h h264_cabac.c h264_cavlc.c
michael
subversion
Sun Jan 17 22:43:09 CET 2010
Author: michael
Date: Sun Jan 17 22:43:08 2010
New Revision: 21271
Log:
Split fill_caches() between filter and decoder.
Modified:
trunk/libavcodec/h264.c
trunk/libavcodec/h264.h
trunk/libavcodec/h264_cabac.c
trunk/libavcodec/h264_cavlc.c
Modified: trunk/libavcodec/h264.c
==============================================================================
--- trunk/libavcodec/h264.c Sun Jan 17 21:35:55 2010 (r21270)
+++ trunk/libavcodec/h264.c Sun Jan 17 22:43:08 2010 (r21271)
@@ -1287,7 +1287,7 @@ static av_always_inline void hl_decode_m
if(h->deblocking_filter && 0) {
backup_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, simple);
- fill_caches(h, mb_type, 1); //FIXME don't fill stuff which isn't used by filter_mb
+ fill_filter_caches(h, mb_type); //FIXME don't fill stuff which isn't used by filter_mb
h->chroma_qp[0] = get_chroma_qp(h, 0, s->current_picture.qscale_table[mb_xy]);
h->chroma_qp[1] = get_chroma_qp(h, 1, s->current_picture.qscale_table[mb_xy]);
if (!simple && FRAME_MBAFF) {
@@ -2184,7 +2184,7 @@ static void loop_filter(H264Context *h){
uvlinesize = h->mb_uvlinesize = s->uvlinesize;
}
backup_mb_border(h, dest_y, dest_cb, dest_cr, linesize, uvlinesize, !is_complex);
- fill_caches(h, mb_type, 1); //FIXME don't fill stuff which isn't used by filter_mb
+ fill_filter_caches(h, mb_type); //FIXME don't fill stuff which isn't used by filter_mb
h->chroma_qp[0] = get_chroma_qp(h, 0, s->current_picture.qscale_table[mb_xy]);
h->chroma_qp[1] = get_chroma_qp(h, 1, s->current_picture.qscale_table[mb_xy]);
Modified: trunk/libavcodec/h264.h
==============================================================================
--- trunk/libavcodec/h264.h Sun Jan 17 21:35:55 2010 (r21270)
+++ trunk/libavcodec/h264.h Sun Jan 17 22:43:08 2010 (r21271)
@@ -719,7 +719,7 @@ static inline int get_chroma_qp(H264Cont
static inline void pred_pskip_motion(H264Context * const h, int * const mx, int * const my);
-static void fill_caches(H264Context *h, int mb_type, int for_deblock){
+static av_always_inline void fill_caches(H264Context *h, int mb_type, int for_deblock){
MpegEncContext * const s = &h->s;
const int mb_xy= h->mb_xy;
int topleft_xy, top_xy, topright_xy, left_xy[2];
@@ -1177,6 +1177,14 @@ static void fill_caches(H264Context *h,
h->neighbor_transform_size= !!IS_8x8DCT(top_type) + !!IS_8x8DCT(left_type[0]);
}
+static void fill_decode_caches(H264Context *h, int mb_type){
+ fill_caches(h, mb_type, 0);
+}
+
+static void fill_filter_caches(H264Context *h, int mb_type){
+ fill_caches(h, mb_type, 1);
+}
+
/**
* gets the predicted intra4x4 prediction mode.
*/
@@ -1313,7 +1321,7 @@ static void decode_mb_skip(H264Context *
// just for fill_caches. pred_direct_motion will set the real mb_type
mb_type|= MB_TYPE_P0L0|MB_TYPE_P0L1|MB_TYPE_DIRECT2|MB_TYPE_SKIP;
- fill_caches(h, mb_type, 0); //FIXME check what is needed and what not ...
+ 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;
}
@@ -1322,7 +1330,7 @@ static void decode_mb_skip(H264Context *
int mx, my;
mb_type|= MB_TYPE_16x16|MB_TYPE_P0L0|MB_TYPE_P1L0|MB_TYPE_SKIP;
- fill_caches(h, mb_type, 0); //FIXME check what is needed and what not ...
+ fill_decode_caches(h, mb_type); //FIXME check what is needed and what not ...
pred_pskip_motion(h, &mx, &my);
fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, 0, 1);
fill_rectangle( h->mv_cache[0][scan8[0]], 4, 4, 8, pack16to32(mx,my), 4);
Modified: trunk/libavcodec/h264_cabac.c
==============================================================================
--- trunk/libavcodec/h264_cabac.c Sun Jan 17 21:35:55 2010 (r21270)
+++ trunk/libavcodec/h264_cabac.c Sun Jan 17 22:43:08 2010 (r21271)
@@ -1403,7 +1403,7 @@ decode_intra_mb:
h->ref_count[1] <<= 1;
}
- fill_caches(h, mb_type, 0);
+ fill_decode_caches(h, mb_type);
if( IS_INTRA( mb_type ) ) {
int i, pred_mode;
Modified: trunk/libavcodec/h264_cavlc.c
==============================================================================
--- trunk/libavcodec/h264_cavlc.c Sun Jan 17 21:35:55 2010 (r21270)
+++ trunk/libavcodec/h264_cavlc.c Sun Jan 17 22:43:08 2010 (r21271)
@@ -631,7 +631,7 @@ decode_intra_mb:
h->ref_count[1] <<= 1;
}
- fill_caches(h, mb_type, 0);
+ fill_decode_caches(h, mb_type);
//mb_pred
if(IS_INTRA(mb_type)){
More information about the ffmpeg-cvslog
mailing list