summaryrefslogtreecommitdiff
path: root/libavcodec
diff options
context:
space:
mode:
authorAnton Khirnov <anton@khirnov.net>2016-04-11 16:19:01 +0200
committerAnton Khirnov <anton@khirnov.net>2016-04-24 10:06:25 +0200
commit56087ec0a29314d1860f6f0e6f40fbb9b40feccd (patch)
treecfa2b576e6c8df83d6a9d7ca9821ad1bbc478d06 /libavcodec
parent0e7772c5e4f1b31e2a3dda714ba4f89b1cca644a (diff)
h264: drop a pointless indirection
Diffstat (limited to 'libavcodec')
-rw-r--r--libavcodec/h264.h4
-rw-r--r--libavcodec/h264_mb_template.c18
-rw-r--r--libavcodec/h264_mc_template.c4
-rw-r--r--libavcodec/h264_slice.c3
4 files changed, 14 insertions, 15 deletions
diff --git a/libavcodec/h264.h b/libavcodec/h264.h
index 794492740e..3dc7d66a5e 100644
--- a/libavcodec/h264.h
+++ b/libavcodec/h264.h
@@ -644,10 +644,6 @@ typedef struct H264Context {
AVBufferPool *mb_type_pool;
AVBufferPool *motion_val_pool;
AVBufferPool *ref_index_pool;
-
- /* Motion Estimation */
- qpel_mc_func (*qpel_put)[16];
- qpel_mc_func (*qpel_avg)[16];
} H264Context;
extern const uint16_t ff_h264_mb_sizes[4];
diff --git a/libavcodec/h264_mb_template.c b/libavcodec/h264_mb_template.c
index 7da4f416bf..1f583dfbb9 100644
--- a/libavcodec/h264_mb_template.c
+++ b/libavcodec/h264_mb_template.c
@@ -173,14 +173,18 @@ static av_noinline void FUNC(hl_decode_mb)(const H264Context *h, H264SliceContex
} else {
if (chroma422) {
FUNC(hl_motion_422)(h, sl, dest_y, dest_cb, dest_cr,
- h->qpel_put, h->h264chroma.put_h264_chroma_pixels_tab,
- h->qpel_avg, h->h264chroma.avg_h264_chroma_pixels_tab,
+ h->h264qpel.put_h264_qpel_pixels_tab,
+ h->h264chroma.put_h264_chroma_pixels_tab,
+ h->h264qpel.avg_h264_qpel_pixels_tab,
+ h->h264chroma.avg_h264_chroma_pixels_tab,
h->h264dsp.weight_h264_pixels_tab,
h->h264dsp.biweight_h264_pixels_tab);
} else {
FUNC(hl_motion_420)(h, sl, dest_y, dest_cb, dest_cr,
- h->qpel_put, h->h264chroma.put_h264_chroma_pixels_tab,
- h->qpel_avg, h->h264chroma.avg_h264_chroma_pixels_tab,
+ h->h264qpel.put_h264_qpel_pixels_tab,
+ h->h264chroma.put_h264_chroma_pixels_tab,
+ h->h264qpel.avg_h264_qpel_pixels_tab,
+ h->h264chroma.avg_h264_chroma_pixels_tab,
h->h264dsp.weight_h264_pixels_tab,
h->h264dsp.biweight_h264_pixels_tab);
}
@@ -336,8 +340,10 @@ static av_noinline void FUNC(hl_decode_mb_444)(const H264Context *h, H264SliceCo
linesize, 0, 1, SIMPLE, PIXEL_SHIFT);
} else {
FUNC(hl_motion_444)(h, sl, dest[0], dest[1], dest[2],
- h->qpel_put, h->h264chroma.put_h264_chroma_pixels_tab,
- h->qpel_avg, h->h264chroma.avg_h264_chroma_pixels_tab,
+ h->h264qpel.put_h264_qpel_pixels_tab,
+ h->h264chroma.put_h264_chroma_pixels_tab,
+ h->h264qpel.avg_h264_qpel_pixels_tab,
+ h->h264chroma.avg_h264_chroma_pixels_tab,
h->h264dsp.weight_h264_pixels_tab,
h->h264dsp.biweight_h264_pixels_tab);
}
diff --git a/libavcodec/h264_mc_template.c b/libavcodec/h264_mc_template.c
index 8ae1eef90a..0c8a925d1d 100644
--- a/libavcodec/h264_mc_template.c
+++ b/libavcodec/h264_mc_template.c
@@ -64,9 +64,9 @@ static void mc_part(const H264Context *h, H264SliceContext *sl,
static void MCFUNC(hl_motion)(const H264Context *h, H264SliceContext *sl,
uint8_t *dest_y,
uint8_t *dest_cb, uint8_t *dest_cr,
- qpel_mc_func(*qpix_put)[16],
+ const qpel_mc_func(*qpix_put)[16],
const h264_chroma_mc_func(*chroma_put),
- qpel_mc_func(*qpix_avg)[16],
+ const qpel_mc_func(*qpix_avg)[16],
const h264_chroma_mc_func(*chroma_avg),
const h264_weight_func *weight_op,
const h264_biweight_func *weight_avg)
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index fda6d3225e..ee4b74a25e 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -934,9 +934,6 @@ int ff_h264_decode_slice_header(H264Context *h, H264SliceContext *sl)
int frame_num, droppable, picture_structure;
int mb_aff_frame = 0;
- h->qpel_put = h->h264qpel.put_h264_qpel_pixels_tab;
- h->qpel_avg = h->h264qpel.avg_h264_qpel_pixels_tab;
-
first_mb_in_slice = get_ue_golomb(&sl->gb);
if (first_mb_in_slice == 0) { // FIXME better field boundary detection