Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
F
ffmpeg
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ffmpeg
Commits
7b9ef8d7
Commit
7b9ef8d7
authored
Jun 20, 2014
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
mpeg: Split error resilience bits off into a separate file
parent
f2f2e762
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
106 additions
and
54 deletions
+106
-54
configure
configure
+13
-11
Makefile
libavcodec/Makefile
+1
-0
h261dec.c
libavcodec/h261dec.c
+1
-0
h263dec.c
libavcodec/h263dec.c
+1
-0
mpeg12dec.c
libavcodec/mpeg12dec.c
+1
-0
mpeg_er.c
libavcodec/mpeg_er.c
+59
-0
mpeg_er.h
libavcodec/mpeg_er.h
+26
-0
mpegvideo.c
libavcodec/mpegvideo.c
+0
-40
mpegvideo.h
libavcodec/mpegvideo.h
+0
-3
mss2.c
libavcodec/mss2.c
+1
-0
rv10.c
libavcodec/rv10.c
+1
-0
rv34.c
libavcodec/rv34.c
+1
-0
vc1dec.c
libavcodec/vc1dec.c
+1
-0
No files found.
configure
View file @
7b9ef8d7
...
...
@@ -1548,6 +1548,7 @@ CONFIG_EXTRA="
intrax8
lgplv3
lpc
mpeg_er
mpegaudio
mpegaudiodsp
mpegvideo
...
...
@@ -1705,6 +1706,7 @@ error_resilience_select="dsputil"
intrax8_select
=
"error_resilience"
mdct_select
=
"fft"
rdft_select
=
"fft"
mpeg_er_select
=
"error_resilience"
mpegaudio_select
=
"mpegaudiodsp"
mpegaudiodsp_select
=
"dct"
mpegvideo_select
=
"blockdsp dsputil hpeldsp videodsp"
...
...
@@ -1768,9 +1770,9 @@ fourxm_decoder_select="blockdsp dsputil"
fraps_decoder_select
=
"dsputil huffman"
g2m_decoder_deps
=
"zlib"
g2m_decoder_select
=
"blockdsp dsputil"
h261_decoder_select
=
"
error_resilience
mpegvideo"
h261_decoder_select
=
"
mpeg_er
mpegvideo"
h261_encoder_select
=
"aandcttables mpegvideoenc"
h263_decoder_select
=
"error_resilience h263_parser h263dsp mpegvideo qpeldsp"
h263_decoder_select
=
"error_resilience h263_parser h263dsp mpeg
_er mpeg
video qpeldsp"
h263_encoder_select
=
"aandcttables h263dsp mpegvideoenc"
h263i_decoder_select
=
"h263_decoder"
h263p_encoder_select
=
"h263_encoder"
...
...
@@ -1811,9 +1813,9 @@ mpc7_decoder_select="dsputil mpegaudiodsp"
mpc8_decoder_select
=
"mpegaudiodsp"
mpeg_xvmc_decoder_deps
=
"X11_extensions_XvMClib_h"
mpeg_xvmc_decoder_select
=
"mpeg2video_decoder"
mpeg1video_decoder_select
=
"error_resilience mpegvideo"
mpeg1video_decoder_select
=
"error_resilience mpeg
_er mpeg
video"
mpeg1video_encoder_select
=
"aandcttables mpegvideoenc"
mpeg2video_decoder_select
=
"error_resilience mpegvideo"
mpeg2video_decoder_select
=
"error_resilience mpeg
_er mpeg
video"
mpeg2video_encoder_select
=
"aandcttables mpegvideoenc"
mpeg4_decoder_select
=
"h263_decoder mpeg4video_parser"
mpeg4_encoder_select
=
"h263_encoder"
...
...
@@ -1822,7 +1824,7 @@ msmpeg4v2_decoder_select="h263_decoder"
msmpeg4v2_encoder_select
=
"h263_encoder"
msmpeg4v3_decoder_select
=
"h263_decoder"
msmpeg4v3_encoder_select
=
"h263_encoder"
mss2_decoder_select
=
"error_resilience qpeldsp vc1_decoder"
mss2_decoder_select
=
"error_resilience
mpeg_er
qpeldsp vc1_decoder"
mxpeg_decoder_select
=
"mjpeg_decoder"
nellymoser_decoder_select
=
"mdct sinewin"
nellymoser_encoder_select
=
"audio_frame_queue mdct sinewin"
...
...
@@ -1838,12 +1840,12 @@ qcelp_decoder_select="lsp"
qdm2_decoder_select
=
"mdct rdft mpegaudiodsp"
ra_144_encoder_select
=
"audio_frame_queue lpc"
ralf_decoder_select
=
"golomb"
rv10_decoder_select
=
"error_resilience h263_decoder h263dsp"
rv10_decoder_select
=
"error_resilience h263_decoder h263dsp
mpeg_er
"
rv10_encoder_select
=
"h263_encoder"
rv20_decoder_select
=
"error_resilience h263_decoder h263dsp"
rv20_decoder_select
=
"error_resilience h263_decoder h263dsp
mpeg_er
"
rv20_encoder_select
=
"h263_encoder"
rv30_decoder_select
=
"error_resilience golomb h264chroma h264pred h264qpel mpegvideo videodsp"
rv40_decoder_select
=
"error_resilience golomb h264chroma h264pred h264qpel mpegvideo videodsp"
rv30_decoder_select
=
"error_resilience golomb h264chroma h264pred h264qpel mpeg
_er mpeg
video videodsp"
rv40_decoder_select
=
"error_resilience golomb h264chroma h264pred h264qpel mpeg
_er mpeg
video videodsp"
shorten_decoder_select
=
"golomb"
sipr_decoder_select
=
"lsp"
sp5x_decoder_select
=
"mjpeg_decoder"
...
...
@@ -1864,7 +1866,7 @@ twinvq_decoder_select="mdct lsp sinewin"
utvideo_decoder_select
=
"dsputil"
utvideo_encoder_select
=
"dsputil huffman huffyuvencdsp"
vble_decoder_select
=
"huffyuvdsp"
vc1_decoder_select
=
"blockdsp error_resilience h263_decoder h264chroma h264qpel intrax8 qpeldsp"
vc1_decoder_select
=
"blockdsp error_resilience h263_decoder h264chroma h264qpel intrax8
mpeg_er
qpeldsp"
vc1image_decoder_select
=
"vc1_decoder"
vorbis_decoder_select
=
"mdct"
vorbis_encoder_select
=
"mdct"
...
...
@@ -1941,7 +1943,7 @@ wmv3_vdpau_hwaccel_select="vc1_vdpau_hwaccel"
# parsers
h264_parser_select
=
"h264_decoder"
mpegvideo_parser_select
=
"mpegvideo"
mpeg4video_parser_select
=
"error_resilience h263dsp mpegvideo qpeldsp"
mpeg4video_parser_select
=
"error_resilience h263dsp mpeg
_er mpeg
video qpeldsp"
vc1_parser_select
=
"mpegvideo"
# external libraries
...
...
libavcodec/Makefile
View file @
7b9ef8d7
...
...
@@ -55,6 +55,7 @@ OBJS-$(CONFIG_LIBXVID) += libxvid_rc.o
OBJS-$(CONFIG_LPC)
+=
lpc.o
OBJS-$(CONFIG_LSP)
+=
lsp.o
OBJS-$(CONFIG_MDCT)
+=
mdct_fixed.o
mdct_float.o
OBJS-$(CONFIG_MPEG_ER)
+=
mpeg_er.o
OBJS-$(CONFIG_MPEGAUDIO)
+=
mpegaudio.o
mpegaudiodata.o
\
mpegaudiodecheader.o
OBJS-$(CONFIG_MPEGAUDIODSP)
+=
mpegaudiodsp.o
\
...
...
libavcodec/h261dec.c
View file @
7b9ef8d7
...
...
@@ -26,6 +26,7 @@
*/
#include "avcodec.h"
#include "mpeg_er.h"
#include "mpegutils.h"
#include "mpegvideo.h"
#include "h263.h"
...
...
libavcodec/h263dec.c
View file @
7b9ef8d7
...
...
@@ -32,6 +32,7 @@
#include "h263.h"
#include "h263_parser.h"
#include "internal.h"
#include "mpeg_er.h"
#include "mpeg4video.h"
#include "mpeg4video_parser.h"
#include "mpegvideo.h"
...
...
libavcodec/mpeg12dec.c
View file @
7b9ef8d7
...
...
@@ -36,6 +36,7 @@
#include "dsputil.h"
#include "error_resilience.h"
#include "internal.h"
#include "mpeg_er.h"
#include "mpeg12.h"
#include "mpeg12data.h"
#include "mpegutils.h"
...
...
libavcodec/mpeg_er.c
0 → 100644
View file @
7b9ef8d7
/*
* This file is part of Libav.
*
* Libav is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* Libav is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#include "error_resilience.h"
#include "mpegvideo.h"
#include "mpeg_er.h"
static
void
set_erpic
(
ERPicture
*
dst
,
Picture
*
src
)
{
int
i
;
if
(
!
src
)
{
dst
->
f
=
NULL
;
dst
->
tf
=
NULL
;
return
;
}
dst
->
f
=
src
->
f
;
dst
->
tf
=
&
src
->
tf
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
dst
->
motion_val
[
i
]
=
src
->
motion_val
[
i
];
dst
->
ref_index
[
i
]
=
src
->
ref_index
[
i
];
}
dst
->
mb_type
=
src
->
mb_type
;
dst
->
field_picture
=
src
->
field_picture
;
}
void
ff_mpeg_er_frame_start
(
MpegEncContext
*
s
)
{
ERContext
*
er
=
&
s
->
er
;
set_erpic
(
&
er
->
cur_pic
,
s
->
current_picture_ptr
);
set_erpic
(
&
er
->
next_pic
,
s
->
next_picture_ptr
);
set_erpic
(
&
er
->
last_pic
,
s
->
last_picture_ptr
);
er
->
pp_time
=
s
->
pp_time
;
er
->
pb_time
=
s
->
pb_time
;
er
->
quarter_sample
=
s
->
quarter_sample
;
er
->
partitioned_frame
=
s
->
partitioned_frame
;
ff_er_frame_start
(
er
);
}
libavcodec/mpeg_er.h
0 → 100644
View file @
7b9ef8d7
/*
* This file is part of Libav.
*
* Libav is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2.1 of the License, or (at your option) any later version.
*
* Libav is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with Libav; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
#ifndef AVCODEC_MPEG_ER_H
#define AVCODEC_MPEG_ER_H
#include "mpegvideo.h"
void
ff_mpeg_er_frame_start
(
MpegEncContext
*
s
);
#endif
/* AVCODEC_MPEG_ER_H */
libavcodec/mpegvideo.c
View file @
7b9ef8d7
...
...
@@ -2466,43 +2466,3 @@ void ff_MPV_report_decode_progress(MpegEncContext *s)
if
(
s
->
pict_type
!=
AV_PICTURE_TYPE_B
&&
!
s
->
partitioned_frame
&&
!
s
->
er
.
error_occurred
)
ff_thread_report_progress
(
&
s
->
current_picture_ptr
->
tf
,
s
->
mb_y
,
0
);
}
#if CONFIG_ERROR_RESILIENCE
static
void
set_erpic
(
ERPicture
*
dst
,
Picture
*
src
)
{
int
i
;
if
(
!
src
)
{
dst
->
f
=
NULL
;
dst
->
tf
=
NULL
;
return
;
}
dst
->
f
=
src
->
f
;
dst
->
tf
=
&
src
->
tf
;
for
(
i
=
0
;
i
<
2
;
i
++
)
{
dst
->
motion_val
[
i
]
=
src
->
motion_val
[
i
];
dst
->
ref_index
[
i
]
=
src
->
ref_index
[
i
];
}
dst
->
mb_type
=
src
->
mb_type
;
dst
->
field_picture
=
src
->
field_picture
;
}
void
ff_mpeg_er_frame_start
(
MpegEncContext
*
s
)
{
ERContext
*
er
=
&
s
->
er
;
set_erpic
(
&
er
->
cur_pic
,
s
->
current_picture_ptr
);
set_erpic
(
&
er
->
next_pic
,
s
->
next_picture_ptr
);
set_erpic
(
&
er
->
last_pic
,
s
->
last_picture_ptr
);
er
->
pp_time
=
s
->
pp_time
;
er
->
pb_time
=
s
->
pb_time
;
er
->
quarter_sample
=
s
->
quarter_sample
;
er
->
partitioned_frame
=
s
->
partitioned_frame
;
ff_er_frame_start
(
er
);
}
#endif
/* CONFIG_ERROR_RESILIENCE */
libavcodec/mpegvideo.h
View file @
7b9ef8d7
...
...
@@ -723,9 +723,6 @@ void ff_MPV_report_decode_progress(MpegEncContext *s);
int
ff_mpeg_update_thread_context
(
AVCodecContext
*
dst
,
const
AVCodecContext
*
src
);
void
ff_set_qscale
(
MpegEncContext
*
s
,
int
qscale
);
/* Error resilience */
void
ff_mpeg_er_frame_start
(
MpegEncContext
*
s
);
int
ff_dct_common_init
(
MpegEncContext
*
s
);
void
ff_convert_matrix
(
DSPContext
*
dsp
,
int
(
*
qmat
)[
64
],
uint16_t
(
*
qmat16
)[
2
][
64
],
const
uint16_t
*
quant_matrix
,
int
bias
,
int
qmin
,
int
qmax
,
int
intra
);
...
...
libavcodec/mss2.c
View file @
7b9ef8d7
...
...
@@ -26,6 +26,7 @@
#include "libavutil/avassert.h"
#include "error_resilience.h"
#include "internal.h"
#include "mpeg_er.h"
#include "msmpeg4data.h"
#include "qpeldsp.h"
#include "vc1.h"
...
...
libavcodec/rv10.c
View file @
7b9ef8d7
...
...
@@ -33,6 +33,7 @@
#include "error_resilience.h"
#include "h263.h"
#include "internal.h"
#include "mpeg_er.h"
#include "mpegvideo.h"
#include "mpeg4video.h"
...
...
libavcodec/rv34.c
View file @
7b9ef8d7
...
...
@@ -33,6 +33,7 @@
#include "golomb.h"
#include "internal.h"
#include "mathops.h"
#include "mpeg_er.h"
#include "qpeldsp.h"
#include "rectangle.h"
#include "thread.h"
...
...
libavcodec/vc1dec.c
View file @
7b9ef8d7
...
...
@@ -29,6 +29,7 @@
#include "internal.h"
#include "avcodec.h"
#include "error_resilience.h"
#include "mpeg_er.h"
#include "mpegutils.h"
#include "mpegvideo.h"
#include "h263.h"
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment