Hello,
This is the second iteration of the h264 cleanup in which we get rid of
mpegvideo.h, Picture and some more spaghetti code.
The first part makes ff_draw_horiz_band() more generic so that svq3
can call it without having to know about Picture, and it is later moved
into the utils.c file. A similar cleanup is also done in
ff_h264_draw_horiz_band().
Then I proceed with moving various fields from Picture to ERPicture and
H264Picture, move defines around and finally do a proper cleanup, like in
the previous iteration; if you have more commit log changes feel free to
suggest them.
Now this set would not be complete without fixing the use of sizeof(AVFrame)
in H264Picture, however I have encountered several showstoppers that were
hidden from the use of structs instead of pointers.
I am working on my branch together with Janne and Luca and we found
something very shady going on in h264_refs.c and especially in
COPY_PICTURE macro. Anyone willing to spend some time on this is more than
welcome and can try the latest changes from my tree:
https://github.com/kodabb/libav/commits/h264free
Cheers,
Vittorio
Vittorio Giovara (12):
mpegvideo: directly use frames in ff_draw_horiz_band()
h264: directly use frames in ff_h264_draw_horiz_band()
er: move relevant fields from Picture to ERPicture
h264: move relevant fields from Picture to H264Picture
h264: Replace mpegvideo-specific MAX_PICTURE_COUNT by private define
h264: Replace mpegvideo-specific MAX_THREADS by private define
h264: Remove MotionEstContext and move the relevant fields in
H264Context
mpegvideo: move PICT_* macros into picttype.h
mpegvideo: move MB_TYPE_* and IS_* macros to mbtype.h
mpegvideo: move ff_draw_horiz_band() in utils.c
mpegvideo: remove h264-only fields
h264 does not depend on mpegvideo any more
libavcodec/dxva2_h264.c | 11 ++-
libavcodec/dxva2_mpeg2.c | 1 +
libavcodec/dxva2_vc1.c | 1 +
libavcodec/error_resilience.c | 209 +++++++++++++++++++++---------------------
libavcodec/error_resilience.h | 21 ++++-
libavcodec/h261dec.c | 1 +
libavcodec/h261enc.c | 1 +
libavcodec/h263.c | 1 +
libavcodec/h264.c | 126 ++++++++++++++-----------
libavcodec/h264.h | 73 ++++++++++++---
libavcodec/h264_cavlc.c | 1 -
libavcodec/h264_direct.c | 9 +-
libavcodec/h264_loopfilter.c | 1 -
libavcodec/h264_mb_template.c | 12 +--
libavcodec/h264_ps.c | 2 +-
libavcodec/h264_refs.c | 52 +++++------
libavcodec/h264data.h | 1 -
libavcodec/internal.h | 7 ++
libavcodec/ituh263dec.c | 1 +
libavcodec/mbtype.h | 75 +++++++++++++++
libavcodec/motion_est.c | 1 +
libavcodec/mpeg12dec.c | 2 +
libavcodec/mpeg4video.c | 1 +
libavcodec/mpeg4videodec.c | 1 +
libavcodec/mpegvideo.c | 83 ++++++-----------
libavcodec/mpegvideo.h | 82 +----------------
libavcodec/mpegvideo_enc.c | 1 +
libavcodec/mpegvideo_motion.c | 2 +
libavcodec/mpegvideo_xvmc.c | 1 +
libavcodec/msmpeg4dec.c | 1 +
libavcodec/picttype.h | 35 +++++++
libavcodec/rv30.c | 1 +
libavcodec/rv34.c | 1 +
libavcodec/rv40.c | 1 +
libavcodec/svq1enc.c | 1 +
libavcodec/svq3.c | 19 ++--
libavcodec/utils.c | 53 +++++++++++
libavcodec/vaapi_h264.c | 11 ++-
libavcodec/vaapi_mpeg2.c | 1 +
libavcodec/vc1dec.c | 1 +
libavcodec/vdpau_h264.c | 13 +--
libavcodec/wmv2dec.c | 1 +
42 files changed, 548 insertions(+), 371 deletions(-)
create mode 100644 libavcodec/mbtype.h
create mode 100644 libavcodec/picttype.h
--
1.8.3.4 (Apple Git-47)
_______________________________________________
libav-devel mailing list
[email protected]
https://lists.libav.org/mailman/listinfo/libav-devel