Commit bf07c76d authored by Gerion Entrup's avatar Gerion Entrup
Browse files

partial merge with mvc.patch

parent 274de88c
......@@ -38,6 +38,7 @@
#include "h264.h"
#include "h264data.h"
#include "h264_mvpred.h"
#include "h264_mvc.h"
#include "golomb.h"
#include "mathops.h"
#include "rectangle.h"
......@@ -47,6 +48,7 @@
// #undef NDEBUG
#include <assert.h>
#include <time.h>
const uint16_t ff_h264_mb_sizes[4] = { 256, 384, 512, 768 };
......@@ -178,6 +180,28 @@ const uint8_t *ff_h264_decode_nal(H264Context *h, const uint8_t *src,
src++;
length--;
// EDIT for MVC support
// JB ff_h264_decode_nal
// @author: Jochen Britz
if (h->nal_unit_type == NAL_PREFIX || h->nal_unit_type == NAL_EXT_SLICE) {
h->svc_extension_flag = (src[0] & 0x80) >> 7;
if (h->svc_extension_flag) {
//ff_h264_decode_nal_unit_header_svc_extension(h);
} else {
ff_h264_mvc_decode_nal_header(h, src);
if(h->nal_unit_type == NAL_PREFIX){
// base view
h->base_view_id = h->view_id;
}
}
src += 3;
length -= 3;
}
// END EDIT
//av_log(h->s.avctx, AV_LOG_INFO, "NAL unit decoded with type (%3d), frame (%3d), view (%3d) and view index (%3d)\n", h->nal_unit_type, h->frame_num ,h->view_id, h->voidx );
#if HAVE_FAST_UNALIGNED
#if HAVE_FAST_64BIT
#define RS 7
......@@ -453,6 +477,27 @@ static void await_references(H264Context *h)
}
}
// EDIT JB thread_await for multi_threading
void ff_h264_thread_await_progress(H264Context *h, Picture *ref_pic, int n, int field){
ff_thread_await_progress(&ref_pic->f, n, field);
}
void ff_h264_thread_await_picture(H264Context *h, Picture *ref_pic){
int ref_field = 2+ref_pic->view_id;
ff_thread_await_progress(&ref_pic->f, ref_pic->poc, ref_field);
}
void ff_h264_thread_report_progress(H264Context *h, Picture *ref_pic, int n, int field){
ff_thread_report_progress(&ref_pic->f, n, field);
}
void ff_h264_thread_report_Picture(H264Context *h){
Picture *ref_pic = h->s.current_picture_ptr;
int ref_field = 2+ref_pic->view_id;
ff_thread_report_progress(&ref_pic->f, ref_pic->poc, ref_field);
}
// END EDIT
static av_always_inline void mc_dir_part(H264Context *h, Picture *pic,
int n, int square, int height,
int delta, int list,
......@@ -854,6 +899,11 @@ static av_always_inline void hl_motion(H264Context *h, uint8_t *dest_y,
&weight_op[1], &weight_avg[1],
IS_DIR(sub_mb_type, 0, 0), IS_DIR(sub_mb_type, 0, 1),
pixel_shift, chroma_idc);
/* TODO
mc_part(h, n + 2, 0, 4, 4 << pixel_shift, dest_y, dest_cb, dest_cr, x_offset,
y_offset + 2, qpix_put[2], chroma_put[1], qpix_avg[2], chroma_avg[1],
&weight_op[1], &weight_avg[1], IS_DIR(sub_mb_type, 0, 0),
IS_DIR(sub_mb_type, 0, 1), pixel_shift, chroma_idc); */
} else if (IS_SUB_4X8(sub_mb_type)) {
mc_part(h, n, 0, 8, 4 * h->mb_linesize,
dest_y, dest_cb, dest_cr, x_offset, y_offset,
......
Supports Markdown
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