Revision ce5e49b0 libavcodec/svq1enc.c
libavcodec/svq1enc.c | ||
---|---|---|
86 | 86 |
/* frame type */ |
87 | 87 |
put_bits(&s->pb, 2, frame_type - 1); |
88 | 88 |
|
89 |
if (frame_type == FF_I_TYPE) {
|
|
89 |
if (frame_type == AV_PICTURE_TYPE_I) {
|
|
90 | 90 |
|
91 | 91 |
/* no checksum since frame code is 0x20 */ |
92 | 92 |
|
... | ... | |
280 | 280 |
block_width = (width + 15) / 16; |
281 | 281 |
block_height = (height + 15) / 16; |
282 | 282 |
|
283 |
if(s->picture.pict_type == FF_P_TYPE){
|
|
283 |
if(s->picture.pict_type == AV_PICTURE_TYPE_P){
|
|
284 | 284 |
s->m.avctx= s->avctx; |
285 | 285 |
s->m.current_picture_ptr= &s->m.current_picture; |
286 | 286 |
s->m.last_picture_ptr = &s->m.last_picture; |
... | ... | |
382 | 382 |
ff_init_block_index(&s->m); |
383 | 383 |
ff_update_block_index(&s->m); |
384 | 384 |
|
385 |
if(s->picture.pict_type == FF_I_TYPE || (s->m.mb_type[x + y*s->m.mb_stride]&CANDIDATE_MB_TYPE_INTRA)){
|
|
385 |
if(s->picture.pict_type == AV_PICTURE_TYPE_I || (s->m.mb_type[x + y*s->m.mb_stride]&CANDIDATE_MB_TYPE_INTRA)){
|
|
386 | 386 |
for(i=0; i<6; i++){ |
387 | 387 |
init_put_bits(&s->reorder_pb[i], reorder_buffer[0][i], 7*32); |
388 | 388 |
} |
389 |
if(s->picture.pict_type == FF_P_TYPE){
|
|
389 |
if(s->picture.pict_type == AV_PICTURE_TYPE_P){
|
|
390 | 390 |
const uint8_t *vlc= ff_svq1_block_type_vlc[SVQ1_BLOCK_INTRA]; |
391 | 391 |
put_bits(&s->reorder_pb[5], vlc[1], vlc[0]); |
392 | 392 |
score[0]= vlc[1]*lambda; |
... | ... | |
401 | 401 |
|
402 | 402 |
best=0; |
403 | 403 |
|
404 |
if(s->picture.pict_type == FF_P_TYPE){
|
|
404 |
if(s->picture.pict_type == AV_PICTURE_TYPE_P){
|
|
405 | 405 |
const uint8_t *vlc= ff_svq1_block_type_vlc[SVQ1_BLOCK_INTER]; |
406 | 406 |
int mx, my, pred_x, pred_y, dxy; |
407 | 407 |
int16_t *motion_ptr; |
... | ... | |
528 | 528 |
init_put_bits(&s->pb, buf, buf_size); |
529 | 529 |
|
530 | 530 |
*p = *pict; |
531 |
p->pict_type = avctx->gop_size && avctx->frame_number % avctx->gop_size ? FF_P_TYPE : FF_I_TYPE;
|
|
532 |
p->key_frame = p->pict_type == FF_I_TYPE;
|
|
531 |
p->pict_type = avctx->gop_size && avctx->frame_number % avctx->gop_size ? AV_PICTURE_TYPE_P : AV_PICTURE_TYPE_I;
|
|
532 |
p->key_frame = p->pict_type == AV_PICTURE_TYPE_I;
|
|
533 | 533 |
|
534 | 534 |
svq1_write_header(s, p->pict_type); |
535 | 535 |
for(i=0; i<3; i++){ |
Also available in: Unified diff