summaryrefslogtreecommitdiff
path: root/libavcodec/h264_direct.c
diff options
context:
space:
mode:
authorMichael Niedermayer <michaelni@gmx.at>2012-12-19 14:39:15 +0100
committerMichael Niedermayer <michaelni@gmx.at>2012-12-19 14:39:30 +0100
commite84194f06024892fc33684c5a1726c97a0c0a45c (patch)
treef9eeea5ebc69dc025be80845d2b82b206d51b037 /libavcodec/h264_direct.c
parentaf804dbe9ed0e6a1b2d5e9eca1a7155c2fe91e3e (diff)
parented2d7d5868a4a5d914f1e5488d63ea696a3b2937 (diff)
Merge commit 'ed2d7d5868a4a5d914f1e5488d63ea696a3b2937'
* commit 'ed2d7d5868a4a5d914f1e5488d63ea696a3b2937': ff_h264_direct_ref_list_init: fix B slice check. h264: increase dist_scale_factor for up to 32 references Merged-by: Michael Niedermayer <michaelni@gmx.at>
Diffstat (limited to 'libavcodec/h264_direct.c')
-rw-r--r--libavcodec/h264_direct.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/libavcodec/h264_direct.c b/libavcodec/h264_direct.c
index 1373e23eb4..99c2ec1b97 100644
--- a/libavcodec/h264_direct.c
+++ b/libavcodec/h264_direct.c
@@ -54,14 +54,17 @@ void ff_h264_direct_dist_scale_factor(H264Context * const h){
const int poc = h->s.current_picture_ptr->field_poc[ s->picture_structure == PICT_BOTTOM_FIELD ];
const int poc1 = h->ref_list[1][0].poc;
int i, field;
- for(field=0; field<2; field++){
- const int poc = h->s.current_picture_ptr->field_poc[field];
- const int poc1 = h->ref_list[1][0].field_poc[field];
- for(i=0; i < 2*h->ref_count[0]; i++)
- h->dist_scale_factor_field[field][i^field] = get_scale_factor(h, poc, poc1, i+16);
- }
- for(i=0; i<h->ref_count[0]; i++){
+ if (FRAME_MBAFF)
+ for (field = 0; field < 2; field++){
+ const int poc = h->s.current_picture_ptr->field_poc[field];
+ const int poc1 = h->ref_list[1][0].field_poc[field];
+ for (i = 0; i < 2 * h->ref_count[0]; i++)
+ h->dist_scale_factor_field[field][i^field] =
+ get_scale_factor(h, poc, poc1, i+16);
+ }
+
+ for (i = 0; i < h->ref_count[0]; i++){
h->dist_scale_factor[i] = get_scale_factor(h, poc, poc1, i);
}
}