summaryrefslogtreecommitdiff
path: root/libavcodec/error_resilience.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-01-03 02:25:56 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-01-03 03:06:45 +0100
commit7d8f1158436c261d2d1657c33e731f9bec650c51 (patch)
treecf3c0261ba5202ad949af637a026b11dc4631a00 /libavcodec/error_resilience.c
parent45552371e3434fb7aa4d0bc566fd4ef954f9af14 (diff)
parent881a5e047dc78ec9ab771817497dffec503d77ee (diff)
Merge remote-tracking branch 'qatar/master'
* qatar/master: mpegenc: use avctx->slices as number of slices v410enc: fix undefined signed left shift caused by integer promotion Release notes: mention cleaned up header includes fix Changelog file Fix a bunch of typos. Drop some pointless void* return value casts from av_malloc() invocations. wavpack: fix typos in previous cosmetic clean-up commit wavpack: cosmetics: K&R pretty-printing avconv: remove the 'codec framerate is different from stream' warning wavpack: determine sample_fmt before requesting a buffer bmv audio: implement new audio decoding API mpegaudiodec: skip all channels when skipping granules mpegenc: simplify muxrate calculation Conflicts: Changelog avconv.c doc/RELEASE_NOTES libavcodec/h264.c libavcodec/mpeg12.c libavcodec/mpegaudiodec.c libavcodec/mpegvideo.c libavformat/mpegenc.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/error_resilience.c')
-rw-r--r--libavcodec/error_resilience.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/libavcodec/error_resilience.c b/libavcodec/error_resilience.c
index ee0e6fcfe2..638215f7d8 100644
--- a/libavcodec/error_resilience.c
+++ b/libavcodec/error_resilience.c
@@ -50,7 +50,11 @@ static void decode_mb(MpegEncContext *s, int ref){
h->mb_xy= s->mb_x + s->mb_y*s->mb_stride;
memset(h->non_zero_count_cache, 0, sizeof(h->non_zero_count_cache));
assert(ref>=0);
- if(ref >= h->ref_count[0]) //FIXME it is posible albeit uncommon that slice references differ between slices, we take the easy approuch and ignore it for now. If this turns out to have any relevance in practice then correct remapping should be added
+ /* FIXME: It is posible albeit uncommon that slice references
+ * differ between slices. We take the easy approach and ignore
+ * it for now. If this turns out to have any relevance in
+ * practice then correct remapping should be added. */
+ if (ref >= h->ref_count[0])
ref=0;
fill_rectangle(&s->current_picture.f.ref_index[0][4*h->mb_xy], 2, 2, 2, ref, 1);
fill_rectangle(&h->ref_cache[0][scan8[0]], 4, 4, 8, ref, 1);
@@ -684,7 +688,7 @@ static int is_intra_more_likely(MpegEncContext *s){
if(CONFIG_MPEG_XVMC_DECODER && s->avctx->xvmc_acceleration && s->pict_type == AV_PICTURE_TYPE_I)
return 1;
- skip_amount= FFMAX(undamaged_count/50, 1); //check only upto 50 MBs
+ skip_amount = FFMAX(undamaged_count / 50, 1); // check only up to 50 MBs
is_intra_likely=0;
j=0;