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
d724fe66
Commit
d724fe66
authored
Mar 18, 2012
by
Diego Biurrun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dv: Split off DV video decoder into its own file.
parent
9f43fdda
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
48 additions
and
2 deletions
+48
-2
Makefile
libavcodec/Makefile
+1
-1
dv.c
libavcodec/dv.c
+0
-0
dv_tablegen.h
libavcodec/dv_tablegen.h
+3
-1
dvdata.h
libavcodec/dvdata.h
+44
-0
dvdec.c
libavcodec/dvdec.c
+0
-0
No files found.
libavcodec/Makefile
View file @
d724fe66
...
...
@@ -126,7 +126,7 @@ OBJS-$(CONFIG_DVBSUB_DECODER) += dvbsubdec.o
OBJS-$(CONFIG_DVBSUB_ENCODER)
+=
dvbsub.o
OBJS-$(CONFIG_DVDSUB_DECODER)
+=
dvdsubdec.o
OBJS-$(CONFIG_DVDSUB_ENCODER)
+=
dvdsubenc.o
OBJS-$(CONFIG_DVVIDEO_DECODER)
+=
dv.o
dvdata.o
OBJS-$(CONFIG_DVVIDEO_DECODER)
+=
dv
dec.o
dv
.o
dvdata.o
OBJS-$(CONFIG_DVVIDEO_ENCODER)
+=
dv.o
dvdata.o
OBJS-$(CONFIG_DXA_DECODER)
+=
dxa.o
OBJS-$(CONFIG_DXTORY_DECODER)
+=
dxtory.o
...
...
libavcodec/dv.c
View file @
d724fe66
This diff is collapsed.
Click to expand it.
libavcodec/dv_tablegen.h
View file @
d724fe66
...
...
@@ -24,6 +24,8 @@
#define AVCODEC_DV_TABLEGEN_H
#include <stdint.h>
#include "libavutil/attributes.h"
#include "dv_vlc_data.h"
#if CONFIG_SMALL
...
...
@@ -46,7 +48,7 @@ typedef struct dv_vlc_pair {
#else
static
struct
dv_vlc_pair
dv_vlc_map
[
DV_VLC_MAP_RUN_SIZE
][
DV_VLC_MAP_LEV_SIZE
];
static
void
dv_vlc_map_tableinit
(
void
)
static
void
av_unused
dv_vlc_map_tableinit
(
void
)
{
int
i
,
j
;
for
(
i
=
0
;
i
<
NB_DV_VLC
-
1
;
i
++
)
{
...
...
libavcodec/dvdata.h
View file @
d724fe66
...
...
@@ -29,6 +29,8 @@
#include "libavutil/rational.h"
#include "avcodec.h"
#include "dsputil.h"
#include "get_bits.h"
typedef
struct
DVwork_chunk
{
uint16_t
buf_offset
;
...
...
@@ -65,6 +67,20 @@ typedef struct DVprofile {
const
uint8_t
(
*
audio_shuffle
)[
9
];
/* PCM shuffling table */
}
DVprofile
;
typedef
struct
DVVideoContext
{
const
DVprofile
*
sys
;
AVFrame
picture
;
AVCodecContext
*
avctx
;
uint8_t
*
buf
;
uint8_t
dv_zigzag
[
2
][
64
];
void
(
*
get_pixels
)(
DCTELEM
*
block
,
const
uint8_t
*
pixels
,
int
line_size
);
void
(
*
fdct
[
2
])(
DCTELEM
*
block
);
void
(
*
idct_put
[
2
])(
uint8_t
*
dest
,
int
line_size
,
DCTELEM
*
block
);
me_cmp_func
ildct_cmp
;
}
DVVideoContext
;
enum
dv_section_type
{
dv_sect_header
=
0x1f
,
dv_sect_subcode
=
0x3f
,
...
...
@@ -106,8 +122,36 @@ enum dv_pack_type {
*/
#define DV_MAX_BPM 8
#define TEX_VLC_BITS 9
extern
RL_VLC_ELEM
ff_dv_rl_vlc
[
1184
];
const
DVprofile
*
avpriv_dv_frame_profile
(
const
DVprofile
*
sys
,
const
uint8_t
*
frame
,
unsigned
buf_size
);
const
DVprofile
*
avpriv_dv_codec_profile
(
AVCodecContext
*
codec
);
int
ff_dv_init_dynamic_tables
(
const
DVprofile
*
d
);
int
ff_dvvideo_init
(
AVCodecContext
*
avctx
);
static
inline
int
dv_work_pool_size
(
const
DVprofile
*
d
)
{
int
size
=
d
->
n_difchan
*
d
->
difseg_size
*
27
;
if
(
DV_PROFILE_IS_1080i50
(
d
))
size
-=
3
*
27
;
if
(
DV_PROFILE_IS_720p50
(
d
))
size
-=
4
*
27
;
return
size
;
}
static
inline
void
dv_calculate_mb_xy
(
DVVideoContext
*
s
,
DVwork_chunk
*
work_chunk
,
int
m
,
int
*
mb_x
,
int
*
mb_y
)
{
*
mb_x
=
work_chunk
->
mb_coordinates
[
m
]
&
0xff
;
*
mb_y
=
work_chunk
->
mb_coordinates
[
m
]
>>
8
;
/* We work with 720p frames split in half. The odd half-frame (chan==2,3) is displaced :-( */
if
(
s
->
sys
->
height
==
720
&&
!
(
s
->
buf
[
1
]
&
0x0C
))
{
*
mb_y
-=
(
*
mb_y
>
17
)
?
18
:-
72
;
/* shifting the Y coordinate down by 72/2 macro blocks */
}
}
#endif
/* AVCODEC_DVDATA_H */
libavcodec/dvdec.c
0 → 100644
View file @
d724fe66
This diff is collapsed.
Click to expand it.
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