---
libavcodec/h263.c | 6 +++---
libavcodec/h263dec.c | 2 +-
libavcodec/h264.c | 12 ++++++------
libavcodec/mimic.c | 8 ++++----
libavcodec/mpeg12.c | 2 +-
libavcodec/mpegvideo.c | 6 +++---
libavcodec/pthread.c | 16 ++++++++--------
libavcodec/thread.h | 12 ++++++------
8 files changed, 32 insertions(+), 32 deletions(-)
diff --git a/libavcodec/h263.c b/libavcodec/h263.c
index 87902c3..51ca813 100644
--- a/libavcodec/h263.c
+++ b/libavcodec/h263.c
@@ -3205,7 +3205,7 @@ static int mpeg4_decode_video_packet_header(MpegEncContext *s)
int mb_x = 0, mb_y = 0;
while(s->next_picture.mbskip_table[ s->mb_index2xy[ mb_num ] ]) {
- if (!mb_x) ff_await_decode_progress((AVFrame*)s->next_picture_ptr, mb_y++);
+ if (!mb_x) ff_await_frame_progress((AVFrame*)s->next_picture_ptr, mb_y++);
mb_num++;
if (++mb_x == s->mb_width) mb_x = 0;
}
@@ -4300,7 +4300,7 @@ int ff_mpeg4_decode_mb(MpegEncContext *s,
s->last_mv[i][1][1]= 0;
}
- ff_await_decode_progress((AVFrame*)s->next_picture_ptr, s->mb_y);
+ ff_await_frame_progress((AVFrame*)s->next_picture_ptr, s->mb_y);
}
/* if we skipped it in the future P Frame than skip it now too */
@@ -4482,7 +4482,7 @@ end:
const int delta= s->mb_x + 1 == s->mb_width ? 2 : 1;
if(s->pict_type==FF_B_TYPE){
- ff_await_decode_progress((AVFrame*)s->next_picture_ptr,
+ ff_await_frame_progress((AVFrame*)s->next_picture_ptr,
(s->mb_x + delta >= s->mb_width) ? FFMIN(s->mb_y+1, s->mb_height-1) : s->mb_y);
}
diff --git a/libavcodec/h263dec.c b/libavcodec/h263dec.c
index 1bb2682..596c48c 100644
--- a/libavcodec/h263dec.c
+++ b/libavcodec/h263dec.c
@@ -618,7 +618,7 @@ retry:
if(MPV_frame_start(s, avctx) < 0)
return -1;
- if (!s->divx_packed) ff_report_predecode_done(avctx);
+ if (!s->divx_packed) ff_report_frame_setup_done(avctx);
#ifdef DEBUG
av_log(avctx, AV_LOG_DEBUG, "qscale=%d\n", s->qscale);
diff --git a/libavcodec/h264.c b/libavcodec/h264.c
index 9456c68..c9a7115 100644
--- a/libavcodec/h264.c
+++ b/libavcodec/h264.c
@@ -1759,7 +1759,7 @@ static void avail_motion(H264Context *h){
for(list=1; list>=0; list--){
for(ref=0; ref<48; ref++){
if(refs[list][ref] >= 0)
- ff_await_decode_progress((AVFrame*)&h->ref_list[list][ref], FFMIN(refs[list][ref], pic_height-1));
+ ff_await_frame_progress((AVFrame*)&h->ref_list[list][ref], FFMIN(refs[list][ref], pic_height-1));
}
}
}
@@ -3991,7 +3991,7 @@ static int decode_slice_header(H264Context *h, H264Context *h0){
h->prev_frame_num++;
h->prev_frame_num %= 1<<h->sps.log2_max_frame_num;
s->current_picture_ptr->frame_num= h->prev_frame_num;
- ff_report_decode_progress(s->current_picture_ptr, INT_MAX);
+ ff_report_frame_progress(s->current_picture_ptr, INT_MAX);
execute_ref_pic_marking(h, NULL, 0);
}
@@ -6830,7 +6830,7 @@ static void decode_postinit(H264Context *h){
s->current_picture_ptr->pict_type= s->pict_type;
// Don't do anything if it's the first field or we've already been called.
- // FIXME the first field should call ff_report_predecode_done() even if it skips the rest
+ // FIXME the first field should call ff_report_frame_setup_done() even if it skips the rest
if (h->next_output_pic || cur->field_poc[0]==INT_MAX || cur->field_poc[1]==INT_MAX) return;
cur->interlaced_frame = FIELD_OR_MBAFF_PICTURE;
@@ -6895,7 +6895,7 @@ static void decode_postinit(H264Context *h){
av_log(s->avctx, AV_LOG_DEBUG, "no picture\n");
}
- ff_report_predecode_done(s->avctx);
+ ff_report_frame_setup_done(s->avctx);
}
/**
@@ -6909,7 +6909,7 @@ static void report_decode_progress(AVCodecContext *avctx, H264Context *h){
if (s->dropable) return;
int rows = FIELD_OR_MBAFF_PICTURE ? 2 : 1;
- ff_report_decode_progress((AVFrame*)s->current_picture_ptr, (s->mb_y - rows) * 16 - 3);
+ ff_report_frame_progress((AVFrame*)s->current_picture_ptr, (s->mb_y - rows) * 16 - 3);
}
static int decode_slice(struct AVCodecContext *avctx, H264Context *h){
@@ -7899,7 +7899,7 @@ static int decode_frame(AVCodecContext *avctx,
if(s->flags2 & CODEC_FLAG2_CHUNKS) decode_postinit(h);
s->mb_y= 0;
- ff_report_decode_progress((AVFrame*)s->current_picture_ptr, (16*s->mb_height >> s->first_field) - 1);
+ ff_report_frame_progress((AVFrame*)s->current_picture_ptr, (16*s->mb_height >> s->first_field) - 1);
if(!USE_FRAME_THREADING(avctx)){
if(!s->dropable) {
diff --git a/libavcodec/mimic.c b/libavcodec/mimic.c
index e5b8b5c..da943b2 100644
--- a/libavcodec/mimic.c
+++ b/libavcodec/mimic.c
@@ -256,7 +256,7 @@ static int decode(MimicContext *ctx, int quality, int num_coeffs,
int index = (ctx->cur_index+backref)&15;
uint8_t *p = ctx->flipped_ptrs[index].data[0];
- ff_await_decode_progress(&ctx->buf_ptrs[index], cur_row);
+ ff_await_frame_progress(&ctx->buf_ptrs[index], cur_row);
if(p) {
p += src -
ctx->flipped_ptrs[ctx->prev_index].data[plane];
@@ -267,7 +267,7 @@ static int decode(MimicContext *ctx, int quality, int num_coeffs,
}
}
} else {
- ff_await_decode_progress(&ctx->buf_ptrs[ctx->prev_index], cur_row);
+ ff_await_frame_progress(&ctx->buf_ptrs[ctx->prev_index], cur_row);
ctx->dsp.put_pixels_tab[1][0](dst, src, stride, 8);
}
src += 8;
@@ -276,7 +276,7 @@ static int decode(MimicContext *ctx, int quality, int num_coeffs,
src += (stride - ctx->num_hblocks[plane])<<3;
dst += (stride - ctx->num_hblocks[plane])<<3;
- ff_report_decode_progress(&ctx->buf_ptrs[ctx->cur_index], cur_row++);
+ ff_report_frame_progress(&ctx->buf_ptrs[ctx->cur_index], cur_row++);
}
}
@@ -359,7 +359,7 @@ static int mimic_decode_frame(AVCodecContext *avctx, void *data,
prepare_avpic(ctx, &ctx->flipped_ptrs[ctx->cur_index],
(AVPicture*) &ctx->buf_ptrs[ctx->cur_index]);
- ff_report_predecode_done(avctx);
+ ff_report_frame_setup_done(avctx);
ctx->swap_buf = av_fast_realloc(ctx->swap_buf, &ctx->swap_buf_size,
swap_buf_size + FF_INPUT_BUFFER_PADDING_SIZE);
diff --git a/libavcodec/mpeg12.c b/libavcodec/mpeg12.c
index b3890a9..1a67b99 100644
--- a/libavcodec/mpeg12.c
+++ b/libavcodec/mpeg12.c
@@ -1659,7 +1659,7 @@ static int mpeg_field_start(MpegEncContext *s){
*s->current_picture_ptr->pan_scan= s1->pan_scan;
- if (USE_FRAME_THREADING(avctx)) ff_report_predecode_done(avctx);
+ if (USE_FRAME_THREADING(avctx)) ff_report_frame_setup_done(avctx);
}else{ //second field
int i;
diff --git a/libavcodec/mpegvideo.c b/libavcodec/mpegvideo.c
index 9531d5e..8f2e850 100644
--- a/libavcodec/mpegvideo.c
+++ b/libavcodec/mpegvideo.c
@@ -1951,10 +1951,10 @@ void MPV_decode_mb_internal(MpegEncContext *s, DCTELEM block[12][64],
if(USE_FRAME_THREADING(s->avctx)) {
if (s->mv_dir & MV_DIR_FORWARD) {
- ff_await_decode_progress((AVFrame*)s->last_picture_ptr, MPV_lowest_referenced_row(s, 0));
+ ff_await_frame_progress((AVFrame*)s->last_picture_ptr, MPV_lowest_referenced_row(s, 0));
}
if (s->mv_dir & MV_DIR_BACKWARD) {
- ff_await_decode_progress((AVFrame*)s->next_picture_ptr, MPV_lowest_referenced_row(s, 1));
+ ff_await_frame_progress((AVFrame*)s->next_picture_ptr, MPV_lowest_referenced_row(s, 1));
}
}
@@ -2463,5 +2463,5 @@ void ff_set_qscale(MpegEncContext * s, int qscale)
void MPV_report_decode_progress(MpegEncContext *s)
{
if (s->pict_type != FF_B_TYPE && !s->partitioned_frame)
- ff_report_decode_progress((AVFrame*)s->current_picture_ptr, s->mb_y);
+ ff_report_frame_progress((AVFrame*)s->current_picture_ptr, s->mb_y);
}
diff --git a/libavcodec/pthread.c b/libavcodec/pthread.c
index 324b695..b5922e8 100644
--- a/libavcodec/pthread.c
+++ b/libavcodec/pthread.c
@@ -70,9 +70,9 @@ typedef struct PerThreadContext {
enum {
STATE_INPUT_READY, ///< Set when the thread is sleeping.
- STATE_PREDECODING, ///< Set before the codec has called ff_report_predecode_done().
+ STATE_PREDECODING, ///< Set before the codec has called ff_report_frame_setup_done().
STATE_DECODING /**<
- * Set after the codec has called ff_report_predecode_done().
+ * Set after the codec has called ff_report_frame_setup_done().
* At this point it is safe to start the next thread.
*/
} state;
@@ -242,15 +242,15 @@ static attribute_align_arg void *decode_frame_thread(void *arg)
if (fctx->die) break;
- if (!codec->update_context) ff_report_predecode_done(avctx);
+ if (!codec->update_context) ff_report_frame_setup_done(avctx);
pthread_mutex_lock(&p->mutex);
avcodec_get_frame_defaults(&p->picture);
p->got_picture = 0;
p->result = codec->decode(avctx, &p->picture, &p->got_picture, p->buf, p->buf_size);
- if (p->state == STATE_PREDECODING) ff_report_predecode_done(avctx);
- if (p->got_picture) ff_report_decode_progress(&p->picture, INT_MAX);
+ if (p->state == STATE_PREDECODING) ff_report_frame_setup_done(avctx);
+ if (p->got_picture) ff_report_frame_progress(&p->picture, INT_MAX);
p->buf_size = 0;
p->state = STATE_INPUT_READY;
@@ -471,7 +471,7 @@ int ff_decode_frame_threaded(AVCodecContext *avctx,
return p->result;
}
-void ff_report_decode_progress(AVFrame *f, int n)
+void ff_report_frame_progress(AVFrame *f, int n)
{
PerThreadContext *p = f->owner->thread_opaque;
int *progress = f->thread_opaque;
@@ -484,7 +484,7 @@ void ff_report_decode_progress(AVFrame *f, int n)
pthread_mutex_unlock(&p->progress_mutex);
}
-void ff_await_decode_progress(AVFrame *f, int n)
+void ff_await_frame_progress(AVFrame *f, int n)
{
PerThreadContext *p = f->owner->thread_opaque;
int * volatile progress = f->thread_opaque;
@@ -497,7 +497,7 @@ void ff_await_decode_progress(AVFrame *f, int n)
pthread_mutex_unlock(&p->progress_mutex);
}
-void ff_report_predecode_done(AVCodecContext *avctx) {
+void ff_report_frame_setup_done(AVCodecContext *avctx) {
PerThreadContext *p = avctx->thread_opaque;
if (!USE_FRAME_THREADING(avctx)) return;
diff --git a/libavcodec/thread.h b/libavcodec/thread.h
index 4d26ae5..a5d390f 100644
--- a/libavcodec/thread.h
+++ b/libavcodec/thread.h
@@ -54,7 +54,7 @@ int ff_decode_frame_threaded(AVCodecContext *avctx,
* called sometime afterwards, after which no variable read by
* it may be changed by the codec.
*/
-void ff_report_predecode_done(AVCodecContext *avctx);
+void ff_report_frame_setup_done(AVCodecContext *avctx);
/**
* Call this function after decoding some part of a frame.
@@ -63,13 +63,13 @@ void ff_report_predecode_done(AVCodecContext *avctx);
* @param f The frame being decoded
* @param progress The highest-numbered part decoded so far
*/
-void ff_report_decode_progress(AVFrame *f, int progress);
+void ff_report_frame_progress(AVFrame *f, int progress);
/**
* Call this function before accessing some part of a reference frame.
* On return, all parts up to the requested number will be available.
*/
-void ff_await_decode_progress(AVFrame *f, int progress);
+void ff_await_frame_progress(AVFrame *f, int progress);
/**
* Allocate a frame with avctx->get_buffer() and set
@@ -95,9 +95,9 @@ void ff_release_buffer(AVCodecContext *avctx, AVFrame *f);
#else
//Stub out these functions for systems without pthreads
-static inline void ff_report_predecode_done(AVCodecContext *avctx) {}
-static inline void ff_report_decode_progress(AVFrame *f, int progress) {}
-static inline void ff_await_decode_progress(AVFrame *f, int progress) {}
+static inline void ff_report_frame_setup_done(AVCodecContext *avctx) {}
+static inline void ff_report_frame_progress(AVFrame *f, int progress) {}
+static inline void ff_await_frame_progress(AVFrame *f, int progress) {}
static inline int ff_get_buffer(AVCodecContext *avctx, AVFrame *f)
{
_______________________________________________
FFmpeg-soc mailing list
[email protected]
https://lists.mplayerhq.hu/mailman/listinfo/ffmpeg-soc