Commit bc987cf9 authored by James Almer's avatar James Almer

Merge commit '45c4bf3d'

* commit '45c4bf3d':
  h264dec: track the last seen value of x264_build
Merged-by: 's avatarJames Almer <jamrial@gmail.com>
parents 5fd6fa0c 45c4bf3d
......@@ -2347,7 +2347,7 @@ decode_intra_mb:
if (CHROMA444(h) && IS_8x8DCT(mb_type)){
int i;
uint8_t *nnz_cache = sl->non_zero_count_cache;
if (h->sei.unregistered.x264_build < 151U) {
if (h->x264_build < 151U) {
for (i = 0; i < 2; i++){
if (sl->left_type[LEFT(i)] && !IS_8x8DCT(sl->left_type[LEFT(i)])) {
nnz_cache[3+8* 1 + 2*8*i]=
......
......@@ -410,7 +410,7 @@ single_col:
(l1ref0[0] < 0 && !l1ref1[0] &&
FFABS(l1mv1[0][0]) <= 1 &&
FFABS(l1mv1[0][1]) <= 1 &&
h->sei.unregistered.x264_build > 33U))) {
h->x264_build > 33U))) {
a = b = 0;
if (ref[0] > 0)
a = mv[0];
......@@ -445,7 +445,7 @@ single_col:
(l1ref0[i8] == 0 ||
(l1ref0[i8] < 0 &&
l1ref1[i8] == 0 &&
h->sei.unregistered.x264_build > 33U))) {
h->x264_build > 33U))) {
const int16_t (*l1mv)[2] = l1ref0[i8] == 0 ? l1mv0 : l1mv1;
if (IS_SUB_8X8(sub_mb_type)) {
const int16_t *mv_col = l1mv[x8 * 3 + y8 * 3 * b4_stride];
......
......@@ -637,7 +637,7 @@ static av_always_inline void hl_decode_mb_predict_luma(const H264Context *h,
uint8_t *const ptr = dest_y + block_offset[i];
const int dir = sl->intra4x4_pred_mode_cache[scan8[i]];
if (transform_bypass && h->ps.sps->profile_idc == 244 && dir <= 1) {
if (h->sei.unregistered.x264_build < 151U) {
if (h->x264_build < 151U) {
h->hpc.pred8x8l_add[dir](ptr, sl->mb + (i * 16 + p * 256 << pixel_shift), linesize);
} else
h->hpc.pred8x8l_filter_add[dir](ptr, sl->mb + (i * 16 + p * 256 << pixel_shift),
......
......@@ -399,12 +399,12 @@ int ff_h264_update_thread_context(AVCodecContext *dst,
h->enable_er = h1->enable_er;
h->workaround_bugs = h1->workaround_bugs;
h->x264_build = h1->x264_build;
h->droppable = h1->droppable;
// extradata/NAL handling
h->is_avc = h1->is_avc;
h->nal_length_size = h1->nal_length_size;
h->sei.unregistered.x264_build = h1->sei.unregistered.x264_build;
memcpy(&h->poc, &h1->poc, sizeof(h->poc));
......@@ -545,6 +545,9 @@ static int h264_frame_start(H264Context *h)
h->mb_aff_frame = h->ps.sps->mb_aff && (h->picture_structure == PICT_FRAME);
if (h->sei.unregistered.x264_build >= 0)
h->x264_build = h->sei.unregistered.x264_build;
assert(h->cur_pic_ptr->long_ref == 0);
return 0;
......@@ -912,7 +915,7 @@ static int h264_slice_header_init(H264Context *h)
if (sps->timing_info_present_flag) {
int64_t den = sps->time_scale;
if (h->sei.unregistered.x264_build < 44U)
if (h->x264_build < 44U)
den *= 2;
av_reduce(&h->avctx->framerate.den, &h->avctx->framerate.num,
sps->num_units_in_tick * h->avctx->ticks_per_frame, den, 1 << 30);
......
......@@ -315,6 +315,7 @@ static int h264_init_context(AVCodecContext *avctx, H264Context *h)
h->flags = avctx->flags;
h->poc.prev_poc_msb = 1 << 16;
h->recovery_frame = -1;
h->x264_build = -1;
h->frame_recovered = 0;
h->poc.prev_frame_num = -1;
h->sei.frame_packing.frame_packing_arrangement_cancel_flag = -1;
......
......@@ -365,6 +365,7 @@ typedef struct H264Context {
int context_initialized;
int flags;
int workaround_bugs;
int x264_build;
/* Set when slice threading is used and at least one slice uses deblocking
* mode 1 (i.e. across slice boundaries). Then we disable the loop filter
* during normal MB decoding and execute it serially at the end.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment