Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
FFmpeg
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
libremedia
Tethys
FFmpeg
Commits
530d5740
Commit
530d5740
authored
21 years ago
by
Ivan Kalvachev
Browse files
Options
Downloads
Patches
Plain Diff
use get_format
Originally committed as revision 2802 to
svn://svn.ffmpeg.org/ffmpeg/trunk
parent
5e7c25f0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
libavcodec/mpeg12.c
+19
-4
19 additions, 4 deletions
libavcodec/mpeg12.c
with
19 additions
and
4 deletions
libavcodec/mpeg12.c
+
19
−
4
View file @
530d5740
...
...
@@ -80,6 +80,13 @@ extern void XVMC_pack_pblocks(MpegEncContext *s,int cbp);
extern
void
XVMC_init_block
(
MpegEncContext
*
s
);
//set s->block
#endif
const
enum
PixelFormat
pixfmt_yuv_420
[]
=
{
PIX_FMT_YUV420P
,
-
1
};
const
enum
PixelFormat
pixfmt_yuv_422
[]
=
{
PIX_FMT_YUV422P
,
-
1
};
const
enum
PixelFormat
pixfmt_yuv_444
[]
=
{
PIX_FMT_YUV444P
,
-
1
};
const
enum
PixelFormat
pixfmt_xvmc_mpg2_420
[]
=
{
PIX_FMT_XVMC_MPEG2_IDCT
,
PIX_FMT_XVMC_MPEG2_MC
,
-
1
};
#ifdef CONFIG_ENCODERS
static
uint8_t
(
*
mv_penalty
)[
MAX_MV
*
2
+
1
]
=
NULL
;
static
uint8_t
fcode_tab
[
MAX_MV
*
2
+
1
];
...
...
@@ -2354,8 +2361,12 @@ static int mpeg1_decode_sequence(AVCodecContext *avctx,
);
avctx
->
bit_rate
=
s
->
bit_rate
;
//get_format() or set_video(width,height,aspect,pix_fmt);
//until then pix_fmt may be changed right after codec init
if
(
avctx
->
xvmc_acceleration
){
avctx
->
pix_fmt
=
avctx
->
get_format
(
avctx
,
pixfmt_xvmc_mpg2_420
);
}
else
{
avctx
->
pix_fmt
=
avctx
->
get_format
(
avctx
,
pixfmt_yuv_420
);
}
if
(
avctx
->
pix_fmt
==
PIX_FMT_XVMC_MPEG2_IDCT
)
if
(
avctx
->
idct_algo
==
FF_IDCT_AUTO
)
avctx
->
idct_algo
=
FF_IDCT_SIMPLE
;
...
...
@@ -2458,8 +2469,12 @@ static int vcr2_init_sequence(AVCodecContext *avctx)
avctx
->
has_b_frames
=
0
;
//true?
s
->
low_delay
=
1
;
//get_format() or set_video(width,height,aspect,pix_fmt);
//until then pix_fmt may be changed right after codec init
if
(
avctx
->
xvmc_acceleration
){
avctx
->
pix_fmt
=
avctx
->
get_format
(
avctx
,
pixfmt_xvmc_mpg2_420
);
}
else
{
avctx
->
pix_fmt
=
avctx
->
get_format
(
avctx
,
pixfmt_yuv_420
);
}
if
(
avctx
->
pix_fmt
==
PIX_FMT_XVMC_MPEG2_IDCT
)
if
(
avctx
->
idct_algo
==
FF_IDCT_AUTO
)
avctx
->
idct_algo
=
FF_IDCT_SIMPLE
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment