[FFmpeg-cvslog] Merge commit 'b13fc1e344011949929975a3451f78f226aa1de3'
Timothy Gu
git at videolan.org
Thu Aug 4 01:42:46 EEST 2016
ffmpeg | branch: master | Timothy Gu <timothygu99 at gmail.com> | Wed Aug 3 15:41:59 2016 -0700| [bca30ed2b67f095fd31e07319a622ac30ad22978] | committer: Timothy Gu
Merge commit 'b13fc1e344011949929975a3451f78f226aa1de3'
* commit 'b13fc1e344011949929975a3451f78f226aa1de3':
h264: do not pass H264Context to h264_slice_header_parse()
Conflicts:
libavcodec/h264dec.h
Did not merge the h264_slice_header_parse() part. We use a few other
members of H264Context for error checking in that function.
Merged-by: Timothy Gu <timothygu99 at gmail.com>
> http://git.videolan.org/gitweb.cgi/ffmpeg.git/?a=commit;h=bca30ed2b67f095fd31e07319a622ac30ad22978
---
libavcodec/h264_refs.c | 18 +++++++++---------
libavcodec/h264_slice.c | 4 ++--
libavcodec/h264dec.h | 6 +++---
3 files changed, 14 insertions(+), 14 deletions(-)
diff --git a/libavcodec/h264_refs.c b/libavcodec/h264_refs.c
index e760df1..8011413 100644
--- a/libavcodec/h264_refs.c
+++ b/libavcodec/h264_refs.c
@@ -418,7 +418,7 @@ int ff_h264_build_ref_list(H264Context *h, H264SliceContext *sl)
return 0;
}
-int ff_h264_decode_ref_pic_list_reordering(const H264Context *h, H264SliceContext *sl)
+int ff_h264_decode_ref_pic_list_reordering(H264SliceContext *sl, void *logctx)
{
int list, index;
@@ -436,10 +436,10 @@ int ff_h264_decode_ref_pic_list_reordering(const H264Context *h, H264SliceContex
break;
if (index >= sl->ref_count[list]) {
- av_log(h->avctx, AV_LOG_ERROR, "reference count overflow\n");
+ av_log(logctx, AV_LOG_ERROR, "reference count overflow\n");
return AVERROR_INVALIDDATA;
} else if (op > 2) {
- av_log(h->avctx, AV_LOG_ERROR,
+ av_log(logctx, AV_LOG_ERROR,
"illegal modification_of_pic_nums_idc %u\n",
op);
return AVERROR_INVALIDDATA;
@@ -821,14 +821,14 @@ int ff_h264_execute_ref_pic_marking(H264Context *h)
return (h->avctx->err_recognition & AV_EF_EXPLODE) ? err : 0;
}
-int ff_h264_decode_ref_pic_marking(const H264Context *h, H264SliceContext *sl,
- GetBitContext *gb)
+int ff_h264_decode_ref_pic_marking(H264SliceContext *sl, GetBitContext *gb,
+ const H2645NAL *nal, void *logctx)
{
int i;
MMCO *mmco = sl->mmco;
int nb_mmco = 0;
- if (h->nal_unit_type == H264_NAL_IDR_SLICE) { // FIXME fields
+ if (nal->type == H264_NAL_IDR_SLICE) { // FIXME fields
skip_bits1(gb); // broken_link
if (get_bits1(gb)) {
mmco[0].opcode = MMCO_LONG;
@@ -863,8 +863,8 @@ int ff_h264_decode_ref_pic_marking(const H264Context *h, H264SliceContext *sl,
if (long_arg >= 32 ||
(long_arg >= 16 && !(opcode == MMCO_SET_MAX_LONG &&
long_arg == 16) &&
- !(opcode == MMCO_LONG2UNUSED && FIELD_PICTURE(h)))) {
- av_log(h->avctx, AV_LOG_ERROR,
+ !(opcode == MMCO_LONG2UNUSED && FIELD_PICTURE(sl)))) {
+ av_log(logctx, AV_LOG_ERROR,
"illegal long ref in memory management control "
"operation %d\n", opcode);
return -1;
@@ -873,7 +873,7 @@ int ff_h264_decode_ref_pic_marking(const H264Context *h, H264SliceContext *sl,
}
if (opcode > (unsigned) MMCO_LONG) {
- av_log(h->avctx, AV_LOG_ERROR,
+ av_log(logctx, AV_LOG_ERROR,
"illegal memory management control operation %d\n",
opcode);
return -1;
diff --git a/libavcodec/h264_slice.c b/libavcodec/h264_slice.c
index 08e59aa..f32a74a 100644
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@ -1635,7 +1635,7 @@ static int h264_slice_header_parse(const H264Context *h, H264SliceContext *sl,
return ret;
if (sl->slice_type_nos != AV_PICTURE_TYPE_I) {
- ret = ff_h264_decode_ref_pic_list_reordering(h, sl);
+ ret = ff_h264_decode_ref_pic_list_reordering(sl, h->avctx);
if (ret < 0) {
sl->ref_count[1] = sl->ref_count[0] = 0;
return ret;
@@ -1655,7 +1655,7 @@ static int h264_slice_header_parse(const H264Context *h, H264SliceContext *sl,
sl->explicit_ref_marking = 0;
if (nal->ref_idc) {
- ret = ff_h264_decode_ref_pic_marking(h, sl, &sl->gb);
+ ret = ff_h264_decode_ref_pic_marking(sl, &sl->gb, nal, h->avctx);
if (ret < 0 && (h->avctx->err_recognition & AV_EF_EXPLODE))
return AVERROR_INVALIDDATA;
}
diff --git a/libavcodec/h264dec.h b/libavcodec/h264dec.h
index 7634261..9483efb 100644
--- a/libavcodec/h264dec.h
+++ b/libavcodec/h264dec.h
@@ -574,7 +574,7 @@ int ff_h264_get_slice_type(const H264SliceContext *sl);
*/
int ff_h264_alloc_tables(H264Context *h);
-int ff_h264_decode_ref_pic_list_reordering(const H264Context *h, H264SliceContext *sl);
+int ff_h264_decode_ref_pic_list_reordering(H264SliceContext *sl, void *logctx);
int ff_h264_build_ref_list(H264Context *h, H264SliceContext *sl);
void ff_h264_remove_all_refs(H264Context *h);
@@ -583,8 +583,8 @@ void ff_h264_remove_all_refs(H264Context *h);
*/
int ff_h264_execute_ref_pic_marking(H264Context *h);
-int ff_h264_decode_ref_pic_marking(const H264Context *h, H264SliceContext *sl,
- GetBitContext *gb);
+int ff_h264_decode_ref_pic_marking(H264SliceContext *sl, GetBitContext *gb,
+ const H2645NAL *nal, void *logctx);
void ff_h264_hl_decode_mb(const H264Context *h, H264SliceContext *sl);
int ff_h264_decode_init(AVCodecContext *avctx);
======================================================================
diff --cc libavcodec/h264_slice.c
index 08e59aa,3218022..f32a74a
--- a/libavcodec/h264_slice.c
+++ b/libavcodec/h264_slice.c
@@@ -1635,7 -1457,7 +1635,7 @@@ static int h264_slice_header_parse(cons
return ret;
if (sl->slice_type_nos != AV_PICTURE_TYPE_I) {
- ret = ff_h264_decode_ref_pic_list_reordering(h, sl);
- ret = ff_h264_decode_ref_pic_list_reordering(sl, avctx);
++ ret = ff_h264_decode_ref_pic_list_reordering(sl, h->avctx);
if (ret < 0) {
sl->ref_count[1] = sl->ref_count[0] = 0;
return ret;
@@@ -1655,8 -1477,8 +1655,8 @@@
sl->explicit_ref_marking = 0;
if (nal->ref_idc) {
- ret = ff_h264_decode_ref_pic_marking(h, sl, &sl->gb);
- ret = ff_h264_decode_ref_pic_marking(sl, &sl->gb, nal, avctx);
- if (ret < 0 && (avctx->err_recognition & AV_EF_EXPLODE))
++ ret = ff_h264_decode_ref_pic_marking(sl, &sl->gb, nal, h->avctx);
+ if (ret < 0 && (h->avctx->err_recognition & AV_EF_EXPLODE))
return AVERROR_INVALIDDATA;
}
diff --cc libavcodec/h264dec.h
index 7634261,e422871..9483efb
--- a/libavcodec/h264dec.h
+++ b/libavcodec/h264dec.h
@@@ -574,8 -528,8 +574,8 @@@ int ff_h264_get_slice_type(const H264Sl
*/
int ff_h264_alloc_tables(H264Context *h);
- int ff_h264_decode_ref_pic_list_reordering(const H264Context *h, H264SliceContext *sl);
+ int ff_h264_decode_ref_pic_list_reordering(H264SliceContext *sl, void *logctx);
-int ff_h264_build_ref_list(const H264Context *h, H264SliceContext *sl);
+int ff_h264_build_ref_list(H264Context *h, H264SliceContext *sl);
void ff_h264_remove_all_refs(H264Context *h);
/**
More information about the ffmpeg-cvslog
mailing list