mirror of https://git.ffmpeg.org/ffmpeg.git
Merge commit '34d4c605e9a5116d5289b35633ade5b01cacab24'
* commit '34d4c605e9a5116d5289b35633ade5b01cacab24': h264_loopfilter: constify all uses of H264Context Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
commit
2730163329
|
@ -892,10 +892,10 @@ void ff_h264_direct_ref_list_init(const H264Context *const h, H264SliceContext *
|
||||||
void ff_h264_pred_direct_motion(const H264Context *const h, H264SliceContext *sl,
|
void ff_h264_pred_direct_motion(const H264Context *const h, H264SliceContext *sl,
|
||||||
int *mb_type);
|
int *mb_type);
|
||||||
|
|
||||||
void ff_h264_filter_mb_fast(H264Context *h, H264SliceContext *sl, int mb_x, int mb_y,
|
void ff_h264_filter_mb_fast(const H264Context *h, H264SliceContext *sl, int mb_x, int mb_y,
|
||||||
uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr,
|
uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr,
|
||||||
unsigned int linesize, unsigned int uvlinesize);
|
unsigned int linesize, unsigned int uvlinesize);
|
||||||
void ff_h264_filter_mb(H264Context *h, H264SliceContext *sl, int mb_x, int mb_y,
|
void ff_h264_filter_mb(const H264Context *h, H264SliceContext *sl, int mb_x, int mb_y,
|
||||||
uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr,
|
uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr,
|
||||||
unsigned int linesize, unsigned int uvlinesize);
|
unsigned int linesize, unsigned int uvlinesize);
|
||||||
|
|
||||||
|
|
|
@ -101,7 +101,7 @@ static const uint8_t tc0_table[52*3][4] = {
|
||||||
static av_always_inline void filter_mb_edgev(uint8_t *pix, int stride,
|
static av_always_inline void filter_mb_edgev(uint8_t *pix, int stride,
|
||||||
const int16_t bS[4],
|
const int16_t bS[4],
|
||||||
unsigned int qp, int a, int b,
|
unsigned int qp, int a, int b,
|
||||||
H264Context *h, int intra)
|
const H264Context *h, int intra)
|
||||||
{
|
{
|
||||||
const unsigned int index_a = qp + a;
|
const unsigned int index_a = qp + a;
|
||||||
const int alpha = alpha_table[index_a];
|
const int alpha = alpha_table[index_a];
|
||||||
|
@ -123,7 +123,7 @@ static av_always_inline void filter_mb_edgev(uint8_t *pix, int stride,
|
||||||
static av_always_inline void filter_mb_edgecv(uint8_t *pix, int stride,
|
static av_always_inline void filter_mb_edgecv(uint8_t *pix, int stride,
|
||||||
const int16_t bS[4],
|
const int16_t bS[4],
|
||||||
unsigned int qp, int a, int b,
|
unsigned int qp, int a, int b,
|
||||||
H264Context *h, int intra)
|
const H264Context *h, int intra)
|
||||||
{
|
{
|
||||||
const unsigned int index_a = qp + a;
|
const unsigned int index_a = qp + a;
|
||||||
const int alpha = alpha_table[index_a];
|
const int alpha = alpha_table[index_a];
|
||||||
|
@ -142,7 +142,7 @@ static av_always_inline void filter_mb_edgecv(uint8_t *pix, int stride,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static av_always_inline void filter_mb_mbaff_edgev(H264Context *h, uint8_t *pix,
|
static av_always_inline void filter_mb_mbaff_edgev(const H264Context *h, uint8_t *pix,
|
||||||
int stride,
|
int stride,
|
||||||
const int16_t bS[7], int bsi,
|
const int16_t bS[7], int bsi,
|
||||||
int qp, int a, int b,
|
int qp, int a, int b,
|
||||||
|
@ -165,7 +165,7 @@ static av_always_inline void filter_mb_mbaff_edgev(H264Context *h, uint8_t *pix,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static av_always_inline void filter_mb_mbaff_edgecv(H264Context *h,
|
static av_always_inline void filter_mb_mbaff_edgecv(const H264Context *h,
|
||||||
uint8_t *pix, int stride,
|
uint8_t *pix, int stride,
|
||||||
const int16_t bS[7],
|
const int16_t bS[7],
|
||||||
int bsi, int qp, int a,
|
int bsi, int qp, int a,
|
||||||
|
@ -191,7 +191,7 @@ static av_always_inline void filter_mb_mbaff_edgecv(H264Context *h,
|
||||||
static av_always_inline void filter_mb_edgeh(uint8_t *pix, int stride,
|
static av_always_inline void filter_mb_edgeh(uint8_t *pix, int stride,
|
||||||
const int16_t bS[4],
|
const int16_t bS[4],
|
||||||
unsigned int qp, int a, int b,
|
unsigned int qp, int a, int b,
|
||||||
H264Context *h, int intra)
|
const H264Context *h, int intra)
|
||||||
{
|
{
|
||||||
const unsigned int index_a = qp + a;
|
const unsigned int index_a = qp + a;
|
||||||
const int alpha = alpha_table[index_a];
|
const int alpha = alpha_table[index_a];
|
||||||
|
@ -213,7 +213,7 @@ static av_always_inline void filter_mb_edgeh(uint8_t *pix, int stride,
|
||||||
static av_always_inline void filter_mb_edgech(uint8_t *pix, int stride,
|
static av_always_inline void filter_mb_edgech(uint8_t *pix, int stride,
|
||||||
const int16_t bS[4],
|
const int16_t bS[4],
|
||||||
unsigned int qp, int a, int b,
|
unsigned int qp, int a, int b,
|
||||||
H264Context *h, int intra)
|
const H264Context *h, int intra)
|
||||||
{
|
{
|
||||||
const unsigned int index_a = qp + a;
|
const unsigned int index_a = qp + a;
|
||||||
const int alpha = alpha_table[index_a];
|
const int alpha = alpha_table[index_a];
|
||||||
|
@ -232,7 +232,7 @@ static av_always_inline void filter_mb_edgech(uint8_t *pix, int stride,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static av_always_inline void h264_filter_mb_fast_internal(H264Context *h,
|
static av_always_inline void h264_filter_mb_fast_internal(const H264Context *h,
|
||||||
H264SliceContext *sl,
|
H264SliceContext *sl,
|
||||||
int mb_x, int mb_y,
|
int mb_x, int mb_y,
|
||||||
uint8_t *img_y,
|
uint8_t *img_y,
|
||||||
|
@ -414,7 +414,7 @@ static av_always_inline void h264_filter_mb_fast_internal(H264Context *h,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ff_h264_filter_mb_fast(H264Context *h, H264SliceContext *sl,
|
void ff_h264_filter_mb_fast(const H264Context *h, H264SliceContext *sl,
|
||||||
int mb_x, int mb_y, uint8_t *img_y,
|
int mb_x, int mb_y, uint8_t *img_y,
|
||||||
uint8_t *img_cb, uint8_t *img_cr,
|
uint8_t *img_cb, uint8_t *img_cr,
|
||||||
unsigned int linesize, unsigned int uvlinesize)
|
unsigned int linesize, unsigned int uvlinesize)
|
||||||
|
@ -436,7 +436,7 @@ void ff_h264_filter_mb_fast(H264Context *h, H264SliceContext *sl,
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
static int check_mv(H264Context *h, H264SliceContext *sl, long b_idx, long bn_idx, int mvy_limit)
|
static int check_mv(H264SliceContext *sl, long b_idx, long bn_idx, int mvy_limit)
|
||||||
{
|
{
|
||||||
int v;
|
int v;
|
||||||
|
|
||||||
|
@ -466,7 +466,7 @@ static int check_mv(H264Context *h, H264SliceContext *sl, long b_idx, long bn_id
|
||||||
return v;
|
return v;
|
||||||
}
|
}
|
||||||
|
|
||||||
static av_always_inline void filter_mb_dir(H264Context *h, H264SliceContext *sl,
|
static av_always_inline void filter_mb_dir(const H264Context *h, H264SliceContext *sl,
|
||||||
int mb_x, int mb_y,
|
int mb_x, int mb_y,
|
||||||
uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr,
|
uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr,
|
||||||
unsigned int linesize, unsigned int uvlinesize,
|
unsigned int linesize, unsigned int uvlinesize,
|
||||||
|
@ -563,7 +563,7 @@ static av_always_inline void filter_mb_dir(H264Context *h, H264SliceContext *sl,
|
||||||
int b_idx= 8 + 4;
|
int b_idx= 8 + 4;
|
||||||
int bn_idx= b_idx - (dir ? 8:1);
|
int bn_idx= b_idx - (dir ? 8:1);
|
||||||
|
|
||||||
bS[0] = bS[1] = bS[2] = bS[3] = check_mv(h, sl, 8 + 4, bn_idx, mvy_limit);
|
bS[0] = bS[1] = bS[2] = bS[3] = check_mv(sl, 8 + 4, bn_idx, mvy_limit);
|
||||||
mv_done = 1;
|
mv_done = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -581,7 +581,7 @@ static av_always_inline void filter_mb_dir(H264Context *h, H264SliceContext *sl,
|
||||||
}
|
}
|
||||||
else if(!mv_done)
|
else if(!mv_done)
|
||||||
{
|
{
|
||||||
bS[i] = check_mv(h, sl, b_idx, bn_idx, mvy_limit);
|
bS[i] = check_mv(sl, b_idx, bn_idx, mvy_limit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -646,7 +646,7 @@ static av_always_inline void filter_mb_dir(H264Context *h, H264SliceContext *sl,
|
||||||
int b_idx= 8 + 4 + edge * (dir ? 8:1);
|
int b_idx= 8 + 4 + edge * (dir ? 8:1);
|
||||||
int bn_idx= b_idx - (dir ? 8:1);
|
int bn_idx= b_idx - (dir ? 8:1);
|
||||||
|
|
||||||
bS[0] = bS[1] = bS[2] = bS[3] = check_mv(h, sl, b_idx, bn_idx, mvy_limit);
|
bS[0] = bS[1] = bS[2] = bS[3] = check_mv(sl, b_idx, bn_idx, mvy_limit);
|
||||||
mv_done = 1;
|
mv_done = 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -664,7 +664,7 @@ static av_always_inline void filter_mb_dir(H264Context *h, H264SliceContext *sl,
|
||||||
}
|
}
|
||||||
else if(!mv_done)
|
else if(!mv_done)
|
||||||
{
|
{
|
||||||
bS[i] = check_mv(h, sl, b_idx, bn_idx, mvy_limit);
|
bS[i] = check_mv(sl, b_idx, bn_idx, mvy_limit);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -714,7 +714,7 @@ static av_always_inline void filter_mb_dir(H264Context *h, H264SliceContext *sl,
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void ff_h264_filter_mb(H264Context *h, H264SliceContext *sl,
|
void ff_h264_filter_mb(const H264Context *h, H264SliceContext *sl,
|
||||||
int mb_x, int mb_y,
|
int mb_x, int mb_y,
|
||||||
uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr,
|
uint8_t *img_y, uint8_t *img_cb, uint8_t *img_cr,
|
||||||
unsigned int linesize, unsigned int uvlinesize)
|
unsigned int linesize, unsigned int uvlinesize)
|
||||||
|
|
Loading…
Reference in New Issue